This library makes functions available for drawing and manipulating objects (of any kind). The following routines exist for this:
• objc_add | Inserts an object in object tree |
• objc_change | Alters status of an object |
• objc_delete | Removes object from the object tree |
• objc_draw | Draws AES objects (or part-objects) |
• objc_edit | Edits text in an object |
• objc_find | Determines object at given screen position |
• objc_offset | Obtains true screen coordinates of an object |
• objc_order | Alters order of objects in object tree |
• objc_sysvar | Manipulates 3D objects |
• objc_wchange | Alters status of an object (in window) |
• objc_wdraw | Draws objects (or part-objects) (in window) |
• objc_wedit | Edits text in an object (in window) |
• objc_xedit | Edits text in an object |
• objc_xfind | Finds object index from its position |
• objc_xoffset | No information available at present |
• x_objc_edit | Edits text in an object, with extensions |
Note: Here special merit has been earned by objc_sysvar, with whose help the 3D-look of objects can be controlled (and as of MagiC 3 also switched off).
See also:
About the AES AES object structure Scrollable input fields Style guidelines
Name: | »Object add« - Insert object in an object tree.
| ||||||||||
Opcode: | 40
| ||||||||||
Syntax: | int16_t objc_add ( OBJECT *ob_atree, int16_t ob_aparent,
int16_t ob_achild );
| ||||||||||
Description: | The call objc_add creates a hierarchical connection between two
objects in an object tree - in other words extablishes the
relationship of a child object to its parent. The following apply:
(Note: At insertion, the components ob_head and ob_tail of the OBJECT structure must already have been suitably initialized and be part of the OBJECT array. | ||||||||||
Return value: | An error has arisen only if the value 0 is returned.
| ||||||||||
Availability: | All AES versions.
| ||||||||||
Group: | Object library
| ||||||||||
See also: | Binding OBJECT objc_delete
|
C: | int16_t objc_add ( OBJECT *ob_atree, int16_t ob_aparent,
int16_t ob_achild );
| ||||||||||||||||||||||||||||||
Binding: |
int16_t objc_add (OBJECT *ob_atree, int16_t ob_aparent, int16_t ob_achild) { int_in[0] = ob_aparent; int_in[1] = ob_achild; addr_in[0] = ob_atree; return ( crys_if(40) ); } | ||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object change« - Alter display of an object within specified
limits.
| ||||||||||||||||||||||||||||
Opcode: | 47
| ||||||||||||||||||||||||||||
Syntax: | int16_t objc_change ( OBJECT *ob_ctree, int16_t ob_cobject,
int16_t ob_cresvd, int16_t ob_cxclip, int16_t ob_cyclip, int16_t
ob_cwclip, int16_t ob_chclip, int16_t ob_cnewstate, int16_t ob_credraw
);
| ||||||||||||||||||||||||||||
Description: | The call objc_change alters the display state of an object and,
if necessary, redraws it. The following apply:
| ||||||||||||||||||||||||||||
Return value: | An error has arisen only if the value 0 is returned.
| ||||||||||||||||||||||||||||
Availability: | All AES versions.
| ||||||||||||||||||||||||||||
Group: | Object library
| ||||||||||||||||||||||||||||
See also: | Binding objc_wchange OBJECT
|
C: | int16_t objc_change ( OBJECT *ob_ctree, int16_t ob_cobject,
int16_t ob_cresvd, int16_t ob_cxclip, int16_t ob_cyclip, int16_t
ob_cwclip, int16_t ob_chclip, int16_t ob_cnewstate, int16_t ob_credraw
);
| ||||||||||||||||||||||||||||||||||||||||||||||||
Binding: |
int16_t objc_change (OBJECT *ob_ctree, int16_t ob_cobject, int16_t ob_cresvd, int16_t ob_cxclip, int16_t ob_cyclip, int16_t ob_cwclip, int16_t ob_chclip, int16_t ob_cnewstate, int16_t ob_credraw) { int_in[0] = ob_cobject; int_in[1] = ob_cresvd; int_in[2] = ob_cxclip; int_in[3] = ob_cyclip; int_in[4] = ob_cwclip; int_in[5] = ob_chclip; int_in[6] = ob_cnewstate; int_in[7] = ob_credraw; addr_in[0] = ob_ctree; return ( crys_if(47) ); } | ||||||||||||||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object delete« - Remove object from an object tree.
| ||||||
Opcode: | 41
| ||||||
Syntax: | int16_t objc_delete ( OBJECT *ob_dltree, int16_t ob_dlobject );
| ||||||
Description: | The call objc_delete removes an object from an object tree. The
following apply:
| ||||||
Return value: | An error has arisen only if the value 0 is returned.
| ||||||
Availability: | All AES versions.
| ||||||
Group: | Object library
| ||||||
Querverweise: | Binding OBJECT objc_add
|
C: | int16_t objc_delete ( OBJECT *ob_dltree, int16_t ob_dlobject );
| |||||||||||||||||||||||||||
Binding: |
int16_t objc_delete (OBJECT *ob_dltree, int16_t ob_dlobject) { int_in[0] = ob_dlobject; addr_in[0] = ob_dltree; return ( crys_if(41) ); } | |||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object draw« - Draw an AES object tree.
| ||||||||||||||||||
Opcode: | 42
| ||||||||||||||||||
Syntax: | int16_t objc_draw ( OBJECT *ob_drtree, int16_t ob_drstart,
int16_t ob_drdepth, int16_t ob_drxclip, int16_t ob_dryclip, int16_t
ob_drwclip, int16_t ob_drhclip );
| ||||||||||||||||||
Description: | The call objc_draw renders an object tree (or parts of objects)
on the screen. The following apply:
Note: With the parameters one can specify a rectangle to which drawing is to be restricted (clipping). | ||||||||||||||||||
Return value: | An error has arisen only if the value 0 is returned.
| ||||||||||||||||||
Availability: | All AES versions.
| ||||||||||||||||||
Group: | Object library
| ||||||||||||||||||
See also: | Binding objc_wdraw OBJECT
|
C: | int16_t objc_draw ( OBJECT *ob_drtree, int16_t ob_drstart,
int16_t ob_drdepth, int16_t ob_drxclip, int16_t ob_dryclip, int16_t
ob_drwclip, int16_t ob_drhclip );
| ||||||||||||||||||||||||||||||||||||||||||
Binding: |
int16_t objc_draw (OBJECT *ob_drtree, int16_t ob_drstart, int16_t ob_drdepth, int16_t ob_drxclip, int16_t ob_dryclip, int16_t ob_drwclip, int16_t ob_drhclip) { int_in[0] = ob_drstart; int_in[1] = ob_drdepth; int_in[2] = ob_drxclip; int_in[3] = ob_dryclip; int_in[4] = ob_drwclip; int_in[5] = ob_drhclip; addr_in[0] = ob_drtree; return ( crys_if(42) ); } | ||||||||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object edit« - Edit text in an editable text object.
| ||||||||||||||||||||||
Opcode: | 46
| ||||||||||||||||||||||
Syntax: | int16_t objc_edit ( OBJECT *ob_edtree, int16_t ob_edobject,
int16_t ob_edchar, int16_t *ob_edidx, int16_t ob_edkind );
| ||||||||||||||||||||||
Description: | The call objc_edit permits manual text input into objects of
the type G_FTEXT or G_FBOXTEXT. The following apply:
Note: MagiC as of version 2.0 has an extended function objc_xedit. | ||||||||||||||||||||||
Return value: | An error has arisen only if the value 0 is returned.
| ||||||||||||||||||||||
Availability: | All AES versions.
| ||||||||||||||||||||||
Group: | Object library
| ||||||||||||||||||||||
See also: | Binding objc_wedit OBJECT TEDINFO objc_xedit
|
C: | int16_t objc_edit ( OBJECT *ob_edtree, int16_t ob_edobject,
int16_t ob_edchar, int16_t *ob_edidx, int16_t ob_edkind );
| |||||||||||||||||||||||||||||||||||||||
Binding: |
int16_t objc_edit (OBJECT *ob_edtree, int16_t ob_edobject, int16_t ob_edchar, int16_t *ob_edidx, int16_t ob_edkind) { int_in[0] = ob_edobject; int_in[1] = ob_edchar; int_in[2] = *ob_edidx; int_in[3] = ob_edkind; addr_in[0] = ob_edtree; crys_if (46); *ob_edidx = int_out[1]; return ( int_out[0] ); } | |||||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object find« - Find which object that lies at the specified
screen position.
| ||||||||||||||
Opcode: | 43
| ||||||||||||||
Syntax: | int16_t objc_find ( OBJECT *ob_ftree, int16_t ob_fstartob,
int16_t ob_fdepth, int16_t ob_fmx, int16_t ob_fmy );
| ||||||||||||||
Description: | The call objc_find determines which object is found at given
screen coordinates. The following apply:
| ||||||||||||||
Return value: | The object index found at the coordinates ob_fmx,
ob_fmy (or -1 for 'no object found').
| ||||||||||||||
Availability: | All AES versions.
| ||||||||||||||
Group: | Object library
| ||||||||||||||
See also: | Binding OBJECT objc_xfind
|
C: | int16_t objc_find ( OBJECT *ob_ftree, int16_t ob_fstartob,
int16_t ob_fdepth, int16_t ob_fmx, int16_t ob_fmy );
| ||||||||||||||||||||||||||||||||||||
Binding: |
int16_t objc_find (OBJECT *ob_ftree, int16_t ob_fstartob, int16_t ob_fdepth, int16_t ob_fmx, int16_t ob_fmy) { int_in[0] = ob_fstartob; int_in[1] = ob_fdepth; int_in[2] = ob_fmx; int_in[3] = ob_fmy; addr_in[0] = ob_ftree; return ( crys_if(43) ); } | ||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object offset« - Calculate the true position of an object on
the screen.
| ||||||||||
Opcode: | 44
| ||||||||||
Syntax: | int16_t objc_offset ( OBJECT *ob_oftree, int16_t ob_ofobject,
int16_t *ob_ofxoff, int16_t *ob_ofyoff );
| ||||||||||
Description: | The call objc_offset calculates the true position of an object
in absolute screen coordinates. The following apply:
| ||||||||||
Return value: | An error has arisen only if the value 0 is returned.
| ||||||||||
Availability: | All AES versions.
| ||||||||||
Group: | Object library
| ||||||||||
Querverweise: | Binding OBJECT form_center
|
C: | int16_t objc_offset ( OBJECT *ob_oftree, int16_t ob_ofobject,
int16_t *ob_ofxoff, int16_t *ob_ofyoff );
| |||||||||||||||||||||||||||||||||
Binding: |
int16_t objc_offset (OBJECT *ob_oftree, int16_t ob_ofobject, int16_t *ob_ofxoff, int16_t *ob_ofyoff) { int_in[0] = ob_ofobject; addr_in[0] = ob_oftree; crys_if (44); *ob_ofxoff = int_out[1]; *ob_ofyoff = int_out[2]; return ( int_out[0] ); } | |||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object order« - Alter order of object in object tree.
| ||||||||||||||||||||||
Opcode: | 45
| ||||||||||||||||||||||
Syntax: | int16_t objc_order ( OBJECT *ob_ortree, int16_t ob_orobject,
int16_t ob_ornewpos );
| ||||||||||||||||||||||
Description: | The call objc_order alters the position of an object relative
to other child objects of the same parent within a sub-tree. The
following apply:
Note: This call does not move the structure elements in memory, but updates the OBJECT tree's ob_head, ob_tail and ob_next fields, thus 'moving' the OBJECT in the tree hierarchy. | ||||||||||||||||||||||
Return value: | An error has arisen only if the value 0 is returned.
| ||||||||||||||||||||||
Availability: | All AES versions.
| ||||||||||||||||||||||
Group: | Object library
| ||||||||||||||||||||||
See also: | Binding OBJECT
|
C: | int16_t objc_order ( OBJECT *ob_ortree, int16_t ob_orobject,
int16_t ob_ornewpos );
| ||||||||||||||||||||||||||||||
Binding: |
int16_t objc_order (OBJECT *ob_ortree, int16_t ob_orobject, int16_t ob_ornewpos) { int_in[0] = ob_orobject; int_in[1] = ob_ornewpos; addr_in[0] = ob_ortree; return ( crys_if(45) ); } | ||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object sysvar« - Manipulation of 3D objects.
| ||||||||||||||||||||||||||||||||||||||||||
Opcode: | 48
| ||||||||||||||||||||||||||||||||||||||||||
Syntax: | int16_t objc_sysvar ( int16_t ob_smode, int16_t ob_swhich,
int16_t ob_sival1, int16_t ob_sival2, int16_t *ob_soval1, int16_t
*ob_soval2 );
| ||||||||||||||||||||||||||||||||||||||||||
Description: | The call objc_sysvar permits the setting or inquiring the
appearance of the AES 3D objects. The following apply:
Note: The settings made with objc_sysvar apply not just for your own program, but are global for the whole system. For this reason the function should not be used in normal user applications, but only in configuration programs (such as CPX modules). Although the function is present in MagiC 2.0, due to not yet implemented 3D-objects no modifications are possible. For this reason close attention should be paid to the function's return value. As of MagiC 3 the 3D-look is available, but some differences have to be borne in mind. | ||||||||||||||||||||||||||||||||||||||||||
Return value: | An error has arisen only if the value 0 is returned.
| ||||||||||||||||||||||||||||||||||||||||||
Availability: | Available as of AES version 3.40.
The presence of this function can be ascertained with a call of appl_getinfo (opcode 13). | ||||||||||||||||||||||||||||||||||||||||||
Group: | Object library
| ||||||||||||||||||||||||||||||||||||||||||
See also: | Binding
|
C: | int16_t objc_sysvar ( int16_t ob_smode, int16_t ob_swhich,
int16_t ob_sival1, int16_t ob_sival2, int16_t *ob_soval1, int16_t
*ob_soval2 );
| |||||||||||||||||||||||||||||||||||||||
Binding: |
int16_t objc_sysvar (int16_t ob_smode, int16_t ob_swhich, int16_t ob_sival1, int16_t ob_sival2, int16_t *ob_soval1, int16_t *ob_soval2) { int_in[0] = ob_smode; int_in[1] = ob_swhich; int_in[2] = ob_sival1; int_in[3] = ob_sival2; crys_if (48); *ob_soval1 = int_out[1]; *ob_soval2 = int_out[2]; return ( int_out[0] ); } | |||||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object window change« - Alter the display of an object in a
window within specified limits.
| ||||||||||||
Opcode: | 61
| ||||||||||||
Syntax: | void objc_wchange ( OBJECT *ob_ctree, int16_t ob_cobject,
int16_t ob_cnewstate, GRECT *clip, int16_t whandle );
| ||||||||||||
Description: | The call objc_wchange alters the display state of an object in
a window and, if necessary, redraws it. The following apply:
Note: A call of this function is equivalent to calling objc_change (without a redraw) followed by objc_wdraw. | ||||||||||||
Return value: | An error has arisen only if the value 0 is returned.
| ||||||||||||
Availability: | The function is available in MagiC as of Version 5.10.
| ||||||||||||
Group: | Object library
| ||||||||||||
See also: | Binding objc_change OBJECT
|
C: | void objc_wchange ( OBJECT *ob_ctree, int16_t ob_cobject,
int16_t ob_cnewstate, GRECT *clip, int16_t whandle );
| |||||||||||||||||||||||||||||||||
Binding: |
void objc_wchange (OBJECT *ob_ctree, int16_t ob_cobject, int16_t ob_cnewstate, GRECT *clip, int16_t whandle) { int_in[0] = ob_cobject; int_in[1] = ob_cnewstate; int_in[2] = whandle; addr_in[0] = ob_ctree; addr_in[1] = clip; crys_if(61); } | |||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object window draw« - Draw an AES object tree in a
window.
| ||||||||||||||
Opcode: | 60
| ||||||||||||||
Syntax: | void objc_wdraw ( OBJECT *ob_drtree, int16_t ob_drstart,
int16_t ob_drdepth, GRECT *clip, int16_t whandle );
| ||||||||||||||
Description: | The call objc_wdraw renders an object tree (or parts of
objects) in a window on the screen. The following apply:
Note: In the parameters one can specify a rectangle to which drawing is to be restricted (clipping). If clip has the value NULL, then the drawing region is restricted to the working area of the window. The function corresponds essentially to objc_draw with the difference that here the rectangle list of a window is respected. | ||||||||||||||
Return value: | An error has arisen only if the value 0 is returned.
| ||||||||||||||
Availability: | The function is available in MagiC as of Version 5.10.
| ||||||||||||||
Group: | Object library
| ||||||||||||||
See also: | Binding objc_draw OBJECT
|
C: | void objc_wdraw ( OBJECT *ob_drtree, int16_t ob_drstart,
int16_t ob_drdepth, GRECT *clip, int16_t whandle );
| |||||||||||||||||||||||||||||||||
Binding: |
void objc_wdraw (OBJECT *ob_drtree, int16_t ob_drstart, int16_t ob_drdepth, GRECT *clip, int16_t whandle) { int_in[0] = ob_drstart; int_in[1] = ob_drdepth; int_in[2] = whandle; addr_in[0] = ob_drtree; addr_in[1] = clip; crys_if(60); } | |||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object window edit« - Edit text in an object in a window.
| ||||||||||||||||||||||||||
Opcode: | 65
| ||||||||||||||||||||||||||
Syntax: | int16_t objc_wedit ( OBJECT *ob_edtree, int16_t ob_edobject,
int16_t ob_edchar, int16_t *ob_edidx, int16_t ob_edkind, int16_t
whandle );
| ||||||||||||||||||||||||||
Description: | The call objc_wedit permits manual text input into objects of
the type G_FTEXT or G_FBOXTEXT in a window. The following apply:
Note: The function corresponds in principle to objc_edit with the difference that here the rectangle list of a window is respected. | ||||||||||||||||||||||||||
Return value: | An error has arisen only if the value 0 is returned.
| ||||||||||||||||||||||||||
Availability: | The function is available in MagiC as of Version 5.10.
| ||||||||||||||||||||||||||
Group: | Object library
| ||||||||||||||||||||||||||
See also: | Binding objc_edit OBJECT TEDINFO
|
C: | int16_t objc_wedit ( OBJECT *ob_edtree, int16_t ob_edobject,
int16_t ob_edchar, int16_t *ob_edidx, int16_t ob_edkind, int16_t
whandle );
| ||||||||||||||||||||||||||||||||||||||||||
Binding: |
int16_t objc_wedit (OBJECT *ob_edtree, int16_t ob_edobject, int16_t ob_edchar, int16_t *ob_edidx, int16_t ob_edkind, int16_t whandle) { int_in[0] = ob_edobject; int_in[1] = ob_edchar; int_in[2] = *ob_edidx; int_in[3] = ob_edkind; int_in[4] = whandle; addr_in[0] = ob_edtree; crys_if (65); *ob_edidx = int_out[1]; return ( int_out[0] ); } | ||||||||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object xedit« - Edit text in an object.
| ||||||||||||||||||||||||||
Opcode: | 46
| ||||||||||||||||||||||||||
Syntax: | int16_t objc_xedit ( OBJECT *ob_edtree, int16_t ob_edobject,
int16_t ob_edchar, int16_t *ob_edidx, int16_t ob_edkind, GRECT *r );
| ||||||||||||||||||||||||||
Description: | The call objc_xedit permits manual text input into objects of
the type G_FTEXT or G_FBOXTEXT. The following apply:
| ||||||||||||||||||||||||||
Return value: | An error has arisen only if the value 0 is returned.
| ||||||||||||||||||||||||||
Availability: | As of MagiC Version 2.0.
| ||||||||||||||||||||||||||
Group: | Object library
| ||||||||||||||||||||||||||
See also: | Binding objc_wedit OBJECT TEDINFO objc_edit
|
C: | int16_t objc_xedit ( OBJECT *ob_edtree, int16_t ob_edobject,
int16_t ob_edchar, int16_t *ob_edidx, int16_t ob_edkind, GRECT *r );
| ||||||||||||||||||||||||||||||||||||||||||
Binding: |
int16_t objc_xedit (OBJECT *ob_edtree, int16_t ob_edobject, int16_t ob_edchar, int16_t *ob_edidx, int16_t ob_edkind, GRECT *r) { int_in[0] = ob_edobject; int_in[1] = ob_edchar; int_in[2] = *ob_edidx; int_in[3] = ob_edkind; addr_in[0] = ob_edtree; addr_in[1] = r; crys_if (46); *ob_edidx = int_out[1]; return ( int_out[0] ); } | ||||||||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object xfind« - Find which object lies at the specified
screen position.
| ||||||||||||||
Opcode: | 49
| ||||||||||||||
Syntax: | int16_t objc_xfind ( OBJECT *ob_ftree, int16_t ob_fstartob,
int16_t ob_fdepth, int16_t ob_fmx, int16_t ob_fmy );
| ||||||||||||||
Description: | The call objc_xfind determines which object is found at given
screen coordinates. The following apply:
Note: The difference from objc_find is that this uses the bounding object rectangle instead of the normal object rectangle, so in this function the frame of the object will be respected as well. | ||||||||||||||
Return value: | The object index found at the coordinates ob_fmx,
ob_fmy (or -1 for 'no object found').
| ||||||||||||||
Availability: | The presence of this function can be ascertained with a call of
appl_getinfo (opcode 5).
| ||||||||||||||
Group: | Object library
| ||||||||||||||
See also: | Binding OBJECT objc_find
|
C: | int16_t objc_xfind ( OBJECT *ob_ftree, int16_t ob_fstartob,
int16_t ob_fdepth, int16_t ob_fmx, int16_t ob_fmy );
| ||||||||||||||||||||||||||||||||||||
Binding: |
int16_t objc_xfind (OBJECT *ob_ftree, int16_t ob_fstartob, int16_t ob_fdepth, int16_t ob_fmx, int16_t ob_fmy) { int_in[0] = ob_fstartob; int_in[1] = ob_fdepth; int_in[2] = ob_fmx; int_in[3] = ob_fmy; addr_in[0] = ob_ftree; return ( crys_if(49) ); } | ||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Object edit« - Edit text in an editable text object.
| |||||||||||||||||||||||||||||||
Opcode: | 28992
| |||||||||||||||||||||||||||||||
Syntax: | int16_t x_objc_edit( OBJECT *tree, int16_t edit_obj, int16_t
key_press, int16_t shift_state, int16_t *edit_idx, int16_t mode );
| |||||||||||||||||||||||||||||||
Description: |
This function is nearly identical to the objc_edit function normaly found in GEM. By adding the shift_state, however, it is able to correctly process extended keystrokes involving the [Control] and [Shift] keys. | |||||||||||||||||||||||||||||||
Return value: | 0 = not an editable field
1 = No error In edit_idx will return the new cursor position. | |||||||||||||||||||||||||||||||
Availability: | The function is only available under Geneva.
| |||||||||||||||||||||||||||||||
Group: | Object library
| |||||||||||||||||||||||||||||||
See also: | Binding objc_edit
|
C: | int16_t x_objc_edit( OBJECT *tree, int16_t edit_obj, int16_t
key_press, int16_t shift_state, int16_t *edit_idx, int16_t mode );
| ||||||||||||||||||||||||||||||||||||||||||
Binding: |
int16_t x_objc_edit( OBJECT *tree, int16_t edit_obj, int16_t key_press, int16_t shift_state, int16_t *edit_idx, int16_t mode ) { int_in[0] = edit_obj; int_in[1] = key_press; int_in[2] = *edit_idx; int_in[3] = shift_state; int_in[4] = mode; addr_in[0] = tree; crys_if(28992); *edit_idx = int_out[1]; return ( int_out[0] ); } | ||||||||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|