#include <sgtree.h>
Public Attributes | |
INT32 | LinePos |
INT32 | LineHeight |
INT32 | AvailableWidth |
INT32 | IndentLevel |
BOOL | AccumulateBounds |
SGDisplayNode * | LastInvalidNode |
DocRect | InvalidBounds |
This structure is passed into SGDisplayNode classes when the SuperGallery asks the tree to calculate and cache item formatting information. Items calculate formatting (into 'lines' across the window) using a simple but reasonably generic system, similar to foratting paragraphs of text. As many sibling items as possible will fit themselves side by side across each 'line' - overflow continues on the next line. Moving up or down the tree acts as a 'newline', forcing the next item to move to a new line. Generally speaking, leaf-nodes of the tree are the only nodes of non- 'infinite' width (groups always fill entire lines), though there is no reason (other than style, taste, panache, and common decency) why they can't be shorter, and mix with other items on a single line.
LinePos, LineHeight are kept up to date with the Y position and size of the currently formatting display 'line'.
AvailableWidth contains the remaining width in this line - if an item cannot fit within AvailableWidth, it will format onto the next line (except when NeededWidth >= MaxWidth, when it takes the entire line for itself & truncates)
IndentLevel indicates the current tree depth; used to indent items in sub- categories further each time.
InvalidBounds is 'Empty' on entry to the formatting pass. As each item determines its format rect, it checks against its cached FormatRect, and if it has moved/resized since the last format, it includes its own y extent within the InvalidBounds rectangle. Thus, on exit, it is a rectangle which is either 'Empty' or encloses all invalid regions of the display list. Used to redraw only those portions of the list which have actually changed.
A structure is used for easy addition of other information at a later date
Definition at line 305 of file sgtree.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|