Object creators

Object creators. More...


Defines

#define dfrm_new_button(d, t, l)   mt_dfrm_new_button(gl_appvar,d,t,l)
 Create buttons objects, see mt_dfrm_new_button().
#define dfrm_new_label(d, t, l)   mt_dfrm_new_label(gl_appvar,d,t,l)
 Create a string object, see mt_dfrm_new_label().
#define dfrm_new_tbox(d, w, h, l)   mt_dfrm_new_tbox(gl_appvar,d,w,h,l)
 Create a box with a title, see mt_dfrm_new_tbox().
#define dfrm_new_text(d, tc, ta, ts, tm, t)   mt_dfrm_new_text(gl_appvar,d,tc,ta,ts,tm,t)
 Create a text object, see mt_dfrm_new_text().
#define dfrm_new_ftext(d, tc, ta, ts, tm, fc, fs, bc, bp, t)   mt_dfrm_new_ftext(gl_appvar,d,tc,ta,ts,tm,fc,fs,bc,bp,t)
 Create a boxed text object, see mt_dfrm_new_ftext().
#define dfrm_new_mtext(d, w, h, tc, ta, tm, fc, fs, bc, bp, t)   mt_dfrm_new_mtext(gl_appvar,d,w,h,tc,ta,tm,fc,fs,bc,bp,t)
 Create a multilined text object, see mt_dfrm_new_mtext().
#define dfrm_new_edit(d, tc, tm, t, v)   mt_dfrm_new_edit(gl_appvar,d,tc,tm,t,v)
 Create an editable field , see mt_dfrm_new_edit().
#define dfrm_new_fedit(d, tc, fs, fc, bp, bc, tm, t, v)   mt_dfrm_new_fedit(gl_appvar,d,tc,fs,fc,bp,bc,tm,t,v)
 Create a framed editable field , see mt_dfrm_new_fedit().
#define dfrm_new_xedit(d, t, tc, l, v)   mt_dfrm_new_xedit(gl_appvar,d,t,tc,l,v)
 Create a editable object without limitation of text lenght, see mt_dfrm_new_xedit().
#define dfrm_new_icon(d, i, du)   mt_dfrm_new_icon(gl_appvar,d,i,du)
 Create a monochrome icon , see mt_dfrm_new_icon().
#define dfrm_new_cicon(d, i, du)   mt_dfrm_new_cicon(gl_appvar,d,i,du)
 Create a color icon , see mt_dfrm_new_cicon().
#define dfrm_new_line(d, w, h, p, s, c, wi, st, e)   mt_dfrm_new_line(gl_appvar,d,w,h,p,s,c,wi,st,e)
 Create a line (or arrow) object.

Functions

int mt_dfrm_new_button (APPvar *ap, void *dfrm, int type, char *label)
 Create buttons objects.
int mt_dfrm_new_label (APPvar *ap, void *dfrm, int type, char *label)
 Create a string object (G_STRING, G_TITLE or MENUTITLE).
int mt_dfrm_new_tbox (APPvar *ap, void *dfrm, int w, int h, char *label)
 Create a box with a title (TITLEBOX).
int dfrm_new_box (void *dfrm, int w, int h, int fsize, int fcol)
 Create a simple box (G_IBOX).
int dfrm_new_fbox (void *dfrm, int w, int h, int fsize, int fcol, int bpat, int bcol)
 Create a filled box (G_BOX).
int dfrm_new_cbox (void *dfrm, int w, int h, int fsize, int fcol, int bpat, int bcol, int tmode, int tcol, int car)
 Create a box with a character inside (G_BOXCHAR).
int mt_dfrm_new_text (APPvar *ap, void *dfrm, int tcol, int talign, int tsize, int tmode, char *text)
 Create a text object (G_TEXT).
int mt_dfrm_new_ftext (APPvar *ap, void *dfrm, int tcol, int talign, int tsize, int tmode, int fcol, int fsize, int bcol, int bpat, char *text)
 Create a boxed object (G_FTEXT).
