LayerPropertyTabs Class Reference

These encompass all the tabs available for the layer properties dialog box to use. Derived off the baseclass which has a lot of globally useful functionality for all property tabbed dialog box handlers. This is just derived of the list class. More...

#include <layerprp.h>

Inheritance diagram for LayerPropertyTabs:

PropertyTabs ListItem CCObject SimpleCCObject GuidesPropertiesTab LayerPropertiesTab List of all members.

Public Member Functions

 LayerPropertyTabs ()
 Constructor.
virtual BOOL Init ()
 Initialiser.
virtual BOOL GetApplyNowState ()
 Finds out the current state of the apply now button.
virtual BOOL SetApplyNowState (BOOL NewState)
 Allows the setting of a new ApplyNow state.
virtual BOOL SetInitMessageState (BOOL NewState)
 Allows the setting of a new InitMessage state.
virtual BOOL GetInitMessageState ()
 Finds out whether we are sending/handling an init message or not.
virtual CDlgResID GetPageID ()
 Allows the options dialog code to determine the dialog ID of this section. Baseclass version, needs overriding by the tab handlers.
virtual BOOL InitSection ()
 Sets initial values for this tab on the layer properties dialog box. Baseclass version, needs overriding by the tab handlers.
virtual BOOL CommitSection ()
 Takes the values in this tab of the layer properties dialog box. Called when ok or apply now is pressed on the main dialog box. Baseclass version, needs overriding by the tab handlers.
virtual BOOL HandleMsg (DialogMsg *Msg)
 Handles all the messages for this layer property tab Baseclass version, needs overriding by the tab handlers.
virtual DialogTabOpGetTabbedDlg ()
 Let the base class know what/where the dialog box handling class is.

Static Public Member Functions

static BOOL InitLayerPropertyTabs ()
 Scans all LayerPropertyTabs to find out which LayerPropertyTabs are available for use, and instantiates one of each, and holds them in a list.
static BOOL DeinitLayerPropertyTabs ()
 Destroy all the LayerProperty objects.
static LayerPropertyTabsGetFirst ()
 Iterating through the list of LayerPropertyTabs known to Camelot. This function returns the first LayerPropertyTabs.
static LayerPropertyTabsGetNext (LayerPropertyTabs *)
 Iterating through the list of LayerPropertyTabs known to Camelot. This function returns the next LayerPropertyTabs.
static BOOL DeclareLayerProperty (LayerPropertyTabs *pLayerProperty)
 A function to declare a new tab to the system.
static BOOL SetTabbedDlg (DialogTabOp *pDlg)
 Let the base class know what/where the dialog box handling class is.

Static Public Attributes

static UINT32 LayersTabNumber = 0
static UINT32 GuidesTabNumber = 0

Static Protected Attributes

static DialogTabOppPropertiesDlg = NULL

Private Member Functions

 CC_DECLARE_DYNAMIC (LayerPropertyTabs)

Private Attributes

BOOL InitMessage
BOOL ApplyNow

Static Private Attributes

static List LayerPropertyTabsList

Detailed Description

These encompass all the tabs available for the layer properties dialog box to use. Derived off the baseclass which has a lot of globally useful functionality for all property tabbed dialog box handlers. This is just derived of the list class.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
See also:
PropertyTabs; ListItem;

Definition at line 251 of file layerprp.h.


Constructor & Destructor Documentation

LayerPropertyTabs::LayerPropertyTabs  ) 
 

Constructor.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
Returns:
Errors:
See also:
LayerPropertyTabsDlg;

Definition at line 1234 of file layerprp.cpp.

01235 {
01236     // Ensure our link to the application options dialog box is set to a good default.
01237     pPropertiesDlg = NULL;
01238 
01239     ApplyNow = FALSE;
01240     InitMessage = FALSE;
01241 }


Member Function Documentation

LayerPropertyTabs::CC_DECLARE_DYNAMIC LayerPropertyTabs   )  [private]
 

