#include <sgcolour.h>
Inheritance diagram for OpDisplayColourGallery:
Public Member Functions | |
void | Do (OpDescriptor *) |
Displays the Colours gallery Updates the button state for this Op (the button sticks down while the gallery is open). | |
Static Public Member Functions | |
static BOOL | Init () |
OpDisplayColourGallery initialiser method. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
For finding the OpDisplayColourGallery's state. | |
static SuperGallery * | FindGallery (void) |
Finds the Colour gallery class instance. | |
Private Member Functions | |
CC_DECLARE_DYNCREATE (OpDisplayColourGallery) |
Definition at line 624 of file sgcolour.h.
|
|
|
Displays the Colours gallery Updates the button state for this Op (the button sticks down while the gallery is open).
Reimplemented from Operation. Definition at line 4828 of file sgcolour.cpp. 04829 { 04830 SuperGallery *pSuperGallery = FindGallery(); 04831 04832 if (pSuperGallery != NULL) 04833 { 04834 // Toggle the visible state of the gallery window 04835 pSuperGallery->SetVisibility( !pSuperGallery->IsVisible() ); 04836 04837 // And update the gallery button state 04838 SGInit::UpdateGalleryButton(_R(OPTOKEN_DISPLAYCOLOURGALLERY), pSuperGallery->IsVisible()); 04839 } 04840 04841 End(); 04842 }
|
|
Finds the Colour gallery class instance.
Definition at line 4865 of file sgcolour.cpp. 04866 { 04867 SuperGallery* pSuperGallery = SuperGallery::FindSuperGallery(_R(IDD_COLOURSGALLERY)); 04868 04869 if (!pSuperGallery) pSuperGallery = new ColourSGallery; 04870 04871 if (pSuperGallery != NULL) 04872 { 04873 if (pSuperGallery->GetRuntimeClass() == CC_RUNTIME_CLASS(ColourSGallery)) 04874 return(pSuperGallery); 04875 04876 ERROR3("Got the Colour gallery but it's not of the ColourSGallery class"); 04877 } 04878 else 04879 { 04880 ERROR3("Can't find the Colour gallery in bars.ini!\n"); 04881 } 04882 04883 return(NULL); 04884 }
|
|
For finding the OpDisplayColourGallery's state.
Definition at line 4795 of file sgcolour.cpp. 04796 { 04797 OpState OpSt; 04798 04799 // If the gallery is currenty open, then the menu item should be ticked 04800 SuperGallery* pSuperGallery = FindGallery(); 04801 if (pSuperGallery != NULL) 04802 OpSt.Ticked = pSuperGallery->IsVisible(); 04803 04804 // If there are no open documents, you can't toggle the gallery 04805 OpSt.Greyed = (Document::GetSelected() == NULL); 04806 return(OpSt); 04807 }
|
|
OpDisplayColourGallery initialiser method.
Reimplemented from SimpleCCObject. Definition at line 4755 of file sgcolour.cpp. 04756 { 04757 return (RegisterOpDescriptor( 04758 0, 04759 _R(IDS_DISPLAY_COLOUR_GALLERY), 04760 CC_RUNTIME_CLASS(OpDisplayColourGallery), 04761 OPTOKEN_DISPLAYCOLOURGALLERY, 04762 OpDisplayColourGallery::GetState, 04763 _R(IDST_COLGAL_OPENGALLERY), 04764 _R(IDBBL_DISPLAY_COLOUR_GALLERY), 04765 _R(IDC_BTN_SGCOLOUR), // UINT32 resourceID = 0, // resource ID 04766 _R(IDC_BTN_SGCOLOUR), // UINT32 controlID = 0, // control ID 04767 SYSTEMBAR_ILLEGAL, // SystemBarType GroupBarID = SYSTEMBAR_ILLEGAL, // group bar ID 04768 TRUE, // BOOL ReceiveMessages = TRUE, // BODGE 04769 FALSE, // BOOL Smart = FALSE, 04770 TRUE, // BOOL Clean = TRUE, 04771 NULL, // OpDescriptor *pVertOpDesc = NULL, 04772 0, // UINT32 OneOpenInstID = 0, 04773 0, // UINT32 AutoStateFlags = 0, 04774 TRUE // BOOL fCheckable = FALSE 04775 ) 04776 ); 04777 04778 }
|