DialogOp Class Reference

The abstract DialogOp class is used as the base class for all Dialog box classes in Camelot. It provides methods required to create dialogs and to communicate with gadgets. More...

#include <dialogop.h>

Inheritance diagram for DialogOp:

Operation MessageHandler ListItem CCObject SimpleCCObject ArrangeAlignment BarCreationDlg BarRedefineStateDlg BarStatesDlg BaseNameObjectsDlg BfxPlugInDlg BitmapExportPreviewDialog BlobbyBar BlobbyDlg BmpDlg BmpPrefsDlg CBaseBrushNameDlg CBiasGainDlg CMXTreeDlg ColourEditDlg ColourNameDlg CustomizeBarDlg CXFTreeDlg DaveDlg DebugTreeDlg DialogBarOp DialogTabOp ExtendSetsDlg FileInfo GuidelinePropDlg ImagemapDlg InfoBarOp LayerDlg LayerNameDlg NameDialog NameObjectsDlg NativePrefsDlg NewColourDlg PasteSpecialDlg PhotoCDDlg PreviewDialog PrintProgressDlg RenderDemoDlg RenderDialogOp SelMediaDlg SepsDlg SGalleryLinePropertiesDlg SGalleryOptionsDlg SGallerySearchDlg SGallerySortDlg StandardBar SuperGallery TemplateDialog TipsDlg ToolbarDlg ToolnameDlg TraceDlg UnitPropertiesDlg URLImportDlg WebAddressDlg XSEPSExportOptions List of all members.

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.
RenderRegionCreateGRenderRegion (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.
RenderRegionCreateOSRenderRegion (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)
CCObjectGetTreeGadgetItemData (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.
OpDescriptorGetGadgetOpDescriptor (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 DialogOpFindDialogOp (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
DialogEventHandlerpEvtHandler
DialogManagerDlgMgr
CDlgResID ReadWritePage
INT32 PageToOpen

Private Attributes

UINT32 MagicWord
BOOL m_bInteractiveProfiles

Friends

class DialogEventHandler
class DialogManager

Detailed Description

The abstract DialogOp class is used as the base class for all Dialog box classes in Camelot. It provides methods required to create dialogs and to communicate with gadgets.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
See also:
DialogManager

Definition at line 145 of file dialogop.h.


Constructor & Destructor Documentation

DialogOp::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.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/8/93
Parameters:
DialogResID,: The resource ID of the dialog [INPUTS] Mode: The dialog's mode (modal, medeless) SubDialogID: The resource ID of another dialog - this allows you to merge two dialogs to create a new one (if this parameter is omitted no merging occurs and you get a normal dialog). MainInst, SubInst - instance handles of the modules containing the dialog templates (if 0 the main application instance is used). OpeningPage: For tabbed dialogs allows opening tab to be chosen

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 }                    

DialogOp::~DialogOp  ) 
 

The DialogOp destructor destroys the instance of the DialogOp and all associated resources. If the dialog was open then it is closed.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-
Note that a dialog box can be destroyed even if it was never created. In this case no message is sent to the dialog manager.
Returns:
Errors: -
See also:
-

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 }    

DialogOp::DialogOp  ) 
 

Definition at line 257 of file dialogop.cpp.

00258 {                                   
00259     ENSURE(FALSE, "Invalid constructor called for DialogOp"); 
00260 }


Member Function Documentation

BOOL DialogOp::AddControlsToHelper  )  [protected, virtual]
 

If you want to subclass some or all of the controls on your dialog then override this function.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/7/2000
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
always TRUE

Errors: -

See also:
First implementation in BrushDlg.h/cpp, DialogControlHelper class (DlgCtHlp.h/.cpp)

Reimplemented in CBrushEditDlg.

Definition at line 440 of file dialogop.cpp.

00441 {
00442     return TRUE;
00443 }

BOOL DialogOp::AddDialogControlToHelper CGadgetID  GadgetID,
CDlgResID  PageID
[protected]
 

Overridden version of above for use with tabbed dialogs, allows you to add controls that are not on the currently active page.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/9/99
Parameters:
GadgetID [INPUTS] PageID - the ID of the tabbed dialog page that this control belongs to

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 }

BOOL DialogOp::AddDialogControlToHelper CGadgetID  GadgetID  )  [protected]
 

Calls the dialog manager add this control to the dialog control helper.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/9/99
Parameters:
GadgetID [INPUTS]

Definition at line 2272 of file dialogop.cpp.

02273 {
02274     return DialogManager::AddDialogControlToHelper(GetReadWriteWindowID(), GadgetID);
02275 }

BOOL DialogOp::BringToTop  ) 
 

This function brings an open dialog to the top of the z-order.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/6/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
FALSE if the function failed.

Errors: -

See also:
-

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 }

void DialogOp::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.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
10-06-2005

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 }

BOOL DialogOp::CaptureMouse CGadgetID  gadID  ) 
 

Allows the given control to Capture the mouse.

Author:
Stefan_Stoykov (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/04/97
Parameters:
gadID ID of the "gadget" (control) which is to receive the [INPUTS] input focus
- [OUTPUTS]
Returns:
TRUE if successful.

Errors: -

See also:
DialogManager::CaptureMouse; DialogManager::ReleaseMouse

Definition at line 1940 of file dialogop.cpp.

01941 {
01942     return DialogManager::CaptureMouse(GetReadWriteWindowID(), gadID);
01943 }

void DialogOp::ChangeProfile CProfileBiasGain Profile,
CGadgetID  GadgetID
[protected, virtual]
 

Actually applies the profile to the selection. This base class function does nothing. It MUST be overidden within InformationBarOp derived classes.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/1/2000
Parameters:
CBiasGainGadget& and its GadgetID (for added safety) [INPUTS]
- [OUTPUTS]
Returns:
-
Take a look at tools.cpp for an example of this.
Returns:
Errors: -
See also:
InformationBarOp::ProfileSelectionChange ()

Reimplemented in BlendInfoBarOp, ContourInfoBarOp, GradInfoBarOp, and TranspInfoBarOp.

Definition at line 3787 of file dialogop.cpp.

03788 {
03789     return;
03790 }

void DialogOp::ChangeProfileOnIdle CProfileBiasGain Profile,
CGadgetID  GadgetID
[protected, virtual]
 

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.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/2000
Parameters:
CBiasGainGadget& and its GadgetID (for added safety) [INPUTS]
- [OUTPUTS]
Returns:
-
Actually applies the profile to the selection (which should be non-undoable). This base class function does nothing. It MUST be overidden within InformationBarOp derived classes.

Take a look at tools.cpp for an example of this.

Returns:
Errors: -
See also:
InformationBarOp::ProfileSelectionChange (), InformationBarOp::ChangeProfile ()

Reimplemented in BlendInfoBarOp, and ContourInfoBarOp.

Definition at line 3815 of file dialogop.cpp.

03816 {
03817     return;
03818 }

void DialogOp::Close void   ) 
 

The close method removes the dialog from the display but keeps all system resources associated with it. It hides the dialog.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

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 }

BOOL DialogOp::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).

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/2/2000
Parameters:
Gadget,: The Gadget to call this routine on [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 573 of file dialogop.cpp.

00574 {
00575     return (DlgMgr->CloseDropdown(GetReadWriteWindowID(), Gadget, CloseVal));
00576 }

BOOL DialogOp::ColourPickerAbort CGadgetID  Gadget,
WPARAM  wParam = 0
 

Used to abort the dragging of the custom colour picker control from within the colour editor.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/1/2000
Parameters:
Gadget,: The Gadget to call this routine on [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 506 of file dialogop.cpp.

00507 {
00508     return (DlgMgr->ColourPickerAbort(GetReadWriteWindowID(), Gadget, wParam));
00509 }

BOOL DialogOp::Create void   )  [virtual]
 

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.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if all resources to create the dialog can be successfully allocated. FALSE otherwise

Errors: If the resources cannot be allocated then ERRORIF is called with a Dialog creation failed error message.

See also:
-

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 TRUE;
00299 }

RenderRegion * DialogOp::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.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/10/94
Parameters:
pRequiredSize - The size that you want the effective area of the window to [INPUTS] be. Measured in Millipoints. eg. If you want your control to appear to be 1 inch square (whatever the actual size of it is), pass in a DocRect that looks a bit like this ... DocRect(0,0,72000,72000) ExtraInfo - The info about the region, as supplied by the dialog manager
Returns:
Render Region. This returns a pointer to a render region, or NULL if it failed to create one.
Notes: Use GRenderRegions when you want fast redraw, grad fills, and transparency. If only simple rendering is required, think about perhaps using an OSRenderRegion instead.

See also:
DialogOp::DestroyGRenderRegion

DialogOp::CreateOSRenderRegion

Definition at line 2676 of file dialogop.cpp.

02678 {
02679     // Make a new dialog view
02680     DialogView *pDialogView = new DialogView;
02681     if (pDialogView == NULL)
02682         // Error - return failure.
02683         return NULL;
02684 
02685     // Initialise the DialogView
02686     if (!pDialogView->Init())
02687     {
02688         // Error - return failure.
02689         delete pDialogView;
02690         return NULL;
02691     }
02692 
02693     // Pixelise the rectangle
02694     pRequiredSize->lo.Pixelise(pDialogView);
02695     pRequiredSize->hi.Pixelise(pDialogView);
02696     DocRect ClipRect = *pRequiredSize;
02697 
02698     // Get some default params for the render region
02699     FIXED16 Scale(1);
02700 
02701     // Ok, go and scale things
02702     INT32 ReqDx = ClipRect.Width();
02703     INT32 ReqDy = ClipRect.Height();
02704 
02705     // Work out the scale factors
02706     FIXED16 XScale = FIXED16(double(ExtraInfo->dx) / double(ReqDx));
02707     FIXED16 YScale = FIXED16(double(ExtraInfo->dy) / double(ReqDy));
02708 
02709     // Build the matricies
02710     // One to shift everything to the correct side of the X axis
02711     Matrix Translate(0, -ExtraInfo->dy);
02712 
02713     // One to scale everything into the window
02714     Matrix ScaleIt(XScale, YScale);
02715 
02716     // One to translate everything to the origin
02717     Matrix ToOrigin(-ClipRect.lo.x, -ClipRect.lo.y);
02718 
02719     // Combine them all
02720     ToOrigin *= ScaleIt;
02721     ToOrigin *= Translate;
02722 
02723     // If the caller wants to use the same colour separation options (ColourPlate) as the
02724     // currently selected view, then copy the ColourPlate across to the new DialogView
02725     if (UseSelViewColContext && DocView::GetSelected() != NULL)
02726         pDialogView->SetColourPlate(DocView::GetSelected()->GetColourPlate());
02727 
02728     // make a render region
02729     GRenderRegion* pRender = new GRenderDIB(ClipRect, ToOrigin, Scale, 32, (double)ExtraInfo->Dpi);
02730     if (pRender!=NULL)
02731     {
02732         // Try and create the bitmap etc
02733         if (pRender->AttachDevice(pDialogView, ExtraInfo->pDC->GetDC(), NULL))
02734         {
02735             // Try and start the render region
02736             if (pRender->StartRender())
02737             {
02738                 return pRender;
02739             }
02740         }
02741 
02742         // Failed to attach and start the render region so free up the region
02743         delete pRender;
02744     }
02745 
02746     // Something went wrong, fail
02747     delete pDialogView;
02748     return NULL;
02749 }

