ILayoutNode

Basic functionality implemented by all types of Layout Nodes. Layout nodes are expected to realize this interface. Specific layout node classes may specialize this interface to provide additional functionality.

Defined in: LayoutBase.h

Methods

virtual int GetChildrenCount

Returns the number of child nodes this node has.

virtual ILayoutNode* GetParentNode

Returns this node's parent node.

virtual void SetParentNode

Set this node's parent node.

virtual ILayoutNode* GetRootParentNode

Returns the root node of the layout tree.

virtual int AddLayoutNode

Adds the layout node pointed by pNode to the list of this node's children.

virtual int RemoveLayoutNode

Removes the layout node pointed by pNode from the list of this node's children.

virtual Iterator* GetChildNodesIterator

Returns an iterator to traverse the collection of child nodes.

ILayoutNode* FindChildNode

Return the first child node whose Id is equal to the parameter nId.

Properties

GUID* GetGUID

Returns a GUID that identifies the exact class this object is an instance of.

Methods

virtual bool IsVisible

Returns the node's visibility state

Properties

CSize,CSize Get/SetMinMaxSize

Gets/Sets the minimum/maximum node size information.

bool SetRecalcDirty

Marks as clean/dirty for position recalculation.

bool Set/IsInvalidateDirty

Returns or sets whether this node needs an invalidation operation to be performed.

DWORD Get/Set/ModifyNodeExStyle

Retrieves or sets the extended style of the node.

bool Get/SetLockRealizeNode

Prevents the RealizeNode operation from being processed in this node. Useful for redraw optimizations.

Methods

int GetDeferWindowCount

Queries the number of child items to be drawn by a DeferWindowPos call in RealizeNode

Properties

bool IsNodeAttached

Returns whether this node is attacched to a realizable screen element, e.g. a window.

long GetNodeId

Returns the Id of the element associated with this node.

int,int Get/SetNonClientOffset

Returns or sets the offset value for positioning nodes relative to a nonclient area

bool Get/SetNodeHorizontal

Sets the base node orientation setting.

CRect Get/SetInitialRect

Retrieves or sets the rectangle initially occupied by the node.

CRect Get/SetInitialRect

Retrieves or sets the rectangle the node would prefer to occupy.

CRect Get/SetCurrentRect

Retrieves or sets the rectangular area the node is currently responsible for.

CRect Get/SetOldRect

Retrieves or sets the rectangular area the node used to occupy before the previous RecalcLayout() operation.

CRect Get/SetInvalidateRect

Retrieves or sets the rectangular area the node requests to be invalidated for the next drawing operation.

Methods

void FitRectWithinNodeMinMax

Constrains the passed rectangle to the maximum and minimum dimensions specified for the node using a call to ILayoutNode::Get/SetMinMaxSize().

void Init

Initializes this layout node.

void Show

Shows or hides the visible elements associated with the node.

CRect RecalcLayout

Performs the layout recalculation operation

bool RealizeNode

Realizes the changes in position and size of the layout node as calculated in a recent execution of the ILayoutNode::RecalcLayout operation

void OptimizedRedraw

Optimized drawing. Called at the end of the realization process to perform any painting logic that have been deferred until the last moment. Descendent layout classes should implement this operation if it is justified to prevent flicker or other painting problems.

bool PerformInvalidation

Invalidates the area indicated by the node's invalid rectangle.

bool EraseNodeBkgnd

Erases the background of the rectangular area assigned to the node. Usually called as part of the processing of the WM_ERASEBKGND windows message.

void PaintNode

Performs all necessary display operations. Usually called as part of the response to the WM_PAINT message.