Utilities functions.

Utilities functions. Contains functions which attach quickly forms to window, menu or toobar, debug function and multilanguage facilities. More...


Defines

#define dfrm_form(d, a, n, g)   mt_dfrm_form(gl_appvar,d,a,n,g)
 Quick declaration of a form window, see mt_dfrm_form().
#define dfrm_modal(d, m)   mt_dfrm_modal(gl_appvar,d,m)
 Quick declaration of a modal form window, see mt_dfrm_modal().
#define dfrm_toolbar(w, d)   mt_dfrm_toolbar(gl_appvar,w,d)
 Quick declaration of a toolbar in a window, see mt_dfrm_toolbar().
#define dfrm_menu(w, d)   mt_dfrm_menu(gl_appvar,w,d)
 Quick declaration of a menu in a window (or desktop menu), see mt_dfrm_menu().
#define dfrm_load_str(f)   mt_dfrm_load_str(gl_appvar,f)
 Load strings from a text file generated by dfrmstr, see mt_dfrm_load_str().

Functions

WINDOW * mt_dfrm_form (APPvar *ap, void *dfrm, int attrib, char *name, int grow)
 Quick declaration of a form window.
WINDOW * mt_dfrm_modal (APPvar *ap, void *dfrm, char *name)
 Quick declaration of a modal form window.
void mt_dfrm_toolbar (APPvar *ap, WINDOW *win, void *dfrm)
 Quick declaration of a toolbar in a window.
void mt_dfrm_menu (APPvar *ap, WINDOW *win, void *dfrm)
 Quick declaration of a menu in a window or as desktop menu.
char ** mt_dfrm_load_str (APPvar *ap, char *file)
 Load strings from a text file generated by dfrmstr.
void dfrm_free_str (char **strings)
 Release memory reserved by dfrm_load_str().
void dfrm_debug_list (OBJECT *tree, int max, char *log, int kind)
void dfrm_trace (char *format,...)
 Write a log message in the DFRM log file.


Detailed Description

Utilities functions. Contains functions which attach quickly forms to window, menu or toobar, debug function and multilanguage facilities.

Utilities


Define Documentation

#define dfrm_form ( d,
a,
n,
 )     mt_dfrm_form(gl_appvar,d,a,n,g)

Quick declaration of a form window, see mt_dfrm_form().

#define dfrm_load_str (  )     mt_dfrm_load_str(gl_appvar,f)

Load strings from a text file generated by dfrmstr, see mt_dfrm_load_str().

#define dfrm_menu ( w,
 )     mt_dfrm_menu(gl_appvar,w,d)

Quick declaration of a menu in a window (or desktop menu), see mt_dfrm_menu().

#define dfrm_modal ( d,
 )     mt_dfrm_modal(gl_appvar,d,m)

Quick declaration of a modal form window, see mt_dfrm_modal().

#define dfrm_toolbar ( w,
 )     mt_dfrm_toolbar(gl_appvar,w,d)

Quick declaration of a toolbar in a window, see mt_dfrm_toolbar().


Function Documentation

void dfrm_debug_list ( OBJECT *  tree,
int  max,
char *  log,
int  kind 
)

References FREEOBJ, and TYPE.

void dfrm_free_str ( char **  strings  ) 

Release memory reserved by dfrm_load_str().

Parameters:
strings array of strings returned by dfrm_load_str().

void dfrm_trace ( char *  format,
  ... 
)

Write a log message in the DFRM log file.

Parameters:
format string format as printf()
... variable argument list depending on format string
This function writes a log message in the file pointed by the AES environ variable 'DFRM_LOG'. If this variable is not defined, dfrm_trace() has no effect.

WINDOW* mt_dfrm_form ( APPvar *  app,
void *  dfrm,
int  attrib,
char *  name,
int  grow 
)

Quick declaration of a form window.

Parameters:
app application descriptor,
dfrm pointer to form structure,
attrib GEM attributes of host window,
name title of host window,
grow if TRUE, activate graphical effects when open/close window,
Returns:
the window descriptor created.
This function is just a custom call of WinDom and DFRM functions to attach quickly a form as a window form.In addition, extended object are installed (using RsrcXtype()). The function makes binding declared by dfrm_attach() effective (using dfrm_win_attach()).

When the window hosting the form is destroyed, memory used by extended objects and by dfrm_create() is automatically released.

Have a look to this function (in src/attach.c) for more details.

References dfrm_tree(), and mt_dfrm_win_attach().

char** mt_dfrm_load_str ( APPvar *  app,
char *  file 
)

Load strings from a text file generated by dfrmstr.

Parameters:
app application descriptor,
file of strings to load,
Returns:
array of strings indexed by dfrmstr
See also:
dfrm_free_str(), dfrmstr
The function loads a text file and returns an array of string. Elements of this array are indexed by constants defined in an header file automatically producted by the dfrmstr utility.

Each element of this array matches to a line from the text file. The text file contains typically all string displaying in object allowing a multilanguage support of DFRM applications.

References MAXBUF, and NAMELEN.

void mt_dfrm_menu ( APPvar *  app,
WINDOW *  win,
void *  dial 
)

Quick declaration of a menu in a window or as desktop menu.

Parameters:
app application descriptor,
win the host window or NULL (desktop),
dial pointer to the toolbar structure,
This function is just an custom call of DFRM and WinDom functions to attach quickly a form as toolbar of a window. Extended object types are converted (with RsrcXtype()), bindings declared by dfrm_attach() are effectives (using dfrm_win_attach()).

When the window is destroyed, memory reserved by dfrm_toolbar() and dfrm_create() is released. Otherwise if menu is attached to the GEM desktop, memory is released when application catches the AP_TERM message.

See src/attach.c for details.

References dfrm_tree(), and mt_dfrm_win_attach().

WINDOW* mt_dfrm_modal ( APPvar *  app,
void *  dial,
char *  name 
)

Quick declaration of a modal form window.

Parameters:
app application descriptor,
dial pointer to form structure,
name title of host window,
Returns:
the window descriptor created.
This function is identical to mt_dfrm_form() excepted the window form created is modal.

References dfrm_tree(), and mt_dfrm_win_attach().

void mt_dfrm_toolbar ( APPvar *  app,
WINDOW *  win,
void *  dial 
)

Quick declaration of a toolbar in a window.

Parameters:
app application descriptor,
win the host window,
dial pointer to the toolbar structure,
This function is just an custom call of DFRM and WinDom functions to attach quickly a form as toolbar of a window. Extended object types are converted (with RsrcXtype()), bindings declared by dfrm_attach() are effectives (using dfrm_win_attach()).

When the window is destroyed, memory reserved by dfrm_toolbar() and dfrm_create() is released.

See src/attach.c for details.

References dfrm_tree(), and mt_dfrm_win_attach().


Generated on Thu Dec 23 18:55:34 2010 for Dynamic Forms by  doxygen 1.5.8