sgtree.h File Reference

(r1785/r1139)

#include "doccolor.h"

Go to the source code of this file.

Classes

struct  SGMiscInfo
struct  SGSortKey
struct  SGFormatInfo
struct  SGRedrawInfo
struct  SGMouseInfo
struct  SGClaimPointInfo
struct  SGDisplayFlags
class  SGDisplayNode
 This DisplayTree node type is used by the SuperGallery This is a virtual class from which all nodes in the DisplayTree are derived. More...
class  SGDisplayRoot
 This DisplayTree node type is used by the SuperGallery The top (root) level of the DisplayTree is made up of a single SGDisplayRoot node. This node is used as a single entry-point for all tree-wide actions which the SuperGallery applies to it (redraw, reformatting, etc). More...
class  SGDisplayRootScroll
 This DisplayTree node type is used by the SuperGallery. More...
class  SGDisplayGroup
 This DisplayTree node type is used by the SuperGallery The top level(s) of the DisplayTree are made up of a number of SGDisplayGroup nodes, which divide the tree up into categories (and, potentially hierarchical groups within categories). More...
class  SGDisplayItem
 This DisplayTree node is used by the SuperGallery It is responsible for providing the ability to redraw one item displayed in the gallery, and remembering information on that item (such as its selection state, etc). More...

Typedefs

typedef void * SGEventInfo

Enumerations

enum  SGEventType {
  SGEVENT_FORMAT, SGEVENT_REDRAW, SGEVENT_BGFLUSH, SGEVENT_MOUSECLICK,
  SGEVENT_DRAGSTARTED, SGEVENT_CLAIMPOINT, SGEVENT_THUMBMSG
}
enum  IndentedButtonValue { IBUTTON_NONE, IBUTTON_UP, IBUTTON_DOWN }

Variables

const INT32 SG_InfiniteWidth = 0
const INT32 SG_DefaultLargeIcon = 16000
const INT32 SG_DefaultSmallIcon = 12000
const INT32 SG_GapBeforeText = 3000
const INT32 SG_GapAboveText = 14400
const INT32 SG_DefaultNameText = 100000
const INT32 DefaultGroupHeight = 12000
const INT32 DefaultGroupWidth = 0
const INT32 DefaultItemHeight = 12000
const INT32 DefaultItemWidth = 30000
const INT32 InterLineGap = 1200
const INT32 UpTreeGap = 3000
const INT32 IndentWidth = 10000
const INT32 MaxSGSortKeys = 2
const INT32 SGSORTKEY_NONE = 0
const INT32 SGSORTKEY_BYNAME = 1


Typedef Documentation

typedef void* SGEventInfo
 

Comment: Used by SuperGallery DisplayTrees

This would ideally be a union of all data structures that can be passed into the DisplayTree HandleEvent methods. However, you can't easily do unions of things containing classes with copy constructors, so it isn't a union. Instead, the HandleEvent function has to cast this pointer to the appropriate type for the event being processed. These are:

'NULL' indicates that there is no specific information passed in, and this parameter of the HandleEvent method will be NULL for these event types.

See also:
SuperGallery; SGDisplayNode::HandleEvent; SGEventType

Definition at line 491 of file sgtree.h.


Enumeration Type Documentation

enum IndentedButtonValue
 

Enumerator:
IBUTTON_NONE 
IBUTTON_UP 
IBUTTON_DOWN 

Definition at line 1243 of file sgtree.h.

01244 {
01245     IBUTTON_NONE,
01246     IBUTTON_UP,
01247     IBUTTON_DOWN
01248 } IndentedButtonValue;

enum SGEventType
 

Comment: Used by SuperGallery DisplayTrees

This is an enumeration of event types which can be passed to SGDisplayNodes to be handled by their HandleEvent methods. Along with this, a 'SGMiscInfo' structure is always passed in containing relevant information, as well as extra data which is event-specific:

The data passed in SGDisplayNode::HandleEvent's 'EventInfo' pointer is determined by the event type. The data will be:

MonoOn SGEVENT_FORMAT NULL SGEVENT_REDRAW (SGRedrawInfo *) [SGEVENT_BGREDRAW NULL] -- This event has been replaced by a virtual method SGEVENT_BGFLUSH NULL - May have NULL MiscInfo SGEVENT_MOUSECLICK (SGMouseInfo *) SGEVENT_DRAGSTARTED (DragMessage *) SGEVENT_CLAIMPOINT (SGMouseInfo *) SGEVENT_THUMBMSG (ThumbMessage *) - May have NULL MiscInfo MonoOff

