Defines | |
#define | mt_ObjcDraw(a, b, c, d, e) mt_ObjcDrawParent(a,b,c,d,0,e) |
#define | mt_ObjcStrCpy(a, tree, index, str) strcpy(mt_ObjcString(a,tree,index,NULL),str) |
Modify an object label. | |
#define | mt_ObjcStrFmt(a, b, c, d) ObjcStrFmt(b,c,d) |
See ObjcStrFmt(). | |
#define | ObjcStrCpy(tree, index, str) strcpy(mt_ObjcString(gl_appvar,tree,index,NULL),str) |
See mt_ObjcStrCpy(). | |
Functions | |
int | mt_ObjcChange (APPvar *app, int mode, void *data, int __index, int state, int redraw) |
Change the object state. | |
int | mt_ObjcChar (APPvar *app, OBJECT *tree, int idx, int put) |
Get and set the character of an object. | |
int | mt_ObjcDrawParent (APPvar *app, int mode, void *win, int __index, int parent_depth, int child_depth) |
Draws an objet in a formular. | |
int | mt_ObjcIsHidden (APPvar *app, int mode, void *win, int __index) |
tell if the object or one of its parent is hidden. | |
OBJECT * | mt_ObjcDup (APPvar *app, OBJECT *tree, WINDOW *win) |
Objects tree duplication. | |
OBJECT * | mt_ObjcNDup (APPvar *app, OBJECT *src, WINDOW *win, int nb) |
Objects duplication. | |
OBJECT * | mt_ObjcNDupAtAddr (APPvar *app, OBJECT *src, WINDOW *win, int nb, OBJECT *dest) |
Objects duplication at a given address. | |
int | mt_ObjcEdit (APPvar *app, int mode, WINDOW *win, int obj, int val, INT16 *idx, int kind) |
Control texte edition of EDITABLE object in formular. | |
void | mt_ObjcFree (APPvar *app, OBJECT *tree) |
Release from memory a duplicated objects tree. | |
void | mt_ObjcNFreeAtAddr (APPvar *app, OBJECT *tree, int nb) |
Release from memory a duplicated objects tree. | |
char * | mt_ObjcString (APPvar *app, OBJECT *tree, int __index, char *put) |
Get and set the label of an object. | |
void | mt_ObjcStr3d (APPvar *app, OBJECT *tree) |
Transform 3D FTEXT MagiC objects. | |
int | mt_ObjcWindDraw (APPvar *app, WINDOW *win, OBJECT *tree, int __index, int depth, int xclip, int yclip, int wclip, int hclip) |
Draw any object in any window. | |
int | mt_ObjcWindDrawParent (APPvar *app, WINDOW *win, OBJECT *tree, int __index, int parent_depth, int child_depth, int xclip, int yclip, int wclip, int hclip) |
Draw any object (and its parents) in any window. | |
int | mt_ObjcWindChange (APPvar *app, WINDOW *win, OBJECT *tree, int __index, int xclip, int yclip, int wclip, int hclip, int state) |
Change state of any object in any window. | |
OBJECT * | mt_ObjcTree (APPvar *app, int mode, WINDOW *win) |
Returns the objects tree hosted by a window. | |
void | ObjcStrFmt (char *dest, char *src, int size) |
Troncate a string in order to fit in an object label. |
#define mt_ObjcDraw | ( | a, | |||
b, | |||||
c, | |||||
d, | |||||
e | ) | mt_ObjcDrawParent(a,b,c,d,0,e) |
#define mt_ObjcStrCpy | ( | a, | |||
tree, | |||||
index, | |||||
str | ) | strcpy(mt_ObjcString(a,tree,index,NULL),str) |
Modify an object label.
Just a fast call of mt_ObjcString().
#define mt_ObjcStrFmt | ( | a, | |||
b, | |||||
c, | |||||
d | ) | ObjcStrFmt(b,c,d) |
See ObjcStrFmt().
#define ObjcStrCpy | ( | tree, | |||
index, | |||||
str | ) | strcpy(mt_ObjcString(gl_appvar,tree,index,NULL),str) |
See mt_ObjcStrCpy().
int mt_ObjcChange | ( | APPvar * | app, | |
int | mode, | |||
void * | win, | |||
int | index, | |||
int | state, | |||
int | redraw | |||
) |
Change the object state.
app | application descriptor, | |
mode | type of target :
| |
win | window descriptor or an object tree if mode is set to OC_OBJC, | |
index | object index to change, | |
state | new object state, | |
redraw | bit 0 indicates if object should be redrawn, OC_MSG resquestes a redraw by WinDom kernel. |
int mt_ObjcChar | ( | APPvar * | app, | |
OBJECT * | tree, | |||
int | idx, | |||
int | put | |||
) |
Get and set the character of an object.
app | application descriptor, | |
tree | address of an objects tree, | |
idx | object index, | |
put | new character (from 0 to 255) or -1 to inquire current value, |
int mt_ObjcDrawParent | ( | APPvar * | app, | |
int | mode, | |||
void * | win, | |||
int | index, | |||
int | parent_depth, | |||
int | child_depth | |||
) |
Draws an objet in a formular.
app | application descriptor, | |
mode | type of target :
| |
win | window descriptor or an object tree if mode is set to OC_OBJC, | |
index | object index to draw, | |
parent_depth | the level of the parent that may be drawn. A value of 1 will draw the parent of the object, the object itself, and its children (specified by next parameter child_depth). | |
child_depth | the maximum object depth to draw (a value of 1 searches only first generation objects, a value of 2 searches up to second generation objects, up to a maximum of 7 to search all objects), if the bit OC_MSG is set, a redraw event will be requested instead of a direct drawn on screen. |
Special bit OC_MSG
If the depth parameter has its OC_MSG bit set to 1, objects will be drawn by sending a set of WM_REDRAW messages to the AES kernel (redraw will be handled by mt_EvntWindom()) instead of drawing immediatly the object.
Objects tree duplication.
app | application descriptor, | |
src | objects tree to duplicate, | |
win | window hosting the src object tree if src contains userdefs objects, |
If object tree contains USERDRAW objects, the parameter win is absolutely required. In other case, NULL is a correct value.
This function is used by mt_FormCreate() to open several formulars with the same objects tree. If the WS_FORMDUP bit of the win->status window descriptor field is set to 1, the standard destroy function releases the memory with mt_ObjcFree().
Toolbars and menus attached to a window with mt_WindSet() are duplicated in memory using mt_ObjcDup() and the memory automatically released when the window is destroyed.
Control texte edition of EDITABLE object in formular.
app | application descriptor, | |
mode | type of target :
| |
win | window descriptor or an object tree if mode is set to OC_OBJC, | |
obj | index of an EDITABLE object, | |
val | parameter whose meanning depends on the kind parameter, | |
idx | position of cursor, | |
kind | type of action. Possible values are :
|
void mt_ObjcFree | ( | APPvar * | app, | |
OBJECT * | cpy | |||
) |
Release from memory a duplicated objects tree.
app | application descriptor, | |
cpy | duplicated objects tree to release. |
int mt_ObjcIsHidden | ( | APPvar * | app, | |
int | mode, | |||
void * | win, | |||
int | index | |||
) |
tell if the object or one of its parent is hidden.
app | application descriptor, | |
mode | type of target :
| |
win | window descriptor or an object tree if mode is set to OC_OBJC, | |
index | object index to draw, |
Objects duplication.
app | application descriptor, | |
src | objects tree to duplicate, | |
win | window hosting the src object tree if src contains userdefs objects, | |
nb | number of objects to copy, |
Objects duplication at a given address.
app | application descriptor, | |
src | objects tree to duplicate, | |
win | window hosting the src object tree if src contains userdefs objects, | |
nb | number of objects to copy, | |
cpy | address where objects tree will be duplicated |
void mt_ObjcNFreeAtAddr | ( | APPvar * | app, | |
OBJECT * | cpy, | |||
int | nb | |||
) |
Release from memory a duplicated objects tree.
app | application descriptor, | |
cpy | duplicated objects tree to release. | |
nb | number of OBJECTs of the tree cpy to release. |
void mt_ObjcStr3d | ( | APPvar * | app, | |
OBJECT * | tree | |||
) |
Transform 3D FTEXT MagiC objects.
app | application descriptor, | |
tree | objects tree to transform. |
char* mt_ObjcString | ( | APPvar * | app, | |
OBJECT * | tree, | |||
int | idx, | |||
char * | put | |||
) |
Get and set the label of an object.
app | application descriptor, | |
tree | address of an objects tree, | |
idx | object index, | |
put | new label or NULL, |
printf( "Object i : %s\n", ObjcString( tree, i, NULL), i); strcpy( ObjcString( tree, i, NULL), "New text");
char txt[120] = "New text"; ObjcString( tree, i, txt);
mt_ObjcString() should never be used to change the text of an menu item. For that purpose, use mt_MenuText() instead of mt_ObjcString().
Returns the objects tree hosted by a window.
app | application descriptor, | |
mode | type of host :
| |
win | host window descriptor, |
int mt_ObjcWindChange | ( | APPvar * | app, | |
WINDOW * | win, | |||
OBJECT * | tree, | |||
int | index, | |||
int | x, | |||
int | y, | |||
int | w, | |||
int | h, | |||
int | state | |||
) |
Change state of any object in any window.
app | application descriptor, | |
win | targeted window descriptor, | |
tree | objects tree containing the object to draw, | |
index | index of object to draw in tree, | |
x,y,w,h | clipping aera coordinates, | |
state | new object state, |
Usually, you don't need to call this function, only mt_ObjcChange().
int mt_ObjcWindDraw | ( | APPvar * | app, | |
WINDOW * | win, | |||
OBJECT * | tree, | |||
int | index, | |||
int | depth, | |||
int | xclip, | |||
int | yclip, | |||
int | wclip, | |||
int | hclip | |||
) |
Draw any object in any window.
app | application descriptor, | |
win | targeted window descriptor, | |
tree | objects tree containing the object to draw, | |
index | index of object to draw in tree, | |
depth | level of redraw in children hierarchy, | |
xclip,yclip,wclip,hclip | clipping aera coordinates, |
Usually, you don't need to call this function, only mt_ObjcDraw().
int mt_ObjcWindDrawParent | ( | APPvar * | app, | |
WINDOW * | win, | |||
OBJECT * | tree, | |||
int | index, | |||
int | parent_depth, | |||
int | child_depth, | |||
int | xclip, | |||
int | yclip, | |||
int | wclip, | |||
int | hclip | |||
) |
Draw any object (and its parents) in any window.
app | application descriptor, | |
win | targeted window descriptor, | |
tree | objects tree containing the object to draw, | |
index | index of object to draw in tree, | |
child_depth | level of redraw in children hierarchy, | |
parent_depth | level of redraw in parent hierarchy, | |
xclip,yclip,wclip,hclip | clipping aera coordinates, |
Usually, you don't need to call this function, only mt_ObjcDraw().
void ObjcStrFmt | ( | char * | dest, | |
char * | src, | |||
int | size | |||
) |
Troncate a string in order to fit in an object label.
dest | troncated string, | |
src | string to troncate, | |
size | new lenght of string |