#include <dialogop.h>
Inheritance diagram for DialogOp:

Public Member Functions | |
| DialogOp (CDlgResID DialogResID, CDlgMode Mode, CDlgResID SubDialogID=0, CCRuntimeClass *Class=CC_RUNTIME_CLASS(DialogOp), INT32 OpeningPage=-1, CWindowID ParentWnd=NULL) | |
| The Constructor of the DialogOp class simply sets the resource ID of the dialog and its modality. | |
| virtual BOOL | IsABar () |
| virtual BOOL | IsAGallery () |
| virtual BOOL | IsVertical () |
| virtual BOOL | Create () |
| The create method reserves everything needed to guarantee that the dialog will appear. It returns FALSE if it fails. If any dialog merging was specified (by providing a non-zero value for SubDialogID in the call to the DialogOp constructor) then it will be carried out when this function is called. | |
| void | Open () |
| The open dialog method displays the dialog box. If Create was successful then this function cannot fail. | |
| void | Close () |
| The close method removes the dialog from the display but keeps all system resources associated with it. It hides the dialog. | |
| BOOL | IsOpen () |
| Don't use this function any more. It's ambiguous and marked for destruction. Call IsWindowVisible or HasWindow instead. This has been a public service announcement !!!! (Simon). | |
| BOOL | IsWindowVisible () |
| Find out if a dialog is shown or hidden. | |
| BOOL | IsCustomComboDropdownVisible (CGadgetID Gadget) |
| Used to determin whether the custom controls dropdown is visible. | |
| BOOL | CloseDropdown (CGadgetID Gadget, BOOL CloseVal) |
| Used to close the controls dropdown. This routine was written because of the amount of trouble that I was experiencing with my custom controls down to escape key processing (which is viewed as a hotkey within camelot). | |
| BOOL | HasWindow () |
| To find out if DialogOp has a window associated with it. | |
| BOOL | BringToTop () |
| This function brings an open dialog to the top of the z-order. | |
| BOOL | IsGadgetTickable (CGadgetID Gadget) |
| To determine if Gadget is of a particular type that can be ticked. eg. if the gadget is a button. | |
| BOOL | ColourPickerAbort (CGadgetID Gadget, WPARAM wParam=0) |
| Used to abort the dragging of the custom colour picker control from within the colour editor. | |
| ~DialogOp () | |
| The DialogOp destructor destroys the instance of the DialogOp and all associated resources. If the dialog was open then it is closed. | |
| RenderRegion * | CreateGRenderRegion (DocRect *pRequiredSize, ReDrawInfoType *ExtraInfo, BOOL UseSelViewColContext=FALSE) |
| Simplifies the creation of a render region as used in a dialog box. It will create a render region, scaled to the correct size etc and deal with all the Creation, initialisation etc of the region. StartRender is also called, so if this function does not return NULL you are able to start drawing into it. You MUST call DestroyGRenderRegion when you have draw everything that you need to as this calls StopRender (which does the blit to the screen) as well as deleting the render region for you. | |
| BOOL | DestroyGRenderRegion (RenderRegion *pRender) |
| Deinitialises the render region and deletes it. | |
| RenderRegion * | CreateOSRenderRegion (DocRect *pRequiredSize, ReDrawInfoType *ExtraInfo, BOOL UseSelViewColContext=FALSE) |
| Simplifies the creation of a render region as used in a dialog box. It will create a render region, scaled to the correct size etc and deal with all the Creation, initialisation etc of the region. StartRender is also called, so if this function does not return NULL you are able to start drawing into it. You MUST call DestroyOSRenderRegion when you have draw everything that you need to as this calls StopRender (which does the blit to the screen) as well as deleting the render region for you. | |
| BOOL | DestroyOSRenderRegion (RenderRegion *pRender) |
| Deinitialises the render region and deletes it. | |
| void | SetComboListLength (CGadgetID Gadget) |
| See DialogManager for a description of this function. | |
| BOOL | SetUnitGadgetValue (CGadgetID Gadget, UnitType Unit, MILLIPOINT value, BOOL EndOfList=TRUE, INT32 ListPos=0) |
| See DialogManager for a description of this function. | |
| BOOL | SetDimensionUnitGadgetValue (CGadgetID Gadget, UnitType units, double value, Node *pNode, BOOL IncludeUnitSpecifier=TRUE, BOOL EndOfList=FALSE, INT32 ListPos=-1) |
| See DialogManager for a description of this function. | |
| BOOL | SetLongGadgetValue (CGadgetID Gadget, INT32 value, BOOL EndOfList=TRUE, INT32 ListPos=0) |
| See DialogManager for a description of this function. | |
| BOOL | SetDoubleGadgetValue (CGadgetID Gadget, double value, BOOL EndOfList=TRUE, INT32 ListPos=0) |
| See DialogManager for a description of this function. | |
| BOOL | SetBoolGadgetSelected (CGadgetID Gadget, BOOL IsSelected, INT32 ListPos=0) |
| An interface for turning option/radio buttons and list item selection states on or off. See DialogManager::SetBoolGadgetValue for details. | |
| BOOL | SetRadioGroupSelected (CGadgetID *GroupGadgets, CGadgetID SelectedGadget) |
| Allows you to select one of a group of gadgets, while ensuring that all other gadgets are disabled. Each item in the NULL_terminated list will be deselected, except the item 'SelectedGadget', which will be selected. | |
| BOOL | SetStringGadgetValue (CGadgetID Gadget, UINT32 IDStr, BOOL EndOfList=TRUE, INT32 ListPos=0) |
| BOOL | SetStringGadgetValue (CGadgetID Gadget, const StringBase &StrVal, BOOL EndOfList=TRUE, INT32 ListPos=0) |
| See DialogManager for a description of this function. | |
| BOOL | SetCustomComboGadgetValue (CGadgetID Gadget, CustomComboBoxControlDataItem *TheItem, BOOL EndOfList=TRUE, INT32 ListPos=0) |
| See DialogManager for a description of this function. | |
| BOOL | SelectCustomComboGadgetValueOnString (CGadgetID Gadget, StringBase *StrVal) |
| See DialogManager for a description of this function. | |
| void | BuildResDropList (const CGadgetID DropListID, const BOOL bIncludeAuto=TRUE, const BOOL bVerbose=FALSE, const INT32 Default=0) |
| Builds a drop down list for a combo box. | |
| void | SetResDropListValue (const CGadgetID DropListID, const BOOL bIncludeAuto=TRUE, const INT32 iValue=0) |
| Builds a drop down list for a combo box. | |
| INT32 | GetResDropListValue (const CGadgetID DropListID, const BOOL bIncludeAuto=TRUE, BOOL *bValid=NULL) |
| Gets value from Resolution dropdown list. | |
| BOOL | SetGadgetRange (CGadgetID Gadget, INT32 Min, INT32 Max, INT32 PageInc=1) |
| See DialogManager for a description of this function. | |
| BOOL | SetSelectedValueIndex (CGadgetID Gadget, INT32 Index) |
| See DialogManager for a description of this function. | |
| BOOL | SetSelectedValueRange (CGadgetID Gadget, WORD StartIndex, WORD EndIndex, BOOL Select=TRUE) |
| See DialogManager for a description of this function. | |
| BOOL | SetDimensionGadgetValue (CGadgetID Gadget, MILLIPOINT value, Node *pNode, BOOL IncludeUnitSpecifier=TRUE, BOOL EndOfList=FALSE, INT32 ListPos=0) |
| See DialogManager for a description of this function. | |
| BOOL | SetMemoryGadgetValue (CGadgetID Gadget, UINT32 value, BOOL EndOfList=TRUE, INT32 ListPos=0) |
| See DialogManager for a description of this function. | |
| BOOL | SetGadgetHelp (CGadgetID Gadget, UINT32 BubbleID, UINT32 StatusID, UINT32 ModuleID=0) |
| See DialogManager for a description of this function. | |
| MILLIPOINT | GetUnitGadgetValue (CGadgetID Gadget, UnitType DefaultType, MILLIPOINT StartRange, MILLIPOINT EndRange, UINT32 IDSInvalidMsg=0, BOOL *Valid=NULL) |
| See DialogManager for a description of this function. | |
| INT32 | GetLongGadgetValue (CGadgetID GadgetID, INT32 StartRange, INT32 EndRange, UINT32 IDSInvalidMsg=0, BOOL *Valid=NULL, Convert::PFNSTRINGTOINT32 pfnParser=Convert::StringToLong) |
| See DialogManager for a description of this function. | |
| double | GetDoubleGadgetValue (CGadgetID GadgetID, double StartRange, double EndRange, UINT32 IDSInvalidMsg=0, BOOL *Valid=NULL, Convert::PFNSTRINGTODOUBLE pfnParser=Convert::StringToDouble) |
| See DialogManager for a description of this function. | |
| BOOL | GetDoubleAndUnitGadgetValue (double *pMPValue, double *pUnitValue, UnitType *pUnitType, CGadgetID GadgetID, Node *pNode) |
| Read the value from a gadget as a double millipont values accounting for unit scaling ALSO read the type of unit specified and the gadget value in terms of these units ie 0.5m would return 36000.0, 0.5 and METERS (assuming scaling 1m->1in). | |
| BOOL | GetBoolGadgetSelected (CGadgetID GadgetID, UINT32 IDSInvalidMsg=0, BOOL *Valid=NULL, INT32 ListPos=-1) |
| See DialogManager for a description of this function. | |
| INT32 | GetSelectedValueIndex (CGadgetID GadgetID) |
| A *SENSIBLE* interface to read which item of a combo/list box type of gadget is selected. | |
| CGadgetID | GetRadioGroupSelected (CGadgetID *GroupGadgets) |
| To determine which control in a group is selected. Returns the first control found to be selected, or if no controls were found to be selected, returns NULL. | |
| String_256 | GetStringGadgetValue (CGadgetID GadgetID, BOOL *Valid=NULL, INT32 ListPos=-1) |
| See DialogManager for a description of this function. | |
| BOOL | GetGadgetRange (CGadgetID GadgetID, INT32 *Min, INT32 *Max) |
| See DialogManager for a description of this function. | |
| MILLIPOINT | GetDimensionGadgetValue (CGadgetID Gadget, Node *pNode, BOOL *Valid=NULL, INT32 ListPos=-1) |
| See DialogManager for a description of this function. | |
| UINT32 | GetMemoryGadgetValue (CGadgetID Gadget, UINT32 StartRange, UINT32 EndRange, UINT32 IDSInvalidMsg=0, BOOL *Valid=NULL) |
| See DialogManager for a description of this function. | |
| BOOL | DeleteAllValues (CGadgetID GadgetID) |
| Deletes ALL values in list-gadgets See DialogManager for a description of this function. | |
| BOOL | DeleteValue (CGadgetID GadgetID, BOOL EndOfList=TRUE, INT32 ListPos=0) |
| See DialogManager for a description of this function. | |
| BOOL | GetValueCount (CGadgetID GadgetID, INT32 *Count) |
| See DialogManager for a description of this function. | |
| BOOL | GetValueIndex (CGadgetID GadgetID, WORD *Index) |
| See DialogManager for a description of this function. | |
| BOOL | GetValueIndex (CGadgetID GadgetID, INT32 *Index) |
| See DialogManager for a description of this function. | |
| INT32 | GetSelectedCount (CGadgetID GadgetID) |
| Returns the number of selected items in a list-type gadget. | |
| INT32 | GetFirstSelectedItem (CGadgetID GadgetID) |
| Returns the index of the first selected item in a list-type gadget. | |
| INT32 * | GetSelectedItems (CGadgetID GadgetID) |
| Returns a ptr to an INT32 array that holds the list of selected indexes. The last array entry contains -1. | |
| BOOL | EnableGadget (CGadgetID GadgetID, BOOL Enabled) |
| See DialogManager for a description of this function. | |
| BOOL | IsGadgetEnabled (CGadgetID Gadget) |
| For checking if a gadget is enabled/disabled. | |
| BOOL | HideGadget (CGadgetID GadgetID, BOOL Hide) |
| See DialogManager for a description of this function. | |
| BOOL | SetGadgetWritable (CGadgetID Gadget, BOOL enable) |
| Sets the state of the 'Read Only' flag of an edit field or combo box. | |
| BOOL | GadgetRedraw (CGadgetID GadgetID, BOOL Redraw) |
| See DialogManager for a description of this function. | |
| void | Layout (BOOL CanYield=FALSE) |
| Relayout dialog - for sizer changes. | |
| BOOL | SetKeyboardFocus (CGadgetID gadID) |
| Sets the keyboard input focus to the given control. | |
| BOOL | HighlightText (CGadgetID gadID, INT32 nStart=0, INT32 nEnd=-1) |
| Highlights the given range of text (by default all of it) within a control that holds editable text, eg. an edit field. | |
| BOOL | CaptureMouse (CGadgetID gadID) |
| Allows the given control to Capture the mouse. | |
| BOOL | ReleaseMouse (CGadgetID gadID) |
| Releases the mouse captured by the given control. | |
| void | PaintGadgetNow (CGadgetID gid) |
| Immediately paints any invalid areas the control may have (like the "UpdateWindow" function in Windows, really). | |
| void | InvalidateGadget (CGadgetID Gadget, BOOL EraseBackground=TRUE) |
| Causes the Dialog Manager to tell the host os to get the gadget to be redrawn. Calling this on a cc_DialogDraw gadget will cause you to receive a DIM_REDRAW message in the not too distant future. | |
| void | InvalidateGadget (CGadgetID Gadget, ReDrawInfoType *ExtraInfo, DocRect *InvalidRect) |
| Causes the Dialog Manager to tell the host os to get the cc_DialogDraw gadget to be redrawn, over the specfied rectangle. You should recieve a DIM_REDRAW message in the not too distant future. | |
| void | ScrollKernelRenderedGadget (CGadgetID Gadget, DocRect *RectToScroll, DocCoord *ScrollBy) |
| Causes the Dialog Manager to tell the host os to get the cc_DialogDraw gadget to be scrolled, over the specfied rectangle. You should recieve a DIM_REDRAW message in the not too distant future, to update any portions that 'scroll into view'. | |
| BOOL | GetKernelRenderedGadgetInfo (CGadgetID Gadget, ReDrawInfoType *Result) |
| Allows the user access to the same information which is passed in to DIM_REDRAW and the kernel-rendered-dialogue mouse-handling messages. This is just for convenience so they can calculate stuff at a time other than handling those two types of dialogue event (e.g. if a document message causes you to have to redraw a small portion of your gadget, you need this information to calculate the invalidation rectangle from). | |
| void | SetEditGadgetType (CGadgetID Gadget, EditGadgetType Type) |
| See DialogManager for a description of this function. | |
| void | SetEditGadgetType (CGadgetID Gadget, UINT32 IDSValidChar) |
| See DialogManager for a description of this function. | |
| CTreeItemID | SetTreeGadgetItem (CGadgetID Gadget, CTreeItemID hParent, const StringBase &str, CTreeItemID hInsAfter, INT32 iImage, CCObject *pObj=NULL) |
| CCObject * | GetTreeGadgetItemData (CGadgetID Gadget, CTreeItemID hItem) |
| BOOL | SelectTreeGadgetItem (CGadgetID Gadget, CTreeItemID hItem, BOOL bNewState=TRUE) |
| CTreeItemID | GetTreeGadgetRootItem (CGadgetID Gadget) |
| CTreeItemID | GetTreeGadgetFirstSelectedItem (CGadgetID Gadget) |
| BOOL | TreeGadgetExpandItem (CGadgetID Gadget, CTreeItemID hItem) |
| CTreeItemID | GetTreeGadgetNextVisItem (CGadgetID Gadget, CTreeItemID hItem) |
| CTreeItemID | GetTreeGadgetFirstChildItem (CGadgetID Gadget, CTreeItemID hItem) |
| size_t | GetTreeGadgetChildrenCount (CGadgetID Gadget, CTreeItemID hItem, BOOL bRecursive=FALSE) |
| void | DualFunctionButton (CGadgetID ButtonGadget) |
| See DialogManager for a description of this function. | |
| void | SetGadgetBitmaps (CGadgetID GadgetID, UINT32 Bitmap1, UINT32 Bitmap2) |
| Calls the dialog manager to set the bitmaps of the gadget (only for cc_Slider controls at the moment). | |
| void | SetGadgetBitmaps (CGadgetID GadgetID, const CGadgetImageList &imagelist) |
| Calls the dialog manager to set the bitmaps of the gadget. | |
| void | SetGadgetBitmap (CGadgetID Gadget, ResourceID Bitmap) |
| Calls the dialog manager to set the bitmaps of the gadget. | |
| ResourceID | GetGadgetBitmap (CGadgetID Gadget) |
| Calls the dialog manager to set the bitmaps of the gadget. | |
| UINT32 | GetGadgetImageCount (CGadgetID) |
| Calls the dialog manager to set the bitmaps of the gadget. | |
| void | SetBitmapButtonIndexes (CGadgetID GadgetID, UINT32 UnselectedIndex, UINT32 SelectedIndex) |
| Calls the dialog manager to set the bitmaps of the cc_bitmapbutton control. | |
| BOOL | MakeListBoxDragable (CGadgetID ListGadget) |
| See DialogManager for a description of this function. | |
| virtual MsgResult | Message (Msg *Message) |
| BOOL | SetTitlebarName (String_256 *Name) |
| Sets the titlebar text. | |
| DialogOp () | |
| BOOL | UpdateStringGadgetValue (CGadgetID Gadget, StringBase *NewString) |
| Similar to SetStringGadgetValue but compares the contents of the gadget in the dialogue before the update and dosen't bother if the new value is the same as the current one. This reduces dialogue flicker. See also: DialogOp::SetStringGadgetValue. | |
| OpDescriptor * | GetGadgetOpDescriptor (CGadgetID Gadget) |
| Finds the OpDescriptor associated with a gadget. | |
| BOOL | SendMessageToControl (OpDescriptor *OpDesc, DialogMsg *Msg, BOOL Processed=FALSE) |
| Conditionally sends a message to a particular control pointed to by an opdescriptor,. | |
| virtual void | DisallowInteractiveProfiles () |
| CWindowID | GetReadWriteWindowID () |
| For a non tabbed dialog this function simply returns the DialogOp's WindowID. For a tabbed dialog the WindowID of the dialog page specified by the last call to TalkToPage is returned. | |
| BOOL | IsModal () |
| CDlgResID | GetCurrentPageID () |
| For a non tabbed dialog this function simply returns NULL. For a tabbed dialog it returns the PageID of the dialog page specified by the last call to TalkToPage. | |
| UINT32 | SetTimer (UINT32 nIDEvent, UINT32 nElapse, void(*lpfnTimer)(void *)=NULL, void *param=NULL, BOOL OneShot=FALSE) |
| Allows the user access to setting a timer caller back or event for a dialog box. The caller can either specify a call back procedure to be called when the timer goes off or if null is specified, a DIM_TIMER message will be sent. The return value is effectively the handle onto the timer system. It must be passed to the KillTimer member function to kill the timer. A Nonzero value indicates successful allocation of the timer; non-zero implies a problem. | |
| BOOL | KillTimer (INT32 nIDEvent) |
| Allows the user access to killing a timer caller back or event that has been set up for a dialog box. Kills the timer event identified by nIDEvent from the earlier call to SetTimer. Any pending WM_TIMER messages associated with the timer are removed from the message queue. | |
| BOOL | GetWindowPosition (wxRect *pRect) |
| Allows the user to get the current window position. | |
| BOOL | GetWindowPosition (RECT *pRect) |
| BOOL | GetGadgetPosition (CGadgetID Gadget, wxRect *pRect) |
| Allows the user to get the current position of the specified icon or control. | |
| BOOL | GetGadgetPosition (CGadgetID Gadget, RECT *pRect) |
| BOOL | SetWindowPosition (const wxRect &Rect) |
| Allows the user to set the current window position. | |
| BOOL | SetWindowPosition (const RECT &Rect) |
| BOOL | SetGadgetPosition (CGadgetID Gadget, const wxRect &Rect) |
| Allows the user to set the current position of the specified icon or control. | |
| BOOL | SetGadgetPosition (CGadgetID Gadget, const RECT &Rect) |
| INT32 | GetScreenDpi () |
| Allows the user to find out the screen dpi. | |
| BOOL | GetScreenSize (INT32 *pWidth, INT32 *pHeight) |
| Allows the user to find out the screen size. | |
| BOOL | IsVisible () |
| Used by the tool bar customize system to find out if a tool bar is visible or not. | |
| virtual void | SetVisibility (BOOL Visible) |
| Used by the tool bar customize system to open and close a tool bar. | |
Static Public Member Functions | |
| static BOOL | IsADialogWindow (CWindowID WndID) |
| To find out if WndID is the window ID of a dialog. | |
| static DialogOp * | FindDialogOp (CDlgResID ResID) |
| Looks for a given DialogOp by using its ResourceID. | |
Public Attributes | |
| CWindowID | WindowID |
Protected Member Functions | |
| void | ProfileSelectionChange (DialogMsg *Message, CGadgetID GadgetID) |
| Responds to CGadgetID's corresponding profile dialog messages. Profile changes are applied (internally) through ChangeProfile (). | |
| virtual void | ChangeProfile (CProfileBiasGain *Profile, CGadgetID GadgetID) |
| Actually applies the profile to the selection. This base class function does nothing. It MUST be overidden within InformationBarOp derived classes. | |
| virtual void | ChangeProfileOnIdle (CProfileBiasGain *Profile, CGadgetID GadgetID) |
| This is a special version of the ChangeProfile () function. It is only called when the user has stopped moving the mouse whilst dragging a profile slider. In this way, camelot now possess TRUE idle slider processing. | |
| virtual BOOL | AddControlsToHelper () |
| If you want to subclass some or all of the controls on your dialog then override this function. | |
| virtual void | RemoveControlsFromHelper () |
| If you added some controls in AddControlsToHelper then you must remove them here. | |
| BOOL | AddDialogControlToHelper (CGadgetID GadgetID) |
| Calls the dialog manager add this control to the dialog control helper. | |
| BOOL | AddDialogControlToHelper (CGadgetID GadgetID, CDlgResID PageID) |
| Overridden version of above for use with tabbed dialogs, allows you to add controls that are not on the currently active page. | |
| BOOL | RemoveDialogControlFromHelper (CGadgetID GadgetID) |
| Calls the dialog manager remove this control from the dialog control helper. | |
| BOOL | RemoveDialogControlFromHelper (CGadgetID GadgetID, CDlgResID PageID) |
| Calls the dialog manager remove this control from the dialog control helper Overridden version. | |
Protected Attributes | |
| CDlgResID | DlgResID |
| CDlgResID | SubDlgID |
| CDlgMode | DlgMode |
| CWindowID | ParentDlgWnd |
| DialogEventHandler * | pEvtHandler |
| DialogManager * | DlgMgr |
| CDlgResID | ReadWritePage |
| INT32 | PageToOpen |
Private Attributes | |
| UINT32 | MagicWord |
| BOOL | m_bInteractiveProfiles |
Friends | |
| class | DialogEventHandler |
| class | DialogManager |
Definition at line 145 of file dialogop.h.
|
||||||||||||||||||||||||||||
|
The Constructor of the DialogOp class simply sets the resource ID of the dialog and its modality.
Definition at line 199 of file dialogop.cpp. 00204 : Operation(Class) 00205 { 00206 MagicWord = MAGIC_CREATE; // Save this for later 00207 00208 DlgResID = DialogResID; // Dialog's resource ID 00209 DlgMode = Mode; // Dialog's mode 00210 SubDlgID = SubDialogID; // Dialog to merge with (0 => no merging) 00211 WindowID = NULL; // We don't know this until we create the dialog 00212 DlgMgr = CCamApp::GetDlgManager(); // Store a pointer to the Dialog Manager so that 00213 // it's easy to get at 00214 00215 ReadWritePage = 0; // The page within the dialog that we are currently 00216 // reading or writing to. This is NULL for all 00217 // non tabbed dialogs. 00218 PageToOpen = OpeningPage; // for tabbed dialogs allows opening tab to be chosen 00219 00220 pEvtHandler = NULL; 00221 00222 m_bInteractiveProfiles = TRUE; 00223 00224 PORTNOTE("dialog","Removed Windows resource'ism") 00225 #ifndef EXCLUDE_FROM_XARALX 00226 // Make the main resource instance the uk.dll one, or whatever, if it exists 00227 if(MainInst == 0) 00228 MainInst = ExtraDLLs[Resources_DLL]; 00229 00230 // Set up instance handle for the main dialog 00231 if (MainInst == 0) 00232 MainDlgInst = AfxGetInstanceHandle(); 00233 else 00234 MainDlgInst = MainInst; 00235 00236 // Make the sub resource instance the uk.dll one, or whatever, if it exists 00237 if(SubDlgInst == 0) 00238 SubDlgInst = ExtraDLLs[Resources_DLL]; 00239 00240 // Set up instance handle for the main dialog 00241 if (SubInst == 0) 00242 SubDlgInst = AfxGetInstanceHandle(); 00243 else 00244 SubDlgInst = SubInst; 00245 #endif 00246 00247 // User is interacting, so shouldn't be waiting! 00248 OpFlags.HasOwnTimeIndicator = TRUE; 00249 00250 ParentDlgWnd = ParentWnd; 00251 }
|
|
|
The DialogOp destructor destroys the instance of the DialogOp and all associated resources. If the dialog was open then it is closed.
Definition at line 598 of file dialogop.cpp. 00599 { 00600 CheckMagic("DialogOp destructor"); 00601 if (WindowID != NULL) 00602 DlgMgr->Delete(WindowID, this); 00603 00604 WindowID = NULL; // ensure we get a NULL pointer if this is used again 00605 DlgMgr = NULL; // Again, ensure this is a NULL pointer 00606 pEvtHandler=NULL; 00607 00608 MagicWord = MAGIC_DESTROY; 00609 }
|
|
|
Definition at line 257 of file dialogop.cpp.
|
|
|
If you want to subclass some or all of the controls on your dialog then override this function.
Reimplemented in CBrushEditDlg. Definition at line 440 of file dialogop.cpp. 00441 { 00442 return TRUE; 00443 }
|
|
||||||||||||
|
Overridden version of above for use with tabbed dialogs, allows you to add controls that are not on the currently active page.
Definition at line 2291 of file dialogop.cpp. 02292 { 02293 // get the handle of the page first 02294 CWindowID PageWindow = DialogManager::GetPageWindow(WindowID, PageID); 02295 02296 if (PageWindow == NULL) 02297 return FALSE; 02298 02299 return DialogManager::AddDialogControlToHelper(PageWindow, GadgetID); 02300 }
|
|
|
Calls the dialog manager add this control to the dialog control helper.
Definition at line 2272 of file dialogop.cpp. 02273 { 02274 return DialogManager::AddDialogControlToHelper(GetReadWriteWindowID(), GadgetID); 02275 }
|
|
|
This function brings an open dialog to the top of the z-order.
Definition at line 416 of file dialogop.cpp. 00417 { 00418 ERROR2IF(!WindowID, FALSE, "BringToTop called on a dialog without a window"); 00419 return (DlgMgr->BringToTop(WindowID, this)); 00420 }
|
|
||||||||||||||||||||
|
Builds a drop down list for a combo box.
Definition at line 942 of file dialogop.cpp. 00947 { 00948 DeleteAllValues(DropListID); 00949 SetComboListLength(DropListID); 00950 00951 // TODO: 00952 // Get XML document from alongside exe 00953 // For each resolution 00954 // Add item to dropdown 00955 // Next 00956 if (bVerbose) 00957 { 00958 if (bIncludeAuto) 00959 SetStringGadgetValue(DropListID, _R(IDS_RES_AUTOVARIABLE), TRUE); 00960 00961 // SetStringGadgetValue(DropListID, _R(IDS_RES_72), TRUE); 00962 SetStringGadgetValue(DropListID, _R(IDS_RES_SCREEN), TRUE); 00963 SetStringGadgetValue(DropListID, _R(IDS_RES_INTERMEDIATE), TRUE); 00964 SetStringGadgetValue(DropListID, _R(IDS_RES_PRINT), TRUE); 00965 SetStringGadgetValue(DropListID, _R(IDS_RES_PRINT300), TRUE); 00966 } 00967 else 00968 { 00969 if (bIncludeAuto) 00970 SetStringGadgetValue(DropListID, _R(IDS_RES_AUTO), TRUE); 00971 00972 // SetStringGadgetValue(DropListID, _R(IDS_RES_72), TRUE); 00973 SetStringGadgetValue(DropListID, _R(IDS_RES_96), TRUE); 00974 SetStringGadgetValue(DropListID, _R(IDS_RES_150), TRUE); 00975 SetStringGadgetValue(DropListID, _R(IDS_RES_200), TRUE); 00976 SetStringGadgetValue(DropListID, _R(IDS_RES_300), TRUE); 00977 } 00978 00979 SetComboListLength(DropListID); 00980 SetSelectedValueIndex(DropListID, Default); 00981 }
|
|
|
Allows the given control to Capture the mouse.
Definition at line 1940 of file dialogop.cpp. 01941 { 01942 return DialogManager::CaptureMouse(GetReadWriteWindowID(), gadID); 01943 }
|
|
||||||||||||
|
Actually applies the profile to the selection. This base class function does nothing. It MUST be overidden within InformationBarOp derived classes.
Reimplemented in BlendInfoBarOp, ContourInfoBarOp, GradInfoBarOp, and TranspInfoBarOp. Definition at line 3787 of file dialogop.cpp.
|
|
||||||||||||
|
This is a special version of the ChangeProfile () function. It is only called when the user has stopped moving the mouse whilst dragging a profile slider. In this way, camelot now possess TRUE idle slider processing.
Take a look at tools.cpp for an example of this.
Reimplemented in BlendInfoBarOp, and ContourInfoBarOp. Definition at line 3815 of file dialogop.cpp.
|
|
|
The close method removes the dialog from the display but keeps all system resources associated with it. It hides the dialog.
Definition at line 344 of file dialogop.cpp. 00345 { 00346 CheckMagic("DialogOp:Close()"); 00347 ENSURE(WindowID != NULL, "Trying to close a window with a NULL window ID !"); 00348 00349 DlgMgr->Close(WindowID, this); 00350 00351 // remove any subclassed controls from the control helper 00352 RemoveControlsFromHelper(); 00353 00354 // we have changed the appearance of the screen so broadcast a message 00355 if (Document::GetCurrent() != NULL) // only if we have a current document 00356 BROADCAST_TO_ALL(ScreenChangeMsg()); 00357 }
|
|
||||||||||||
|
Used to close the controls dropdown. This routine was written because of the amount of trouble that I was experiencing with my custom controls down to escape key processing (which is viewed as a hotkey within camelot).
Definition at line 573 of file dialogop.cpp. 00574 { 00575 return (DlgMgr->CloseDropdown(GetReadWriteWindowID(), Gadget, CloseVal)); 00576 }
|
|
||||||||||||
|
Used to abort the dragging of the custom colour picker control from within the colour editor.
Definition at line 506 of file dialogop.cpp. 00507 { 00508 return (DlgMgr->ColourPickerAbort(GetReadWriteWindowID(), Gadget, wParam)); 00509 }
|
|
|
The create method reserves everything needed to guarantee that the dialog will appear. It returns FALSE if it fails. If any dialog merging was specified (by providing a non-zero value for SubDialogID in the call to the DialogOp constructor) then it will be carried out when this function is called.
Reimplemented in BarCreationDlg, BarStatesDlg, BarRedefineStateDlg, InformationBarOp, BlobbyDlg, BlobbyBar, BmpPrefsDlg, PhotoCDDlg, BmpDlg, CMXTreeDlg, ColourEditDlg, CXFTreeDlg, DebugTreeDlg, ExtendSetsDlg, WebAddressDlg, InfoBarOp, LayerDlg, LayerNameDlg, NewColourDlg, SepsDlg, UnitPropertiesDlg, SelMediaDlg, SuperGallery, SGalleryOptionsDlg, SGallerySortDlg, SGallerySearchDlg, ColourNameDlg, TipsDlg, ToolbarDlg, ToolnameDlg, CustomizeBarDlg, WebPrefsDlg, NativePrefsDlg, PasteSpecialDlg, and SGalleryLinePropertiesDlg. Definition at line 287 of file dialogop.cpp. 00288 { 00289 // Create an instance of the dialog by calling the dialog managers Create method. The 00290 00291 // The WindowID will be set by this call 00292 BOOL Created = DlgMgr->Create(this, /*MainDlgInst,*/ DlgResID, /*SubDlgInst,*/ SubDlgID, DlgMode, 00293 PageToOpen, ParentDlgWnd); 00294 00295 ERRORIF(!Created, _R(IDT_DIALOG_CREATEFAIL), FALSE); 00296 00297 // It all worked 00298 return |