Objective
The purpose of UI Definition Language is to make it easy to define UI with script instead of with GUI.
Samples
- Dialog Layout Definition
Dialogs are described in Dialogbox Layout Language.
(Visual tools are dificult to apply basic principles of layout.)
"@TYPE`OKCANCEL;"
"@TITLE`Dialog1;"
"@SETTAB`80;"
"<BODY>;"
"TEXT`Dialog Layout Test-1;"
"<BR>;"
"BUTTON`BT1`100;"
"BUTTON`BT2`101;"
"<BR>;"
"LABEL`Label:;"
"CHECKBOX`CHK1`102;"
"CHECKBOX`CHK2`103;"
"<BR>;"
"{`900;"
"LABEL`Labe2:;"
"RADIOBUTTON`CHK1`110;"
"RADIOBUTTON`CHK2`111;"
"<BR2>;"
"COL;"
"RADIOBUTTON`CHK3`112;"
"RADIOBUTTON`CHK4`113;"
"}`112;"
"<BR>;"
"LABEL`Labe3:;"
"TEXT`your name=;"
"EDIT``106`150;"
"<BR>;"
"LABEL`Labe4:;"
"SCBAR`1,100,40`107`150;"
"@TABORDER`100,101,102,103,110,111,112,113,106,107;"
;
SetLayout(s);
|
- Dialog Layout Definition
KStr s;
s="@<`1;&File`100`2;&View`250`3;&Help`900`9;>;"
"@<`2;&Open...`102``Load image file.;&Save CSP as...`103``Save CSP image as file.;-;&Exit`850``Exit program.;>;"
"@<`3;&Reference`251``RGB Sample;-;>;"
"@<`4;&RGB`261``View RGB Coordinate;&HSV`262``View HSV Coordinate;HSV(&C)`263``View HSV Cube Coordinate;>;"
"@<`9;&Registration...`852;Registerd Info...`853;-;&About...`851``About this program;>;"
"@>";
SetMenuData(s);
CreateMenu(1);
|
- Dialog Layout Definition
s="@<;New`101``1`New;Open`102``4`Open;Save`103``7`Save;Reload`104``8`Reload;-;``50;"
">;@>";
m_tlbar1.SetButtons(s);
m_tlbar1.SetBmpDT(&m_bmp);
|