octree_set_auto_support

 

Description

Add a checkbox to the right of GetN control.

Syntax

void octree_set_auto_support(TreeNode* tr, int nVal = 1)

Parameters

tr
[input] the tree node of GetN control. For now GETN_BUTTON, GETN_LIST, GETN_NUM, GETN_BEGIN_BRANCH control support the checkbox.
nVal
[intput] the status of checkbox. Can be one of the following:
enum
{
        AUTO_UNCHECKED = -1,
        AUTO_NOT_SUPPORT,
        AUTO_CHECKED
};

Return

Examples

EX1

#include <GetNBox.h>
void octree_set_auto_support_ex1()
{
        GETN_TREE(tr) 
        GETN_BUTTON(Path, "File path", GetAppPath())
        
        TreeNode trN = tr.Path;
        octree_set_auto_support(&trN, 1);
        
        if( GetNBox(tr) ) // open the GetN dialog
        {
                // enter here if clicked OK button to close dialog
                trN = tr.Path;
                int nCheckStatus = octree_get_auto_support(&trN);
                string strAuto = AUTO_CHECKED == nCheckStatus ? "checked" : "not checked";
                out_str( strAuto );
        }
}

Remark

See Also

octree_get_auto_support

header to Include

OCTreeUtils.h

Reference