OpDisplayColourGallery Class Reference

#include <sgcolour.h>

Inheritance diagram for OpDisplayColourGallery:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

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 SuperGalleryFindGallery (void)
 Finds the Colour gallery class instance.

Private Member Functions

 CC_DECLARE_DYNCREATE (OpDisplayColourGallery)

Detailed Description

Definition at line 624 of file sgcolour.h.


Member Function Documentation

OpDisplayColourGallery::CC_DECLARE_DYNCREATE OpDisplayColourGallery   )  [private]
 

void OpDisplayColourGallery::Do OpDescriptor  )  [virtual]
 

Displays the Colours gallery Updates the button state for this Op (the button sticks down while the gallery is open).

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/2/95 (base generated in sgbase.cpp)
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

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 }

SuperGallery * OpDisplayColourGallery::FindGallery void   )  [static]
 

Finds the Colour gallery class instance.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/2/95 (base generated in sgbase.cpp)
Returns:
NULL or a pointer to the Colour gallery instance
Notes: The bars system always keeps one Colour gallery alive for us. If one is not found, this usually indicates that it can't be found in bars.ini: Check that the 'Name' string *exactly* matches the title string given in bars.ini. Also check that bars.ini indicates the bar is of the ColourSGallery class

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 }

OpState OpDisplayColourGallery::GetState String_256 UIDescription,
OpDescriptor
[static]
 

For finding the OpDisplayColourGallery's state.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/2/95 (base generated in sgbase.cpp)
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The state of the OpDisplayColourGallery operation

Errors: -

See also:
-

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 }

BOOL OpDisplayColourGallery::Init void   )  [static]
 

OpDisplayColourGallery initialiser method.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/2/95 (base generated in sgbase.cpp)
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if the operation could be successfully initialised FALSE if no more memory could be allocated

Errors: ERROR will be called if there was insufficient memory to allocate the operation.

See also:
-

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 }               


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