RenderRegion * DialogOp::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.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com> (Jason copied CreateGRenderRegion)
Date:
17/10/94 (11/1/95)
Parameters:
pRequiredSize - The size that you want the effective area of the window to [INPUTS] be. Measured in Millipoints. eg. If you want your control to appear to be 1 inch square (whatever the actual size of it is), pass in a DocRect that looks a bit like this ... DocRect(0,0,72000,72000) ExtraInfo - The info about the region, as supplied by the dialog manager
Returns:
Render Region. This returns a pointer to a render region, or NULL if it failed to create one.
Notes: Use GRenderRegions when you want fast redraw, grad fills, and transparency. If only simple rendering is required, think about perhaps using an OSRenderRegion instead.

See also:
DialogOp::DestroyOSRenderRegion

DialogOp::CreateGRenderRegion

Definition at line 2822 of file dialogop.cpp.

02824 {
02825     // Make a new dialog view
02826     DialogView *pDialogView = new DialogView;
02827     if (pDialogView == NULL)
02828         // Error - return failure.
02829         return NULL;
02830 
02831     // Initialise the DialogView
02832     if (!pDialogView->Init())
02833     {
02834         // Error - return failure.
02835         delete pDialogView;
02836         return NULL;
02837     }
02838 
02839     // Pixelise the rectangle
02840     pRequiredSize->lo.Pixelise(pDialogView);
02841     pRequiredSize->hi.Pixelise(pDialogView);
02842     DocRect ClipRect = *pRequiredSize;
02843 
02844     // Get some default params for the render region
02845     FIXED16 Scale(1);
02846 
02847     // Ok, go and scale things
02848     INT32 ReqDx = ClipRect.Width();
02849     INT32 ReqDy = ClipRect.Height();
02850 
02851     // Work out the scale factors
02852     FIXED16 XScale = FIXED16(double(ExtraInfo->dx) / double(ReqDx));
02853     FIXED16 YScale = FIXED16(double(ExtraInfo->dy) / double(ReqDy));
02854 
02855     // Build the matricies
02856     // One to shift everything to the correct side of the X axis
02857     Matrix Translate(0, -ExtraInfo->dy);
02858 
02859     // One to scale everything into the window
02860     Matrix ScaleIt(XScale, YScale);
02861 
02862     // One to translate everything to the origin
02863     Matrix ToOrigin(-ClipRect.lo.x, -ClipRect.lo.y);
02864 
02865     // Combine them all
02866     ToOrigin *= ScaleIt;
02867     ToOrigin *= Translate;
02868 
02869     // If the caller wants to use the same colour separation options (ColourPlate) as the
02870     // currently selected view, then copy the ColourPlate across to the new DialogView
02871     if (UseSelViewColContext && DocView::GetSelected() != NULL)
02872         pDialogView->SetColourPlate(DocView::GetSelected()->GetColourPlate());
02873 
02874     // Make a render region for the screen, asking specifically for an OSRenderRegion,
02875     // and none of this sneaky & cunning diverting it back into being a GRenderRegion!
02876     RenderRegion* pRender = OSRenderRegion::Create(ClipRect, ToOrigin, Scale,
02877                                                     RENDERTYPE_SCREEN, NULL, TRUE);
02878 
02879     if (pRender!=NULL)
02880     {
02881         // Try and create the bitmap etc
02882         if (pRender->AttachDevice(pDialogView, ExtraInfo->pDC, NULL))
02883         {
02884             // Try and start the render region
02885             if (pRender->StartRender())
02886             {
02887                 return pRender;
02888             }
02889         }
02890 
02891         // Failed to attach and start the render region so free up the region
02892         delete pRender;
02893     }
02894 
02895     // Something went wrong, fail
02896     delete pDialogView;
02897     return NULL;
02898 }

BOOL DialogOp::DeleteAllValues CGadgetID  GadgetID  ) 
 

Deletes ALL values in list-gadgets See DialogManager for a description of this function.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/5/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::DeleteAllValues

Definition at line 1596 of file dialogop.cpp.

01597 {
01598     return(DlgMgr->DeleteAllValues(GetReadWriteWindowID(), GadgetID));
01599 }

BOOL DialogOp::DeleteValue CGadgetID  GadgetID,
BOOL  EndOfList = TRUE,
INT32  ListPos = 0
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::DeleteValue

Definition at line 1620 of file dialogop.cpp.

01623 {    
01624     return (DlgMgr->DeleteValue(GetReadWriteWindowID(), GadgetID, EndOfList, ListPos)); 
01625 }      

BOOL DialogOp::DestroyGRenderRegion RenderRegion pRender  ) 
 

Deinitialises the render region and deletes it.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/10/94
Parameters:
A pointer to a render region return by CreateGRenderRegion [INPUTS]
Returns:
TRUE if it worked, FALSE if the render region passed in was bad

Errors: ERROR2 error if pRender is NULL

See also:
DialogOp::CreateGRenderRegion

Definition at line 2768 of file dialogop.cpp.

02769 {
02770     // Test for preconditions
02771     ERROR2IF(pRender==NULL, FALSE, "DestroyGRenderRegion was passed a NULL render region");
02772 
02773     // Blit to the screen
02774     pRender->StopRender();
02775 
02776     // and delete the render region and its (dialog) view
02777     // these are deleted in this order because the RenderRegion destructor may
02778     // call functions on its RenderView
02779     View* pView = pRender->GetRenderView();
02780     delete pRender;
02781     delete pView;
02782 
02783     // It worked
02784     return TRUE;
02785 }

BOOL DialogOp::DestroyOSRenderRegion RenderRegion pRender  ) 
 

Deinitialises the render region and deletes it.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com> (Jason copied CreateGRenderRegion)
Date:
17/10/94 (11/1/95)
Parameters:
A pointer to a render region return by CreateOSRenderRegion [INPUTS]
Returns:
TRUE if it worked, FALSE if the render region passed in was bad

Errors: ERROR2 error if pRender is NULL

See also:
DialogOp::CreateGRenderRegion

DialogOp::CreateOSRenderRegion

Definition at line 2922 of file dialogop.cpp.

02923 {
02924     // Test for preconditions
02925     ERROR2IF(pRender==NULL, FALSE, "DestroyOSRenderRegion was passed a NULL render region");
02926 
02927     // Blit to the screen
02928     pRender->StopRender();
02929 
02930     // and delete the render region and its (dialog) view
02931     // these are deleted in this order because the RenderRegion destructor may
02932     // call functions on its RenderView
02933     View* pView = pRender->GetRenderView();
02934     delete pRender;
02935     delete pView;
02936 
02937     // It worked
02938     return TRUE;
02939 }

virtual void DialogOp::DisallowInteractiveProfiles  )  [inline, virtual]
 

Definition at line 478 of file dialogop.h.

void DialogOp::DualFunctionButton CGadgetID  ButtonGadget  ) 
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::DualFunctionButton

Definition at line 2398 of file dialogop.cpp.

02399 {
02400     DlgMgr->DualFunctionButton(GetReadWriteWindowID(), ButtonGadget); 
02401 }    

BOOL DialogOp::EnableGadget CGadgetID  Gadget,
BOOL  Enabled
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::EnableGadget

Definition at line 1798 of file dialogop.cpp.

01799 {   
01800     return (DlgMgr->EnableGadget(GetReadWriteWindowID(), Gadget, Enabled));     
01801 } 

DialogOp * DialogOp::FindDialogOp CDlgResID  ResID  )  [static]
 

Looks for a given DialogOp by using its ResourceID.

Author:
Alex Bligh <alex@alex.org.uk>
Date:
17/4/2006
Parameters:
ResID - The resource ID of the dialog to find [INPUTS]
- [OUTPUTS]
Returns:
ptr to DialogOp NULL is returned if not found

Errors: -

See also:
-

Definition at line 3012 of file dialogop.cpp.

03013 {
03014     List*       pList = MessageHandler::GetClassList(CC_RUNTIME_CLASS(DialogOp));
03015     DialogOp*   pDialogOp = (DialogOp*)pList->GetHead();
03016     
03017     while (pDialogOp != NULL)
03018     {
03019         if (pDialogOp->DlgResID == ResID)
03020             return (pDialogOp);
03021 
03022         pDialogOp = (DialogOp*)pList->GetNext(pDialogOp);
03023     }
03024 
03025     return NULL;
03026 }

BOOL DialogOp::GadgetRedraw CGadgetID  GadgetID,
BOOL  Redraw
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::GadgetRedraw

Definition at line 1899 of file dialogop.cpp.

01900 {                                                           
01901     return (DlgMgr->GadgetRedraw(GetReadWriteWindowID(), GadgetID, Redraw)); 
01902 }

BOOL DialogOp::GetBoolGadgetSelected CGadgetID  Gadget,
UINT32  IDSInvalidMsg = 0,
BOOL *  Valid = NULL,
INT32  ListPos = -1
 

See DialogManager for a description of this function.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::GetLongGadgetValue; DialogOp::GetRadioGroupSelected

Definition at line 1431 of file dialogop.cpp.

01435 {  
01436     return (DlgMgr->GetBoolGadgetSelected(GetReadWriteWindowID(),
01437                                         Gadget,
01438                                         IDSInvalidMsg,
01439                                         Valid,
01440                                         ListPos));
01441 }  

CDlgResID DialogOp::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.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/12/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
the PageID of the tab currently being used. NULL if its the main page.

Errors: - Scope: public

See also:
DialogTabOp::TalkToPage; DialogOp::GetReadWriteWindowID();

Definition at line 2990 of file dialogop.cpp.

02991 {
02992     // Just return the current id of the tab page in use.
02993     return ReadWritePage;
02994 }

MILLIPOINT DialogOp::GetDimensionGadgetValue CGadgetID  Gadget,
Node pNode,
BOOL *  Valid = NULL,
INT32  ListPos = -1
 

See DialogManager for a description of this function.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/6/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::GetDimensionGadgetValue

Definition at line 1544 of file dialogop.cpp.

01545 {   
01546     return (DlgMgr->GetDimensionGadgetValue(GetReadWriteWindowID(), Gadget, pNode, Valid, ListPos));
01547 }