int mt_dfrm_new_mtext (APPvar *ap, void *dfrm, int w, int h, int tcol, int talign, int tmode, int fcol, int fsize, int bcol, int bpat, char *text)
 Create a multilined text (XBOXLONGEDIT).
int mt_dfrm_new_edit (APPvar *ap, void *dfrm, int tcol, char *tmptl, char *text, char *valid)
 Create an editable field (G_FTEXT).
int mt_dfrm_new_fedit (APPvar *ap, void *dfrm, int tcol, int fsize, int fcol, int bpat, int bcol, char *tmptl, char *text, char *valid)
 Create a framed editable field (G_FBOXTEXT).
int mt_dfrm_new_xedit (APPvar *ap, void *dfrm, char *type, int tcol, char *label, char *value)
 Create a editable object without limitation of text lenght (XEDIT).
int mt_dfrm_new_icon (APPvar *ap, void *dfrm, ICONBLK *icon, int dup)
 Build an monochrome icon from an ICONBLK data.
int mt_dfrm_new_cicon (APPvar *ap, void *dfrm, CICONBLK *icon, int dup)
 Build a color icon from a CICONBLK data.
int mt_dfrm_new_line (APPvar *ap, void *dfrm, int w, int h, int pente, int style, int color, int width, int start, int end)
 Create a line (or arrow) object.


Detailed Description

Object creators.

Contains functions which define individual object : box, button, label, ...


Define Documentation

#define dfrm_new_button ( d,
t,
 )     mt_dfrm_new_button(gl_appvar,d,t,l)

Create buttons objects, see mt_dfrm_new_button().

#define dfrm_new_cicon ( d,
i,
du   )     mt_dfrm_new_cicon(gl_appvar,d,i,du)

Create a color icon , see mt_dfrm_new_cicon().

#define dfrm_new_edit ( d,
tc,
tm,
t,
 )     mt_dfrm_new_edit(gl_appvar,d,tc,tm,t,v)

Create an editable field , see mt_dfrm_new_edit().

#define dfrm_new_fedit ( d,
tc,
fs,
fc,
bp,
bc,
tm,
t,
 )     mt_dfrm_new_fedit(gl_appvar,d,tc,fs,fc,bp,bc,tm,t,v)

Create a framed editable field , see mt_dfrm_new_fedit().

#define dfrm_new_ftext ( d,
tc,
ta,
ts,
tm,
fc,
fs,
bc,
bp,
 )     mt_dfrm_new_ftext(gl_appvar,d,tc,ta,ts,tm,fc,fs,bc,bp,t)

Create a boxed text object, see mt_dfrm_new_ftext().

#define dfrm_new_icon ( d,
i,
du   )     mt_dfrm_new_icon(gl_appvar,d,i,du)

Create a monochrome icon , see mt_dfrm_new_icon().

#define dfrm_new_label ( d,
t,
 )     mt_dfrm_new_label(gl_appvar,d,t,l)

Create a string object, see mt_dfrm_new_label().

#define dfrm_new_line ( d,
w,
h,
p,
s,
c,
wi,
st,
 )     mt_dfrm_new_line(gl_appvar,d,w,h,p,s,c,wi,st,e)

Create a line (or arrow) object.

#define dfrm_new_mtext ( d,
w,
h,
tc,
ta,
tm,
fc,
fs,
bc,
bp,
 )     mt_dfrm_new_mtext(gl_appvar,d,w,h,tc,ta,tm,fc,fs,bc,bp,t)

Create a multilined text object, see mt_dfrm_new_mtext().

#define dfrm_new_tbox ( d,
w,
h,
 )     mt_dfrm_new_tbox(gl_appvar,d,w,h,l)

Create a box with a title, see mt_dfrm_new_tbox().

#define dfrm_new_text ( d,
tc,
ta,
ts,
tm,
 )     mt_dfrm_new_text(gl_appvar,d,tc,ta,ts,tm,t)

Create a text object, see mt_dfrm_new_text().

#define dfrm_new_xedit ( d,
t,
tc,
l,
 )     mt_dfrm_new_xedit(gl_appvar,d,t,tc,l,v)

