OpDisplayLineGallery Class Reference

#include <sgline.h>

Inheritance diagram for OpDisplayLineGallery:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

void Do (OpDescriptor *)
 Displays the Lines gallery.

Static Public Member Functions

static BOOL Init ()
 General-purpose line gallery initialiser method.
static OpState GetState (String_256 *, OpDescriptor *)
 For finding the OpDisplayLineGallery's state.

Private Member Functions

 CC_DECLARE_DYNCREATE (OpDisplayLineGallery)

Static Private Member Functions

static SuperGalleryFindGallery (void)
 Finds the Line gallery class instance Notes: The bars system always keeps one Line 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 LineGallery class.

Detailed Description

Definition at line 414 of file sgline.h.


Member Function Documentation

OpDisplayLineGallery::CC_DECLARE_DYNCREATE OpDisplayLineGallery   )  [private]
 

void OpDisplayLineGallery::Do OpDescriptor  )  [virtual]
 

Displays the Lines gallery.

Author:
Justin_Flude (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 2919 of file sgline.cpp.

02920 {
02921     SuperGallery *pSuperGallery = FindGallery();
02922 
02923     if (!pSuperGallery)
02924         pSuperGallery = new LineGallery();
02925 
02926     if (pSuperGallery != NULL)
02927     {
02928         // Toggle the visible state of the gallery window
02929         pSuperGallery->SetVisibility(!pSuperGallery->IsVisible());
02930 
02931         // And update the gallery button state
02932         SGInit::UpdateGalleryButton(_R(OPTOKEN_DISPLAY_LINE_GALLERY), pSuperGallery->IsVisible());
02933     }
02934     
02935     End();
02936 }

SuperGallery * OpDisplayLineGallery::FindGallery void   )  [static, private]
 

Finds the Line gallery class instance Notes: The bars system always keeps one Line 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 LineGallery class.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/2/95 (base generated in sgbase.cpp)
Returns:
NULL or a pointer to the Line gallery instance

Definition at line 2954 of file sgline.cpp.

02955 {
02956     SuperGallery* pSuperGallery = SuperGallery::FindSuperGallery(_R(IDD_LINESGALLERY));
02957 
02958     if (pSuperGallery != NULL)
02959     {
02960         if (pSuperGallery->GetRuntimeClass() == CC_RUNTIME_CLASS(LineGallery))
02961             return(pSuperGallery);
02962 
02963         ERROR3("Got the line gallery but it's not of the LineGallery class?");
02964     }
02965 
02966     return(NULL);
02967 }

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

For finding the OpDisplayLineGallery's state.

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

Errors: -

See also:
-

Definition at line 2892 of file sgline.cpp.

02893 {
02894     // If the gallery is currently open then the menu item should be ticked.
02895     OpState OpSt;  
02896     SuperGallery* pSuperGallery = FindGallery();
02897     if (pSuperGallery != NULL) OpSt.Ticked = pSuperGallery->IsVisible();
02898 
02899     // If there are no open documents, you can't toggle the gallery
02900     OpSt.Greyed = (Document::GetSelected() == NULL);
02901     return OpSt;
02902 }

BOOL OpDisplayLineGallery::Init void   )  [static]
 

General-purpose line gallery initialiser method.

Author:
Justin_Flude (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: -

See also:
-

Reimplemented from SimpleCCObject.

Definition at line 2852 of file sgline.cpp.

02853 {
02854     return LineGallery::Init()
02855         && OpChangeLineJoinOpDesc::Init()
02856         && OpChangeLineCapOpDesc::Init()
02857         && RegisterOpDescriptor(0,
02858                                 _R(IDS_DISPLAY_LINE_GALLERY),
02859                                 CC_RUNTIME_CLASS(OpDisplayLineGallery),
02860                                 OPTOKEN_DISPLAY_LINE_GALLERY,
02861                                 OpDisplayLineGallery::GetState,
02862                                 0,                                      /* help ID */
02863                                 _R(IDBBL_DISPLAY_LINE_GALLERY),
02864                                 _R(IDC_BTN_SGLINE), // UINT32 resourceID = 0,   // resource ID
02865                                 _R(IDC_BTN_SGLINE), // UINT32 controlID = 0,    // control ID
02866                                 SYSTEMBAR_ILLEGAL,    // SystemBarType GroupBarID = SYSTEMBAR_ILLEGAL,  // group bar ID
02867                                 TRUE,     // BOOL ReceiveMessages = TRUE,   // BODGE
02868                                 FALSE,    // BOOL Smart = FALSE,
02869                                 TRUE,     // BOOL Clean = TRUE,   
02870                                 NULL,     // OpDescriptor *pVertOpDesc = NULL,
02871                                 0,    // UINT32 OneOpenInstID = 0,      
02872                                 0,    // UINT32 AutoStateFlags = 0,
02873                                 TRUE      // BOOL fCheckable = FALSE
02874                                 );
02875 }


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