BOOL DialogOp::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 DialogOp::GetDoubleAndUnitGadgetValue( double* pMPValue, double* pUnitValue, UnitType* pUnitType, CGadgetID GadgetID, Node* pNode)

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/9/95
Parameters:
GadgetID - [INPUTS] pNode - node from which to determine default units (ie page units)
pMPValue - value of gadget converted to millipoints (accounting for scaling) [OUTPUTS] pUnitValue - value of gadget in terms of units output in pUnitType pUnitType - type of unit the value was specified in (or page units if none)
Returns:
FALSE if fails

Definition at line 1401 of file dialogop.cpp.

01406 {
01407     return DlgMgr->GetDoubleAndUnitGadgetValue( pMPValue, pUnitValue, pUnitType,
01408                                                 GetReadWriteWindowID(), GadgetID, pNode);
01409 }

double DialogOp::GetDoubleGadgetValue CGadgetID  Gadget,
double  StartRange,
double  EndRange,
UINT32  IDSInvalidMsg = 0,
BOOL *  Valid = NULL,
Convert::PFNSTRINGTODOUBLE  pfnParser = Convert::StringToDouble
 

See DialogManager for a description of this function.

Author:
Alex_Bligh (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/12/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::GetDoubleGadgetValue

Definition at line 1365 of file dialogop.cpp.

01371 {  
01372     return DlgMgr->GetDoubleGadgetValue(GetReadWriteWindowID(),
01373                                       Gadget,
01374                                       StartRange,
01375                                       EndRange,
01376                                       IDSInvalidMsg, 
01377                                       Valid,
01378                                       pfnParser);
01379 }  

INT32 DialogOp::GetFirstSelectedItem CGadgetID  GadgetID  ) 
 

Returns the index of the first selected item in a list-type gadget.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/10/95
Parameters:
GadgetID = ID of list-type gadget [INPUTS]
Returns:
The index of the firsted selected items in the list-type gadget, or -1 if it fails
See also:
-

Definition at line 1709 of file dialogop.cpp.

01710 {
01711     return (DlgMgr->GetFirstSelectedItem(GetReadWriteWindowID(),GadgetID));
01712 }

ResourceID DialogOp::GetGadgetBitmap CGadgetID  Gadget  ) 
 

Calls the dialog manager to set the bitmaps of the gadget.

Author:
Alex Bligh <alex@alex.org.uk>
Date:
07/05/2006
Parameters:
GadgetID - The gadget to set the bitmaps of [INPUTS] Bitmap - The ID of the bitmap

Definition at line 2216 of file dialogop.cpp.

02217 {
02218     // Call the dialog Manager
02219     return DialogManager::GetGadgetBitmap(GetReadWriteWindowID(), Gadget);
02220 }

UINT32 DialogOp::GetGadgetImageCount CGadgetID  GadgetID  ) 
 

Calls the dialog manager to set the bitmaps of the gadget.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
08/Feb/2006
Parameters:
GadgetID - The gadget to set the bitmaps of [INPUTS] imagelist - list of images for this gadget

Definition at line 2235 of file dialogop.cpp.

02236 {
02237     // Call the dialog Manager
02238     return DialogManager::GetGadgetImageCount(GetReadWriteWindowID(), GadgetID);
02239 }

OpDescriptor * DialogOp::GetGadgetOpDescriptor CGadgetID  Gadget  ) 
 

Finds the OpDescriptor associated with a gadget.

Author:
Alex Bligh
Date:
03-Mar-2005
Parameters:
Gadget - the Gadget to get the OpDescriptor for [INPUTS]
- [OUTPUTS]
Returns:
Pointer the gadget's associated OpDescriptor

Errors: -

See also:
-

Definition at line 3675 of file dialogop.cpp.

03676 {
03677     return (DlgMgr->GetGadgetOpDescriptor(GetReadWriteWindowID(), Gadget));
03678 }

BOOL DialogOp::GetGadgetPosition CGadgetID  Gadget,
RECT pRect
 

Definition at line 3462 of file dialogop.cpp.

03463 {
03464     // Call the Dialog Manager
03465     return DialogManager::GetGadgetPosition(GetReadWriteWindowID(), Gadget, pRect);
03466 }

BOOL DialogOp::GetGadgetPosition CGadgetID  Gadget,
wxRect *  pRect
 

Allows the user to get the current position of the specified icon or control.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/6/97
Parameters:
Rect pointer to the rectangle to fill in [OUTPUTS]
Returns:
True if the call was successful, FALSE otherwise.
See also:
DialogOp::SetGadgetPosition; DialogManager::GetGadgetPosition;

Definition at line 3456 of file dialogop.cpp.

03457 {
03458     // Call the Dialog Manager
03459     return DialogManager::GetGadgetPosition(GetReadWriteWindowID(), Gadget, pRect);
03460 }

BOOL DialogOp::GetGadgetRange CGadgetID  GadgetID,
INT32 *  Min,
INT32 *  Max
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::GetGadgetRange

Definition at line 1522 of file dialogop.cpp.

01523 {                                                       
01524     return (DlgMgr->GetGadgetRange(GetReadWriteWindowID(), GadgetID, Min, Max));    
01525 }    

BOOL DialogOp::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).

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/1/95
Parameters:
Gadget - The ID of the gadget that you want info for [INPUTS]
Returns:
FALSE if there was a catastrophic error (it will report an ERROR2), in which case the returned data is invalid (well, it defaults to 96 Dpi and an area of 72000x72000 millipoints, so is 'safe' to use, but probably wrong) TRUE under normal conditions
Parameters:
Result - will be returned filled in with appropriate kernel-rendered- [OUTPUTS] dialogue information (dx, dy, and Dpi will be filled in with the appropriate values; pMousePOs, pDC, and pClipRect will all be NULL)
See also:
DialogManager::GetKernelRenderedGadgetInfo

Definition at line 2139 of file dialogop.cpp.

02140 {
02141     // Call the Dialog Manager
02142     return(DialogManager::GetKernelRenderedGadgetInfo(GetReadWriteWindowID(), Gadget, Result));
02143 }

INT32 DialogOp::GetLongGadgetValue CGadgetID  Gadget,
INT32  StartRange,
INT32  EndRange,
UINT32  IDSInvalidMsg = 0,
BOOL *  Valid = NULL,
Convert::PFNSTRINGTOINT32  pfnParser = Convert::StringToLong
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::GetLongGadgetValue

Definition at line 1329 of file dialogop.cpp.

01335 {  
01336     return DlgMgr->GetLongGadgetValue(GetReadWriteWindowID(),
01337                                       Gadget,
01338                                       StartRange,
01339                                       EndRange,
01340                                       IDSInvalidMsg, 
01341                                       Valid,
01342                                       pfnParser);
01343 }  

UINT32 DialogOp::GetMemoryGadgetValue CGadgetID  Gadget,
UINT32  StartRange,
UINT32  EndRange,
UINT32  IDSInvalidMsg = 0,
BOOL *  Valid = NULL
 

See DialogManager for a description of this function.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/1/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::GetMemoryGadgetValue; DialogManager::SetMemoryGadgetValue;

Definition at line 1568 of file dialogop.cpp.

01573 {    
01574     return(DlgMgr->GetMemoryGadgetValue(GetReadWriteWindowID(), Gadget, StartRange, EndRange,
01575                                         IDSInvalidMsg, Valid));         
01576 }   

CGadgetID DialogOp::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.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/94
Parameters:
GroupGadgets - Points to a NULL-terminated list of Gadget IDs [INPUTS]
- [OUTPUTS]
Returns:
The gadget ID of the gadget in the input list which was selected or NULL if the list was empty or no items in it were selected

Errors: ERROR3 occurs in debug builds if the list was empty

SeelAlso: DialogOp::SetRadioGroupSelected; DialogOp::SetBoolGadgetSelected

Definition at line 1467 of file dialogop.cpp.

01468 {
01469     INT32  i = 0;
01470 
01471     ERROR3IF(GroupGadgets[0] == 0,
01472                 "DialogOp::GetRadioGroupSelected called with blank ID list");
01473 
01474     while (GroupGadgets[i] != 0)
01475     {
01476         if (GetBoolGadgetSelected(GroupGadgets[i]))
01477             return(GroupGadgets[i]);
01478 
01479         i++;
01480     }
01481 
01482     return( 0 );
01483 }

CWindowID DialogOp::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.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/11/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
the WindowID of the window that we are currently reading or writing to. NULL if the window does not exist.

Errors: - Scope: protected

See also:
DialogTabOp::TalkToPage

Definition at line 2964 of file dialogop.cpp.

02965 {
02966     CheckMagic("DialogOp::GetReadWriteWindowID");
02967     return (DlgMgr->GetPageWindow(WindowID, ReadWritePage));        
02968 }

INT32 DialogOp::GetResDropListValue const CGadgetID  DropListID,
const BOOL  bIncludeAuto = TRUE,
BOOL *  pbValid = NULL
 

Gets value from Resolution dropdown list.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
10-06-2005

Definition at line 1060 of file dialogop.cpp.

01064 {
01065     BOOL Valid;
01066     INT32 iValue = 0;
01067     if (pbValid) *pbValid = FALSE;
01068 
01069     // First check whether it's "none" or not
01070     String_256 str;
01071     str = GetStringGadgetValue(DropListID, &Valid, -1);
01072 
01073 //  if (str.IsIdentical(String_32(_R(IDS_LE_NONE))) ||
01074 //      str.IsIdentical(String_32(_R(IDS_LE_MANY))) ||
01075 //      !Valid)
01076 //  {
01077 //      return;
01078 //  }
01079 //
01080     if (bIncludeAuto && str.IsIdentical(String_32(_R(IDS_RES_AUTO))))
01081     {
01082         iValue = 0;
01083         Valid = TRUE;
01084     }
01085     else if (str.IsIdentical(String_32(_R(IDS_RES_AUTOVARIABLE))))
01086     {
01087         iValue = 0;
01088         Valid = TRUE;
01089     }
01090     else if (str.IsIdentical(String_32(_R(IDS_RES_SCREEN))))
01091     {
01092         iValue = 96;
01093         Valid = TRUE;
01094     }
01095     else if (str.IsIdentical(String_32(_R(IDS_RES_INTERMEDIATE))))
01096     {
01097         iValue = 150;
01098         Valid = TRUE;
01099     }
01100     else if (str.IsIdentical(String_32(_R(IDS_RES_PRINT))))
01101     {
01102         iValue = 200;
01103         Valid = TRUE;
01104     }
01105     else if (str.IsIdentical(String_32(_R(IDS_RES_PRINT300))))
01106     {
01107         iValue = 300;
01108         Valid = TRUE;
01109     }
01110     else
01111         iValue = GetLongGadgetValue(DropListID, 1, 1000, 0, &Valid);
01112 
01113     if (pbValid) *pbValid = Valid;
01114     return iValue;
01115 }

