#include <sgbase.h>
Inheritance diagram for OpDisplayTEMPLATEGallery:
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 DialogBarOp * | FindGallery (void) |
Finds the TEMPLATE gallery class instance. |
Definition at line 254 of file sgbase.h.
|
|
|
Displays the TEMPLATEs gallery Updates the button state for this Op (the button sticks down while the gallery is open).
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 }
|
|
Finds the TEMPLATE gallery class instance.
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 }
|
|
For finding the OpDisplayTEMPLATEGallery's state.
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 }
|
|
OpDisplayTEMPLATEGallery initialiser method.
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 }
|