60 #ifndef D4D_GAUGE_HUB_RADIUS
61 #define D4D_GAUGE_HUB_RADIUS 3
66 #ifndef D4D_COLOR_GAUG_HUB
67 #define D4D_COLOR_GAUG_HUB D4D_COLOR_DARK_RED
72 #ifndef D4D_COLOR_GAUG_POINTER
73 #define D4D_COLOR_GAUG_POINTER D4D_COLOR_DARK_BLUE
87 #define D4D_GAUGE_F_REDRAW_TEXT (0x01 << D4D_OBJECT_F_OBJECT_SHIFT)
88 #define D4D_GAUGE_F_HUB (0x02 << D4D_OBJECT_F_OBJECT_SHIFT)
89 #define D4D_GAUGE_F_THICK_POINTER (0x04 << D4D_OBJECT_F_OBJECT_SHIFT)
95 #ifndef D4D_GAUGE_F_DEFAULT
96 #define D4D_GAUGE_F_DEFAULT (D4D_OBJECT_F_VISIBLE | D4D_OBJECT_F_ENABLED | D4D_OBJECT_F_TABSTOP | D4D_OBJECT_F_TOUCHENABLE | D4D_GAUGE_F_REDRAW_TEXT | D4D_GAUGE_F_HUB)
101 #ifndef D4D_GAUGE_TXT_PRTY_DEFAULT
102 #define D4D_GAUGE_TXT_PRTY_DEFAULT (D4D_ALIGN_H_CENTER_MASK | D4D_ALIGN_V_CENTER_MASK)
107 #ifndef D4D_GAUGE_FNT_PRTY_DEFAULT
108 #define D4D_GAUGE_FNT_PRTY_DEFAULT ( 0 )
181 #define D4D_GET_GAUGE(pObj) ((D4D_GAUGE*)((pObj)->pParam))
219 #define _D4D_DECLARE_GAUGE(type, name, text, x, y, cx, cy, radius, pMargin, pRelations, tx, ty, kx, ky, plen, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg) \
220 static D4D_GAUGE_DATA name##_data = {0, 1, D4D_CLOCK_WISE, {0, 100, 0, 0x7F } }; \
221 static D4D_STR_PROPERTIES name##_strPrties = { D4D_GAUGE_FNT_PRTY_DEFAULT, D4D_GAUGE_TXT_PRTY_DEFAULT}; \
222 static type D4D_GAUGE name##_params = \
224 { text, D4D_TEXT_LEN(text), fontId, &name##_strPrties, D4D_OBJECT_MAX_TEXT_LEN(text), 0}, \
233 D4D_DECLARE_OBJECT(type, name, x, y, cx, cy, radius, pMargin, pRelations, pOnUsrMsg, &d4d_gaugeSysFunc, &(name##_params), flags, pUser, pScheme)
262 #define D4D_DECLARE_GAUGE(name, text, x, y, cx, cy, tx, ty, kx, ky, plen, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg) \
263 _D4D_DECLARE_GAUGE(D4D_CONST, name, text, x, y, cx, cy, 0, NULL, NULL, tx, ty, kx, ky, plen, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg)
287 #define D4D_DECLARE_STD_GAUGE(name, text, x, y, cx, cy, tx, ty, kx, ky, plen, pBmp, fontId, onvalch) \
288 D4D_DECLARE_GAUGE(name, text, x, y, cx, cy, tx, ty, kx, ky, plen, (D4D_GAUGE_F_DEFAULT), pBmp, NULL, fontId, NULL, onvalch, NULL)
318 #define D4D_DECLARE_RGAUGE(name, text, x, y, cx, cy, radius, tx, ty, kx, ky, plen, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg) \
319 _D4D_DECLARE_GAUGE(D4D_CONST, name, text, x, y, cx, cy, radius, NULL, NULL, tx, ty, kx, ky, plen, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg)
344 #define D4D_DECLARE_STD_RGAUGE(name, text, x, y, cx, cy, radius, tx, ty, kx, ky, plen, pBmp, fontId, onvalch) \
345 D4D_DECLARE_RGAUGE(name, text, x, y, cx, cy, radius, tx, ty, kx, ky, plen, (D4D_GAUGE_F_DEFAULT), pBmp, NULL, fontId, NULL, onvalch, NULL)
352 #define D4D_DECLARE_GAUGE_INRAM(name, text, x, y, cx, cy, tx, ty, kx, ky, plen, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg) \
353 _D4D_DECLARE_GAUGE(D4D_NO_CONST, name, text, x, y, cx, cy, 0, NULL, NULL, tx, ty, kx, ky, plen, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg)
358 #define D4D_DECLARE_STD_GAUGE_INRAM(name, text, x, y, cx, cy, tx, ty, kx, ky, plen, pBmp, fontId, onvalch) \
359 D4D_DECLARE_GAUGE_INRAM(name, text, x, y, cx, cy, tx, ty, kx, ky, plen, (D4D_GAUGE_F_DEFAULT), pBmp, NULL, fontId, NULL, onvalch, NULL)
365 #define D4D_DECLARE_RGAUGE_INRAM(name, text, x, y, cx, cy, radius, tx, ty, kx, ky, plen, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg) \
366 _D4D_DECLARE_GAUGE(D4D_NO_CONST, name, text, x, y, cx, cy, radius, NULL, NULL, tx, ty, kx, ky, plen, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg)
371 #define D4D_DECLARE_STD_RGAUGE_INRAM(name, text, x, y, cx, cy, radius, tx, ty, kx, ky, plen, pBmp, fontId, onvalch) \
372 D4D_DECLARE_RGAUGE_INRAM(name, text, x, y, cx, cy, radius, tx, ty, kx, ky, plen, (D4D_GAUGE_F_DEFAULT), pBmp, NULL, fontId, NULL, onvalch, NULL)
401 #define D4D_GaugeSetText D4D_SetText
Type definition of eGUI point structure.
Byte D4D_GAUGE_ANGLE
The gauge angle variable, is used to set up limits of gauge angle <0-FF == 0° - 359°>.
void D4D_GaugSetDir(D4D_OBJECT_PTR pThis, D4D_TREND trend)
The function set the trend/direction of gauge.
The string type. This structure contains all properties about string in eGUI.
D4D_GAUGE_ON_CHANGE OnValueChanged
The gauge limits structure that defines input value range and for this range specify the final angles...
D4D_GAUGE_VALUE valueLast
D4D_GAUGE_ANGLE angleMin
line angle from 0x00 to 0xFF
D4D_TREND
Type definition of eGUI trend type.
D4D_GAUGE_VALUE D4D_GaugGetValue(D4D_OBJECT_PTR pThis)
The function gets the current value of gauge.
D4D_GAUGE_VALUE valueMin
minimal value (corresponds to angleMin)
const D4D_OBJECT_SYS_FUNCTION d4d_gaugeSysFunc
Byte D4D_COOR
Type definition of eGUI coordination variables.
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
void D4D_GaugSetLimits(D4D_OBJECT_PTR pThis, const D4D_GAUGE_LIMITS *pLimits)
The function sets the new limits values of gauge.
D4D_BMP eGUI main image structure.
void D4D_GaugSetValue(D4D_OBJECT_PTR pThis, D4D_GAUGE_VALUE value)
The function sets the new value of gauge.
D4D_GAUGE_VALUE valueMax
maximal value (corresponds to angleMax)
The object main structure type definition.
signed char sByte
Type definition of sByte (signed 8-bit).
The object system function needed for each object - this is part of D4D_OBJECT main structure...
sByte D4D_GAUGE_VALUE
The gauge value variable, is used to hadle inputs of gauga functions API.
D4D_GAUGE_ANGLE angleMax
line angle from 0x00 to 0xFF
void D4D_GaugGetLimits(D4D_OBJECT_PTR pThis, D4D_GAUGE_LIMITS *pLimits)
The function gets the values of gauge limit structure.
D4D_TREND D4D_GaugGetDir(D4D_OBJECT_PTR pThis)
The function gets the trend/direction of gauge object.
void(* D4D_GAUGE_ON_CHANGE)(D4D_OBJECT *pThis)
Type definition of gauge on change callback function.