INT32 DialogOp::GetScreenDpi  ) 
 

Allows the user to find out the screen dpi.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/6/97
Returns:
0 or the dpi of the screen.
See also:
DialogManager::GetScreenDpi;

Definition at line 3530 of file dialogop.cpp.

03531 {
03532     return DialogManager::GetScreenDpi();
03533 }

BOOL DialogOp::GetScreenSize INT32 *  pWidth,
INT32 *  pHeight
 

Allows the user to find out the screen size.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/6/97
Parameters:
pWidth the screen width in pixels [OUTPUTS] pHeight the screen height in pixels
Returns:
True if worked ok, False otherwise.
See also:
DialogManager::GetScreenSize;

Definition at line 3549 of file dialogop.cpp.

03550 {
03551     ERROR2IF(pWidth == NULL || pHeight == NULL,FALSE,"GetScreenSize Bad params!");
03552     return DialogManager::GetScreenSize(pWidth, pHeight);
03553 }

INT32 DialogOp::GetSelectedCount CGadgetID  GadgetID  ) 
 

Returns the number of selected items in a list-type gadget.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/10/95
Parameters:
GadgetID = ID of list-type gadget [INPUTS]
Returns:
The number of selected items in the list-type gadget, or -1 if it fails
See also:
-

Definition at line 1691 of file dialogop.cpp.

01692 {
01693     return (DlgMgr->GetSelectedCount(GetReadWriteWindowID(), GadgetID));
01694 }

INT32 * DialogOp::GetSelectedItems CGadgetID  GadgetID  ) 
 

Returns a ptr to an INT32 array that holds the list of selected indexes. The last array entry contains -1.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/10/95
Parameters:
GadgetID = ID of list-type gadget [INPUTS]
Returns:
ptr to the INT32 array, or NULL if it fails
The caller is responsible for deleting the array that's returned. e.g INT32* pArray = GetSelectedItems(WindowID,GadgetID); if (pArray != NULL) { ..... // Use the array delete [] pArray; }
See also:
-

Definition at line 1737 of file dialogop.cpp.

01738 {
01739     return (DlgMgr->GetSelectedItems(GetReadWriteWindowID(),GadgetID));
01740 }

INT32 DialogOp::GetSelectedValueIndex CGadgetID  GadgetID  ) 
 

A *SENSIBLE* interface to read which item of a combo/list box type of gadget is selected.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/10/94
Parameters:
GadgetID - the 'listy' gadget you wish to interrogate [INPUTS]
Returns:
-1 if no items are selected in the gadget Otherwise, the index of the selected item [0 .. numitems-1]
See also:
DialogOp::GetValueIndex; DialogOp::SetSelectedValueIndex

Definition at line 1665 of file dialogop.cpp.

01666 {
01667     INT32 Index;
01668 
01669     BOOL Valid = DlgMgr->GetValueIndex(GetReadWriteWindowID(), GadgetID, &Index);
01670 
01671     if (Valid)
01672         return(Index);
01673 
01674     return(-1);     // No selection, or some error
01675 }

String_256 DialogOp::GetStringGadgetValue CGadgetID  Gadget,
BOOL *  Valid = NULL,
INT32  ListPos = -1
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::GetStringGadgetValue

Definition at line 1502 of file dialogop.cpp.

01503 {   
01504     return (DlgMgr->GetStringGadgetValue(GetReadWriteWindowID(), Gadget, Valid, ListPos));
01505 }

size_t DialogOp::GetTreeGadgetChildrenCount CGadgetID  Gadget,
CTreeItemID  hItem,
BOOL  bRecursive = FALSE
 

Definition at line 3655 of file dialogop.cpp.

03656 {
03657     return (DlgMgr->GetTreeGadgetChildrenCount(GetReadWriteWindowID(), Gadget, hItem));
03658 }

CTreeItemID DialogOp::GetTreeGadgetFirstChildItem CGadgetID  Gadget,
CTreeItemID  hItem
 

Definition at line 3650 of file dialogop.cpp.

03651 {
03652     return (DlgMgr->GetTreeGadgetFirstChildItem(GetReadWriteWindowID(), Gadget, hItem));
03653 }

CTreeItemID DialogOp::GetTreeGadgetFirstSelectedItem CGadgetID  Gadget  ) 
 

Definition at line 3635 of file dialogop.cpp.

03636 {
03637     return (DlgMgr->GetTreeGadgetFirstSelectedItem(GetReadWriteWindowID(), Gadget));
03638 }

CCObject * DialogOp::GetTreeGadgetItemData CGadgetID  Gadget,
CTreeItemID  hItem
 

Definition at line 3620 of file dialogop.cpp.

03621 {
03622     return (DlgMgr->GetTreeGadgetItemData(GetReadWriteWindowID(), Gadget, hItem));
03623 }

CTreeItemID DialogOp::GetTreeGadgetNextVisItem CGadgetID  Gadget,
CTreeItemID  hItem
 

Definition at line 3645 of file dialogop.cpp.

03646 {
03647     return (DlgMgr->GetTreeGadgetNextVisItem(GetReadWriteWindowID(), Gadget, hItem));
03648 }

CTreeItemID DialogOp::GetTreeGadgetRootItem CGadgetID  Gadget  ) 
 

Definition at line 3630 of file dialogop.cpp.

03631 {
03632     return (DlgMgr->GetTreeGadgetRootItem(GetReadWriteWindowID(), Gadget));
03633 }

MILLIPOINT DialogOp::GetUnitGadgetValue CGadgetID  Gadget,
UnitType  DefaultType,
MILLIPOINT  StartRange,
MILLIPOINT  EndRange,
UINT32  IDSInvalidMsg = 0,
BOOL *  Valid = NULL
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::GetUnitGadgetValue

Definition at line 1298 of file dialogop.cpp.

01304 {    
01305     return(DlgMgr->GetUnitGadgetValue(GetReadWriteWindowID(), Gadget, DefaultType, StartRange, EndRange,
01306                                   IDSInvalidMsg, Valid));         
01307 }   

BOOL DialogOp::GetValueCount CGadgetID  GadgetID,
INT32 *  Count
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::GetValueCount

Definition at line 1642 of file dialogop.cpp.

01643 {                                                            
01644     return (DlgMgr->GetValueCount(GetReadWriteWindowID(), GadgetID, Count)); 
01645 }         

BOOL DialogOp::GetValueIndex CGadgetID  GadgetID,
INT32 *  Index
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::GetValueIndex

Definition at line 1778 of file dialogop.cpp.

01779 {
01780     return (DlgMgr->GetValueIndex(GetReadWriteWindowID(), GadgetID, Index));
01781 }   

BOOL DialogOp::GetValueIndex CGadgetID  GadgetID,
WORD Index
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::GetValueIndex

Definition at line 1758 of file dialogop.cpp.

01759 {
01760     return (DlgMgr->GetValueIndex(GetReadWriteWindowID(), GadgetID, Index));
01761 }   

BOOL DialogOp::GetWindowPosition RECT pRect  ) 
 

Definition at line 3437 of file dialogop.cpp.

03438 {
03439     // Call the Dialog Manager
03440     return DialogManager::GetWindowPosition(GetReadWriteWindowID(), pRect);
03441 }

BOOL DialogOp::GetWindowPosition wxRect *  pRect  ) 
 

Allows the user to get the current window position.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/6/97
Parameters:
Rect pointer to the rectangle to fill in [OUTPUTS]
Returns:
True if the call was successful, FALSE otherwise.
See also:
DialogOp::SetWindowPosition; DialogManager::GetWindowPosition;

Definition at line 3431 of file dialogop.cpp.

03432 {
03433     // Call the Dialog Manager
03434     return DialogManager::GetWindowPosition(GetReadWriteWindowID(), pRect);
03435 }

BOOL DialogOp::HasWindow  ) 
 

To find out if DialogOp has a window associated with it.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/11/93
Returns:
TRUE if this DialogOp has an associated window.
SeeAlso DialogOp::IsWindowVisible

Definition at line 396 of file dialogop.cpp.

00397 {
00398     return (WindowID != NULL); 
00399 }

BOOL DialogOp::HideGadget CGadgetID  GadgetID,
BOOL  Hide
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::HideGadget

Definition at line 1841 of file dialogop.cpp.

01842 {                                                                                
01843     return (DlgMgr->HideGadget(GetReadWriteWindowID(), GadgetID, Hide));        
01844 }

BOOL DialogOp::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.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/11/94
Parameters:
gadID control ID within the window/dialogue box [INPUTS] nStart first letter to highlight (by default the very first) nEnd last letter to highlight (by default the very last)
- [OUTPUTS]
Returns:
TRUE if successful

Errors: ERROR3 if you try to highlight text in a control without any, eg. a button or a scroller.

See also:
DialogManager::HighlightText

Definition at line 1985 of file dialogop.cpp.

01986 {
01987     return DialogManager::HighlightText(GetReadWriteWindowID(), gadID, nStart, nEnd);
01988 }

void DialogOp::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.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/11/94
Parameters:
Gadget - The ID of the gadget that you want to be redrawn [INPUTS] ExtraInfo - The information passed to your DIM_ mouse event handler InvalidRect - The MILLIPOINT rectangle to invalidate, in the (0,0)->(dx,dy) coordinate space used in ReDrawInfoType.
See also:
DialogManager::InvalidateGadget

Definition at line 2058 of file dialogop.cpp.

02061 {
02062     // Call the Dialog Manager
02063     DialogManager::InvalidateGadget(GetReadWriteWindowID(), Gadget, ExtraInfo, InvalidRect);
02064 }

void DialogOp::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.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/10/94
Parameters:
Gadget - The ID of the gadget that you want to be redrawn [INPUTS] EraseBackground TRUE if the background should be erased
See also:
DialogManager::InvalidateGadget

Definition at line 2029 of file dialogop.cpp.

02030 {
02031     // Call the Dialog Manager
02032     DialogManager::InvalidateGadget(GetReadWriteWindowID(), Gadget, EraseBackground);
02033 }

virtual BOOL DialogOp::IsABar  )  [inline, virtual]
 

Reimplemented in DialogBarOp, BlobbyBar, SuperGallery, and StandardBar.

Definition at line 159 of file dialogop.h.

00159 { return FALSE; }

BOOL DialogOp::IsADialogWindow CWindowID  WndID  )  [static]
 

To find out if WndID is the window ID of a dialog.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/3/94
Parameters:
WndID,: The CWindowID to try and find [INPUTS]
- [OUTPUTS]
Returns:
TRUE if WndID is the window id of a dialog

Errors: -

See also:
-