Create a editable object without limitation of text lenght, see mt_dfrm_new_xedit().


Function Documentation

int dfrm_new_box ( void *  dfrm,
int  w,
int  h,
int  size,
int  col 
)

Create a simple box (G_IBOX).

Parameters:
dfrm form pointer,
w,h default size if the object is not packed,
size width of frame border,
col color index of frame border,
Returns:
object index created.
w and h parameters can be set to 0. For positive value, unit is pixel. For negative value, unit is semi-character size.

References dfrm_adjust_size(), dfrm_init_obj(), dfrm_tree(), and TE_TRANS.

Referenced by mt_dfrm_new_image(), mt_dfrm_new_line(), mt_dfrm_new_slider(), and mt_dfrm_thumb_new().

int dfrm_new_cbox ( void *  dfrm,
int  w,
int  h,
int  fsize,
int  fcol,
int  bpat,
int  bcol,
int  tmode,
int  tcol,
int  car 
)

Create a box with a character inside (G_BOXCHAR).

Parameters:
dfrm form pointer,
w,h default size if the object is not packed,
fsize width of frame border,
fcol color of frame border,
bpat,bcol pattern and color of background,
tmode text mode (TE_TRANS or TE_OPAQUE),
tcol text color,
car character to display,
Returns:
object index created.
w and h parameters can be set to 0. For positive value, unit is pixel. For negative value, unit is semi-character size.

References dfrm_adjust_size(), dfrm_init_obj(), and dfrm_tree().

Referenced by mt_dfrm_new_slider().

int dfrm_new_fbox ( void *  dfrm,
int  w,
int  h,
int  fsize,
int  fcol,
int  pat,
int  col 
)

Create a filled box (G_BOX).

Parameters:
dfrm form pointer,
w,h default size if the object is not packed,
fsize width of frame border,
fcol color index of frame border,
pat pattern index interior,
col color index interior,
Returns:
object index created.
w and h parameters can be set to 0. For positive value, unit is pixel. For negative value, unit is semi-character size.

References dfrm_adjust_size(), dfrm_init_obj(), dfrm_tree(), and TE_TRANS.

Referenced by mt_dfrm_add_menu().

int mt_dfrm_new_button ( APPvar *  app,
void *  dfrm,
int  type,
char *  label 
)

Create buttons objects.

Parameters:
app application descriptor,
dfrm form pointer,
type type of button :
  • TYPE_SBUT standard selectable button,
  • TYPE_EBUT standard exit button,
  • TYPE_DBUT standard default button,
  • TYPE_UBUT standard undo button,
  • TYPE_XSBUT extended selectable button,
  • TYPE_XEBUT extended exit button,
  • TYPE_XDBUT extended default button,
  • TYPE_XUBUT extended undo button,
  • TYPE_IBUT extended ONGLET button (for thumb forms),
  • TYPE_PBUT a button hosted a popup.
label text inside button
Returns:
object index created
Create a selectable button. The size is adjusted to the label lenght. Extended buttons are extended objects provided by the WinDom library.

References dfrm_cellsize(), dfrm_init_obj(), dfrm_tree(), DRAW3D, FLAGS10, FLAGS11, FLAGS9, LHEIGHT, LWIDTH, STATE8, TYPE_DBUT, TYPE_EBUT, TYPE_IBUT, TYPE_PBUT, TYPE_RBUT, TYPE_SBUT, TYPE_UBUT, TYPE_XDBUT, TYPE_XEBUT, TYPE_XRBUT, TYPE_XSBUT, and TYPE_XUBUT.

Referenced by mt_dfrm_thumb_add().

int mt_dfrm_new_cicon ( APPvar *  app,
void *  dfrm,
CICONBLK *  icon,
int  dup 
)

Build a color icon from a CICONBLK data.

Parameters:
app application descriptor,
dfrm form pointer,
icon pointer to AES cicon data,
dup if TRUE icon data will be memory duplicated.
This function creates a G_CICON object (color icon) using icon data provided by a ICONBLK structure. Icon data may be provided from a resource file. Icon text may be changed using mt_ObjcString() (and mt_objc_tree()) functions.

