The file format that describes GUI is XML flavour and is called XUI. It looks like that:
<?xml version="1.0" standalone="yes" ?> <xui> <widget id="id0" label="This is my Window!" w="400" h="600" foreground="000000" background="FFFFFF" handler="MyHandler" frame="0"> <pushbutton id="id3" label="New Window" x="32" y="30" w="128" h="25" onclick="CreateWindow" hotkey="78" /> <pushbutton id="id4" label="Close Window" x="32" y="70" w="128" h="25" onclick="CloseWindow" hotkey="67" /> <pushbutton id="id5" label="Close Application" x="32" y="120" w="128" h="25" onclick="__CloseApplication" hotkey="65" selected="1" /> <editbox id="id7" label="Text Entry :" x="120" y="220" w="128" h="25" onclick="MyTextEntry" hotkey="84" scrambled="1" /> <editbox id="id8" label="Integer Entry :" x="120" y="250" w="128" h="25" onclick="MyIntegerEntry" hotkey="84" hexadecimal="1" /> <editbox id="id9" label="Double Entry :" x="120" y="280" w="128" h="25" onclick="MyDoubleEntry" hotkey="84" /> <checkbox id="id10" label="CheckBox" x="32" y="320" onclick="MyIntegerEntry" hotkey="67" /> <slidebar id="id15" x="32" y="350" onclick="MyIntegerEntry" horizontal="1" step="10" minimum="-100" maximum="100" /> <listbox id="id16" x="32" y="380" w="100" h="20" onclick="MyIntegerEntry" dropdown="5" /> <radiogroup id="id12" x="200" y="20" onclick="MyIntegerEntry" span="40"> <radiobutton label="prvy" x="200" y="20" hotkey="112" /> <radiobutton label="druhy" x="200" y="60" hotkey="100" /> <radiobutton label="treti" x="200" y="100" /> <radiobutton label="stvrty" x="200" y="140" /> <radiobutton label="piaty" x="200" y="180" /> </radiogroup> <menubar> <menu id="id13" label="File" hotkey="70" popup="id13_1"> <menupopup id="id13_1" w="200" h="74"> <menuitem id="id13_1_1" label="Item 1" hotkey="1" /> <menuitem id="id13_1_2" label="Item 2" hotkey="2" /> <menuitem id="id13_1_3" label="Quit" onclick="__CloseApplication" hotkey="113" selected="1" /> </menupopup> </menu> <menu id="id14" label="Edit" onclick="__CloseApplication" hotkey="69"> <menupopup /> </menu> </menubar> </widget> <widget id="id1" label="Yet another window" x="400" w="400" h="600" foreground="000000" background="FFFFFF" persistent="1" resize="1"> <text label="A text label" x="32" y="32" foreground="000000" background="FFFFFF" /> </widget> </xui>
There are three ways to create XUI file:
Todo.
Todo.
Todo.
Classes | |
| struct | fgl::FGClosure |
| class | fgl::XUIComponent |
| class | fgl::XUIComposite |
| class | fgl::XUIControl |
| class | fgl::XUIText |
| class | fgl::XUIPushButton |
| class | fgl::XUIEditBox |
| class | fgl::XUICheckBox |
| class | fgl::XUISlideBar |
| class | fgl::XUIRadioButton |
| class | fgl::XUIListBox |
| class | fgl::XUIRadioGroup |
| class | fgl::XUIMenuItem |
| class | fgl::XUIPopupMenu |
| class | fgl::XUIMenu |
| class | fgl::XUIMenuBar |
| class | fgl::XUIWindow |
| class | fgl::XUIBuilder |
Typedefs | |
| typedef void(* | XUIEventHandler )(CallBack cb, void *user_data) |
| typedef void(* | XUIEnterHandlerText )(CallBack cb, const char *text, void *user_data) |
| typedef void(* | XUIEnterHandlerInteger )(CallBack cb, const int integer, void *user_data) |
| typedef void(* | XUIEnterHandlerDouble )(CallBack cb, const double integer, void *user_data) |
| typedef void(* | XUIWindowHandler )(FGEvent *event, void *user_data) |
Functions | |
| void | fgl::GetTempName (char *buffer, int size) |
| void | fgl::RegisterOnClickSignal (const char *signal_name, XUIEventHandler fnc, void *user_data) |
| void | fgl::RegisterOnEnterSignal (const char *signal_name, XUIEnterHandlerText fnc, void *user_data) |
| void | fgl::RegisterOnEnterSignal (const char *signal_name, XUIEnterHandlerInteger fnc, void *user_data) |
| void | fgl::RegisterOnEnterSignal (const char *signal_name, XUIEnterHandlerDouble fnc, void *user_data) |
| void | fgl::RegisterControl (FGControl *ctrl, XUIEventHandler fnc, void *user_data) |
| void | fgl::RegisterWindowHandler (const char *handler_name, XUIWindowHandler fnc, void *user_data) |
| bool | fgl::ChangeSignalData (const char *signal_name, void *func, void *user_data) |
| bool | fgl::DeregisterSignal (const char *signal_name, void *func) |
| bool | fgl::DeregisterSignal (const char *signal_name, void *func, void *data) |
|
||||||||||||||||
|
Changes the user data pointer for already registere named signal (aka callback) + function address.
|
|
||||||||||||||||
|
Removes the named signal (aka callback) for function address and user data pointer combination from the registered events.
|
|
||||||||||||
|
Removes the named signal (aka callback) for function address from the registered events.
|
|
||||||||||||
|
A special utility function - generates random text strings - ASCIIZ - (with codes from 32 to 127).
|
|
||||||||||||||||
|
Registers FGControl* type object with function within user data pointer.
|
|
||||||||||||||||
|
Registers callback for this signal_name within user data pointer.
|
|
||||||||||||||||
|
Registers callback (double EditBox type) for this signal_name within user data pointer.
|
|
||||||||||||||||
|
Registers callback (integer EditBox or Slider type) for this signal_name within user data pointer.
|
|
||||||||||||||||
|
Registers callback (text EditBox type) for this signal_name within user data pointer.
|
|
||||||||||||||||
|
Registers FGWindow handler type object with function within user data pointer.
|
1.4.0