OpDisplayBitmapGallery Class Reference

Displays the bitmap gallery. This op can be attached to a menu, button or keypress. More...

#include <sgbitmap.h>

Inheritance diagram for OpDisplayBitmapGallery:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

void Do (OpDescriptor *)
 Displays the bitmap gallery.

Static Public Member Functions

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

Private Member Functions

 CC_DECLARE_DYNCREATE (OpDisplayBitmapGallery)

Detailed Description

Displays the bitmap gallery. This op can be attached to a menu, button or keypress.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/1/95
See also:
-

Definition at line 399 of file sgbitmap.h.


Member Function Documentation

OpDisplayBitmapGallery::CC_DECLARE_DYNCREATE OpDisplayBitmapGallery   )  [private]
 

void OpDisplayBitmapGallery::Do OpDescriptor  )  [virtual]
 

Displays the bitmap gallery.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/1/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from Operation.

Definition at line 3510 of file sgbitmap.cpp.

03511 {
03512     SuperGallery* pSuperGallery = SuperGallery::FindSuperGallery(_R(IDD_BITMAPSGALLERY));
03513 
03514     if (!pSuperGallery)
03515         pSuperGallery = new BitmapSGallery();
03516 
03517     if (pSuperGallery != NULL)
03518     {
03519         if (pSuperGallery->GetRuntimeClass() == CC_RUNTIME_CLASS(BitmapSGallery))
03520         {
03521             // Toggle the visibility of the gallery window
03522             pSuperGallery->SetVisibility( !pSuperGallery->IsVisible() );
03523 
03524             // And update the gallery button state
03525             SGInit::UpdateGalleryButton(_R(OPTOKEN_DISPLAYBITMAPGALLERY),
03526                                         pSuperGallery->IsVisible());
03527         }
03528 #if _DEBUG
03529         else
03530             ERROR3("The Bitmap Gallery isn't a BitmapSGallery! Woss goin' on?");
03531 #endif
03532     }
03533 
03534     ERROR3IF(pSuperGallery == NULL,"Couldn't find the bitmap gallery bar");
03535 
03536     End();
03537 }

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

For finding the OpDisplayBitmapGallery's state.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/1/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The state of the OpDisplayBitmapGallery operation

Errors: -

See also:
-

Definition at line 3476 of file sgbitmap.cpp.

03477 {
03478     OpState OpSt;
03479 
03480     // If the gallery is currenty open, then the menu item should be ticked
03481     SuperGallery* pSuperGallery = SuperGallery::FindSuperGallery(_R(IDD_BITMAPSGALLERY));
03482 
03483     if (pSuperGallery != NULL)
03484     {
03485         if (pSuperGallery->GetRuntimeClass() == CC_RUNTIME_CLASS(BitmapSGallery))
03486             OpSt.Ticked = pSuperGallery->IsVisible();
03487     }
03488 
03489     // If there are no open documents, you can't toggle the gallery
03490     OpSt.Greyed = (Document::GetSelected() == NULL);
03491 
03492     return(OpSt);
03493 }

BOOL OpDisplayBitmapGallery::Init void   )  [static]
 

OpDisplayBitmapGallery initialiser method.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/1/95
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 3428 of file sgbitmap.cpp.

03429 {
03430     return (
03431             RegisterOpDescriptor(
03432                                 0,
03433                                 _R(IDS_DISPLAY_BITMAP_GALLERY),
03434                                 CC_RUNTIME_CLASS(OpDisplayBitmapGallery),
03435                                 OPTOKEN_DISPLAYBITMAPGALLERY,
03436                                 OpDisplayBitmapGallery::GetState,
03437                                 0,  /* help ID */
03438                                 _R(IDBBL_DISPLAY_BITMAP_GALLERY),
03439                                 _R(IDC_BTN_SGBITMAP), // UINT32 resourceID = 0, // resource ID
03440                                 _R(IDC_BTN_SGBITMAP), // UINT32 controlID = 0,  // control ID
03441                                 SYSTEMBAR_ILLEGAL,    // SystemBarType GroupBarID = SYSTEMBAR_ILLEGAL,  // group bar ID
03442                                 TRUE,     // BOOL ReceiveMessages = TRUE,   // BODGE
03443                                 FALSE,    // BOOL Smart = FALSE,
03444                                 TRUE,     // BOOL Clean = TRUE,   
03445                                 NULL,     // OpDescriptor *pVertOpDesc = NULL,
03446                                 0,    // UINT32 OneOpenInstID = 0,      
03447                                 0,    // UINT32 AutoStateFlags = 0,
03448                                 TRUE      // BOOL fCheckable = FALSE
03449                                 )
03450             
03451 PORTNOTE("other", "Removed BitmapExportPreviewDialog")
03452 #ifndef EXCLUDE_FROM_XARALX
03453 //#if _DEBUG
03454             && BitmapExportPreviewDialog::Init()
03455 //#endif
03456 #endif
03457             && PreviewDialog::Init()
03458             );
03459 }               


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