References dfrm_init_obj(), and dfrm_tree().

int mt_dfrm_new_edit ( APPvar *  app,
void *  dfrm,
int  tcol,
char *  tmplt,
char *  text,
char *  valid 
)

Create an editable field (G_FTEXT).

Parameters:
app application descriptor,
dfrm dialog pointer,
tcol text color,
tmplt pointer to a template string,
text pointer to text,
valid pointer to a validation string,
Returns:
index of the created object. For explanation about tmplt and valid, see documentation of AES TEDINFO structure.

References dfrm_cellsize(), dfrm_init_obj(), dfrm_tree(), FLAGS9, LHEIGHT, and LWIDTH.

int mt_dfrm_new_fedit ( APPvar *  app,
void *  dfrm,
int  tcol,
int  fsize,
int  fcol,
int  bpat,
int  bcol,
char *  tmplt,
char *  text,
char *  valid 
)

Create a framed editable field (G_FBOXTEXT).

Parameters:
app application descriptor,
dfrm dialog pointer,
tcol text color,
fsize frame width,
fcol frame color,
bpat background pattern,
bcol background color,
tmplt pointer to a template string,
text pointer to text,
valid pointer to a validation string,
Returns:
index of the created object. For explanation about tmplt and valid, see documentation of AES TEDINFO structure.

References dfrm_cellsize(), dfrm_init_obj(), dfrm_tree(), FLAGS9, LHEIGHT, and LWIDTH.

int mt_dfrm_new_ftext ( APPvar *  app,
void *  dfrm,
int  tcol,
int  talign,
int  tsize,
int  tmode,
int  fcol,
int  fsize,
int  bcol,
int  bpat,
char *  text 
)

Create a boxed object (G_FTEXT).

Parameters:
app application descriptor,
dfrm dialog pointer,
tcol color index of text,
talign text alignment :
  • TE_LEFT align to left,
  • TE_RIGHT align to right,
  • TE_CNTR centering,
tsize text size : IBM or SMALL,
tmode text mode :
  • TE_TRANS transparent mode,
  • TE_OPAQUE opaque mode,
fcol frame color,
fsize frame width,
bcol background color,
bpat background pattern,
text text to display,
Returns:
index of the created object.

References dfrm_cellsize(), dfrm_init_obj(), dfrm_tree(), LHEIGHT, and LWIDTH.

int mt_dfrm_new_icon ( APPvar *  app,
void *  dfrm,
ICONBLK *  icon,
int  dup 
)

Build an monochrome icon from an ICONBLK data.

Parameters:
app application descriptor,
dfrm form pointer,
icon pointer to AES icon data,
dup if TRUE icon data will be memory duplicated.
This function creates a G_ICON object (monochrome icon) using icon data provided by a ICONBLK structure. Icon data may be provided from a resource file. Icon text may be changed using mt_ObjcString() (and mt_objc_tree()) functions.

References __malloc_obspec(), dfrm_init_obj(), and dfrm_tree().

int mt_dfrm_new_label ( APPvar *  app,
void *  dfrm,
int  type,
char *  label 
)

Create a string object (G_STRING, G_TITLE or MENUTITLE).

Parameters:
app application descriptor,
dfrm form pointer,
type type of object :
  • TYPE_ULABEL underlined label,
  • TYPE_LABEL label,
  • TYPE_MITEM entry of a menu,
  • TYPE_MTITLE title of a menu,
label label text,
Returns:
index of created object.

References dfrm_cellsize(), dfrm_init_obj(), dfrm_tree(), DRAW3D, LHEIGHT, LWIDTH, STATE8, TYPE_LABEL, TYPE_MITEM, TYPE_MTITLE, and TYPE_ULABEL.

Referenced by mt_dfrm_add_menu(), and mt_dfrm_new_dmenu().

int mt_dfrm_new_line ( APPvar *  app,
void *  dfrm,
int  w,
int  h,
int  slop,
int  style,
int  color,
int  width,
int  start,
int  end 
)

Create a line (or arrow) object.

