Advanced Docking Configurations

This section describes some of the advanced configuration options available in the Advanced Docking Windows architecture and how to the implement or disable these features.

You can use the SECDockInsertionConstraints insertion constraints object in conjunction with SECFrameDockingFeature::DockNode() to create advanced docking configurations. This mechanism allows reuse of similar constraints across multiple insertions easily. In addition, the relative insertion constraints are automatically updated to reflect the last insertion at each docking call.

The following table lists some of the primary members of SECDockInsertionConstraints. For a comprehensive list, please refer to the Objective Toolkit Class Reference.

SECDockInsertionConstraints class members

Member

Description

SECLayoutNode* m_pNodeRelative

Docking occurs relative to this node pointer.

BOOL m_bInsertAfter

If TRUE, newly docked node is positioned after m_pNodeRelative, else before.

Void SetInsertPosition(UINT nPos,BOOL bAfter=TRUE,BOOL bPrimaryCnstr=TRUE);

Alternative to m_pNodeRelative. If you use this mechanism, a caller can specify a positional index, instead of a concrete relative node pointer. If the position is out of range, it is truncated within the target grid’s cell bound. If bPrimaryCnstr is FALSE, this mechanism is only used as a backup when m_pNodeRelative cannot be located.

BOOL m_bCreateNewLine

If TRUE, a new line is created for the newly docked node, instead of positioning relative on an existing line.

BOOL m_bDynamicNode

If FALSE, docked node is not bounded by sizing splitters. Note that the parent grid row/column to which it belongs can still have sizing splitters. See SetBorderSizing.

Int m_nForcedSize

Allows specification of a specific size for the newly inserted node instead of “best fit” insertion.

Int m_nForcedNewLineSize

If a new line is created (m_bCreateNewLine==TRUE), then this value specifies the line size.

Void SetDockSite(DWORD dwDockSite)

Allows specification of the dock site via SEC_DOCK_* parameters.

Void SetDockSite(SECFrameDockingFeatureBase::DockSite site)

Allows specification of the dock site via SECFrameDockingFeatureBase::top, bottom, left, or right.

 

For information on using docking insertion constraints, To use docking insertion constraints