SGFillsItem Class Reference

A fills gallery item. More...

#include <sglfills.h>

Inheritance diagram for SGFillsItem:

SGLibDisplayItem SGDisplayItem SGDisplayNode CCObject SimpleCCObject List of all members.

Public Member Functions

 SGFillsItem ()
 ~SGFillsItem ()
 SGFillsItem (LibraryIndex LibraryIndexToDisplay, BOOL bNew=FALSE)
 Creates and initialises a new item for the Fills gallery Notes:.
LibDisplayType GetDisplayType (SGMiscInfo *MiscInfo)
 Return the display type to use - Fills gallery override Notes:.

Protected Member Functions

virtual BOOL HandleEvent (SGEventType EventType, void *EventInfo, SGMiscInfo *MiscInfo)
 Handles a SuperGallery DisplayTree event.

Private Member Functions

 CC_DECLARE_DYNCREATE (SGFillsItem)

Detailed Description

A fills gallery item.

Author:
Richard_Millican (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/3/95
See also:

Definition at line 300 of file sglfills.h.


Constructor & Destructor Documentation

SGFillsItem::SGFillsItem  ) 
 

Definition at line 1772 of file sglfills.cpp.

01773 {
01774 }

SGFillsItem::~SGFillsItem  ) 
 

Definition at line 1776 of file sglfills.cpp.

01777 {
01778 }

SGFillsItem::SGFillsItem LibraryIndex  LibraryIndexToDisplay,
BOOL  bNew = FALSE
 

Creates and initialises a new item for the Fills gallery Notes:.

Author:
Richard_Millican (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/3/95
Parameters:
LibraryIndex - Offset into index file which describes this item [INPUTS]
[OUTPUTS] 
Returns:
See also:

Definition at line 1765 of file sglfills.cpp.

01765                                                                       :
01766     SGLibDisplayItem(LibraryIndexToDisplay, bNew)
01767 {
01768 }


Member Function Documentation

SGFillsItem::CC_DECLARE_DYNCREATE SGFillsItem   )  [private]
 

LibDisplayType SGFillsItem::GetDisplayType SGMiscInfo MiscInfo  )  [virtual]
 

Return the display type to use - Fills gallery override Notes:.

Author:
Richard_Millican (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/3/95
Parameters:
MiscInfo - Contains a few useful bits of info that may be [INPUTS] needed for all event types.
[OUTPUTS] 
Returns:
The display mode type to use (position of text, and size of thumb)
See also:

Reimplemented from SGLibDisplayItem.

Definition at line 1731 of file sglfills.cpp.

01732 {
01733     switch(MiscInfo->DisplayMode)
01734     {
01735         case 2:
01736             return LibDisplay_SmallThumbText;
01737             break;
01738         case 1:
01739             return LibDisplay_FullInfo;
01740             break;
01741         case 0:
01742         default:
01743             return LibDisplay_LargeThumbTextUnder;
01744             break;
01745     }
01746 
01747     return LibDisplay_LargeThumbTextUnder;
01748 }

BOOL SGFillsItem::HandleEvent SGEventType  EventType,
void *  EventInfo,
SGMiscInfo MiscInfo
[protected, virtual]
 

Handles a SuperGallery DisplayTree event.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/1/95 (base generated in sgbase.cpp)
Parameters:
EventType - An enumerated value describing what type of event is to be processed [INPUTS]
EventInfo - A structure describing the event (may be NULL). The exact thing pointed at by this pointer depends upon the event type:

MonoOn Event Thing EventInfo points at SGEVENT_FORMAT (SGFormatInfo *) SGEVENT_REDRAW (SGRedrawInfo *) SGEVENT_MOUSECLICK (SGMouseInfo *) MonoOff Use the provided SGDisplayNode::Get[Format]Info() inlines to retrieve this information - they provide useful error/type checking, and hide the cast

MiscInfo - always provided. Contains a few useful bits of info that may be needed for all event types.

Parameters:
FormatInfo is updated as appropriate [OUTPUTS]
Returns:
TRUE if the event was handled successfully FALSE if it was not
Notes: This overrides the pure virtual SGDisplayNode::HandleEvent method

A node need not handle a specific event - if it does not handle it, it should return FALSE.

Redraw and Formatting handlers should never return TRUE, as this will prevent the event from continuing through the tree.

Non-leaf-nodes must call SGDisplayNode::GiveEventToMyChildren in order to pass the event dow the tree. THIS node is a leaf-node, so it doesn't.

See also:
SGDisplayNode::HandleEvent

Reimplemented from SGLibDisplayItem.

Definition at line 1834 of file sglfills.cpp.

01835 {
01836     switch (EventType)
01837     {
01838         case SGEVENT_MOUSECLICK:
01839         {
01840             SGMouseInfo *Mouse = GetMouseInfo(EventType, EventInfo);
01841 
01842             if (Mouse != NULL && FormatRect.ContainsCoord(Mouse->Position))
01843             {                   
01844                 INT32 XSize=0, YSize=0;
01845                 if(SGLibDisplayItem::StartDrag(EventType, EventInfo, MiscInfo, &XSize, &YSize))
01846                 {
01847                     GalleryFillsDragInfo *DragFill;
01848 
01849                     DragFill = new GalleryFillsDragInfo(this, Mouse, MiscInfo,
01850                                                         Mouse->MenuClick, XSize, YSize);
01851                     if (DragFill != NULL)
01852                         DragManagerOp::StartDrag(DragFill, GetListWindow());
01853                     else
01854                     if(LibraryGallery::TmpDraggingBitmap != NULL)
01855                     {
01856                         delete LibraryGallery::TmpDraggingBitmap;
01857                         LibraryGallery::TmpDraggingBitmap = NULL;
01858                     }
01859                 }
01860                 return TRUE;        // Claim this event - nobody else can own this click
01861             }
01862         }
01863     }
01864     
01865     return(SGLibDisplayItem::HandleEvent(EventType, EventInfo, MiscInfo));
01866 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:01:05 2007 for Camelot by  doxygen 1.4.4