Definition at line 2602 of file dialogop.cpp.

02603 {
02604     // Traverse the dialog list to see if WndID is a dialog window
02605     
02606     // Obtain the first live dialogOp 
02607     List* DlgList = GetClassList(CC_RUNTIME_CLASS(DialogOp)); 
02608     ListItem* CurrentOp = DlgList->GetHead(); 
02609     
02610 
02611     while (CurrentOp != NULL)    
02612     {        
02613                 
02614         if (((DialogOp*)CurrentOp)->WindowID == WndID)    
02615                                                               
02616         {   
02617             return TRUE;
02618         }       
02619         CurrentOp = DlgList->GetNext(CurrentOp); // Get next operation in the live list
02620     }        
02621     return FALSE; 
02622 }

virtual BOOL DialogOp::IsAGallery  )  [inline, virtual]
 

Reimplemented in SuperGallery.

Definition at line 160 of file dialogop.h.

00160 {return FALSE; }

BOOL DialogOp::IsCustomComboDropdownVisible CGadgetID  Gadget  ) 
 

Used to determin whether the custom controls dropdown is visible.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/2/2000
Parameters:
Gadget,: The Gadget to call this routine on [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 549 of file dialogop.cpp.

00550 {
00551     return (DlgMgr->IsCustomComboDropdownVisible(GetReadWriteWindowID(), Gadget));
00552 }

BOOL DialogOp::IsGadgetEnabled CGadgetID  Gadget  ) 
 

For checking if a gadget is enabled/disabled.

Author:
Luke_Hart (Xara Group Ltd) <lukeh@xara.com>
Date:
07/09/06
Parameters:
WindowID,: Dialog box window identifier [INPUTS] Gadget: Gadget identifier
[OUTPUTS] 
Returns:
TRUE if enabled, else FALSE

Errors: -

See also:
DialogOp::IsGadgetEnabled

Definition at line 1821 of file dialogop.cpp.

01822 {
01823     return DlgMgr->IsGadgetEnabled( GetReadWriteWindowID(), Gadget );
01824 }

BOOL DialogOp::IsGadgetTickable CGadgetID  Gadget  ) 
 

To determine if Gadget is of a particular type that can be ticked. eg. if the gadget is a button.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/6/95
Parameters:
Gadget,: The Gadget to test [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 484 of file dialogop.cpp.

00485 {
00486     return (DlgMgr->IsGadgetTickable(GetReadWriteWindowID(), Gadget)); 
00487 }

BOOL DialogOp::IsModal  )  [inline]
 

Definition at line 508 of file dialogop.h.

00508 { return (DlgMode == MODAL); }; 

BOOL DialogOp::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).

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/11/93
Returns:
!!!!!!!!!!!!!!!!!!!! Bodge

Definition at line 373 of file dialogop.cpp.

00374 {
00375     if( WindowID != NULL )
00376     {
00377         return ( (wxWindow *)WindowID )->IsShown(); //      <<< --------------  BODGE, BODGE, BODGE
00378     }
00379     else return FALSE; 
00380 }

virtual BOOL DialogOp::IsVertical  )  [inline, virtual]
 

Reimplemented in StandardBar.

Definition at line 161 of file dialogop.h.

00161 { return FALSE; }

BOOL DialogOp::IsVisible  ) 
 

Used by the tool bar customize system to find out if a tool bar is visible or not.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if this DialogOp is on screen

Errors: -

See also:
-
This function is a hangover from old bar days. You probably don't want to use it. Use Show() etc. which are orthogonal to this. This merely tells you whether there is a window ID there... FOR COMPATIBILITY ONLY

Reimplemented in InformationBarOp.

Definition at line 3048 of file dialogop.cpp.

03049 {
03050     return (WindowID != NULL);
03051 }

BOOL DialogOp::IsWindowVisible  ) 
 

Find out if a dialog is shown or hidden.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>, function name changed by Simon
Date:
9/11/93
Returns:
TRUE if the window associated with this Op is visible. FALSE if not. Note the Window must exist to do this check. A call to HasWindow will verify this
SeeAlso DialogOp::HasWindow

Definition at line 526 of file dialogop.cpp.

00527 {
00528     ERROR2IF (WindowID != NULL, FALSE, "The window does not exist, Should have called HasWindow"); 
00529     return (DlgMgr->IsWindowVisible(WindowID));
00530 }

BOOL DialogOp::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.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/97
Parameters:
nIDEvent Specifies a nonzero timer identifier. [INPUTS]
Returns:
True if the event was killed, FALSE if the specified timer event could not be found.
See also:
DialogOp::SetTimer; DialogManager::SetTimer;

Definition at line 3407 of file dialogop.cpp.

03408 {
03409     // Call the Dialog Manager
03410     return DialogManager::KillTimer( this, GetReadWriteWindowID(), nIDEvent );
03411 }

void DialogOp::Layout BOOL  CanYield = FALSE  ) 
 

Relayout dialog - for sizer changes.

Author:
Alex Bligh <alex@alex.org.uk>
Date:
10/05/2006
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 1879 of file dialogop.cpp.

01880 {
01881     DlgMgr->Layout(GetReadWriteWindowID(), CanYield);
01882 }

BOOL DialogOp::MakeListBoxDragable CGadgetID  ListGadget  ) 
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/12/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::MakeListBoxDragable

Definition at line 2419 of file dialogop.cpp.

02420 {
02421     return (DlgMgr->MakeListBoxDragable(GetReadWriteWindowID(), ListGadget)); 
02422 }

MsgResult DialogOp::Message Msg Message  )  [virtual]
 

if (IS_OUR_DIALOG_MSG(Message)) { DialogMsg* Msg = (DialogMsg*)Message; Handle Msg here }

Pass message on to base class for rest of handling. return <BaseClass>Message(Message);

This Pure virtual function will ENSURE

Returns:
Errors: -
See also:
MessageHandler

IS_OUR_DIALOG_MSG

Reimplemented from MessageHandler.

Reimplemented in ArrangeAlignment, AppPrefsDlg, GIFAnimationPropertyTabsDlg, AnimExOptns, BarCreationDlg, BarStatesDlg, BarRedefineStateDlg, DialogBarOp, SystemBarOp, InformationBarOp, BfxDlg, BfxPlugInDlg, CBiasGainDlg, BlobbyDlg, BlobbyBar, BlobbyTabDlg, BmapPrevDlg, BitmapExportPreviewDialog, BmpPrefsDlg, JPEGExportPrefsDialog, PhotoCDDlg, BmpDlg, CBaseBrushNameDlg, CBrushEditDlg, CMXTreeDlg, ColourEditDlg, CXFTreeDlg, DaveDlg, DebugTreeDlg, DialogTabOp, ExtendSetsDlg, ImagemapDlg, FileInfo, GuidelinePropDlg, WebAddressDlg, InfoBarOp, LayerDlg, LayerNameDlg, LayerPropertyTabsDlg, NameDialog, NewColourDlg, NameGallery, BaseNameObjectsDlg, SepsDlg, UnitPropertiesDlg, PreviewDialog, PrintPrefsDlg, RenderDemoDlg, SelMediaDlg, SuperGallery, SGalleryOptionsDlg, SGallerySortDlg, SGallerySearchDlg, TEMPLATESGallery, BitmapSGallery, ColourSGallery, ColourNameDlg, FrameSGallery, LayerSGallery, LibraryGallery, LibClipartSGallery, LibFillsSGallery, LineGallery, NameGallery, NameObjectsDlg, StatusLine, StandardBar, TipsDlg, TemplateDialog, ToolbarDlg, ToolnameDlg, CustomizeBarDlg, TraceDlg, URLImportDlg, WebPrefsDlg, NativePrefsDlg, XSEPSExportOptions, BevelInfoBarOp, BezToolInfoBarOp, BlendInfoBarOp, BlankInfoBarOp, ContourInfoBarOp, GradInfoBarOp, TranspInfoBarOp, FreeHandInfoBarOp, GridInfoBarOp, LiveEffectsInfoBarOp, MouldInfoBarOp, PenToolInfoBarOp, QuickShapeBaseInfoBarOp, SelectorInfoBarOp, SliceInfoBarOp, TextInfoBarOp, ZoomInfoBarOp, PasteSpecialDlg, PrintProgressDlg, FontsSGallery, and SGalleryLinePropertiesDlg.

Definition at line 2454 of file dialogop.cpp.

