Defines | |
#define | dfrm_create(m, t) mt_dfrm_create (gl_appvar,m,t) |
Create a new form, see mt_dfrm_create(). | |
#define | dfrm_free(d) mt_dfrm_free(gl_appvar,d) |
Release from the memory a form, see mt_dfrm_create(). | |
#define | dfrm_add_menu(d, l) mt_dfrm_add_menu(gl_appvar,d,l) |
Add and place an object in a form, see mt_dfrm_add_menu(). | |
#define | dfrm_win_attach(t, w, d) mt_dfrm_win_attach(gl_appvar,t,w,d) |
Makes effective bindings performed with mt_dfrm_attach(), see mt_dfrm_win_attach(). | |
#define | dfrm_find_label(d, l) mt_dfrm_find_label(gl_appvar,d,l) |
Searching object by its label, see mt_dfrm_find_label(). | |
#define | dfrm_delete(d, i) mt_dfrm_delete(gl_appvar,d,i) |
Delete an object from a form, see mt_dfrm_delete(). | |
Functions | |
void * | mt_dfrm_create (APPvar *ap, int maxobj, int type) |
Creating a new dynamic form. | |
void | mt_dfrm_free (APPvar *ap, void *dfrm) |
Release from the memory a form. | |
void | dfrm_add (void *dfrm, int pind, int cind, int wspace, int hspace, int dir) |
Add and place an object in a form. | |
int | mt_dfrm_add_menu (APPvar *ap, void *dfrm, char *label) |
Special function to adding a title in a menu bar. | |
void | dfrm_align (void *dfrm, int ind, int dir, int align) |
Giving alignement directives to objects. | |
void | dfrm_repack (void *dfrm) |
Applying alignment directives. | |
void | dfrm_order (void *dfrm, int ind, int order) |
Ordering children's object in a dynamic form. | |
void | dfrm_attach (void *dfrm, int ind, int type,...) |
ObjcAttach() remplacement for menu and form. | |
void | mt_dfrm_win_attach (APPvar *ap, int type, void *win, void *dfrm) |
Make effective bindings performed with mt_dfrm_attach(). | |
OBJECT * | dfrm_tree (void *dfrm) |
Returns the OBJECT tree of a form. | |
int | dfrm_cellsize (int mode) |
Return cell character size . | |
int | mt_dfrm_find_label (APPvar *ap, void *dfrm, char *label) |
Searching object by its label. | |
int | mt_dfrm_delete (APPvar *ap, void *dfrm, int ind) |
Delete an object from a form. |
Contains functions to create or release AES object tree, adding, align and modify object in a object tree. Contains interface to WinDom environmment.
#define dfrm_add_menu | ( | d, | |||
l | ) | mt_dfrm_add_menu(gl_appvar,d,l) |
Add and place an object in a form, see mt_dfrm_add_menu().
#define dfrm_create | ( | m, | |||
t | ) | mt_dfrm_create (gl_appvar,m,t) |
Create a new form, see mt_dfrm_create().
#define dfrm_delete | ( | d, | |||
i | ) | mt_dfrm_delete(gl_appvar,d,i) |
Delete an object from a form, see mt_dfrm_delete().
#define dfrm_find_label | ( | d, | |||
l | ) | mt_dfrm_find_label(gl_appvar,d,l) |
Searching object by its label, see mt_dfrm_find_label().
#define dfrm_free | ( | d | ) | mt_dfrm_free(gl_appvar,d) |
Release from the memory a form, see mt_dfrm_create().
#define dfrm_win_attach | ( | t, | |||
w, | |||||
d | ) | mt_dfrm_win_attach(gl_appvar,t,w,d) |
Makes effective bindings performed with mt_dfrm_attach(), see mt_dfrm_win_attach().
void dfrm_add | ( | void * | _dfrm, | |
int | pind, | |||
int | cind, | |||
int | wspace, | |||
int | hspace, | |||
int | dir | |||
) |
Add and place an object in a form.
_dfrm | form descriptor | |
pind | parent object index | |
cind | child object index | |
wspace,hspace | horizontal and vertically spacing | |
dir | direction of spacing. It is a bit field of
|
'wspace' and 'hspace' are relative or absolute spatial position of the child object. It depends on 'dir' parameter :
wspace and hspace can be positive, negative or null. Positive value means the unit is pixel. Negative value means the unit is a semi character size. Advantage to use character unit is the position of objects is independant of screen resolution (and system font system).
If needed, size of parent object is adjusted in order to contain all children objects.
If you want add a title in menu, you have to use the special function dfrm_add_menu().
References dfrm_adjust_size(), dfrm_tree(), DIR_HORI, DIR_NONE, DIR_VERT, _dfrm::_dfrm::properties::hspace, NILOBJ, _dfrm::props, and _dfrm::_dfrm::properties::wspace.
Referenced by mt_dfrm_add_menu(), mt_dfrm_new_dmenu(), mt_dfrm_new_slider(), mt_dfrm_thumb_add(), and mt_dfrm_thumb_new().
void dfrm_align | ( | void * | dfrm, | |
int | ind, | |||
int | dir, | |||
int | align | |||
) |
Giving alignement directives to objects.
This function indicates the way the object position will be calculated by dfrm_repack(). This position is always relative to the parent object. For example a LEFT_ALIGN means the object will be align on the left in the object parent (and not the on the left of the previous object in the same level).
Alignement takes into account the spacing information you gave in when the object was added in the object tree (with dfrm_add()). For example, an object adding the a w-spacing of 10, aligned to the right, will be set with a spacing of 10 pixels between the right border of the object and the right border of the parent.
dfrm | form descriptor, | |
ind | index of object, | |
dir | direction of alignement (DIR_HORI or DIR_VERT), | |
align | kind of alignement,
|
References DIR_HORI, and DIR_VERT.
Referenced by mt_dfrm_new_dmenu(), and mt_dfrm_thumb_add().
void dfrm_attach | ( | void * | _dfrm, | |
int | ind, | |||
int | type, | |||
... | ||||
) |
ObjcAttach() remplacement for menu and form.
_dfrm | dialog pointer, | |
ind | index of object | |
type | type of form, see ObjcAttach(), | |
... | see see ObjcAttach(). |
Use dfrm_attach() exactly as ObjcAttach().
References _dfrm::bind, _dfrm::_dfrm::_bind::bit, _dfrm::_dfrm::_bind::data, _dfrm::_dfrm::_bind::fnc, _dfrm::_dfrm::_bind::value, and _dfrm::_dfrm::_bind::var.
int dfrm_cellsize | ( | int | mode | ) |
Return cell character size .
mode | should be :
|
References LHEIGHT, LWIDTH, SHEIGHT, and SWIDTH.
Referenced by mt_dfrm_new_button(), mt_dfrm_new_edit(), mt_dfrm_new_fedit(), mt_dfrm_new_ftext(), mt_dfrm_new_label(), mt_dfrm_new_tbox(), mt_dfrm_new_text(), and mt_dfrm_new_xedit().
void dfrm_order | ( | void * | dfrm, | |
int | ind, | |||
int | order | |||
) |
Ordering children's object in a dynamic form.
dfrm | form pointer | |
ind | object index to reorder | |
order | new order :
|
References dfrm_tree(), obj_root(), ORD_BOT, and ORD_TOP.
Referenced by mt_dfrm_thumb_end().
void dfrm_repack | ( | void * | _dfrm | ) |
Applying alignment directives.
Computes size and position of objects in an form according to alignment directives given by dfrm_align() and dfrm_add(). This function is called only one time juste before displaying form at screen.
_dfrm | form pointer |
References ALIGN_BOT, ALIGN_CENTER, ALIGN_FJUSTIFY, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_TOP, dfrm_tree(), get_next_obj(), _dfrm::_dfrm::properties::halign, _dfrm::_dfrm::properties::hspace, NILOBJ, obj_root(), _dfrm::props, _dfrm::_dfrm::properties::walign, and _dfrm::_dfrm::properties::wspace.
OBJECT* dfrm_tree | ( | void * | dfrm | ) |
Returns the OBJECT tree of a form.
dfrm | form descriptor |
Referenced by dfrm_add(), dfrm_new_box(), dfrm_new_cbox(), dfrm_new_fbox(), dfrm_order(), dfrm_repack(), mt_dfrm_add_menu(), mt_dfrm_delete(), mt_dfrm_find_label(), mt_dfrm_form(), mt_dfrm_free(), mt_dfrm_menu(), mt_dfrm_modal(), mt_dfrm_new_button(), mt_dfrm_new_cicon(), mt_dfrm_new_edit(), mt_dfrm_new_fedit(), mt_dfrm_new_ftext(), mt_dfrm_new_icon(), mt_dfrm_new_image(), mt_dfrm_new_label(), mt_dfrm_new_line(), mt_dfrm_new_mtext(), mt_dfrm_new_slider(), mt_dfrm_new_tbox(), mt_dfrm_new_text(), mt_dfrm_new_xcicon(), mt_dfrm_new_xedit(), mt_dfrm_thumb_add(), mt_dfrm_thumb_end(), mt_dfrm_thumb_new(), mt_dfrm_toolbar(), and mt_dfrm_win_attach().
int mt_dfrm_add_menu | ( | APPvar * | app, | |
void * | _dfrm, | |||
char * | label | |||
) |
Special function to adding a title in a menu bar.
This function is used (instead of dfrm_add()) for insert a new title (a G_TITLE object) in the menu bar. dfrm_add() should never be called because inserting a new title object needs reorder all objects in the menu tree.
app | application descriptor, | |
_dfrm | pointer to a DFRM dialog | |
label | text of title object. |
References BAR, _dfrm::bind, dfrm_add(), dfrm_new_fbox(), dfrm_tree(), DIR_HORI, DIR_NONE, FREEOBJ, mt_dfrm_new_label(), NILOBJ, _dfrm::props, SCREEN, TITLES, and TYPE_MTITLE.
Referenced by mt_dfrm_new_dmenu().
void* mt_dfrm_create | ( | APPvar * | app, | |
int | maxobj, | |||
int | type | |||
) |
Creating a new dynamic form.
app | application descriptor, | |
maxobj | maximal number of objects, | |
type | type of form :
|
If the number of allowed objects is reached (by functions dfrm_new_*()), the program will be stopped by an false assertion.
References BAR, _dfrm::bind, DESKTOP, DRAW3D, FLAGS9, _dfrm::_dfrm::_bind::fnc, FREEOBJ, NILOBJ, _dfrm::props, _dfrm::root, SCREEN, TITLES, TYPE_EMPTY, TYPE_MENU, TYPE_NORMAL, TYPE_OUTLINED, and _dfrm::_dfrm::_bind::var.
int mt_dfrm_delete | ( | APPvar * | app, | |
void * | dfrm, | |||
int | ind | |||
) |
Delete an object from a form.
Delete an object from a dynamic form. Actually, the object is just disconnected and eventually its resources allocated are released.
app | application descriptor, | |
dfrm | form descriptor, | |
ind | object index in form, |
References __free_obspec(), dfrm_tree(), and FREEOBJ.
int mt_dfrm_find_label | ( | APPvar * | app, | |
void * | dfrm, | |||
char * | label | |||
) |
Searching object by its label.
app | application descriptor, | |
dfrm | form descriptor, | |
label | string to find as label object, |
References dfrm_tree().
void mt_dfrm_free | ( | APPvar * | app, | |
void * | _dfrm | |||
) |
Release from the memory a form.
app | applicationd descriptor, | |
_dfrm | form descriptor. |
References __free_obspec(), _dfrm::bind, dfrm_tree(), _dfrm::props, and _dfrm::root.
void mt_dfrm_win_attach | ( | APPvar * | app, | |
int | type, | |||
void * | win, | |||
void * | _dfrm | |||
) |
Make effective bindings performed with mt_dfrm_attach().
app | application descriptor, | |
type | type of form (OC_FORM, OC_MENU, OC_TOOLBAR), | |
win | window hosting form, | |
_dfrm | pointer to the form structure. |
References _dfrm::bind, _dfrm::_dfrm::_bind::bit, _dfrm::_dfrm::_bind::data, dfrm_tree(), _dfrm::_dfrm::_bind::fnc, _dfrm::_dfrm::_bind::value, and _dfrm::_dfrm::_bind::var.
Referenced by mt_dfrm_form(), mt_dfrm_menu(), mt_dfrm_modal(), and mt_dfrm_toolbar().