X-Function Improvements

 

Popup menu within GetN dialog (ORG-8466)

Create a new X-Function, and in tree view of X-Function Builder, set GetN Dialog Custom Buttons with "Popup Menu".

Then, edit in Code Builder, include header file "control.h" (#include <control.h>), then in <xf-name>_event1 function, add the following code;

if( nEventID == GETNE_ON_CUSTOM_BUTTON1 )
{
    Menu m;
    m.Create();
    m.Add("Item 1",1,MF_DISABLED);
    POINT pt;
    GetCursorPos(&pt);
    m.TrackPopupResMenu(0, pt.x, pt.y, GetWindow());
}

The result will be

 

Support adding help file for customized X-Function (ORG-7549)

When creating an X-Function in X-Function Builder, in the tree view, it is allowed to specify the Document Name, then the help button in the X-Function dialog will open this specified help file if clicked.


 

Ability to clear documentation when duplicating an X-Function (ORG-7616)

In X-Function Builder, menu Tools: Clear Document is used to remove document related contents after duplicating an existing X-Function.

 

Provide command to open X-Function in X-Function Builder (ORG-7786)

edit -x integ1;
// Or using this
integ1 -e;

 

Support Auto checkbox for Slider control (ORG-7847)

#include <GetNBox.h>
void test_GetN()
{
	GETN_TREE(tr)	
	GETN_SLIDER(slider, "test", 0, "1|100|100")
	
	TreeNode trN = tr.slider;
	octree_set_auto_support(&trN, 1);
	
	GetNBox(tr);
}

The result dialog is:

 

Error message of X-Function shows in window (Script Window) where it runs (ORG-8836)