#include <sglfills.h>
Inheritance diagram for OpDisplayLibFillsGallery:
Public Member Functions | |
void | Do (OpDescriptor *) |
Displays the LibFillss gallery Updates the button state for this Op (the button sticks down while the gallery is open). | |
Static Public Member Functions | |
static BOOL | Init () |
OpDisplayLibFillsGallery initialiser method. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
For finding the OpDisplayLibFillsGallery's state. | |
Private Member Functions | |
CC_DECLARE_DYNCREATE (OpDisplayLibFillsGallery) | |
Static Private Member Functions | |
static DialogBarOp * | FindGallery (void) |
Finds the LibFills gallery class instance. |
Definition at line 274 of file sglfills.h.
|
|
|
Displays the LibFillss gallery Updates the button state for this Op (the button sticks down while the gallery is open).
Reimplemented from Operation. Definition at line 1641 of file sglfills.cpp. 01642 { 01643 DialogBarOp *pDialogBarOp = FindGallery(); 01644 01645 if (pDialogBarOp != NULL) 01646 { 01647 // Toggle the visible state of the gallery window 01648 pDialogBarOp->SetVisibility( !pDialogBarOp->IsVisible() ); 01649 01650 // And update our button state 01651 SGInit::UpdateGalleryButton(OPTOKEN_DISPLAYFILLSGALLERY, pDialogBarOp->IsVisible()); 01652 01653 // If we're closing the gallery, flush the thumbnail caches 01654 if(pDialogBarOp->IsVisible() == FALSE) 01655 { 01656 // Flush the thumbnail cache 01657 BROADCAST_TO_CLASS(ThumbMessage(ThumbMessage::ThumbState::KILLCACHE, SGLib_Texture), DialogOp); 01658 BROADCAST_TO_CLASS(ThumbMessage(ThumbMessage::ThumbState::KILLCACHE, SGLib_Fractal), DialogOp); 01659 01660 // Ensure all open libraries are closed and memory reclaimed when the gallery closes 01661 if(LibFillsSGallery::ThisGallery != NULL) 01662 { 01663 // Free memory, etc... 01664 LibFillsSGallery::ThisGallery->GalleryAboutToClose(); 01665 } 01666 01667 } 01668 } 01669 01670 End(); 01671 }
|
|
Finds the LibFills gallery class instance.
Definition at line 1693 of file sglfills.cpp. 01694 { 01695 String_32 Name = _R(IDS_SGLFILLS_GALLERY_NAME); // "Fill gallery" 01696 DialogBarOp* pDialogBarOp = DialogBarOp::FindDialogBarOp(Name); 01697 01698 if (pDialogBarOp != NULL) 01699 { 01700 if (pDialogBarOp->GetRuntimeClass() == CC_RUNTIME_CLASS(LibFillsSGallery)) 01701 return(pDialogBarOp); 01702 01703 ERROR3("Got the Fills gallery but it's not of the LibFillsSGallery class"); 01704 } 01705 else 01706 { 01707 ERROR3("Can't find the Fills gallery in bars.ini!\n"); 01708 } 01709 01710 return(NULL); 01711 }
|
|
For finding the OpDisplayLibFillsGallery's state.
Definition at line 1609 of file sglfills.cpp. 01610 { 01611 OpState OpSt; 01612 01613 // If the gallery is currenty open, then the menu item should be ticked 01614 DialogBarOp* pDialogBarOp = FindGallery(); 01615 if (pDialogBarOp != NULL) 01616 OpSt.Ticked = pDialogBarOp->IsVisible(); 01617 01618 // OpSt.Greyed = (Document::GetSelected() == NULL); 01619 return(OpSt); 01620 }
|
|
OpDisplayLibFillsGallery initialiser method.
Reimplemented from SimpleCCObject. Definition at line 1576 of file sglfills.cpp. 01577 { 01578 01579 // **** TO DO **** 01580 // Ensure the IDS_ OPTOKEN_ and IDBBL_ constants are available and correct 01581 // You should really also uppercase these constant names. 01582 01583 return (RegisterOpDescriptor( 01584 0, 01585 _R(IDS_DISPLAY_FILLS_GALLERY), 01586 CC_RUNTIME_CLASS(OpDisplayLibFillsGallery), 01587 OPTOKEN_DISPLAYFILLSGALLERY, 01588 OpDisplayLibFillsGallery::GetState, 01589 0, /* help ID */ 01590 _R(IDBBL_DISPLAY_FILLS_GALLERY), 01591 0 /* bitmap ID */)); 01592 }
|