OpDisplayTEMPLATEGallery Class Reference

#include <sgbase.h>

Inheritance diagram for OpDisplayTEMPLATEGallery:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

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

Static Public Member Functions

static BOOL Init ()
 OpDisplayTEMPLATEGallery initialiser method.
static OpState GetState (String_256 *, OpDescriptor *)
 For finding the OpDisplayTEMPLATEGallery's state.

Private Member Functions

 CC_DECLARE_DYNCREATE (OpDisplayTEMPLATEGallery)

Static Private Member Functions

static DialogBarOpFindGallery (void)
 Finds the TEMPLATE gallery class instance.

Detailed Description

Definition at line 254 of file sgbase.h.


Member Function Documentation

OpDisplayTEMPLATEGallery::CC_DECLARE_DYNCREATE OpDisplayTEMPLATEGallery   )  [private]
 

void OpDisplayTEMPLATEGallery::Do OpDescriptor  )  [virtual]
 

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

Author:
Unattributed (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 900 of file sgbase.cpp.

00901 {
00902     DialogBarOp *pDialogBarOp = FindGallery();
00903 
00904     if (pDialogBarOp != NULL)
00905     {
00906         // Toggle the visible state of the gallery window
00907         pDialogBarOp->SetVisibility( !pDialogBarOp->IsVisible() );
00908 
00909         // And update the gallery button state
00910         SGInit::UpdateGalleryButton(OPTOKEN_DISPLAYTEMPLATEGALLERY, pDialogBarOp->IsVisible());
00911     }
00912     
00913     End();
00914 }

DialogBarOp * OpDisplayTEMPLATEGallery::FindGallery void   )  [static, private]
 

Finds the TEMPLATE gallery class instance.

Author:
Unattributed (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/2/95 (base generated in sgbase.cpp)
Returns:
NULL or a pointer to the TEMPLATE gallery instance
Notes: The bars system always keeps one TEMPLATE 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 TEMPLATESGallery class

Definition at line 937 of file sgbase.cpp.

00938 {
00939     String_32 Name = _R(IDS_SGBASE_TEMPLATE_GALLERY); //"TEMPLATE gallery";
00940     DialogBarOp* pDialogBarOp = DialogBarOp::FindDialogBarOp(Name);
00941 
00942     if (pDialogBarOp != NULL)
00943     {
00944         if (pDialogBarOp->GetRuntimeClass() == CC_RUNTIME_CLASS(TEMPLATESGallery))
00945             return(pDialogBarOp);
00946 
00947         ERROR3("Got the TEMPLATE gallery but it's not of the TEMPLATESGallery class");
00948     }
00949     else
00950     {
00951         ERROR3("Can't find the TEMPLATE gallery in bars.ini!\n");
00952     }
00953 
00954     return(NULL);
00955 }

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

For finding the OpDisplayTEMPLATEGallery's state.

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

Errors: -

See also:
-

Definition at line 867 of file sgbase.cpp.

00868 {
00869     OpState OpSt;  
00870 
00871     // If the gallery is currenty open, then the menu item should be ticked
00872     DialogBarOp* pDialogBarOp = FindGallery();
00873     if (pDialogBarOp != NULL)
00874         OpSt.Ticked = pDialogBarOp->IsVisible();
00875 
00876     // If there are no open documents, you can't toggle the gallery
00877     OpSt.Greyed = (Document::GetSelected() == NULL);
00878     return(OpSt);   
00879 }

BOOL OpDisplayTEMPLATEGallery::Init void   )  [static]
 

OpDisplayTEMPLATEGallery initialiser method.

Author:
Unattributed (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 834 of file sgbase.cpp.

00835 {
00836 
00837     // **** TO DO ****
00838     // Ensure the IDS_ OPTOKEN_ and IDBBL_ constants are available and correct
00839     // You should really also uppercase these constant names.
00840 
00841     return (RegisterOpDescriptor(
00842                                 0,
00843                                 _R(IDS_DISPLAY_TEMPLATE_GALLERY),
00844                                 CC_RUNTIME_CLASS(OpDisplayTEMPLATEGallery),
00845                                 OPTOKEN_DISPLAYTEMPLATEGALLERY,
00846                                 OpDisplayTEMPLATEGallery::GetState,
00847                                 0,  /* help ID */
00848                                 _R(IDBBL_DISPLAY_TEMPLATE_GALLERY),
00849                                 0   /* bitmap ID */));
00850 }               


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