#include <property.h>
Inheritance diagram for PropertyTabs:
Public Member Functions | |
PropertyTabs () | |
Constructor. | |
virtual BOOL | Init () |
Initialiser. | |
virtual BOOL | SetUpDocUnits () |
Sets up the units variable to the currently set document units. | |
virtual void | SetCurrentDocAndSpread (Document *pDoc) |
Sets up the document and spread that we are currently supposed to be working on. This can then be used by the tabs instead of each one using their own method to work it out. | |
virtual void | SetDefaultUnits () |
Sets up the units class variables to the default values. | |
virtual DialogTabOp * | GetTabbedDlg ()=0 |
virtual CDlgResID | GetPageID ()=0 |
virtual BOOL | InitSection ()=0 |
virtual BOOL | CommitSection ()=0 |
virtual BOOL | HandleMsg (DialogMsg *Msg)=0 |
virtual void | SetActiveLayer (Layer *pNewLayer) |
Sets up the active layer that we are currently supposed to be working on. This can then be used by the tabs instead of each one using their own method to work it out. This may be different to a current layer used by say the layer properties tab as this will be the one that the layer properties tabbed dialog box was brought up over using the adjust click menu on the layer gallery. | |
virtual Layer * | GetActiveLayer () |
Sets up the layer that we are currently supposed to be working on. This can then be used by the tabs instead of each one using their own method to work it out. This may be different to a current layer used by say the layer properties tab as this will be the one that the layer properties tabbed dialog box was brought up over using the adjust click menu on the layer gallery. | |
virtual Layer * | GetGuideLayer () |
Returns ptr to the guide layer to use, or NULL if it can't find one. | |
virtual void | SetCurrentLayer (Layer *pNewLayer) |
Sets up the layer that we are currently supposed to be working on. This can then be used by the tabs instead of each one using their own method to work it out. This may be different to the active layer set up in the baseclass. The current one as far as we are concerned is the one that the layer properties tabbed dialog box was brought up over using the adjust click menu on the layer gallery. | |
virtual Layer * | GetCurrentLayer () |
Sets up the layer that we are currently supposed to be working on. This can then be used by the tabs instead of each one using their own method to work it out. This may be different to the active layer set up in the baseclass. The current one as far as we are concerned is the one that the layer properties tabbed dialog box was brought up over using the adjust click menu on the layer gallery. | |
virtual BOOL | NewUnitsInSection () |
Called when new default units chosen. Gives any tabbed dialog a chance to update any fields with new units in. This is the base class version and so will be used for any tabs which have no specified handling code. | |
virtual BOOL | GreySection () |
Called when the user has closed all documents. Gives any tabbed dialog a chance to grey any fields which are document specific. This is the base class version and so will be used for any tabs which have no specified handling code. | |
virtual BOOL | UngreySection () |
Called when the user has opened a document. Gives any tabbed dialog a chance to update any fields which may have been greyed when the last document was closed. This is the base class version and so will be used for any tabs which have no specified handling code. | |
virtual BOOL | UpdateSection () |
Called when the user has clicked on a new document or opened a new document. Gives any tabbed dialog a chance to update any fields which are used to reflect the current document's status. This is the base class version and so will be used for any tabs which have no specified handling code. | |
virtual BOOL | UpdateSpreadSection () |
Called when the user has clicked or done something to change the selected spread. Gives any tabbed dialog a chance to update any fields which are used to reflect the current spread's status. This is the base class version and so will be used for any tabs which have no specified handling code. | |
virtual BOOL | UpdateLayerSection () |
Called when the user has clicked or done something to change the selected layer. Gives any tabbed dialog a chance to update any fields which are used to reflect the current layer's status. This is the base class version and so will be used for any tabs which have no specified handling code. | |
virtual BOOL | UpdateGuidelineSection () |
Called when the user has clicked or done something to change the guidelines of the *active* layer. Gives any tabbed dialog a chance to update any fields which are used to reflect the current layer's status. This is the base class version and so will be used for any tabs which have no specified handling code. | |
virtual BOOL | ColourListChanged (Document *pDoc) |
Called when the colour list changes in some way. pDoc points to the doc that contains the list that's changed. If pDoc is NULL, then there is no longer a colour list (e.g. all docs closed). | |
virtual BOOL | IsPropertyRequired () |
Allows the layer properties options dialog code to determine if this tab belongs is required at this point. This base class version allow the majority of tabs to answer yes to this question and hence only needs overiding if the tab is not required. | |
virtual BOOL | GetApplyNowState ()=0 |
virtual BOOL | SetApplyNowState (BOOL NewState)=0 |
virtual BOOL | SetInitMessageState (BOOL NewState)=0 |
virtual BOOL | GetInitMessageState ()=0 |
virtual BOOL | GreyApplyNow () |
Makes the Apply Now button on the main page of the tabbed dialog grey. | |
virtual BOOL | UngreyApplyNow () |
Makes the Apply Now button on the main page of the tabbed dialog ungrey. | |
virtual BOOL | SetOkState (BOOL Val) |
Greys/Ungreys the OK button on the main page of the tabbed dialog. | |
Spread * | GetSpread () |
Static Public Attributes | |
static Document * | pScopeDocument = NULL |
Static Protected Attributes | |
static Document * | pDocument = NULL |
static Spread * | pSpread = NULL |
static UnitType | CurrentPageUnits = NOTYPE |
Private Member Functions | |
CC_DECLARE_DYNAMIC (PropertyTabs) | |
Static Private Attributes | |
static Layer * | pActiveLayer = NULL |
static Layer * | pCurrentLayer = NULL |
Definition at line 125 of file property.h.
|
Constructor.
Definition at line 169 of file property.cpp. 00170 { 00171 // Set up some good default values. 00172 // pScopeDocument = NULL; 00173 // pDocument = NULL; 00174 // pSpread = NULL; 00175 // CurrentPageUnits = NOTYPE; 00176 // pActiveLayer = NULL; 00177 // pCurrentLayer = NULL; 00178 }
|
|
|
|
Called when the colour list changes in some way. pDoc points to the doc that contains the list that's changed. If pDoc is NULL, then there is no longer a colour list (e.g. all docs closed).
Reimplemented in GuidesPropertiesTab. Definition at line 767 of file property.cpp. 00768 { 00769 return TRUE; 00770 }
|
|
Implemented in GIFAnimationPropertyTabs, FramePropertiesTab, AnimationPropertiesTab, AnimationColoursTab, PreviewInBrowserTab, LayerPropertyTabs, GuidesPropertiesTab, and LayerPropertiesTab. |
|
Sets up the layer that we are currently supposed to be working on. This can then be used by the tabs instead of each one using their own method to work it out. This may be different to a current layer used by say the layer properties tab as this will be the one that the layer properties tabbed dialog box was brought up over using the adjust click menu on the layer gallery.
Definition at line 468 of file property.cpp. 00469 { 00470 return pActiveLayer; 00471 }
|
|
Implemented in GIFAnimationPropertyTabs, and LayerPropertyTabs. |
|
Sets up the layer that we are currently supposed to be working on. This can then be used by the tabs instead of each one using their own method to work it out. This may be different to the active layer set up in the baseclass. The current one as far as we are concerned is the one that the layer properties tabbed dialog box was brought up over using the adjust click menu on the layer gallery.
Definition at line 838 of file property.cpp. 00839 { 00840 return PropertyTabs::pCurrentLayer; 00841 }
|
|
Returns ptr to the guide layer to use, or NULL if it can't find one.
Definition at line 486 of file property.cpp. 00487 { 00488 if (pSpread != NULL) 00489 return (pSpread->FindFirstGuideLayer()); 00490 00491 return NULL; 00492 }
|
|
Implemented in GIFAnimationPropertyTabs, and LayerPropertyTabs. |
|
Implemented in GIFAnimationPropertyTabs, FramePropertiesTab, AnimationPropertiesTab, AnimationColoursTab, PreviewInBrowserTab, LayerPropertyTabs, GuidesPropertiesTab, and LayerPropertiesTab. |
|
Definition at line 204 of file property.h. 00204 { return pSpread; }
|
|
Implemented in GIFAnimationPropertyTabs, and LayerPropertyTabs. |
|
Makes the Apply Now button on the main page of the tabbed dialog grey.
Definition at line 510 of file property.cpp. 00511 { 00512 // First, get a pointer to the dialog box that we are going to use 00513 DialogTabOp * pPropertiesDlg = GetTabbedDlg(); 00514 ERROR2IF(pPropertiesDlg == NULL, FALSE, "LayerPropertyTabs::GreyApplyNow called with no dialog pointer"); 00515 00516 // Grey out the apply now button on the main page 00517 // Must restore the state of the currently selected tab as otherwise you might start 00518 // switching to talking to the main page when we are in the middle of talking to controls 00519 // on one of the pages and hence give rise to unknown controls messages when we try to 00520 // talk to the pages controls again. 00521 CDlgResID PageID = pPropertiesDlg->GetCurrentPageID(); // Get currently selected Tab id 00522 pPropertiesDlg->TalkToPage(0); 00523 00524 pPropertiesDlg->EnableGadget(_R(ID_APPLY_NOW), FALSE); 00525 pPropertiesDlg->EnableGadget(_R(wxID_OK), FALSE); 00526 pPropertiesDlg->SetStringGadgetValue(_R(wxID_CANCEL),_R(IDS_CLOSEDOCS)); 00527 00528 pPropertiesDlg->TalkToPage(PageID); // Select the originally selected tab 00529 00530 return TRUE; 00531 }
|
|
Called when the user has closed all documents. Gives any tabbed dialog a chance to grey any fields which are document specific. This is the base class version and so will be used for any tabs which have no specified handling code.
Reimplemented in FramePropertiesTab, AnimationPropertiesTab, AnimationColoursTab, PreviewInBrowserTab, GuidesPropertiesTab, and LayerPropertiesTab. Definition at line 615 of file property.cpp. 00616 { 00617 // Called when the user has closed all documents 00618 // Would normally be overriden by a a particular tab 00619 return TRUE; 00620 }
|
|
Implemented in GIFAnimationPropertyTabs, FramePropertiesTab, AnimationPropertiesTab, AnimationColoursTab, PreviewInBrowserTab, LayerPropertyTabs, GuidesPropertiesTab, and LayerPropertiesTab. |
|
Initialiser.
Reimplemented from SimpleCCObject. Reimplemented in GIFAnimationPropertyTabs, FramePropertiesTab, AnimationPropertiesTab, AnimationColoursTab, PreviewInBrowserTab, LayerPropertyTabs, GuidesPropertiesTab, and LayerPropertiesTab. Definition at line 193 of file property.cpp. 00194 { 00195 // Do nothing for now. 00196 return TRUE; 00197 }
|
|
Implemented in GIFAnimationPropertyTabs, FramePropertiesTab, AnimationPropertiesTab, AnimationColoursTab, PreviewInBrowserTab, LayerPropertyTabs, GuidesPropertiesTab, and LayerPropertiesTab. |
|
Allows the layer properties options dialog code to determine if this tab belongs is required at this point. This base class version allow the majority of tabs to answer yes to this question and hence only needs overiding if the tab is not required.
Reimplemented in FramePropertiesTab, AnimationPropertiesTab, AnimationColoursTab, PreviewInBrowserTab, GuidesPropertiesTab, and LayerPropertiesTab. Definition at line 789 of file property.cpp. 00790 { 00791 return FALSE; 00792 }
|
|
Called when new default units chosen. Gives any tabbed dialog a chance to update any fields with new units in. This is the base class version and so will be used for any tabs which have no specified handling code.
Definition at line 590 of file property.cpp. 00591 { 00592 // Called when new default units chosen 00593 // Would normally be overriden by a a particular tab 00594 return TRUE; 00595 }
|
|
Sets up the active layer that we are currently supposed to be working on. This can then be used by the tabs instead of each one using their own method to work it out. This may be different to a current layer used by say the layer properties tab as this will be the one that the layer properties tabbed dialog box was brought up over using the adjust click menu on the layer gallery.
Definition at line 446 of file property.cpp. 00447 { 00448 pActiveLayer = pNewLayer; 00449 }
|
|
Implemented in GIFAnimationPropertyTabs, and LayerPropertyTabs. |
|
Sets up the document and spread that we are currently supposed to be working on. This can then be used by the tabs instead of each one using their own method to work it out.
Definition at line 404 of file property.cpp. 00405 { 00406 // Note this new document in our class variable. 00407 pDocument = pDoc; 00408 00409 // Set up what we consider to be the current spread using the current document 00410 // class variable. 00411 if (pDocument) 00412 { 00413 pSpread = pDocument->FindFirstSpread(); 00414 // We will get the active layer of this spread 00415 if (pSpread) 00416 pActiveLayer = pSpread->FindActiveLayer(); 00417 } 00418 else 00419 { 00420 pSpread = NULL; 00421 pActiveLayer = NULL; 00422 } 00423 00424 }
|
|
Sets up the layer that we are currently supposed to be working on. This can then be used by the tabs instead of each one using their own method to work it out. This may be different to the active layer set up in the baseclass. The current one as far as we are concerned is the one that the layer properties tabbed dialog box was brought up over using the adjust click menu on the layer gallery.
Definition at line 815 of file property.cpp. 00816 { 00817 PropertyTabs::pCurrentLayer = pNewLayer; 00818 }
|
|
Sets up the units class variables to the default values.
Definition at line 329 of file property.cpp. 00330 { 00331 // Just to be on the safe side set up some default values 00332 CurrentPageUnits = MILLIMETRES; // Set up random default units. 00333 }
|
|
Implemented in GIFAnimationPropertyTabs, and LayerPropertyTabs. |
|
Greys/Ungreys the OK button on the main page of the tabbed dialog.
Definition at line 855 of file property.cpp. 00856 { 00857 // Get a pointer to the dialog box that we are going to use. 00858 DialogTabOp * pPropertiesDlg = GetTabbedDlg(); 00859 ERROR2IF(pPropertiesDlg == NULL,FALSE,"LayerPropertyTabs::UngreyApplyNow called with no dialog pointer"); 00860 00861 // Grey/Ungrey the OK button on the main page. 00862 // Get currently selected Tab id 00863 CDlgResID PageID = pPropertiesDlg->GetCurrentPageID(); 00864 00865 // Select the main tab 00866 pPropertiesDlg->TalkToPage(0); 00867 00868 // ungrey button on main tab 00869 pPropertiesDlg->EnableGadget(_R(ID_OK), Val); 00870 00871 // Select the originally selected tab 00872 pPropertiesDlg->TalkToPage(PageID); 00873 00874 return TRUE; 00875 }
|
|
Sets up the units variable to the currently set document units.
Definition at line 350 of file property.cpp. 00351 { 00352 BOOL SetUpOk = FALSE; 00353 00354 // Set up the default document measurement units that are used 00355 // Get the page units from the doc unit list of the current document unless there 00356 // is no document present. 00357 // Otherwise just pick a random default. 00358 pDocument = Document::GetSelected(); 00359 if (pDocument == NULL) 00360 { 00361 // Just to be on the safe side set up some default values 00362 CurrentPageUnits = MILLIMETRES; 00363 } 00364 else 00365 { 00366 // Get the unit list attached to the current document 00367 DocUnitList* pDocUnitList = pDocument->GetDocUnitList(); 00368 ERROR3IF(pDocUnitList == NULL,"PropertyTabs::SetUpDocUnits No doc unit list attached to this doc yet"); 00369 00370 if (pDocUnitList != NULL) 00371 { 00372 CurrentPageUnits = pDocUnitList->GetPageUnits(); // Set to the page units. 00373 00374 // Flag that everything went ok 00375 SetUpOk = TRUE; 00376 } 00377 else 00378 { 00379 // Just to be on the safe side set up some default values 00380 CurrentPageUnits = MILLIMETRES; // Set up random default units. 00381 } 00382 } 00383 00384 return (SetUpOk); 00385 }
|
|
Makes the Apply Now button on the main page of the tabbed dialog ungrey.
Definition at line 548 of file property.cpp. 00549 { 00550 // First, get a pointer to the dialog box that we are going to use 00551 DialogTabOp * pPropertiesDlg = GetTabbedDlg(); 00552 ERROR2IF(pPropertiesDlg == NULL,FALSE,"LayerPropertyTabs::UngreyApplyNow called with no dialog pointer"); 00553 00554 // Ungrey the apply now button on the main page 00555 // Must restore the state of the currently selected tab as otherwise you might start 00556 // switching to talking to the main page when we are in the middle of talking to controls 00557 // on one of the pages and hence give rise to unknown controls messages when we try to 00558 // talk to the pages controls again. 00559 CDlgResID PageID = pPropertiesDlg->GetCurrentPageID(); // Get currently selected Tab id 00560 pPropertiesDlg->TalkToPage(0); // Select the main tab 00561 00562 pPropertiesDlg->EnableGadget(_R(ID_APPLY_NOW), TRUE); // ungrey button on main tab 00563 pPropertiesDlg->EnableGadget(_R(wxID_OK), TRUE); 00564 pPropertiesDlg->SetStringGadgetValue(_R(wxID_CANCEL),_R(IDS_CANCEL)); 00565 00566 pPropertiesDlg->TalkToPage(PageID); // Select the originally selected tab 00567 00568 return TRUE; 00569 }
|
|
Called when the user has opened a document. Gives any tabbed dialog a chance to update any fields which may have been greyed when the last document was closed. This is the base class version and so will be used for any tabs which have no specified handling code.
Reimplemented in FramePropertiesTab, AnimationPropertiesTab, AnimationColoursTab, PreviewInBrowserTab, GuidesPropertiesTab, and LayerPropertiesTab. Definition at line 641 of file property.cpp. 00642 { 00643 // Called when the user has opened a document 00644 // Would normally be overriden by a a particular tab 00645 return TRUE; 00646 }
|
|
Called when the user has clicked or done something to change the guidelines of the *active* layer. Gives any tabbed dialog a chance to update any fields which are used to reflect the current layer's status. This is the base class version and so will be used for any tabs which have no specified handling code.
Reimplemented in GuidesPropertiesTab. Definition at line 744 of file property.cpp. 00745 { 00746 // Called when the user has changed the selected/active layer 00747 // Would normally be overriden by a a particular tab 00748 return TRUE; 00749 }
|
|
Called when the user has clicked or done something to change the selected layer. Gives any tabbed dialog a chance to update any fields which are used to reflect the current layer's status. This is the base class version and so will be used for any tabs which have no specified handling code.
Reimplemented in FramePropertiesTab, AnimationPropertiesTab, AnimationColoursTab, PreviewInBrowserTab, GuidesPropertiesTab, and LayerPropertiesTab. Definition at line 717 of file property.cpp. 00718 { 00719 // Called when the user has changed the selected/active layer 00720 // Would normally be overriden by a a particular tab 00721 return TRUE; 00722 }
|
|
Called when the user has clicked on a new document or opened a new document. Gives any tabbed dialog a chance to update any fields which are used to reflect the current document's status. This is the base class version and so will be used for any tabs which have no specified handling code.
Reimplemented in FramePropertiesTab, AnimationPropertiesTab, AnimationColoursTab, PreviewInBrowserTab, GuidesPropertiesTab, and LayerPropertiesTab. Definition at line 665 of file property.cpp. 00666 { 00667 // Called when the user has opened a document 00668 // Would normally be overriden by a a particular tab 00669 return TRUE; 00670 }
|
|
Called when the user has clicked or done something to change the selected spread. Gives any tabbed dialog a chance to update any fields which are used to reflect the current spread's status. This is the base class version and so will be used for any tabs which have no specified handling code.
Definition at line 691 of file property.cpp. 00692 { 00693 // Called when the user has changed the selected spread 00694 // Would normally be overriden by a a particular tab 00695 return TRUE; 00696 }
|
|
Definition at line 211 of file property.h. |
|
Definition at line 214 of file property.h. |
|
Definition at line 215 of file property.h. |
|
Definition at line 208 of file property.h. |
|
Definition at line 143 of file property.h. |
|
Definition at line 209 of file property.h. |