02455 {
02456     CheckMagic("DialogOp::Message");;
02457 
02458     if (MESSAGE_IS_A(Message, DocChangingMsg))
02459     {
02460         // Get a pointer the correct type of message.
02461         DocChangingMsg *pDocMsg = (DocChangingMsg *) Message;
02462 
02463         if ( static_cast<OpMsg*> ( Message )->MsgType  == (OpMsg::OpMsgType)DocViewMsg::SELCHANGED )
02464         {
02465             // Selected document has changed:
02466 
02467             // Make sure we were actually up to date before..
02468             if (pDocMsg->pOldDoc)
02469             {
02470                 ERROR3IF(pOurDoc != pDocMsg->pOldDoc,
02471                          "pOurDoc ptr is out of date in DialogOp::Message()");
02472             }
02473 
02474             // Update our document pointer (might be NULL).
02475             pOurDoc = pDocMsg->pNewDoc;
02476         }
02477     }
02478     else if (MESSAGE_IS_A(Message, DocViewMsg))
02479     {
02480         // Get a pointer the correct type of message.
02481         DocViewMsg *pDocViewMsg = (DocViewMsg *) Message;
02482 
02483         if ( static_cast<OpMsg*> ( Message )->MsgType  == (OpMsg::OpMsgType)DocViewMsg::SELCHANGED )
02484         {
02485             // Selected document has changed:
02486             // Make sure we were actually up to date before..
02487             ERROR3IF(pOurView != (View *) pDocViewMsg->pOldDocView,
02488                      "pOurView ptr is out of date in DialogOp::Message()");
02489 
02490             // Update our view pointer.
02491             pOurView = (View *) pDocViewMsg->pNewDocView;
02492         }
02493     }
02494     else if (IS_OUR_DIALOG_MSG(Message))
02495     {
02496         // We have an unhandled dialog message.  If it is for a button with the appropriate
02497         // "help" resource/gadget ID then run some help for this dialog.
02498         DialogMsg* pDlgMsg = (DialogMsg*) Message;
02499 
02500         // Messages for individial controls with OpDescriptors need to be sent to that control
02501         if (pDlgMsg->GadgetID)
02502         {
02503             OpDescriptor *OpDesc = GetGadgetOpDescriptor(pDlgMsg->GadgetID);
02504             if (OpDesc)
02505             {
02506                 // These tend to change bar state
02507                 ControlList::Get()->Changed();
02508                 // Its a message for the current OpDescriptor
02509                 // Convert the dialog message into a OpDescriptor control message
02510                 BROADCAST_TO_CLASS(
02511                     OpDescControlMsg(OpDesc, 
02512                                         pDlgMsg->DlgMsg, 
02513                                         OpDesc->GetBarControlInfo()->ControlID,
02514                                         OpDesc->GetBarControlInfo()->ResourceID,
02515                                         this), OpDescriptor);
02516             }
02517         }
02518 
02519         switch (pDlgMsg->DlgMsg)
02520         {
02521             case DIM_LFT_BN_CLICKED:
02522 
02523             case DIM_RGT_BN_CLICKED:
02524                 // If they clicked on a "help" button then invoke the help system for this dialog.
02525                 if (pDlgMsg->GadgetID == _R(ID_CC_HELP_BUTTON))
02526                 {
02527                     // Invoke the help system and mark this message as completely processed.  If we
02528                     // don't and instead fall through to the base-class handler, the base class might
02529                     // conceivably fail the message (as it doesn't know anything about it).
02530                     HelpUser(*this);
02531                     return DLG_EAT_IF_HUNGRY(pDlgMsg);
02532                 }
02533                 break;
02534             
02535             case DIM_TITLEFOCUSWARN:
02536                 {
02537                     // this indicates that the dialog has been moved, we need to send a message saying that the
02538                     // screen has changed
02539                     BROADCAST_TO_ALL(ScreenChangeMsg());
02540                 }
02541                 break;
02542 
02543             case DIM_DLG_MOVED:
02544                 {
02545                     BROADCAST_TO_ALL(ScreenChangeMsg());
02546                 }
02547                 break;
02548 
02549             case DIM_COMMIT:
02550             case DIM_CANCEL:
02551             case DIM_CREATE:
02552             case DIM_BAR_DEATH:
02553                 {
02554                     // These messages need to be propagated to all controls
02555                     BOOL Destroy = ControlList::Get()->SendMessageToAllControls(this, pDlgMsg); 
02556 
02557                     // These messages need to be broadcast to all controls within the dialog
02558                     // temporarily ALWAYS destroy if we get as far as here on a DIM_CANCEL
02559                     if ((pDlgMsg->DlgMsg==DIM_CANCEL) || (pDlgMsg->DlgMsg==DIM_COMMIT) ||Destroy )
02560                     {
02561                         Close();
02562                         End();
02563                         // the Op has now been deleted. Exit fast!
02564                         return OK;
02565                         //DlgMgr->Delete(WindowID, this);
02566                         //WindowID = NULL;
02567                     }
02568                     break;
02569                 }
02570 
02571             default:
02572                 break;
02573         }
02574 
02575         // Pass to the base class for possibly more handling.  If there isn't any then we
02576         // eat the message, as we know it's for this dialogue.
02577         MsgResult msgrslt = Operation::Message(Message);
02578         return (msgrslt == OK) ? DLG_EAT_IF_HUNGRY(pDlgMsg) : msgrslt;
02579     } 
02580 
02581     // Not interested or possibly more to do - pass to base class.
02582     return Operation::Message(Message);
02583 }      

void DialogOp::Open  ) 
 

The open dialog method displays the dialog box. If Create was successful then this function cannot fail.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 317 of file dialogop.cpp.

00318 {                            
00319     ENSURE(WindowID != NULL, "Trying to open a dialog box which has not been created !"); 
00320     
00321     // we may wish to subclass some of our controls, do so here
00322     AddControlsToHelper();
00323 
00324     // open the dialog
00325     DlgMgr->Open(WindowID,this); 
00326 }

void DialogOp::PaintGadgetNow CGadgetID  gid  ) 
 

Immediately paints any invalid areas the control may have (like the "UpdateWindow" function in Windows, really).

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/9/94
Parameters:
gid the gadget ID of a control [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 2006 of file dialogop.cpp.

02007 {
02008     DialogManager::PaintGadgetNow(GetReadWriteWindowID(), gid);
02009 }

void DialogOp::ProfileSelectionChange DialogMsg Message,
CGadgetID  GadgetID
[protected]
 

Responds to CGadgetID's corresponding profile dialog messages. Profile changes are applied (internally) through ChangeProfile ().

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/1/2000
Parameters:
CBiasGainGadget& and its GadgetID (for added safety) [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
InformationBarOp::ChangeProfile ()

Definition at line 3740 of file dialogop.cpp.

03741 {
03742     CProfileBiasGain* pBiasGainValue = NULL;
03743     switch (Message->DlgMsg)
03744     {
03745     case DIM_PROFILE_CHANGED:
03746         pBiasGainValue  =  reinterpret_cast<CProfileBiasGain* /*const**/>( Message->DlgMsgParam );
03747         ChangeProfile( pBiasGainValue, GadgetID );
03748         break;
03749             
03750     case DIM_PROFILE_CHANGING:
03751         if (m_bInteractiveProfiles == TRUE)
03752         {
03753             pBiasGainValue  =  reinterpret_cast<CProfileBiasGain* /*const**/>( Message->DlgMsgParam );
03754             ChangeProfile( pBiasGainValue, GadgetID );
03755         }
03756         break;
03757 
03758     case DIM_PROFILE_CHANGEIDLE:
03759         pBiasGainValue  =  reinterpret_cast<CProfileBiasGain* /*const**/>( Message->DlgMsgParam );
03760         ChangeProfileOnIdle( pBiasGainValue, GadgetID );
03761         break;
03762 
03763     default:
03764         break;
03765     } // end switch (message)
03766 }

BOOL DialogOp::ReleaseMouse CGadgetID  gadID  ) 
 

Releases the mouse captured by the given control.

Author:
Stefan_Stoykov (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/04/97
Parameters:
gadID ID of the "gadget" (control) which is to receive the [INPUTS] input focus
- [OUTPUTS]
Returns:
TRUE if successful.

Errors: -

See also:
DialogManager::CaptureMouse; DialogManager::ReleaseMouse

Definition at line 1961 of file dialogop.cpp.

01962 {
01963     return DialogManager::ReleaseMouse(GetReadWriteWindowID(), gadID);
01964 }

void DialogOp::RemoveControlsFromHelper  )  [protected, virtual]
 

If you added some controls in AddControlsToHelper then you must remove them here.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/7/2000
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
First implementation in BrushDlg.h/cpp, DialogControlHelper class (DlgCtHlp.h/.cpp)

Reimplemented in CBrushEditDlg.

Definition at line 462 of file dialogop.cpp.

00463 {
00464     return;
00465 }

BOOL DialogOp::RemoveDialogControlFromHelper CGadgetID  GadgetID,
CDlgResID  PageID
[protected]
 

Calls the dialog manager remove this control from the dialog control helper Overridden version.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/9/99
Parameters:
GadgetID [INPUTS] PageID - ID of the tabbed dialog page this control is on

Definition at line 2331 of file dialogop.cpp.

02332 {
02333     // get the handle of the page first
02334     CWindowID PageWindow = DialogManager::GetPageWindow(WindowID, PageID);
02335 
02336     if (PageWindow == NULL)
02337         return FALSE;
02338 
02339     return DialogManager::RemoveDialogControlFromHelper(PageWindow, GadgetID);
02340 
02341 }

BOOL DialogOp::RemoveDialogControlFromHelper CGadgetID  GadgetID  )  [protected]
 

Calls the dialog manager remove this control from the dialog control helper.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/9/99
Parameters:
GadgetID [INPUTS]

Definition at line 2313 of file dialogop.cpp.

02314 {
02315     return DialogManager::RemoveDialogControlFromHelper(GetReadWriteWindowID(), GadgetID);
02316 }

void DialogOp::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'.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/1/95
Parameters:
wid - The Window identifier [INPUTS] Gadget - The ID of the gadget that you want to be redrawn
RectToScroll - The MILLIPOINT rectangle to scroll, in the (0,0)->(dx,dy) coordinate space used in ReDrawInfoType structures. Think of this rectangle as the visible portion of the window which will be copied (some of which will be scrolled out of view), and let this method worry about invalidating the 'hole' left behind to finish off the display. This parameter may be NULL, in which case the entire gadget will be scrolled

ScrollBy - Gives the X and Y amounts in millipoints to scroll the given rectangle. I don't know what will happen if neither of these values is zero!

Notes: If you are using a Virtual coordinate space which differs from the (0,0)->(dx,dy) space that this requires, then you'll need to call some conversion methods which do not yet exist!

See the dlgmgr version for fuller details

See also:
DialogManager::ScrollKernelRenderedGadget

Definition at line 2101 of file dialogop.cpp.

02103 {
02104     // Call the Dialog Manager
02105     DialogManager::ScrollKernelRenderedGadget(GetReadWriteWindowID(), Gadget, RectToScroll, ScrollBy);
02106 }

BOOL DialogOp::SelectCustomComboGadgetValueOnString CGadgetID  Gadget,
StringBase StrVal
 

See DialogManager for a description of this function.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com> S
Date:
9/9/99
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SelectCustomComboGadgetValueOnString

Definition at line 922 of file dialogop.cpp.

00923 {
00924     return (DlgMgr->SelectCustomComboGadgetValueOnString (GetReadWriteWindowID(), Gadget, StrVal));
00925 }

BOOL DialogOp::SelectTreeGadgetItem CGadgetID  Gadget,
CTreeItemID  hItem,
BOOL  bNewState = TRUE
 

Definition at line 3625 of file dialogop.cpp.

03626 {
03627     return (DlgMgr->SelectTreeGadgetItem(GetReadWriteWindowID(), Gadget, hItem, bNewState));
03628 }

BOOL DialogOp::SendMessageToControl OpDescriptor OpDesc,
DialogMsg DlgMsg,
BOOL  Processed = FALSE
 

Conditionally sends a message to a particular control pointed to by an opdescriptor,.

Author:
Alex Bligh
Date:
03-Mar-2005
Parameters:
Msg,: The message to handle [INPUTS]
- [OUTPUTS]
Returns:
TRUE to destroy the window, else FALSE

Errors: -

See also:
-
The message is only sent if it is destined for that OpDescriptor - that's a broadcast, or if the dialog message has a gadget ID equal to that of the opdescriptor

Definition at line 3699 of file dialogop.cpp.