BOOL LayerPropertyTabs::CommitSection  )  [virtual]
 

Takes the values in this tab of the layer properties dialog box. Called when ok or apply now is pressed on the main dialog box. Baseclass version, needs overriding by the tab handlers.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
04/12/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
True if values in dialog box ok, False otherwise.

Errors: -

See also:
LayerPropertiesTab::InitSection()

Implements PropertyTabs.

Reimplemented in GuidesPropertiesTab, and LayerPropertiesTab.

Definition at line 1606 of file layerprp.cpp.

01607 {
01608     return TRUE;
01609 }

BOOL LayerPropertyTabs::DeclareLayerProperty LayerPropertyTabs pLayerProperty  )  [static]
 

A function to declare a new tab to the system.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
Parameters:
A pointer to a new LayerPropertyTabs class already declared into the system [INPUTS]
Returns:
True if tab declared, False if something went wrong.
See also:
LayerProperty

Definition at line 1378 of file layerprp.cpp.

01379 {
01380     // First check to see if somebody has actually declared the pointer to be non null.
01381     if (pLayerProperty == NULL) return FALSE;
01382 
01383     if (!pLayerProperty->Init())
01384     {
01385         /* Error occured - report it and stop trying to initialise the options tab. */
01386         InformError();
01387         return TRUE;
01388     }
01389     LayerPropertyTabsList.AddTail(pLayerProperty);
01390     
01391     // All ok
01392     return TRUE;
01393 }

BOOL LayerPropertyTabs::DeinitLayerPropertyTabs  )  [static]
 

Destroy all the LayerProperty objects.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
See also:
LayerProperty

Definition at line 1354 of file layerprp.cpp.

01355 {
01356 //  LayerPropertyTabs *pLayerProperty = NULL;
01357 
01358     // Now, we can get rid of our LayerPropertyTabs
01359     LayerPropertyTabsList.DeleteAll();
01360 
01361     // All ok
01362     return TRUE;
01363 }

BOOL LayerPropertyTabs::GetApplyNowState  )  [virtual]
 

Finds out the current state of the apply now button.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The current ApplyNow state as either True or False.

Errors: -

See also:
SetApplyNowState();

Implements PropertyTabs.

Definition at line 1492 of file layerprp.cpp.

01493 {
01494     return ApplyNow;
01495 } 

LayerPropertyTabs * LayerPropertyTabs::GetFirst  )  [static]
 

Iterating through the list of LayerPropertyTabs known to Camelot. This function returns the first LayerPropertyTabs.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
Returns:
Pointer to the first LayerProperty, or NULL if none.
See also:
LayerPropertyTabs::GetNext() Scope: Static

Definition at line 1451 of file layerprp.cpp.

01452 {
01453     return (LayerPropertyTabs *) LayerPropertyTabsList.GetHead();
01454 }

BOOL LayerPropertyTabs::GetInitMessageState  )  [virtual]
 

Finds out whether we are sending/handling an init message or not.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The current ApplInitMessageyNow state as either True or False.

Errors: -

See also:
SetApplyNowState();

Implements PropertyTabs.

Definition at line 1540 of file layerprp.cpp.

01541 {
01542     return InitMessage;
01543 } 

LayerPropertyTabs * LayerPropertyTabs::GetNext LayerPropertyTabs pLayerPropertyTabs  )  [static]
 

Iterating through the list of LayerPropertyTabs known to Camelot. This function returns the next LayerPropertyTabs.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
Parameters:
pLayerPropertyTabs - pointer to the LayerPropertyTabs to be used to get the following [INPUTS] LayerPropertyTabs.
Returns:
Pointer to the next LayerPropertyTabs, or NULL if none.
See also:
LayerPropertyTabs::GetFirst

Definition at line 1471 of file layerprp.cpp.