NULL indicates that for this event type, a NULL pointer is passed in the EventInfo parameter.

See also:
SuperGallery; SGDisplayNode::HandleEvent; SGEventInfo
Enumerator:
SGEVENT_FORMAT 
SGEVENT_REDRAW 
SGEVENT_BGFLUSH 
SGEVENT_MOUSECLICK 
SGEVENT_DRAGSTARTED 
SGEVENT_CLAIMPOINT 
SGEVENT_THUMBMSG 

Definition at line 527 of file sgtree.h.

00528 {
00529     SGEVENT_FORMAT,         // A request to just format the item (a dummy redraw run)
00530     SGEVENT_REDRAW,         // A request to redraw a portion of the displayed list
00531 //  SGEVENT_BGREDRAW,       // A request to handle background redraws (handled by base class)
00532     SGEVENT_BGFLUSH,        // A request to flush (forget) background redraws (handled by base class)
00533     SGEVENT_MOUSECLICK,     // A request to determine what action should be taken for a click
00534     SGEVENT_DRAGSTARTED,    // A DRAGSTARTED DragMessage has been recieved
00535     SGEVENT_CLAIMPOINT,     // Asks the item enclosing a given position to claim the event
00536     SGEVENT_THUMBMSG,       // Passes a library ThumbMessage onto all items in the tree
00537 } SGEventType;


Variable Documentation

const INT32 DefaultGroupHeight = 12000
 

Definition at line 136 of file sgtree.h.

const INT32 DefaultGroupWidth = 0
 

Definition at line 137 of file sgtree.h.

const INT32 DefaultItemHeight = 12000
 

Definition at line 139 of file sgtree.h.

const INT32 DefaultItemWidth = 30000
 

Definition at line 140 of file sgtree.h.

const INT32 IndentWidth = 10000
 

Definition at line 144 of file sgtree.h.

const INT32 InterLineGap = 1200
 

Definition at line 142 of file sgtree.h.

const INT32 MaxSGSortKeys = 2
 

Comment: This structure is passed into SGDisplayNode classes when a sort operation is being applied. It describes how items should be sorted.

MonoOn const INT32 MaxSGSortKeys = 2;

typedef struct { INT32 SortKey; BOOL Reversed; } SGSortKey;

const INT32 SGSORTKEY_NONE = 0;

const INT32 SGSORTKEY_BYNAME = 1; MonoOff

SortKeys are ALWAYS used in arrays of MaxSGSortKeys length. i.e. SGSortKey SortInfo[MaxSGSortKeys];

Each entry in the SortKey array gives a sort key, specified as as an integer, where 0 means 'no sorting', and other integers are defined by the specific gallery/display item. By default, the value 1 is used to mean 'sort by name', and default gallery handlers are provided by the base classes to provide this sort mode.

Each entry also has a Reversed flag which indicates whether the related sort mode should be used in reverse.

The MaxSGSortKeys constant is used to allow us to add or remove extra sort keys at will. All references to sort keys should be made by loops which scan from 0 to MaxSGSortkeys-1.

See also:
SuperGallery; SGDisplayNode::AddItem

Definition at line 242 of file sgtree.h.

const INT32 SG_DefaultLargeIcon = 16000
 

Definition at line 129 of file sgtree.h.

const INT32 SG_DefaultNameText = 100000
 

Definition at line 133 of file sgtree.h.

const INT32 SG_DefaultSmallIcon = 12000
 

Definition at line 130 of file sgtree.h.

const INT32 SG_GapAboveText = 14400
 

Definition at line 132 of file sgtree.h.

const INT32 SG_GapBeforeText = 3000
 

Definition at line 131 of file sgtree.h.

const INT32 SG_InfiniteWidth = 0
 

Definition at line 127 of file sgtree.h.

const INT32 SGSORTKEY_BYNAME = 1
 

Definition at line 245 of file sgtree.h.

const INT32 SGSORTKEY_NONE = 0
 

Definition at line 244 of file sgtree.h.

const INT32 UpTreeGap = 3000
 

Definition at line 143 of file sgtree.h.


Generated on Sat Nov 10 03:49:21 2007 for Camelot by  doxygen 1.4.4