60 #ifndef D4D_ICON_F_DEFAULT
61 #define D4D_ICON_F_DEFAULT (D4D_OBJECT_F_VISIBLE | D4D_OBJECT_F_ENABLED)
66 #ifndef D4D_ICON_TXT_PRTY_DEFAULT
67 #define D4D_ICON_TXT_PRTY_DEFAULT (D4D_ALIGN_H_CENTER_MASK | D4D_ALIGN_V_CENTER_MASK)
72 #ifndef D4D_ICON_FNT_PRTY_DEFAULT
73 #define D4D_ICON_FNT_PRTY_DEFAULT ( 0 )
78 #ifndef D4D_ICON_ENABLE_ANIMATION
79 #define D4D_ICON_ENABLE_ANIMATION D4D_TRUE
84 #ifndef D4D_ICON_ANIMATION_TICK_COUNTER
85 #define D4D_ICON_ANIMATION_TICK_COUNTER ( 4 )
125 #if D4D_ICON_ENABLE_ANIMATION == D4D_TRUE
149 #define D4D_GET_ICON(pObj) ((D4D_ICON*)((pObj)->pParam))
192 #define _D4D_DECLARE_ICON_BEGIN(type, name, text, x, y, cx, cy, tx, ty, radius, pMargin, pRelations, flags, pScheme, fontId, pUser, pOnValch, pOnUsrMsg) \
193 extern const D4D_ICON_BMPS* const name##_bmps[];\
194 static D4D_ICON_DATA name##_data; \
195 static D4D_STR_PROPERTIES name##_strPrties = { D4D_ICON_FNT_PRTY_DEFAULT, D4D_ICON_TXT_PRTY_DEFAULT}; \
196 static type D4D_ICON name##_params = \
198 { text, D4D_TEXT_LEN(text), fontId, &name##_strPrties, D4D_OBJECT_MAX_TEXT_LEN(text), 0}, \
205 D4D_DECLARE_OBJECT(type, name, x, y, cx, cy, radius, pMargin, pRelations, pOnUsrMsg, &d4d_iconSysFunc, &(name##_params), (flags), pUser, pScheme)\
207 const D4D_ICON_BMPS* const name##_bmps[] = \
223 #define D4D_DECLARE_ICON_BMP(pBmp) (pBmp),
237 #define D4D_DECLARE_ICON_END() NULL };
270 #define D4D_DECLARE_ICON_BEGIN(name, text, x, y, cx, cy, tx, ty, flags, pScheme, fontId, pUser, pOnValch, pOnUsrMsg) \
271 _D4D_DECLARE_ICON_BEGIN(D4D_CONST, name, text, x, y, cx, cy, tx, ty, 0, NULL, NULL, flags, pScheme, fontId, pUser, pOnValch, pOnUsrMsg)
300 #define D4D_DECLARE_STD_ICON_BEGIN(name, text, x, y, cx, cy, tx, ty, fontId, pOnValch) \
301 D4D_DECLARE_ICON_BEGIN(name, text, x, y, cx, cy, tx, ty, (D4D_ICON_F_DEFAULT), NULL, fontId, NULL, pOnValch, NULL)
337 #define D4D_DECLARE_RICON_BEGIN(name, text, x, y, cx, cy, tx, ty, radius, flags, pScheme, fontId, pUser, pOnValch, pOnUsrMsg) \
338 _D4D_DECLARE_ICON_BEGIN(D4D_CONST, name, text, x, y, cx, cy, tx, ty, radius, NULL, NULL, flags, pScheme, fontId, pUser, pOnValch, pOnUsrMsg)
368 #define D4D_DECLARE_STD_RICON_BEGIN(name, text, x, y, cx, cy, tx, ty, radius, fontId, pOnValch) \
369 D4D_DECLARE_RICON_BEGIN(name, text, x, y, cx, cy, tx, ty, radius, (D4D_ICON_F_DEFAULT), NULL, fontId, NULL, pOnValch, NULL)
376 #define D4D_DECLARE_ICON_BEGIN_INRAM(name, text, x, y, cx, cy, tx, ty, flags, pScheme, fontId, pUser, pOnValch, pOnUsrMsg) \
377 _D4D_DECLARE_ICON_BEGIN(D4D_NO_CONST, name, text, x, y, cx, cy, tx, ty, 0, NULL, NULL, flags, pScheme, fontId, pUser, pOnValch, pOnUsrMsg)
382 #define D4D_DECLARE_STD_ICON_BEGIN_INRAM(name, text, x, y, cx, cy, tx, ty, fontId, onvalch) \
383 D4D_DECLARE_ICON_BEGIN_INRAM(name, text, x, y, cx, cy, tx, ty, (D4D_ICON_F_DEFAULT), NULL, fontId, NULL, onvalch, NULL)
390 #define D4D_DECLARE_RICON_BEGIN_INRAM(name, text, x, y, cx, cy, tx, ty, radius, flags, pScheme, fontId, pUser, pOnValch, pOnUsrMsg) \
391 _D4D_DECLARE_ICON_BEGIN(D4D_NO_CONST, name, text, x, y, cx, cy, tx, ty, radius, NULL, NULL, flags, pScheme, fontId, pUser, pOnValch, pOnUsrMsg)
396 #define D4D_DECLARE_STD_RICON_BEGIN_INRAM(name, text, x, y, cx, cy, tx, ty, radius, fontId, onvalch) \
397 D4D_DECLARE_RICON_BEGIN_INRAM(name, text, x, y, cx, cy, tx, ty, radius, (D4D_ICON_F_DEFAULT), NULL, fontId, NULL, onvalch, NULL)
402 #define D4D_DECLARE_STD_ICON1(name, text, x, y, cx, cy, tx, ty, pBmp0, font, onvalch) \
403 D4D_DECLARE_ICON_BEGIN(name, text, x, y, cx, cy, tx, ty, (D4D_ICON_F_DEFAULT), NULL, font, NULL, onvalch, NULL)\
404 D4D_DECLARE_ICON_BMP((pBmp0))\
405 D4D_DECLARE_ICON_END()
407 #define D4D_DECLARE_STD_ICON2(name, text, x, y, cx, cy, tx, ty, pBmp1, pBmp0, font, onvalch) \
408 D4D_DECLARE_ICON_BEGIN(name, text, x, y, cx, cy, tx, ty, (D4D_ICON_F_DEFAULT), NULL, font, NULL, onvalch, NULL)\
409 D4D_DECLARE_ICON_BMP((pBmp0))\
410 D4D_DECLARE_ICON_BMP((pBmp1))\
411 D4D_DECLARE_ICON_END()
413 #define D4D_DECLARE_STD_ICON1_INRAM(name, text, x, y, cx, cy, tx, ty, pBmp0, font, onvalch) \
414 D4D_DECLARE_ICON_BEGIN_INRAM(name, text, x, y, cx, cy, tx, ty, (D4D_ICON_F_DEFAULT), NULL, font, NULL, onvalch, NULL)\
415 D4D_DECLARE_ICON_BMP((pBmp0))\
416 D4D_DECLARE_ICON_END()
418 #define D4D_DECLARE_STD_ICON2_INRAM(name, text, x, y, cx, cy, tx, ty, pBmp1, pBmp0, font, onvalch) \
419 D4D_DECLARE_ICON_BEGIN_INRAM(name, text, x, y, cx, cy, tx, ty, (D4D_ICON_F_DEFAULT), NULL, font, NULL, onvalch, NULL)\
420 D4D_DECLARE_ICON_BMP((pBmp0))\
421 D4D_DECLARE_ICON_BMP((pBmp1))\
422 D4D_DECLARE_ICON_END()
441 #if D4D_ICON_ENABLE_ANIMATION == D4D_TRUE
449 #define D4D_IconSetText D4D_SetText
Type definition of eGUI point structure.
D4D_ICON_ON_CHANGE OnValueChanged
The string type. This structure contains all properties about string in eGUI.
const D4D_ICON_BMPS *const * pBmpX
void D4D_IconAnimationStart(D4D_OBJECT_PTR pThis)
Function starts the animation of icon.
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
D4D_BMP eGUI main image structure.
void(* D4D_ICON_ON_CHANGE)(D4D_OBJECT *pThis)
Type definition of icon on change callback function.
The object main structure type definition.
signed char sByte
Type definition of sByte (signed 8-bit).
D4D_ICON_INDEX D4D_IconGetIndex(D4D_OBJECT_PTR pThis)
Function returns current visible bitmap index.
The object system function needed for each object - this is part of D4D_OBJECT main structure...
LWord D4D_BOOL
Type definition of eGUI boolean.
Byte D4D_ICON_INDEX
This is icon index variable, it used in API functions to choose the active icon in the list...
D4D_BOOL animationEnabled
void D4D_IconAnimationStop(D4D_OBJECT_PTR pThis)
Function stops the animation of icon.
D4D_ICON_INDEX D4D_IconGetBmpCount(D4D_OBJECT_PTR pThis)
Function returns the icon bitmap count.
const D4D_OBJECT_SYS_FUNCTION d4d_iconSysFunc
void D4D_IconSetIndex(D4D_OBJECT_PTR pThis, D4D_ICON_INDEX index)
Function sets the new bitmap of icon by icon index.
void D4D_IconAnimationSetCounts(D4D_OBJECT_PTR pThis, Word cnt)
Function sets the time tick tresholds for animation speed.
void D4D_IconChangeIndex(D4D_OBJECT_PTR pThis, sByte incr)
Function sets the new bitmap of icon by icon index difference.
unsigned short Word
Type definition of Word (unsigned 16-bit).