OpDisplayNameGallery Class Reference

#include <ngdialog.h>

Inheritance diagram for OpDisplayNameGallery:

Operation Operation MessageHandler MessageHandler ListItem ListItem CCObject CCObject SimpleCCObject SimpleCCObject List of all members.

Public Member Functions

void Do (OpDescriptor *)
 This function should be over-ridden to perform an operation without passing a parameter.

Static Public Member Functions

static BOOL Init ()
 Initialises the Attribute gallery and it's associated gadgets.
static OpState GetState (String_256 *, OpDescriptor *)
 For finding the OpDisplayNameGallery's state.
static BOOL Init ()
 Declares a preference that allows you to clear memory in delete().
static OpState GetState (String_256 *, OpDescriptor *)

Protected Member Functions

virtual void Do (OpDescriptor *)
 Displays the Names gallery Updates the button state for this Op (the button sticks down while the gallery is open).

Static Protected Member Functions

static SuperGallery * FindGallery ()
 Finds the Name gallery class instance Notes: The bars system always keeps one Name 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 NameGallery class.

Private Member Functions

 CC_DECLARE_DYNCREATE (OpDisplayNameGallery)
 CC_DECLARE_DYNCREATE (OpDisplayNameGallery)

Static Private Member Functions

static DialogBarOp * FindGallery ()

Detailed Description

Definition at line 233 of file ngdialog.h.


Member Function Documentation

OpDisplayNameGallery::CC_DECLARE_DYNCREATE (  OpDisplayNameGallery   )  [private]
 

OpDisplayNameGallery::CC_DECLARE_DYNCREATE (  OpDisplayNameGallery   )  [private]
 

void OpDisplayNameGallery::Do (  OpDescriptor *   )  [virtual]
 

This function should be over-ridden to perform an operation without passing a parameter.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/6/94
Parameters:
OpDesc,: A pointer to the OpDescriptor which invoked the operation [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
Operation::DoWithParam

Reimplemented from Operation.

void OpDisplayNameGallery::Do (  OpDescriptor *   )  [protected, virtual]
 

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

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/5/99

Reimplemented from Operation.

Definition at line 855 of file ngdialog.cpp.

00856 {
00857     SuperGallery* pOp = FindGallery();
00858     if (pOp != 0)
00859     {
00860         // Toggle the visible state of the gallery window
00861         pOp->SetVisibility(!pOp->IsVisible());
00862         SGInit::UpdateGalleryButton(_R(OPTOKEN_DISPLAY_NAME_GALLERY), pOp->IsVisible());
00863     }
00864 
00865     End();
00866 }

static DialogBarOp* OpDisplayNameGallery::FindGallery (   )  [static, private]
 

DialogBarOp * OpDisplayNameGallery::FindGallery (   )  [static, protected]
 

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

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/5/99
Returns:
0 or a pointer to the Name gallery instance

Definition at line 812 of file ngdialog.cpp.

00813 {
00814     SuperGallery* pOp = SuperGallery::FindSuperGallery(_R(IDD_NAMESGALLERY));
00815     if (!pOp) pOp=new NameGallery();
00816     ERROR3IF(pOp == 0 || pOp->GetRuntimeClass() != CC_RUNTIME_CLASS(NameGallery), 
00817         "OpDisplayNameGallery::FindGallery: Can't find the gallery in bars.ini!\n");
00818     return pOp;
00819 }

static OpState OpDisplayNameGallery::GetState (  String_256 *  ,
OpDescriptor * 
)  [static]
 

OpState OpDisplayNameGallery::GetState (  String_256 *  UIDescription,
OpDescriptor * 
)  [static]
 

For finding the OpDisplayNameGallery's state.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/5/99

Definition at line 831 of file ngdialog.cpp.

00832 {
00833     // If the gallery is currently open, then the menu item should be ticked
00834     OpState OpSt;  
00835     SuperGallery* pSuperGallery = FindGallery();
00836     if (pSuperGallery != 0) OpSt.Ticked = pSuperGallery->IsVisible();
00837 
00838     // If there are no open documents, you can't toggle the gallery
00839     OpSt.Greyed = (Document::GetSelected() == 0);
00840     return OpSt;
00841 }

static BOOL OpDisplayNameGallery::Init (  void   )  [static]
 

Declares a preference that allows you to clear memory in delete().

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/4/94
Returns:
TRUE if it worked OK, FALSE if not

Reimplemented from SimpleCCObject.

BOOL OpDisplayNameGallery::Init (  void   )  [static]
 

Initialises the Attribute gallery and it's associated gadgets.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/5/99
Returns:
0 or a pointer to the Name gallery instance

Reimplemented from SimpleCCObject.

Definition at line 879 of file ngdialog.cpp.

00880 {
00881     ERRORIF(new OpNameGalleryPropIndexDesc == 0, _R(IDE_NOMORE_MEMORY), FALSE);
00882     return OpDisplayNameGallery::RegisterOpDescriptor(
00883                     0,
00884                     _R(IDS_DISPLAY_NAME_GALLERY),
00885                     CC_RUNTIME_CLASS(OpDisplayNameGallery),
00886                     OPTOKEN_DISPLAY_NAME_GALLERY,
00887                     OpDisplayNameGallery::GetState,
00888                     0,
00889                     _R(IDBBL_DISPLAY_NAME_GALLERY),
00890                     _R(IDC_BTN_SGNAME), // UINT32 resourceID = 0,   // resource ID
00891                     _R(IDC_BTN_SGNAME), // UINT32 controlID = 0,    // control ID
00892                     SYSTEMBAR_ILLEGAL,    // SystemBarType GroupBarID = SYSTEMBAR_ILLEGAL,  // group bar ID
00893                     TRUE,     // BOOL ReceiveMessages = TRUE,   // BODGE
00894                     FALSE,    // BOOL Smart = FALSE,
00895                     TRUE,     // BOOL Clean = TRUE,   
00896                     NULL,     // OpDescriptor *pVertOpDesc = NULL,
00897                     0,    // UINT32 OneOpenInstID = 0,      
00898                     0,    // UINT32 AutoStateFlags = 0,
00899                     TRUE      // BOOL fCheckable = FALSE
00900                     );
00901 }


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