GETN_SYMBOL
#define GETN_SYMBOL(_NODE_NAME, _NODE_LABEL, _DEFAULT_VAL) _tmpSubNode = _tmpNode.AddNumericNode((int)_DEFAULT_VAL, #_NODE_NAME, TRGP_SYMBOL);TREE_ADD_LABEL(_NODE_LABEL);
This macro creates a symbol list control on a tree generated by GETN_TREE.
EX1
#include <GetNBox.h> void GETN_SYMBOL_ex1() { //make sure a graphlayer is active with at least one DataPlot on it GraphLayer gl = Project.ActiveLayer(); if( gl ) { DataPlot dp = gl.DataPlots(); if( dp ) { GETN_TREE(testTree) // 1st declare a tree GETN_SYMBOL(Symbol, "Symbol", 0); //default select solid square symbol testTree.Symbol.nVal = dp.GetSymbol(); //get last used symbol if( GetNBox(testTree, "Set Symbol", "Select a Symbol:") ) //will show a GETN_BOX for user to choose plot symbol { dp.SetSymbol(testTree.Symbol.nVal); //update plot symbol dp.Invalidate(); //redraw } } } }
DataPlot::GetSymbol, DataPlot::SetSymbol
GetNbox.h