DialogTabOp Class Reference

The abstract DialogTabOp class is used as the base class for all tabbed Dialog box classes in Camelot. It is a simple specialisation of a DialogOp. More...

#include <dialogop.h>

Inheritance diagram for DialogTabOp:

DialogOp Operation MessageHandler ListItem CCObject SimpleCCObject AppPrefsDlg BfxDlg BlobbyTabDlg BmapPrevDlg CBrushEditDlg GIFAnimationPropertyTabsDlg LayerPropertyTabsDlg PrintPrefsDlg List of all members.

Public Member Functions

 DialogTabOp (CDlgResID DummyDialogResID, CDlgMode Mode, CCRuntimeClass *Class=CC_RUNTIME_CLASS(DialogOp), INT32 OpeningPage=-1)
 The Constructor of the DialogTabOp class simply sets the resource ID of the dialog and its modality.
virtual BOOL RegisterYourPagesInOrderPlease ()
 This virtual function will get called to give you a chance to add pages to your DialogTabOp. This function will usually make multiple calls to AddAPage to register the initial set of pages to be contained in the tab dialog. The pages should all be the same size and be registered in the left to right order in which you wish them to appear.
BOOL AddAPage (CDlgResID DialogResID, CGadgetID Gadget=0)
 This function adds a dialog page to the tabbed dialog.
void SetName (String_256 *Name)
 This function should be called BEFORE calling create. It sets the title bar name of the dialog.
BOOL TalkToPage (CDlgResID PageID)
 Set's the Page that you wish to communicate with. Initially this page is set to NULL which means that all communication will be directed at the tabbed dialog itself. After this call all subsequent Get and Set functions will be directed at the specified page within the dialog.
String_256GetName (void)
 Returns the name of the dialog.
virtual MsgResult Message (Msg *Message)
virtual void BrushEditDlgOnOK ()
void SetPropertyPageModified (BOOL Modified)
 Sets the modified property of the currently active property page of the current tabbed dialog (if it exists).
virtual BOOL LoadFrameFromResources ()
virtual BOOL HasImages ()
virtual TabType GetTabType ()
virtual CGadgetID GetDefaultBookGadget ()
 ~DialogTabOp ()
 The DialogTabOp destructor destroys the instance of the DialogTabOp and all associated resources. If the dialog was open then it is closed.
 DialogTabOp ()

Private Attributes

String_256 MyName

Detailed Description

The abstract DialogTabOp class is used as the base class for all tabbed Dialog box classes in Camelot. It is a simple specialisation of a DialogOp.

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

Definition at line 567 of file dialogop.h.


Constructor & Destructor Documentation

DialogTabOp::DialogTabOp CDlgResID  DummyDialogResID,
CDlgMode  Mode,
CCRuntimeClass Class = CC_RUNTIME_CLASS(DialogOp),
INT32  OpeningPage = -1
 

The Constructor of the DialogTabOp 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 DummyDialogResID: An ID which is unique to this dialog. Even though a Dialog resource is not specified for the tab dialog itself (only it's pages) we need to uniquly identify it. (so we can record it's position, etc.) Mode: The dialog's mode (modal, medeless)

Definition at line 3110 of file dialogop.cpp.

03113                                            :DialogOp(DummyDialogResID, Mode, 0, /*NULL, NULL,*/
03114                                                    Class, OpeningPage)
03115 {
03116     // The base class does most of the work as you can see
03117 };

DialogTabOp::~DialogTabOp  ) 
 

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

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

Errors: -

See also:
-

Definition at line 3272 of file dialogop.cpp.

03273 {
03274     // We must do this before we become a DialogOp (due changes to vtable as
03275     // destructors are called)
03276     if (WindowID != NULL)
03277     {
03278         DlgMgr->Delete(WindowID, this);
03279         WindowID = NULL;
03280     }
03281 
03282     //  Let's get the base class destructor to do all the work shall we
03283 
03284 };         

DialogTabOp::DialogTabOp  ) 
 

Definition at line 3355 of file dialogop.cpp.

03356 {                                   
03357     ENSURE(FALSE, "Invalid constructor called for DialogTabOp"); 
03358 }


Member Function Documentation

BOOL DialogTabOp::AddAPage CDlgResID  DialogResID,
CGadgetID  Gadget = 0
 

This function adds a dialog page to the tabbed dialog.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/11/94
Parameters:
DialogResID,: Dialog resource ID of the page you want to add to the Tabbed [INPUTS] dialog. GadgetID: The gadget ID of the book control to add it to, or zero for the default one (either specified using GetDefaultBookGadget or just the first one it finds). You only need specify this if the dialog contains multiple book controls (if there are multiple book controls and only one is kernel managed, the best thing to do is to override GetDefaultBookGadget)
- [OUTPUTS]
Returns:
-
Note:

This function can be called many times before the dialog is made visible. For a modal dialog this function should be called in response to a dialog DIM_CREATE message.

To keep things simple all Dialog pages should be the same size please.

Returns:
Errors: -
See also:
-

Definition at line 3150 of file dialogop.cpp.

03151 {     
03152     // Ask the Dialog Manager to add the page 
03153     return (DlgMgr->AddAPage(this, DialogResID, Gadget)); 
03154 }; 

virtual void DialogTabOp::BrushEditDlgOnOK  )  [inline, virtual]
 