Parameters:
app application descriptor,
dfrm form pointer,
w,h object size,
slop line slop : 0 for a descreasing slop, 1 else,
style line style (see vsl_type()),
color line color (see vsl_color()),
width line width (see vsl_width()),
start start point style (see vsl_ends()),
end end point style (see vsl_ends()).
Returns:
index of the created object.
This function creates an object which draw a line. the object size and position determine the line geometry. There are two cases. If slop parameter is negative : a line is drawn between the left-upper and right-downer object points. If slop parameter is positive : a line is drawn between the left-downer and right-upper object points. Other parameters fixe the line attributes.

References __malloc_obspec(), line_style::color, dfrm_adjust_size(), dfrm_new_box(), dfrm_tree(), line_style::end, line_style::handle, line_style::pente, line_style::start, line_style::style, and line_style::width.

int mt_dfrm_new_mtext ( APPvar *  app,
void *  dfrm,
int  w,
int  h,
int  tcol,
int  talign,
int  tmode,
int  fcol,
int  fsize,
int  bcol,
int  bpat,
char *  text 
)

Create a multilined text (XBOXLONGEDIT).

Parameters:
app application descriptor,
dfrm dialog pointer,
w,h size of object,
tcol color index of text,
talign text alignment :
  • TE_LEFT align to left,
  • TE_RIGHT align to right,
  • TE_CNTR centering,
tmode text mode :
  • TE_TRANS transparent mode,
  • TE_OPAQUE opaque mode,
fcol frame color,
fsize frame width,
bcol background color,
bpat background pattern,
text text to display,
Returns:
index of the created object.

References dfrm_adjust_size(), dfrm_init_obj(), dfrm_tree(), and XBOXLONGTEXT.

int mt_dfrm_new_tbox ( APPvar *  app,
void *  dfrm,
int  w,
int  h,
char *  label 
)

Create a box with a title (TITLEBOX).

Parameters:
app application descriptor,
dfrm form pointer,
w,h minimal width and height of the object
label label text,
Returns:
index of created object.

References dfrm_adjust_size(), dfrm_cellsize(), dfrm_init_obj(), dfrm_tree(), DRAW3D, LHEIGHT, and LWIDTH.

int mt_dfrm_new_text ( APPvar *  app,
void *  dfrm,
int  tcol,
int  talign,
int  tsize,
int  tmode,
char *  text 
)

Create a text object (G_TEXT).

Parameters:
app application descriptor,
dfrm dialog pointer,
tcol color index of text,
talign text alignment :
  • TE_LEFT align to left,
  • TE_RIGHT align to right,
  • TE_CNTR centering,
tsize text size : IBM or SMALL,
tmode text mode :
  • TE_TRANS transparent mode,
  • TE_OPAQUE opaque mode,
text text to display,
Returns:
index of the created object.

References dfrm_cellsize(), dfrm_init_obj(), dfrm_tree(), LHEIGHT, and LWIDTH.

int mt_dfrm_new_xedit ( APPvar *  app,
void *  dfrm,
char *  type,
int  tcol,
char *  tmplt,
char *  text 
)

Create a editable object without limitation of text lenght (XEDIT).

Parameters:
app application descriptor,
dfrm dialog pointer,
type fix the allowed editable characters. Possible values are :
  • XEDIT_HIDDEN any character and no echo of character typed (usefull for password capture)
  • XEDIT_LOWER any uncapitulate character
  • XEDIT_ALLCHAR any character
  • XEDIT_NUMERIC only numeric character
  • XEDIT_ALPHANUM only alphanumeric character
  • XEDIT_LOWERSPACE TODO
  • XEDIT_UPPERSPACE TODO
  • XEDIT_FILENAME only character allowed for file name
  • XEDIT_PATHNAME only character allowed for path name
  • XEDIT_PATHMASK only character allowed for path mask
tcol text color,
tmplt pointer to a template string,
text pointer to text,
Returns:
index of the created object.

References dfrm_cellsize(), dfrm_init_obj(), dfrm_tree(), DRAW3D, LHEIGHT, and LWIDTH.


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