01472 {
01473     return (LayerPropertyTabs *) LayerPropertyTabsList.GetNext(pLayerPropertyTabs);
01474 }

CDlgResID LayerPropertyTabs::GetPageID  )  [virtual]
 

Allows the options dialog code to determine the dialog ID of this section. Baseclass version, needs overriding by the tab handlers.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
04/12/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The dialog ID of this tab section.

Errors: -

See also:
-

Implements PropertyTabs.

Reimplemented in GuidesPropertiesTab, and LayerPropertiesTab.

Definition at line 1584 of file layerprp.cpp.

01585 {
01586     return 0;
01587 }

DialogTabOp * LayerPropertyTabs::GetTabbedDlg  )  [virtual]
 

Let the base class know what/where the dialog box handling class is.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
Returns:
Pointer to the main dialog box used by this LayerPropertyTabs, maybe NULL if none.
See also:
LayerPropertyTabs::GreyApplyNow(); LayerPropertyTabs::UngreyApplyNow(); Scope: virtual

Implements PropertyTabs.

Definition at line 1409 of file layerprp.cpp.

01410 {
01411     // returns a pointer to the main dialog box used by this code
01412     return LayerPropertyTabs::pPropertiesDlg;
01413 }

BOOL LayerPropertyTabs::HandleMsg DialogMsg Msg  )  [virtual]
 

Handles all the messages for this layer property tab Baseclass version, needs overriding by the tab handlers.

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

Errors: -

See also:
LayerPropertyTabsDlg; LayerPropertiesTab;

Implements PropertyTabs.

Reimplemented in GuidesPropertiesTab, and LayerPropertiesTab.

Definition at line 1627 of file layerprp.cpp.

01628 {
01629     return TRUE;
01630 }  

BOOL LayerPropertyTabs::Init void   )  [virtual]
 

Initialiser.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
Returns:
Errors:
See also:
LayerPropertyTabsDlg;

Reimplemented from PropertyTabs.

Reimplemented in GuidesPropertiesTab, and LayerPropertiesTab.

Definition at line 1256 of file layerprp.cpp.

01257 {
01258     // Do nothing for now.
01259     return TRUE;
01260 }

BOOL LayerPropertyTabs::InitLayerPropertyTabs  )  [static]
 

Scans all LayerPropertyTabs to find out which LayerPropertyTabs are available for use, and instantiates one of each, and holds them in a list.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
Returns:
TRUE if initialised ok, FALSE if not.

Errors: Out of memory (if a LayerProperty fails to initialise for other reasons then an error is reported, but Camelot will still start up ok, i.e. TRUE is returned).

See also:
LayerProperty

Definition at line 1300 of file layerprp.cpp.

01301 {
01302     // Find the LayerPropertyTabs - the kernel ones are hard-wired.
01303     LayerPropertyTabs *pLayerProperty = NULL;
01304 
01305     // Create, initialise and install the built in LayerPropertyTabs list
01306     ADD_LAYERPROPERTY(LayerPropertiesTab)   // Layer
01307 #ifndef WEBSTER 
01308     ADD_LAYERPROPERTY(GuidesPropertiesTab)  // Guide lines
01309 #endif // WEBSTER
01310 
01311     // We must work out what the units tab number is when used in document mode so
01312     // that we can skip to it directly when using the units button on the tool bar.
01313     INT32 i = 0;
01314 
01315     // Now go through all the tabs declared to the system
01316     pLayerProperty = LayerPropertyTabs::GetFirst();
01317 
01318     while (pLayerProperty != NULL)
01319     {
01320         // Only include the tab if it is a document based option
01321         if ( pLayerProperty->IsPropertyRequired() )
01322         {
01323             if (pLayerProperty->GetPageID() == _R(IDD_TAB_LAYER_PROPERTIES))
01324             {
01325                 LayersTabNumber = i;        // note that tab number
01326             }
01327             else if (pLayerProperty->GetPageID() == _R(IDD_TAB_GUIDELINE_PROPERTIES))
01328             {
01329                 GuidesTabNumber = i;        // note that tab number
01330             }
01331             
01332             i += 1;     // increment the counter 
01333         }
01334 
01335         // Get the next option's tab.
01336         pLayerProperty = LayerPropertyTabs::GetNext(pLayerProperty);
01337     }
01338 
01339     // All ok
01340     return TRUE;
01341 }