Definition at line 599 of file dialogop.h.

00599 {}  // does nothing in the base class

virtual CGadgetID DialogTabOp::GetDefaultBookGadget  )  [inline, virtual]
 

Definition at line 611 of file dialogop.h.

00611 {return (CGadgetID)0;}

String_256 * DialogTabOp::GetName void   ) 
 

Returns the name of the dialog.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/11/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The dialog's name

Errors: -

See also:
-

Definition at line 3226 of file dialogop.cpp.

03227 {
03228     return &MyName;
03229 } 

virtual TabType DialogTabOp::GetTabType  )  [inline, virtual]
 

Reimplemented in AppPrefsDlg, and PrintPrefsDlg.

Definition at line 610 of file dialogop.h.

00610 {return TABTYPE_TABS;}

virtual BOOL DialogTabOp::HasImages  )  [inline, virtual]
 

Reimplemented in AppPrefsDlg, and PrintPrefsDlg.

Definition at line 608 of file dialogop.h.

00608 {return FALSE;}

virtual BOOL DialogTabOp::LoadFrameFromResources  )  [inline, virtual]
 

Definition at line 605 of file dialogop.h.

00605 {return FALSE;}

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

Reimplemented in AppPrefsDlg, GIFAnimationPropertyTabsDlg, AnimExOptns, BfxDlg, BlobbyTabDlg, BmapPrevDlg, CBrushEditDlg, LayerPropertyTabsDlg, and PrintPrefsDlg.

Definition at line 3334 of file dialogop.cpp.

03335 {
03336     if (IS_OUR_DIALOG_MSG(Message))
03337     {
03338         DialogMsg* pDlgMsg = (DialogMsg*) Message;
03339         if (pDlgMsg->PageID == 0)
03340         {
03341             // It's a message from the Property sheet itself
03342             if (pDlgMsg->GadgetID == _R(ID_HELP))
03343             {
03344                 // Map to our standard help ID. This is no longer equal to _R(ID_HELP)
03345                pDlgMsg->GadgetID = _R(ID_CC_HELP_BUTTON);
03346             }
03347         }
03348     } 
03349     return DialogOp::Message(Message); // Let the base class do the rest
03350 }

BOOL DialogTabOp::RegisterYourPagesInOrderPlease  )  [virtual]
 

This virtual function will get called to give you a chance to add pages to your DialogTabOp. This function will usually make multiple calls to AddAPage to register the initial set of pages to be contained in the tab dialog. The pages should all be the same size and be registered in the left to right order in which you wish them to appear.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/11/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
return TRUE if all calls to AddAPage returned TRUE
This function get's called directly from the Create method, Don't call it explicitly yourself. If you return FALSE from this method then the Create method will fail.

Returns:
Errors: -
See also:
DialogTabOp::AddPage

DialogOp::Create

Reimplemented in AppPrefsDlg, GIFAnimationPropertyTabsDlg, BfxDlg, BlobbyTabDlg, BmapPrevDlg, CBrushEditDlg, LayerPropertyTabsDlg, and PrintPrefsDlg.

Definition at line 3182 of file dialogop.cpp.

03183 {
03184     ERROR2(FALSE, "The DialogTabOp has not had any pages added during creation"); 
03185 } 

void DialogTabOp::SetName String_256 pName  ) 
 

This function should be called BEFORE calling create. It sets the title bar name of the dialog.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/11/94
Parameters:
pName,: The Dialogs name [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 3204 of file dialogop.cpp.

03205 {
03206     MyName = *pName; 
03207     return; // done
03208 } 

void DialogTabOp::SetPropertyPageModified BOOL  Modified  ) 
 

Sets the modified property of the currently active property page of the current tabbed dialog (if it exists).

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/3/2000
Parameters:
the modified value to set [INPUTS]
Returns:
-

Definition at line 3247 of file dialogop.cpp.

03248 {
03249     if (DlgMgr != NULL)
03250         DlgMgr->SetPropertyPageModified(Modified);
03251     else
03252         ERROR3("Dialog Manager is NULL in DialogTabOp::SetPropertyPageModified");
03253 }

BOOL DialogTabOp::TalkToPage CDlgResID  PageID  ) 
 

Set's the Page that you wish to communicate with. Initially this page is set to NULL which means that all communication will be directed at the tabbed dialog itself. After this call all subsequent Get and Set functions will be directed at the specified page within the dialog.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/11/94
Parameters:
PageID,: Resource ID of the page you wish to communicate with [INPUTS]
- [OUTPUTS]
Returns:
FALSE if the page has not yet been created. This function is guaranteed to return TRUE if it is called in responce to a message from the page.
eg. To set the string value of a gadget _R(IDC_BUTTON1) on page _R(IDD_PAGE1)

TalkToPage(_R(IDD_PAGE1)); SetStringGadgetValue(_R(IDC_BUTTON1), &Wibble);

Returns:
Errors: -
See also:
-

Definition at line 3316 of file dialogop.cpp.

03317 {
03318     ReadWritePage = PageID;
03319 
03320     // Determine if the page we are trying to talk to exists
03321     return (GetReadWriteWindowID() != NULL);
03322 }


Member Data Documentation

String_256 DialogTabOp::MyName [private]
 

Definition at line 621 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