GUI Forms in OpenVX

 

The overall format for a GUI template is very similar to virtual template formats. There is a short header section followed by a series of FIELD sections, where each field corresponds to a single widget that will appear on the form. As with virtual forms, GUI forms must be compiled and loaded into Forms.VX (preferably a local copy), see Virtual Forms - Virtual Forms in OpenVX for more details about how to do this.
 

Example: GUI template

 

TEMPLATE=CdTestMenu
description=Test menu
function=CdTestMenu
gui_form
persistent
sole_focus
buttons = ok,cancel,reset

FIELD=Field 1
id=1
prompt=Enter form name.
wid_class=w_txt_btn
wid_rel_id = 0
wid_loc = b
options=color=16,font=3,

FIELD=Field 2
id=2
prompt=Enter form name.
wid_class=w_menu
wid_loc = r
options=format=2,height=2,width=2,btn1:cmd1,btn2:cmd2,btn3:cmd3,btn4:cmd4,icon,

FIELD=Field 3
id=3
prompt=Enter form name.
wid_class=w_opt
options=height=1,width=3,btn1:,btn2:,btn3:cmd3,
FIELD=Field 4
id=4
prompt=Enter form name.
wid_class=w_num
wid_rel_id = 0
options=format=1,width=2,step=2.5,min=-1.0,max=100.0,:$do_num,

Return to VX CAD/CAM Index