eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
D4D OBJECT API Macro's Specification
Collaboration diagram for D4D OBJECT API Macro's Specification:

Macros

#define D4D_EXTERN_OBJECT(name)
 Macro that externs the D4D_OBJECT struxture. More...
 
#define D4D_GET_OBJECT_DATA(pObject)
 Macro that gets the pointer to object data from object structure pointer. More...
 
#define D4D_BORDER_WIDTH(flags)
 Macro that find out the width of object graphic border by object flags. More...
 
#define D4D_OBJECT_FLAGS2BEVEL(pObject)
 Macro that gets the type of bevel from the object flags. More...
 
#define D4D_DECLARE_OBJECT(type, name, x, y, cx, cy, rad, margin, relations, onusrmsg, sysFunc, param, initFlags, userData, pScheme)
 Macro that create the object structure in memory including all substructures. More...
 
#define D4D_DECLARE_OBJECT_RELATIONS(name, pParent,...)
 Macro that defines at one line relations array. More...
 
#define D4D_DECLARE_OBJECT_RELATIONS_BEGIN(name, pParent)
 Macro that defines at multi line relations array. More...
 
#define D4D_DECLARE_OBJECT_RELATIONS_CHILD(child)
 Macro that defines at multi line relations array - the add child part. More...
 
#define D4D_DECLARE_OBJECT_RELATIONS_END
 Macro that defines at multi line relations array - the final part. More...
 

Detailed Description

This section specifies the exact usage for each API macro.

Macro Definition Documentation

#define D4D_BORDER_WIDTH (   flags)

Macro that find out the width of object graphic border by object flags.

Parameters
flags- object flags
Returns
witdh of object frame in pixels
Note
This is help macro to find out object frame width

Definition at line 224 of file d4d_object.h.

#define D4D_DECLARE_OBJECT (   type,
  name,
  x,
  y,
  cx,
  cy,
  rad,
  margin,
  relations,
  onusrmsg,
  sysFunc,
  param,
  initFlags,
  userData,
  pScheme 
)

Macro that create the object structure in memory including all substructures.

Parameters
type- type of object <D4D_CONST; D4D_NO_CONST>
name- name of object
x- coordination of object in X axis
y- coordination of object in Y axis
cx- size of object in X axis
cy- size of object in Y axis
rad- radius of corners
margin- pointer to margin structure (*D4D_MARGIN)(Could be NULL)
relations- pointer to relation array (Could be NULL)
onusrmsg- pointer to object user message (Could be NULL)
sysFunc- pointer to object system functions structure (*D4D_OBJECT_SYS_FUNCTION)
param- pointer to widget parameters
initFlags- init flags of object corresponding to D4D OBJECT Defines masks of object behaviour flags
userData- user data of object
pScheme- pointer to color scheme. In case that this parameter is NULL, the default scheme color will be used for draw object
Note
This macro create complete D4D_OBJECT structure, including the object data sub structure. Is ussually used by graphic widgets declaration macros.

Definition at line 255 of file d4d_object.h.

#define D4D_DECLARE_OBJECT_RELATIONS (   name,
  pParent,
  ... 
)

Macro that defines at one line relations array.

Parameters
name- name of the object relation array
pParent- pointer to parent object - could be NULL if there is no parent object
...- pointers to children objects - could be NULL if there is no child object
Note
This macro simplify definition of object relation arrays

Definition at line 280 of file d4d_object.h.

#define D4D_DECLARE_OBJECT_RELATIONS_BEGIN (   name,
  pParent 
)

Macro that defines at multi line relations array.

Parameters
name- name of the object relation array
pParent- pointer to parent object - could be NULL if there is no parent object
Note
This macro is second way how to define object relation array, must be followed by D4D_DECLARE_OBJECT_RELATIONS_CHILD or D4D_DECLARE_OBJECT_RELATIONS_END

Definition at line 291 of file d4d_object.h.

#define D4D_DECLARE_OBJECT_RELATIONS_CHILD (   child)

Macro that defines at multi line relations array - the add child part.

Parameters
child- name of the child object
Note
This macro is second way how to define object relation array, must be followed by D4D_DECLARE_OBJECT_RELATIONS_CHILD or D4D_DECLARE_OBJECT_RELATIONS_END

Definition at line 301 of file d4d_object.h.

#define D4D_DECLARE_OBJECT_RELATIONS_END

Macro that defines at multi line relations array - the final part.

Note
This macro is second way how to define object relation array, it closes the robject relation parts definition

Definition at line 307 of file d4d_object.h.

#define D4D_EXTERN_OBJECT (   name)

Macro that externs the D4D_OBJECT struxture.

Parameters
nameof object structure
Note
This is help macro to write clear D4D code to extern D4D_OBJECT to other C file

Definition at line 207 of file d4d_object.h.

#define D4D_GET_OBJECT_DATA (   pObject)

Macro that gets the pointer to object data from object structure pointer.

Parameters
pObject- object structure pointer
Returns
pointer to object runtime data structure
Note
This is help macro to write clear D4D code to get object data pointer

Definition at line 216 of file d4d_object.h.

#define D4D_OBJECT_FLAGS2BEVEL (   pObject)

Macro that gets the type of bevel from the object flags.

Parameters
pObject- object structure pointer
Returns
the type of bevel (D4D_BEVEL)
Note
This macro separate from object flags the type of object bevel in type D4D_BEVEL.

Definition at line 232 of file d4d_object.h.