PAGE SOFTWARE
Commands
PAGE(name,style);
POSN(x,y,<name>);
TEXT(t_name,default_text,style);
DRAW(d_name,offsetx,offsety,style);
IMG(i_name,default_img,style);
KEY(k_name,[process],sizex,sizey,style);
LOOP(pgloopname,loopqty) {}
associated styles
STYLE(stpage,text) { };
STYLE(sttext,text) { };
STYLE(stdraw,text) { };
STYLE(stimg,text) { };
STYLE(stkey,key) { };
Update information is provided at
the end of each section |
The various
application screens are called Pages. These default to the TFT screen size
but can be larger where zoom is used or smaller for pop ups. A page must be
defined before it is used with a PAGE command which then incorporates all
the objects you want to include.
A POSN command defines the X,Y position of each object and this is retained
in the internal object structure list for future reference.
The main page object commands are TEXT, DRAW, IMG and KEY.
Each of these utilise a style which must be predefined before the object is
created.
Objects can be set as hidden by default using a HIDE command after creation.
When a PAGE has been defined, any updates or changes are handled in a PAGE
LOOP since the page definition is no longer accessed.
Conditional inclusion of objects is possible using an IF command.
Example:
//These first
4 lines may
be defined in lib.mnu, style.mnu and var.mnu files
LIB(bigButBlue,"NAND/bluebutt.bmp?back=white");
//load button image into library
STYLE(stpage,page) {back=black;}
//define back colour of page
STYLE(stimgB,image) {curRel=CC;}
//define reference point of image
STYLE(stfont24R,text) {font=ASCII24;col=red;curRel=CC;}
// font type and colour
PAGE(menupage,stpage)
{
POSN(120,100);
IMG(button_imgL,
bigButBlue, stimgB);
KEY(kmhelp,[LOAD(end,1);],120,60,TOUCH);
POSN(240,36);
TEXT(mtext1,"HelloWorld",stfont24R);]
POSN(240,136);
IF(remote=1?[TEXT(mtext2,"Goodbye
World",stfont24R);]);
HIDE(mtext2);
LOOP(menuloop,forever)
{
IF(end=1
AND remote=1
?[HIDE(mtext1);]:[SHOW(mtext2);]);;
}
}
|