BOOL LayerPropertyTabs::InitSection  )  [virtual]
 

Sets initial values for this tab on the layer properties dialog box. Baseclass version, needs overriding by the tab handlers.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
04/12/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if successful, else FALSE

Errors: -

See also:
LayerPropertyTabsDlg; LayerPropertiesTab;

Implements PropertyTabs.

Reimplemented in GuidesPropertiesTab, and LayerPropertiesTab.

Definition at line 1647 of file layerprp.cpp.

01648 {
01649     return TRUE;
01650 }  

BOOL LayerPropertyTabs::SetApplyNowState BOOL  NewState  )  [virtual]
 

Allows the setting of a new ApplyNow state.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
Parameters:
New ApplyNow flag state. [INPUTS]
- [OUTPUTS]
Returns:
The old ApplyNow state as either True or False.

Errors: -

See also:
GetApplyNowState();

Implements PropertyTabs.

Definition at line 1512 of file layerprp.cpp.

01513 {
01514     BOOL OldState = ApplyNow;       // note current old state
01515     // Only make the change if we are not in an init message state. As otherwise, when we
01516     // do an init, we will be sent a message to say a control has been changed and then
01517     // try to set the ApplyNow TRUE and hence then try to ungrey the ApplyNow button when
01518     // we shouldn't. 
01519     if (!InitMessage)
01520         ApplyNow = NewState;        // Set up the required new state    
01521 
01522     return OldState;                // return old state to the caller
01523 }

BOOL LayerPropertyTabs::SetInitMessageState BOOL  NewState  )  [virtual]
 

Allows the setting of a new InitMessage state.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
Parameters:
New InitMessage state. [INPUTS]
- [OUTPUTS]
Returns:
The old InitMessage state as either True or False.

Errors: -

See also:
GetInitMessageState();

Implements PropertyTabs.

Definition at line 1560 of file layerprp.cpp.

01561 {
01562     BOOL OldState = InitMessage;    // note current old state
01563     InitMessage = NewState;         // Set up the required new state    
01564     
01565     return OldState;                // return old state to the caller
01566 }

BOOL LayerPropertyTabs::SetTabbedDlg DialogTabOp pDlg  )  [static]
 

Let the base class know what/where the dialog box handling class is.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/95
Returns:
Pointer to the main dialog box used by this LayerPropertyTabs, maybe NULL if none.
See also:
LayerPropertyTabs::GreyApplyNow(); LayerPropertyTabs::UngreyApplyNow(); Scope: Static

Definition at line 1429 of file layerprp.cpp.

01430 {
01431     // returns a pointer to the main dialog box used by this code
01432     pPropertiesDlg = pDlg;
01433     
01434     return TRUE;
01435 }


Member Data Documentation

BOOL LayerPropertyTabs::ApplyNow [private]
 

Definition at line 296 of file layerprp.h.

UINT32 LayerPropertyTabs::GuidesTabNumber = 0 [static]
 

Definition at line 285 of file layerprp.h.

BOOL LayerPropertyTabs::InitMessage [private]
 

Definition at line 295 of file layerprp.h.

List LayerPropertyTabs::LayerPropertyTabsList [static, private]
 

Definition at line 299 of file layerprp.h.

UINT32 LayerPropertyTabs::LayersTabNumber = 0 [static]
 

Definition at line 284 of file layerprp.h.

DialogTabOp * LayerPropertyTabs::pPropertiesDlg = NULL [static, protected]
 

Definition at line 292 of file layerprp.h.


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