03700 {
03701     BOOL DestroyWindow = FALSE;
03702     if (OpDesc)
03703     {
03704         // If the message is DIM_CANCEL then we must inform all OpDescriptors on the 
03705         // bar that their controls are about to be destroyed. 
03706         if (DlgMsg->DlgMsg == DIM_CANCEL||DlgMsg->DlgMsg == DIM_BAR_DEATH)
03707         {
03708             // Tell the OpDescriptor its controls are about to be destroyed
03709             OpDescControlDestroyMsg op(OpDesc, OpDesc->GetBarControlInfo()->ControlID, OpDesc->GetBarControlInfo()->ResourceID, this);
03710             OpDesc->Message(&op);
03711             DestroyWindow = TRUE; // Cos we are cancelling
03712         }
03713         else if  (DlgMsg->DlgMsg == DIM_CREATE)
03714         {
03715             // Tell the OpDescriptor its controls have been created 
03716             OpDescControlCreateMsg op(OpDesc, OpDesc->GetBarControlInfo()->ControlID, OpDesc->GetBarControlInfo()->ResourceID, this);
03717             OpDesc->Message(&op);
03718         }       
03719     }
03720     return DestroyWindow;
03721 }

void DialogOp::SetBitmapButtonIndexes CGadgetID  GadgetID,
UINT32  UnselectedIndex,
UINT32  SelectedIndex
 

Calls the dialog manager to set the bitmaps of the cc_bitmapbutton control.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/9/99
Parameters:
GadgetID - The gadget to set the bitmaps of [INPUTS] SelectedIndex - index for the selected state glyph UnselectedIndex - index for the unselected state glyph

Definition at line 2254 of file dialogop.cpp.

02255 {
02256     // call the dialog manager function
02257     DialogManager::SetBitmapButtonIndexes(GetReadWriteWindowID(), GadgetID, SelectedIndex, UnselectedIndex);
02258 }

BOOL DialogOp::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.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/7/94
Parameters:
Gadget - The Gadget to be set [INPUTS] IsSelected - TRUE to select, FALSE to deselect the gadget ListPos - The item (in list fields) to be affected
- [OUTPUTS]
Returns:
TRUE if it succeeded

Errors: -

See also:
DialogManager::SetBoolGadgetValue

Definition at line 765 of file dialogop.cpp.

00766 {                                                
00767     return(DlgMgr->SetBoolGadgetSelected(GetReadWriteWindowID(), Gadget, IsSelected, ListPos));
00768 
00769 //  return(DlgMgr->SetLongGadgetValue(WindowID, Gadget,
00770 //                                  (IsSelected) ? TRUE : FALSE, EndOfList, ListPos));
00771 }    

void DialogOp::SetComboListLength CGadgetID  Gadget  ) 
 

See DialogManager for a description of this function.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetUnitGadgetValue

Definition at line 629 of file dialogop.cpp.

00630 {
00631     DlgMgr->SetComboListLength(GetReadWriteWindowID(),Gadget);
00632 }  

BOOL DialogOp::SetCustomComboGadgetValue CGadgetID  Gadget,
CustomComboBoxControlDataItem *  TheItem,
BOOL  EndOfList = TRUE,
INT32  ListPos = 0
 

See DialogManager for a description of this function.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com> S
Date:
12/8/99
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetCustomComboGadgetValue

Definition at line 895 of file dialogop.cpp.

00899 {
00900 #ifndef EXCLUDE_FROM_XARALX
00901     return( DlgMgr->SetCustomComboGadgetValue( GetReadWriteWindowID(), Gadget, TheItem, EndOfList, ListPos ) ); 
00902 #else
00903     return FALSE;
00904 #endif
00905 }

BOOL DialogOp::SetDimensionGadgetValue CGadgetID  Gadget,
MILLIPOINT  Value,
Node pNode,
BOOL  IncludeUnitSpecifier = TRUE,
BOOL  EndOfList = FALSE,
INT32  ListPos = 0
 

See DialogManager for a description of this function.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/6/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetDimensionGadgetValue

Definition at line 1209 of file dialogop.cpp.

01216 {
01217     return(DlgMgr->SetDimensionGadgetValue(GetReadWriteWindowID(), Gadget, Value, pNode, IncludeUnitSpecifier, EndOfList, ListPos)); 
01218 }  

BOOL DialogOp::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.

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/95

Definition at line 679 of file dialogop.cpp.

00687 {
00688     return DlgMgr->SetDimensionUnitGadgetValue(GetReadWriteWindowID(), Gadget, units, Value, pNode,
00689                                                IncludeUnitSpecifier, EndOfList, ListPos); 
00690 }  

BOOL DialogOp::SetDoubleGadgetValue CGadgetID  Gadget,
double  value,
BOOL  EndOfList = TRUE,
INT32  ListPos = 0
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetLongGadgetValue

Definition at line 737 of file dialogop.cpp.

00741 {                                                
00742     return(DlgMgr->SetDoubleGadgetValue(GetReadWriteWindowID(), Gadget, value, EndOfList, ListPos));  
00743 }    

void DialogOp::SetEditGadgetType CGadgetID  Gadget,
UINT32  IDSValidChar
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetEditGadgetType

Definition at line 2378 of file dialogop.cpp.

02379 {                                                          
02380     DlgMgr->SetEditGadgetType(GetReadWriteWindowID(), Gadget, IDSValidChar); 
02381 }  

void DialogOp::SetEditGadgetType CGadgetID  Gadget,
EditGadgetType  Type
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetEditGadgetType

Definition at line 2358 of file dialogop.cpp.

02359 {
02360     DlgMgr->SetEditGadgetType(GetReadWriteWindowID(), Gadget, Type);
02361 }                                                     

void DialogOp::SetGadgetBitmap CGadgetID  Gadget,
ResourceID  Bitmap
 

Calls the dialog manager to set the bitmaps of the gadget.

Author:
Alex Bligh <alex@alex.org.uk>
Date:
07/05/2006
Parameters:
GadgetID - The gadget to set the bitmaps of [INPUTS] Bitmap - The ID of the bitmap

Definition at line 2198 of file dialogop.cpp.

02199 {
02200     // Call the dialog Manager
02201     DialogManager::SetGadgetBitmap(GetReadWriteWindowID(), Gadget, Bitmap);
02202 }

void DialogOp::SetGadgetBitmaps CGadgetID  GadgetID,
const CGadgetImageList imagelist
 

Calls the dialog manager to set the bitmaps of the gadget.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
08/Feb/2006
Parameters:
GadgetID - The gadget to set the bitmaps of [INPUTS] imagelist - list of images for this gadget

Definition at line 2180 of file dialogop.cpp.

02181 {
02182     // Call the dialog Manager
02183     DialogManager::SetGadgetBitmaps(GetReadWriteWindowID(), GadgetID, imagelist);
02184 }

void DialogOp::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).

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/10/94
Parameters:
GadgetID - The gadget to set the bitmaps of [INPUTS] Bitmap1 - The first Bitmaps ID Bitmap2 - The Second bitmaps ID

Definition at line 2161 of file dialogop.cpp.

02162 {
02163     // Call the dialog Manager
02164     DialogManager::SetGadgetBitmaps(GetReadWriteWindowID(), GadgetID, Bitmap1, Bitmap2);
02165 }

BOOL DialogOp::SetGadgetHelp CGadgetID  Gadget,
UINT32  BubbleID,
UINT32  StatusID,
UINT32  ModuleID = 0
 

See DialogManager for a description of this function.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/4/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetGadgetHelp

Definition at line 1266 of file dialogop.cpp.

01270 {
01271     return(DlgMgr->SetGadgetHelp(GetReadWriteWindowID(), Gadget, BubbleID, StatusID, ModuleID));  
01272 }   

BOOL DialogOp::SetGadgetPosition CGadgetID  Gadget,
const RECT Rect
 

Definition at line 3512 of file dialogop.cpp.

03513 {
03514     // Call the Dialog Manager
03515     return DialogManager::SetGadgetPosition(GetReadWriteWindowID(), Gadget, Rect);
03516 }

BOOL DialogOp::SetGadgetPosition CGadgetID  Gadget,
const wxRect &  Rect
 

Allows the user to set the current position of the specified icon or control.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/6/97
Parameters:
Rect pointer to the rectangle to fill in [INPUTS]
Returns:
True if the call was successful, FALSE otherwise.
See also:
DialogOp::SetGadgetPosition; DialogManager::GetGadgetPosition;

Definition at line 3506 of file dialogop.cpp.

03507 {
03508     // Call the Dialog Manager
03509     return DialogManager::SetGadgetPosition(GetReadWriteWindowID(), Gadget, Rect);
03510 }

BOOL DialogOp::SetGadgetRange CGadgetID  GadgetID,
INT32  Min,
INT32  Max,
INT32  PageInc = 1
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetGadgetValue

Definition at line 1135 of file dialogop.cpp.

01136 {                                                       
01137     return (DlgMgr->SetGadgetRange(GetReadWriteWindowID(), GadgetID, Min, Max, PageInc));   
01138 } 

BOOL DialogOp::SetGadgetWritable CGadgetID  GadgetID,
BOOL  enable
 

Sets the state of the 'Read Only' flag of an edit field or combo box.

Author:
DMC
Date:
15/11/94
Parameters:
id,the 'IDC_?' of the control. [INPUTS] enable, TRUE to allow the control to be typed into. FALSE to make it read only.

Definition at line 1859 of file dialogop.cpp.

01860 {
01861     return( DlgMgr->SetGadgetWritable( GetReadWriteWindowID(), GadgetID, enable ) );
01862 }

BOOL DialogOp::SetKeyboardFocus CGadgetID  gadID  ) 
 

Sets the keyboard input focus to the given control.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/11/94
Parameters:
gadID ID of the "gadget" (control) which is to receive the [INPUTS] input focus
- [OUTPUTS]
Returns:
TRUE if successful.

Errors: -

See also:
DialogManager::SetKeyboardFocus; DialogManager::DefaultKeyboardFocus

Definition at line 1920 of file dialogop.cpp.

01921 {
01922     return DialogManager::SetKeyboardFocus(GetReadWriteWindowID(), gadID);
01923 }

BOOL DialogOp::SetLongGadgetValue CGadgetID  Gadget,
INT32  value,
BOOL  EndOfList = TRUE,
INT32  ListPos = 0
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetLongGadgetValue

Definition at line 711 of file dialogop.cpp.

00715 {                                                
00716     return(DlgMgr->SetLongGadgetValue(GetReadWriteWindowID(), Gadget, value, EndOfList, ListPos));  
00717 }    

BOOL DialogOp::SetMemoryGadgetValue CGadgetID  Gadget,
UINT32  Value,
BOOL  EndOfList = TRUE,
INT32  ListPos = 0
 

See DialogManager for a description of this function.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/1/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetMemoryGadgetValue; DialogManager::SetMemoryGadgetValue;

Definition at line 1239 of file dialogop.cpp.

01244 {
01245     return(DlgMgr->SetMemoryGadgetValue(GetReadWriteWindowID(), Gadget, Value, EndOfList, ListPos)); 
01246 }  

BOOL DialogOp::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.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/94
Parameters:
GroupGadgets - A NULL-terminated list of gadgets in the radio group [INPUTS] SelectedGadget - The gadget from this list which you wish to be selected
- [OUTPUTS]
Returns:
TRUE if it succeeded

