ARSA Language  2.8
(Encryption, GPU and Web 3.0)
arsaui Class Reference

#include <arsaui.h>

Public Member Functions

void init ()
 initialze arsagui, call !!!ONLY one time!!! when user want to do with arsagui. More...
 
void deinit ()
 deinitialze arsagui, call when user not use arsagui any more. More...
 
const char * editbox (const char *window, const char *value=0, const char *parent_guid=0)
 
bool setfont (const char *guid, const char *fontlayer, const char *fontname_ttf=0)
 
void setmultiline (const char *guid, bool value=true)
 
void setreadonly (const char *guid, bool value=true)
 
void setpassword (const char *guid, bool value=true)
 
const char * getvalue (const char *guid)
 
void setvalue (const char *guid, const char *value)
 
void setvisible (const char *guid, bool value=true)
 
bool isvisible (const char *guid)
 
void setenable (const char *guid, bool value=true)
 
bool isenable (const char *guid)
 
const char * getselecttext (const char *guid)
 
void inserttext (const char *guid, const char *value)
 insert text at current cursor. More...
 
void setselecttext (const char *guid)
 set select text with hightlight, lost focus gui for disable. More...
 
void setfocus (const char *guid, bool focus=true)
 set focus gui. More...
 
bool isfocus (const char *guid, bool includechild=false)
 is focus on gui. More...
 
void setmaxchar (const char *guid, int maxchar=1)
 set maximum text. More...
 
int getmaxchar (const char *guid)
 get maximum text. More...
 
void clear ()
 
int getcount ()
 
void remove (const char *guid)
 
bool isidok (const char *guid)
 
int setbuffer (const char *guid, const char *buffername, const char *data)
 
const char * getbuffer (const char *guid, const char *buffername)
 
void settextalign (const char *guid, const char *ax="upperleft", const char *ay="upperleft")
 set text alignment in horizontal and vertical More...
 
int popevent (const char *guid)
 pop gui event. More...
 

Detailed Description

Definition at line 7 of file arsaui.h.

Member Function Documentation

◆ clear()

void arsaui::clear ( )

◆ deinit()

void arsaui::deinit ( )

deinitialze arsagui, call when user not use arsagui any more.

◆ editbox()

const char* arsaui::editbox ( const char *  window,
const char *  value = 0,
const char *  parent_guid = 0 
)

◆ getbuffer()

const char* arsaui::getbuffer ( const char *  guid,
const char *  buffername 
)

◆ getcount()

int arsaui::getcount ( )

◆ getmaxchar()

int arsaui::getmaxchar ( const char *  guid)

get maximum text.

Parameters
guidgui id
Returns
maximum character on gui.

◆ getselecttext()

const char* arsaui::getselecttext ( const char *  guid)

◆ getvalue()

const char* arsaui::getvalue ( const char *  guid)

◆ init()

void arsaui::init ( )

initialze arsagui, call !!!ONLY one time!!! when user want to do with arsagui.

◆ inserttext()

void arsaui::inserttext ( const char *  guid,
const char *  value 
)

insert text at current cursor.

Parameters
guidgui id
valuestring to insert

◆ isenable()

bool arsaui::isenable ( const char *  guid)

◆ isfocus()

bool arsaui::isfocus ( const char *  guid,
bool  includechild = false 
)

is focus on gui.

Parameters
guidgui id
includechildtrue is check all child, false is only myself.
Returns
true is focus, false is not focus.

◆ isidok()

bool arsaui::isidok ( const char *  guid)

◆ isvisible()

bool arsaui::isvisible ( const char *  guid)

◆ popevent()

int arsaui::popevent ( const char *  guid)

pop gui event.

Parameters
guidgui id
Returns
gui event as int, -1 is no event. value follows:
0 -> A gui element has lost its focus.
1 -> A gui element has got the focus.
2 -> The mouse cursor hovered over a gui element.
3 -> The mouse cursor left the hovered element.
4 -> An element would like to close.
5 -> A button was clicked.
6 -> A scrollbar has changed its position.
7 -> A checkbox has changed its check state.
8 -> A new item in a listbox was selected.
9 -> An item in the listbox was selected, which was already selected.
10 -> A file has been selected in the file dialog.
11 -> A directory has been selected in the file dialog.
12 -> A file open dialog has been closed without choosing a file.
13 -> 'Yes' was clicked on a messagebox.
14 -> 'No' was clicked on a messagebox.
15 -> 'OK' was clicked on a messagebox.
16 -> 'Cancel' was clicked on a messagebox.
17 -> In an editbox 'ENTER' was pressed.
18 -> The text in an editbox was changed. This does not include automatic changes in text-breaking.
19 -> The marked area in an editbox was changed.
20 -> The tab was changed in an tab control.
21 -> A menu item was selected in a (context) menu.
22 -> The selection in a combo box has been changed.
23 -> The value of a spin box has changed.
24 -> A table has changed.
25 -> A table head has changed.
26 -> A table selected again.
27 -> A tree view node lost selection.
28 -> A tree view node was selected.
29 -> A tree view node was expanded.
30 -> A tree view node was collapsed.

◆ remove()

void arsaui::remove ( const char *  guid)

◆ setbuffer()

int arsaui::setbuffer ( const char *  guid,
const char *  buffername,
const char *  data 
)

◆ setenable()

void arsaui::setenable ( const char *  guid,
bool  value = true 
)

◆ setfocus()

void arsaui::setfocus ( const char *  guid,
bool  focus = true 
)

set focus gui.

Parameters
guidgui id
focustrue is focus, false is not focus

◆ setfont()

bool arsaui::setfont ( const char *  guid,
const char *  fontlayer,
const char *  fontname_ttf = 0 
)

◆ setmaxchar()

void arsaui::setmaxchar ( const char *  guid,
int  maxchar = 1 
)

set maximum text.

Parameters
guidgui id
maxcharmaximum character, default: 1

◆ setmultiline()

void arsaui::setmultiline ( const char *  guid,
bool  value = true 
)

◆ setpassword()

void arsaui::setpassword ( const char *  guid,
bool  value = true 
)

◆ setreadonly()

void arsaui::setreadonly ( const char *  guid,
bool  value = true 
)

◆ setselecttext()

void arsaui::setselecttext ( const char *  guid)

set select text with hightlight, lost focus gui for disable.

Parameters
guidgui id

◆ settextalign()

void arsaui::settextalign ( const char *  guid,
const char *  ax = "upperleft",
const char *  ay = "upperleft" 
)

set text alignment in horizontal and vertical

Parameters
guidgui id
axalignment on horizontal, default: upperleft , value follows:
upperleft -> Aligned to parent's top or left side (default)
lowerright -> Aligned to parent's bottom or right side
center -> Aligned to the center of parent
scale -> Stretched to fit parent
ayalignment on vertical, default: upperleft , value follows:
upperleft -> Aligned to parent's top or left side (default)
lowerright -> Aligned to parent's bottom or right side
center -> Aligned to the center of parent
scale -> Stretched to fit parent

◆ setvalue()

void arsaui::setvalue ( const char *  guid,
const char *  value 
)

◆ setvisible()

void arsaui::setvisible ( const char *  guid,
bool  value = true 
)

The documentation for this class was generated from the following file: