46 #ifndef __D4D_SLIDER_H
47 #define __D4D_SLIDER_H
69 #define D4D_SLDR_F_BAR_AUTOCOLOR (0x01 << D4D_OBJECT_F_OBJECT_SHIFT)
70 #define D4D_SLDR_F_TEXT_AUTOCOLOR (0x02 << D4D_OBJECT_F_OBJECT_SHIFT)
71 #define D4D_SLDR_F_BAR_SCALECOLOR (0x04 << D4D_OBJECT_F_OBJECT_SHIFT)
72 #define D4D_SLDR_F_AUTOTOUCH_OFF (0x08 << D4D_OBJECT_F_OBJECT_SHIFT)
74 #define D4D_SLDR_F_AUTOCOLOR (D4D_SLDR_F_BAR_AUTOCOLOR | D4D_SLDR_F_TEXT_AUTOCOLOR)
79 #ifndef D4D_SLDR_F_DEFAULT
80 #define D4D_SLDR_F_DEFAULT (D4D_OBJECT_F_VISIBLE | D4D_OBJECT_F_ENABLED | D4D_OBJECT_F_TABSTOP | D4D_OBJECT_F_TOUCHENABLE | D4D_OBJECT_F_FOCUSRECT | D4D_OBJECT_F_MOUSE_NORMAL)
85 #ifndef D4D_SLDR_TXT_PRTY_DEFAULT
86 #define D4D_SLDR_TXT_PRTY_DEFAULT (D4D_ALIGN_H_CENTER_MASK | D4D_ALIGN_V_CENTER_MASK)
91 #ifndef D4D_SLDR_FNT_PRTY_DEFAULT
92 #define D4D_SLDR_FNT_PRTY_DEFAULT ( D4D_FNT_PRTY_TRANSPARENT_YES_MASK )
97 #ifndef D4D_SLDR_BAR_OFF_LENGTH
98 #define D4D_SLDR_BAR_OFF_LENGTH 2
103 #ifndef D4D_SLDR_BAR_OFF_WIDTH
104 #define D4D_SLDR_BAR_OFF_WIDTH 4
109 #ifndef D4D_SLDR_AUTOTOUCHTICKS
110 #define D4D_SLDR_AUTOTOUCHTICKS 10
116 #ifndef D4D_COLOR_SLDR_BAR_FORE
117 #define D4D_COLOR_SLDR_BAR_FORE D4D_COLOR_DARK_BLUE
122 #ifndef D4D_COLOR_SLDR_BAR_BCKG
123 #define D4D_COLOR_SLDR_BAR_BCKG D4D_COLOR_BRIGHT_GREY
128 #ifndef D4D_COLOR_SLDR_BAR_START
129 #define D4D_COLOR_SLDR_BAR_START D4D_COLOR_GREEN
134 #ifndef D4D_COLOR_SLDR_BAR_END
135 #define D4D_COLOR_SLDR_BAR_END D4D_COLOR_RED
200 #define D4D_GET_SLIDER(pObj) ((D4D_SLIDER*)((pObj)->pParam))
239 #define _D4D_DECLARE_SLIDER(type, name, text, x, y, cx, cy, radius, pMargin, pRelations, tx, ty, bx, by, bcx, bcy, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg) \
240 static D4D_SLIDER_DATA name##_data = { 0, 0, 100, 1, 0, D4D_COLOR_SLDR_BAR_FORE}; \
241 static D4D_STR_PROPERTIES name##_strPrties = { D4D_SLDR_FNT_PRTY_DEFAULT, D4D_SLDR_TXT_PRTY_DEFAULT}; \
242 static type D4D_SLIDER name##_params = \
244 { text, D4D_TEXT_LEN(text), fontId, &name##_strPrties, D4D_OBJECT_MAX_TEXT_LEN(text), 0}, \
253 D4D_DECLARE_OBJECT(type, name, x, y, cx, cy, radius, pMargin, pRelations, pOnUsrMsg, &d4d_sliderSysFunc, &(name##_params), flags, pUser, pScheme)
283 #define D4D_DECLARE_SLIDER(name, text, x, y, cx, cy, tx, ty, bx, by, bcx, bcy, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg) \
284 _D4D_DECLARE_SLIDER(D4D_CONST, name, text, x, y, cx, cy, 0, NULL, NULL, tx, ty, bx, by, bcx, bcy, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg)
309 #define D4D_DECLARE_STD_SLIDER(name, text, x, y, cx, cy, tx, ty, bx, by, bcx, bcy, pBmp, fontId, onvalch) \
310 D4D_DECLARE_SLIDER(name, text, x, y, cx, cy, tx, ty, bx, by, bcx, bcy, (D4D_SLDR_F_DEFAULT), pBmp, NULL, fontId, NULL, onvalch, NULL)
334 #define D4D_DECLARE_SLIDER_AUTOSIZE(name, text, x, y, cx, cy, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg) \
335 D4D_DECLARE_SLIDER(name, text, x, y, cx, cy, 0, 0, 0, 0, 0, 0, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg)
355 #define D4D_DECLARE_STD_SLIDER_AUTOSIZE(name, text, x, y, cx, cy, pBmp, fontId, onvalch) \
356 D4D_DECLARE_STD_SLIDER(name, text, x, y, cx, cy, 0, 0, 0, 0, 0, 0, pBmp, fontId, onvalch)
387 #define D4D_DECLARE_RSLIDER(name, text, x, y, cx, cy, radius, tx, ty, bx, by, bcx, bcy, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg) \
388 _D4D_DECLARE_SLIDER(D4D_CONST, name, text, x, y, cx, cy, radius, NULL, NULL, tx, ty, bx, by, bcx, bcy, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg)
414 #define D4D_DECLARE_STD_RSLIDER(name, text, x, y, cx, cy, radius, tx, ty, bx, by, bcx, bcy, pBmp, fontId, onvalch) \
415 D4D_DECLARE_RSLIDER(name, text, x, y, cx, cy, radius, tx, ty, bx, by, bcx, bcy, (D4D_SLDR_F_DEFAULT), pBmp, NULL, fontId, NULL, onvalch, NULL)
440 #define D4D_DECLARE_RSLIDER_AUTOSIZE(name, text, x, y, cx, cy, radius, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg) \
441 D4D_DECLARE_RSLIDER(name, text, x, y, cx, cy, radius, 0, 0, 0, 0, 0, 0, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg)
462 #define D4D_DECLARE_STD_RSLIDER_AUTOSIZE(name, text, x, y, cx, cy, radius, pBmp, fontId, onvalch) \
463 D4D_DECLARE_STD_RSLIDER(name, text, x, y, cx, cy, radius, 0, 0, 0, 0, 0, 0, pBmp, fontId, onvalch)
470 #define D4D_DECLARE_SLIDER_INRAM(name, text, x, y, cx, cy, tx, ty, bx, by, bcx, bcy, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg) \
471 _D4D_DECLARE_SLIDER( D4D_NO_CONST, name, text, x, y, cx, cy, 0, NULL, NULL, tx, ty, bx, by, bcx, bcy, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg)
476 #define D4D_DECLARE_STD_SLIDER_INRAM(name, text, x, y, cx, cy, tx, ty, bx, by, bcx, bcy, pBmp, fontId, onvalch) \
477 D4D_DECLARE_SLIDER_INRAM(name, text, x, y, cx, cy, tx, ty, bx, by, bcx, bcy, (D4D_SLDR_F_DEFAULT), pBmp, NULL, fontId, NULL, onvalch, NULL)
482 #define D4D_DECLARE_SLIDER_AUTOSIZE_INRAM(name, text, x, y, cx, cy, flags, pBmp, pScheme, font, pUser, onvalch, pOnUsrMsg) \
483 D4D_DECLARE_SLIDER_INRAM(name, text, x, y, cx, cy, 0, 0, 0, 0, 0, 0, flags, pBmp, pScheme, font, pUser, onvalch, pOnUsrMsg)
488 #define D4D_DECLARE_STD_SLIDER_AUTOSIZE_INRAM(name, text, x, y, cx, cy, pBmp, font, onvalch) \
489 D4D_DECLARE_STD_SLIDER_INRAM(name, text, x, y, cx, cy, 0, 0, 0, 0, 0, 0, pBmp, font, onvalch)
495 #define D4D_DECLARE_RSLIDER_INRAM(name, text, x, y, cx, cy, radius, tx, ty, bx, by, bcx, bcy, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg) \
496 _D4D_DECLARE_SLIDER(D4D_NO_CONST, name, text, x, y, cx, cy, radius, NULL, NULL, tx, ty, bx, by, bcx, bcy, flags, pBmp, pScheme, fontId, pUser, onvalch, pOnUsrMsg)
501 #define D4D_DECLARE_STD_RSLIDER_INRAM(name, text, x, y, cx, cy, radius, tx, ty, bx, by, bcx, bcy, pBmp, fontId, onvalch) \
502 D4D_DECLARE_RSLIDER_INRAM(name, text, x, y, cx, cy, radius, tx, ty, bx, by, bcx, bcy, (D4D_SLDR_F_DEFAULT), pBmp, NULL, fontId, NULL, onvalch, NULL)
507 #define D4D_DECLARE_RSLIDER_AUTOSIZE_INRAM(name, text, x, y, cx, cy, radius, flags, pBmp, pScheme, font, pUser, onvalch, pOnUsrMsg) \
508 D4D_DECLARE_RSLIDER_INRAM(name, text, x, y, cx, cy, radius, 0, 0, 0, 0, 0, 0, flags, pBmp, pScheme, font, pUser, onvalch, pOnUsrMsg)
513 #define D4D_DECLARE_STD_RSLIDER_AUTOSIZE_INRAM(name, text, x, y, cx, cy, radius, pBmp, font, onvalch) \
514 D4D_DECLARE_STD_RSLIDER_INRAM(name, text, x, y, cx, cy, radius, 0, 0, 0, 0, 0, 0, pBmp, font, onvalch)
540 #define D4D_SldrSetText D4D_SetText
sByte D4D_SLIDER_VALUE
Type definition of slider value type - this is standard type used for slider data input...
Type definition of eGUI point structure.
D4D_SLIDER_VALUE valueMin
minimal value - <-128..valueMax>
D4D_SLIDER_VALUE valueOrg
bar origin value (should be valueMin <= org <= valueMax)
The string type. This structure contains all properties about string in eGUI.
void D4D_SldrChangeValue(D4D_OBJECT_PTR pThis, D4D_SLIDER_VALUE incr)
Function change the slider value by signed increment.
D4D_SLDR_ON_CHANGE OnValueChanged
void D4D_SldrSetValue(D4D_OBJECT_PTR pThis, D4D_SLIDER_VALUE value)
Function Sets the slider value.
void D4D_SldrSetBarColor(D4D_OBJECT_PTR pThis, D4D_COLOR color)
Function Sets the slider bar color.
D4D_SLIDER_VALUE valueMax
maximal value - <valueMin..127>
void D4D_SldrGetLimits(D4D_OBJECT_PTR pThis, D4D_SLIDER_LIMITS *pLimits)
Function get the current limits of slider object.
D4D_SLIDER_VALUE step
step value of slider change
D4D_BMP eGUI main image structure.
D4D_COLOR D4D_SldrGetBarColor(D4D_OBJECT_PTR pThis)
Type definition of slider limits structure.
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...
D4D_SLIDER_VALUE D4D_SldrGetValue(D4D_OBJECT_PTR pThis)
Function Gets the slider value.
const D4D_OBJECT_SYS_FUNCTION d4d_sliderSysFunc
Type definition of eGUI size structure.
void D4D_SldrSetLimits(D4D_OBJECT_PTR pThis, const D4D_SLIDER_LIMITS *pLimits)
Function set the new limits of slider object.
LWord D4D_COLOR
Type definition of eGUI color variables.
void(* D4D_SLDR_ON_CHANGE)(D4D_OBJECT *pThis)
Type definition of slider on change callback function.