Errors: ERROR3 will occur if the list is empty, or if the SelectedGadget does not appear in the list.

See also:
DialogManager::SetBoolGadgetValue; DialogOp::GetRadioGroupSelected

Definition at line 797 of file dialogop.cpp.

00798 {
00799     INT32 i = 0;
00800     INT32 returnval = 0;        // Accumulator for BOOL return values
00801 #ifdef _DEBUG
00802     BOOL WasInList = FALSE;
00803 #endif
00804 
00805     while (GroupGadgets[i] != 0)
00806     {
00807 #ifdef _DEBUG
00808         if (GroupGadgets[i] == SelectedGadget)
00809             WasInList = TRUE;
00810 #endif
00811         returnval |= (INT32) SetBoolGadgetSelected(GroupGadgets[i], (GroupGadgets[i] == SelectedGadget));
00812         i++;
00813     }
00814 
00815 #ifdef _DEBUG
00816     if (!WasInList)
00817         ERROR3("DialogOp::SetRadioGroupSelected - SelectedGadget is not in the list of radio gadgets");
00818 #endif
00819 
00820     return(returnval != 0);
00821 }

void DialogOp::SetResDropListValue const CGadgetID  DropListID,
const BOOL  bIncludeAuto = TRUE,
const INT32  iValue = 0
 

Builds a drop down list for a combo box.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
10-06-2005

Definition at line 997 of file dialogop.cpp.

01001 {
01002     // TODO:
01003     // Get XML document from alongside exe
01004     // Discover index by comparing value against values in XML
01005     INT32 iAutoAdjust = bIncludeAuto ? 1 : 0;
01006 
01007     switch (iValue)
01008     {
01009     case 0:
01010         if (bIncludeAuto)
01011         {
01012             SetSelectedValueIndex(DropListID, 0);
01013         }
01014         break;
01015 //  case 72:
01016 //      SetSelectedValueIndex(DropListID, iAutoAdjust + 0);
01017 //      break;
01018     case 96:
01019         SetSelectedValueIndex(DropListID, iAutoAdjust + 0);
01020         break;
01021     case 150:
01022         SetSelectedValueIndex(DropListID, iAutoAdjust + 1);
01023         break;
01024     case 200:
01025         SetSelectedValueIndex(DropListID, iAutoAdjust + 2);
01026         break;
01027     case 300:
01028         SetSelectedValueIndex(DropListID, iAutoAdjust + 3);
01029         break;
01030     default:
01031         {
01032             // Remove selected item from list first
01033             // otherwise is screws up the value we are about to put into the field
01034             SetSelectedValueIndex(DropListID, -1);
01035 
01036             TCHAR str[32];
01037             String_32 strTemp(_R(IDS_RES_PPI_FORMAT));
01038             camSnprintf( str, 32, strTemp, iValue );
01039             String_32 strPPI(str);
01040             SetStringGadgetValue(DropListID, strPPI, FALSE, -1);
01041         }
01042         break;
01043     }
01044 }

BOOL DialogOp::SetSelectedValueIndex CGadgetID  Gadget,
INT32  Index
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetSelectedValueIndex

Definition at line 1156 of file dialogop.cpp.

01158 { 
01159     return (DlgMgr->SetSelectedValueIndex(GetReadWriteWindowID(), Gadget, Index));  
01160 }                                              

BOOL DialogOp::SetSelectedValueRange CGadgetID  Gadget,
WORD  StartIndex,
WORD  EndIndex,
BOOL  Select = TRUE
 

See DialogManager for a description of this function.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/04/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetSelectedValueIndex

Definition at line 1180 of file dialogop.cpp.

01184 {
01185     return (DlgMgr->SetSelectedValueRange(GetReadWriteWindowID(), Gadget, StartIndex, EndIndex, Select));   
01186 }

BOOL DialogOp::SetStringGadgetValue CGadgetID  Gadget,
const StringBase StrValue,
BOOL  EndOfList = TRUE,
INT32  ListPos = 0
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetStringGadgetValue

Definition at line 869 of file dialogop.cpp.

00873 {      
00874     return (DlgMgr->SetStringGadgetValue(GetReadWriteWindowID(), Gadget, StrValue, EndOfList, ListPos)); 
00875 }

BOOL DialogOp::SetStringGadgetValue CGadgetID  Gadget,
UINT32  IDStr,
BOOL  EndOfList = TRUE,
INT32  ListPos = 0
 

Definition at line 842 of file dialogop.cpp.

00847 {       
00848     return(DlgMgr->SetStringGadgetValue(GetReadWriteWindowID(), Gadget, IDStr, EndOfList, ListPos));  
00849 }

UINT32 DialogOp::SetTimer UINT32  nIDEvent,
UINT32  nElapse,
void(*)(void *)  lpfnTimer = 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.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/97
Parameters:
nIDEvent Specifies a nonzero timer identifier. [INPUTS] nElapse Specifies the time-out value, in milliseconds. param An opaque parameter sent to the timer function (along with nIDEvent)
Returns:
The timer identifier of the new timer if Nonzero, Zero means a problem.
See also:
DialogOp::KillTimer; DialogManager::SetTimer;

Definition at line 3384 of file dialogop.cpp.

03385 {
03386     // Call the Dialog Manager
03387     return DialogManager::SetTimer( this, GetReadWriteWindowID(), nIDEvent, nElapse, lpfnTimer, param, OneShot );
03388 }

BOOL DialogOp::SetTitlebarName String_256 Name  ) 
 

Sets the titlebar text.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/12/94
Parameters:
The title bar name [INPUTS]
- [OUTPUTS]
Returns:
FALSE if the function fails, otherwise TRUE

Errors: -

See also:
-

Definition at line 2639 of file dialogop.cpp.

02640 {                                                                
02641     return(DlgMgr->SetTitlebarName(GetReadWriteWindowID(), Name)); 
02642 }

CTreeItemID DialogOp::SetTreeGadgetItem CGadgetID  Gadget,
CTreeItemID  hParent,
const StringBase str,
CTreeItemID  hInsAfter,
INT32  iImage,
CCObject pObj = NULL
 

Definition at line 3615 of file dialogop.cpp.

03616 {
03617     return (DlgMgr->SetTreeGadgetItem(GetReadWriteWindowID(), Gadget, hParent, str, hInsAfter, iImage, pObj));
03618 }

BOOL DialogOp::SetUnitGadgetValue CGadgetID  Gadget,
UnitType  Unit,
MILLIPOINT  Value,
BOOL  EndOfList = TRUE,
INT32  ListPos = 0
 

See DialogManager for a description of this function.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
DialogManager::SetUnitGadgetValue

Definition at line 654 of file dialogop.cpp.

00660 {
00661     return(DlgMgr->SetUnitGadgetValue(GetReadWriteWindowID(), Gadget, Unit, Value, EndOfList, ListPos)); 
00662 }  

void DialogOp::SetVisibility BOOL  Visible  )  [virtual]
 

Used by the tool bar customize system to open and close a tool bar.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/4/94
Parameters:
Open - if TRUE then open DialogOp in its last pos if it is [INPUTS] currently closed. if FALSE, it is closed
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented in NameGallery, and SuperGallery.

Definition at line 3070 of file dialogop.cpp.

03071 {
03072     if (Visible)
03073     {
03074         if (!WindowID)
03075         {
03076             Create();
03077         }
03078         Open();
03079     }
03080     else
03081     {
03082         Close();
03083     }
03084 }

BOOL DialogOp::SetWindowPosition const RECT Rect  ) 
 

Definition at line 3487 of file dialogop.cpp.

03488 {
03489     // Call the Dialog Manager
03490     return DialogManager::SetWindowPosition(GetReadWriteWindowID(), Rect);
03491 }

BOOL DialogOp::SetWindowPosition const wxRect &  Rect  ) 
 

Allows the user to set the current window position.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/6/97
Parameters:
Rect pointer to the rectangle to fill in [INPUTS]
Returns:
True if the call was successful, FALSE otherwise.
See also:
DialogOp::SetWindowPosition; DialogManager::GetWindowPosition;

Definition at line 3481 of file dialogop.cpp.

03482 {
03483     // Call the Dialog Manager
03484     return DialogManager::SetWindowPosition(GetReadWriteWindowID(), Rect);
03485 }

BOOL DialogOp::TreeGadgetExpandItem CGadgetID  Gadget,
CTreeItemID  hItem
 

Definition at line 3640 of file dialogop.cpp.

03641 {
03642     return (DlgMgr->TreeGadgetExpandItem(GetReadWriteWindowID(), Gadget, hItem));
03643 }

BOOL DialogOp::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.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/09/94
Parameters:
Dialog - pointer to the DialogOp containing the gadget. [INPUTS] Gadget - the gadget ID to update. NewString - the new contents of the gadget.
Returns:
TRUE if the dialogue was updated. FALSE if it wasn't.

Definition at line 3572 of file dialogop.cpp.

03573 {
03574     String_256 OldString = GetStringGadgetValue(Gadget, NULL, -1);
03575 
03576     if (OldString != *NewString)
03577     {
03578         SetStringGadgetValue(Gadget, *NewString);
03579         return TRUE;
03580     }
03581     else
03582     {               
03583         return FALSE;
03584     }
03585 }


Friends And Related Function Documentation

friend class DialogEventHandler [friend]
 

Definition at line 147 of file dialogop.h.

friend class DialogManager [friend]
 

Definition at line 148 of file dialogop.h.


Member Data Documentation

DialogManager* DialogOp::DlgMgr [protected]
 

Definition at line 497 of file dialogop.h.

CDlgMode DialogOp::DlgMode [protected]
 

Definition at line 490 of file dialogop.h.

CDlgResID DialogOp::DlgResID [protected]
 

Definition at line 488 of file dialogop.h.

BOOL DialogOp::m_bInteractiveProfiles [private]
 

Definition at line 547 of file dialogop.h.

UINT32 DialogOp::MagicWord [private]
 

Definition at line 546 of file dialogop.h.

INT32 DialogOp::PageToOpen [protected]
 

Definition at line 502 of file dialogop.h.

CWindowID DialogOp::ParentDlgWnd [protected]
 

Definition at line 493 of file dialogop.h.

DialogEventHandler* DialogOp::pEvtHandler [protected]
 

Definition at line 495 of file dialogop.h.

CDlgResID DialogOp::ReadWritePage [protected]
 

Definition at line 499 of file dialogop.h.

CDlgResID DialogOp::SubDlgID [protected]
 

Definition at line 489 of file dialogop.h.

CWindowID DialogOp::WindowID
 

Definition at line 469 of file dialogop.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:53:37 2007 for Camelot by  doxygen 1.4.4