SECLNGridBag::AddLayoutNode
intSECLNGridBag::AddLayoutNode(SECLayoutNode*pNode, const SECGridBagConstraints&rConstraints)
Add a child layout node, with associated gridbag constraint information.
Defined in: GRIDBAG.CPP
Return Value
void
Parameters
pNode
new child node to add.
rConstraints
corresponding gridbag constraint information
Comments
The constraint information passed in is cloned to protected internal storage. This allows you to reuse the same constraint object for multiple child nodes without any special memory management required. Example: { // The gragbag parent node clones each gridbag constraint as it is passed in // (and automatically tracks all memory management). This means the original // object is no more than a template which can be easily reused. SECGridBagConstraints gbc; pNodeParent->AddLayoutNode(pNodeChild1,gbc);
// See how easy it is to make a small change and use again? gbc.m_fWeightX=1.0; pNodeParent->AddLayoutNode(pNodeChild2,gbc);
// at end of block, gbc goes out of scope. Not a big deal, all relevent // data has been cloned to protected internal storage. }