77 #define _calc (*((D4D_SLIDER_TMP_VAL*)d4d_scratchPad))
109 if(
_calc.isHorizontal)
126 if(!
_calc.bar1Geom.sz.cx)
129 if(!
_calc.bar1Geom.sz.cy)
133 _calc.bar1Geom.pnt.x += tmpBarOff.
x;
134 _calc.bar1Geom.pnt.y += tmpBarOff.
y;
137 if(
_calc.isHorizontal)
158 #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
159 if(tmpBarOff.
x > tmpBarOff.
y)
160 tmp_scale = (
sWord)(tmpBarOff.
x - tmpBarOff.
y);
162 tmp_scale = (
sWord)(tmpBarOff.
y - tmpBarOff.
x);
171 _calc.inner_radius = 0;
190 if(
_calc.isHorizontal)
198 _calc.bar3Geom.sz.cx -= c2;
199 _calc.bar1Geom.sz.cx = c1;
208 #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
210 if(
_calc.inner_radius)
212 _calc.bar1Geom.sz.cx +=
_calc.inner_radius * 2;
213 _calc.bar3Geom.sz.cx +=
_calc.inner_radius * 2;
225 _calc.bar2Geom.pnt.y += tmp_coor;
254 #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
256 if(
_calc.inner_radius)
270 _calc.bar2Geom.pnt.x += tmp_coor;
364 if(
_calc.isHorizontal)
431 #if defined(D4D_LLD_TCH) || defined(D4D_LLD_MOUSE)
503 if(pData->
value == value)
507 pData->
value = value;
637 #if defined(D4D_LLD_TCH)
641 #if defined(D4D_LLD_MOUSE)
645 #if defined(D4D_LLD_TCH) || defined(D4D_LLD_MOUSE)
675 D4D_SldrTouched(pMsg, &touchClickPoint);
700 D4D_SldrTouched(pMsg, &touchClickPoint);
D4D_COLOR D4D_GetCrossColor(D4D_COLOR startColor, D4D_COLOR endColor, Byte value)
Compute cross color between two basic color in 256 steps.
D4D_COLOR D4D_ObjectGetBckgColor(D4D_OBJECT *pObj, D4D_OBJECT_DRAWFLAGS draw)
Function return object current background color.
#define D4D_KEY_SCANCODE_ESC
This macro is used to specify Key Scan Code ESC. If not defined, it sets to 0x01 as a default...
#define D4D_KEY_SCANCODE_RIGHT
This macro is used to specify Key Scan Code RIGHT. If not defined, it sets to 0x4D as a default...
D4D_COLOR D4D_ObjectGetBckgFillColor(D4D_OBJECT *pObj)
Function return object current fill background color.
D4D_COLOR D4D_ObjectGetForeColor(D4D_OBJECT *pObj, D4D_OBJECT_DRAWFLAGS draw)
Function return object current fore color.
#define D4D_KEY_SCANCODE_UP
This macro is used to specify Key Scan Code UP. If not defined, it sets to 0x51 as a default...
static D4D_COLOR D4D_SldrComputeColorBar(D4D_OBJECT *pThis, D4D_SLIDER_VALUE value)
D4D_CLR_SCHEME_OBJ objectDepend
Sub structure of object non standard colors.
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>
On Init message - is send for first time when the object is inicialized.
D4D object messages structure.
#define D4D_COLOR_SLDR_BAR_START
This is slider start fore color definition. If not defined, it sets to D4D_COLOR_GREEN as a default...
D4D_OBJECT_DATA_PTR pData
Pointer on runtime object data.
D4D_COLOR barFore
The slider bar fore color.
D4D_SLIDER_VALUE valueOrg
bar origin value (should be valueMin <= org <= valueMax)
Mouse Whell Move Down message - is send in case that mouse whell move down is detected on this object...
#define D4D_FALSE
This is definition of boolean operation value in eGUI - FALSE.
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.
#define D4D_DrawRBmp(ppt, pBmp, greyScale, radius)
D4D_OBJECT_INITFLAGS initFlags
The initializations object flags.
#define D4D_DrawTextRect(ppt, psz, buffText, colorText, colorBkgd)
Function that draw text into defined rectangle on the screen.
static void D4D_SldrOnDraw(D4D_MESSAGE *pMsg)
D4D_COLOR barEnd
The slider bar fore end color for case that the D4D_SLDR_F_BAR_SCALECOLOR flag is enabled...
D4D_FONT fontId
index of used font
D4D_SLDR_ON_CHANGE OnValueChanged
void D4D_SldrSetValue(D4D_OBJECT_PTR pThis, D4D_SLIDER_VALUE value)
Function Sets the slider value.
D4D_POINT D4D_GetTouchScreenCoordinates(D4D_OBJECT *pObject)
#define D4D_TRUE
This is definition of boolean operation value in eGUI - TRUE.
void D4D_DrawFrame(D4D_OBJECT *pObject, D4D_COLOR clrT, D4D_COLOR clrB)
Function draw standard object frame based on the object settings and current state.
void D4D_SldrSetBarColor(D4D_OBJECT_PTR pThis, D4D_COLOR color)
Function Sets the slider bar color.
D4D_SLIDER_VALUE valueMax
maximal value - <valueMin..127>
struct D4D_OBJECT_S * pObject
Pointer to object who is receiver of this message. If the receiver is just screen this field must be ...
Key Up message - is send when the object get new Key Up event.
D4D Driver main header file.
#define D4D_KEY_SCANCODE_ENTER
This macro is used to specify Key Scan Code ENTER. If not defined, it sets to 0x1C as a default...
D4D_OBJECT_FLAGS flags
runtime object flags
D4D_COLOR barBckg
The slider bar background color.
Auto Touched message - is send when the object is still keep touch by touch screen driver ...
#define D4D_GetMouseCoordinates(pObject)
void D4D_SldrGetLimits(D4D_OBJECT_PTR pThis, D4D_SLIDER_LIMITS *pLimits)
Function get the current limits of slider object.
#define D4D_OBJECT_DRAWFLAGS_COMPLETE
Draw complete flag.
sByte D4D_LimitS8(sByte val, sByte min, sByte max)
Calculation of limitation value (signed) - 8 bit.
#define D4D_SCRATCHPAD_SIZE
Call back function raised by any new input event (touch, mouse, keys).
Mouse Left Button Release message - is send in case that mouse left release is detected on this objec...
D4D Driver private header file.
#define D4D_KEY_SCANCODE_DOWN
This macro is used to specify Key Scan Code DOWN. If not defined, it sets to 0x50 as a default...
#define D4D_DEFSTR(str)
Macro that helps declare the strings in eGUI.
This is the main structure of the color scheme in the D4D. It contains all the necessary colors to ru...
#define D4D_SLDR_BAR_OFF_WIDTH
This is slider working bar offset in axis Y to object outline. If not defined, it sets to 2 pixels as...
D4D_SLIDER_VALUE step
step value of slider change
D4D_COOR cx
Size in axis X (width)
static void D4D_SldrOnKeyUp(D4D_MESSAGE *pMsg)
Byte D4D_COOR
Type definition of eGUI coordination variables.
D4D_POINT position
Position on the screen/object.
void D4D_SldrOnMessage(D4D_MESSAGE *pMsg)
#define D4D_OBJECT_DRAWFLAGS_STATE
Draw just change of state flag.
D4D_COOR radius
Object corners radius.
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
void D4D_ObjOnMessage(D4D_MESSAGE *pMsg)
static void D4D_SldrValue2Coor(D4D_OBJECT *pThis)
void D4D_FocusSet(const D4D_SCREEN *pScreen, D4D_OBJECT_PTR pObject)
The function set the obejct focus to new object.
#define NULL
Type definition of null pointer.
#define D4D_SLDR_F_BAR_SCALECOLOR
This option enable little bit different type of drawing bar, the color is gradually changed from fore...
D4D_CLR_SCHEME * D4D_ObjectGetScheme(D4D_OBJECT *pObj)
Function return the pointer to current use object scheme of object.
D4D_TCHAR * pText
pointer to text array
D4D_STRING * D4D_SldrGetTextBuffer(D4D_OBJECT *pThis)
D4D_COOR y
Coordination in axis Y.
#define D4D_OBJECT_F_NOTINIT
#define D4D_GET_SLIDER(pObj)
D4D_OBJECT_PTR D4D_GetFocusedObject(const D4D_SCREEN *pScreen)
The function returns pointer to object that is focused in given screen.
D4D_MSGID nMsgId
Type of message.
D4D_SIZE size
Size of the object.
signed short sWord
Type definition of sWord (signed 16-bit).
void D4D_RRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_LINETYPE ltype, D4D_COLOR color, D4D_COOR radius)
Function draw rectangle on the screen with round corners.
D4D_COOR D4D_RndCornerGetNonPrintedPxl(D4D_COOR radius, D4D_COOR line)
Function that counts number of printed pixels in specified line of circle quadrant.
D4D_COLOR D4D_SldrGetBarColor(D4D_OBJECT_PTR pThis)
Byte D4D_MulDivUU8(Byte u1, Byte u2, Byte d)
Simple proportion unsigned calculation - 8 bit.
D4D_DIRECTION
Type definition of eGUI direction type.
#define D4D_KEY_SCANCODE_LEFT
This macro is used to specify Key Scan Code LEFT. If not defined, it sets to 0x4B as a default...
Type definition of slider limits structure.
D4D_KEY_SCANCODE key
There will be stored only code of key without release / press information - is valid with D4D_MSG_KEY...
D4D_POINT D4D_GetClientToScreenPoint(D4D_OBJECT *pObject, D4D_POINT *nClientPoint)
The function convert client point on the screen to the global screen point.
LWord D4D_INDEX
Type definition of eGUI general index variables.
The object main structure type definition.
void D4D_CaptureKeys(D4D_OBJECT_PTR pObj)
Function switch on capturing the keys to objects.
Draw message - is send when the object should be redrawed.
D4D_CLR_SCHEME_SLDR slider
The non standard colors of slider object.
void D4D_ComputeGeometry(D4D_GEOMETRY *pGeometry, D4D_OBJECT *pObject)
D4D_COOR cy
Size in axis Y (height)
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.
#define D4D_OBJECT_F_FASTTOUCH
Object has enabled fast touch screen capability. This option supports only a some objects (button...
D4D_COLOR barStart
The slider bar fore start color for case that the D4D_SLDR_F_BAR_SCALECOLOR flag is enabled...
Touched message - is send when the object is touched by touch screen driver.
LWord D4D_BOOL
Type definition of eGUI boolean.
const D4D_OBJECT_SYS_FUNCTION d4d_sliderSysFunc
Type definition of eGUI size structure.
D4D_COOR D4D_GetTextWidth(D4D_FONT ix, D4D_TCHAR *pText)
The function returns width of text in pixels.
D4D_OBJECT_DRAWFLAGS draw
Contains draw flags - is valid with D4D_MSG_DRAW and D4D_MSG_DRAWDONE message.
void D4D_FillRRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color, D4D_COOR radius)
Function draw filled rectangle on the screen with round corners.
Type definition of eGUI geometry structure.
void D4D_FillRRectColorScale(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR startColor, D4D_COLOR endColor, D4D_DIRECTION direction, D4D_COOR radius)
Function draw filled rectangle with round corners with changing color (cross color from start to end ...
void D4D_SldrSetLimits(D4D_OBJECT_PTR pThis, const D4D_SLIDER_LIMITS *pLimits)
Function set the new limits of slider object.
#define D4D_SLDR_AUTOTOUCHTICKS
This is slider timeout of auto increment for long touch (in ticks of eGUI time ticks - D4D_TimeTickPu...
void D4D_InvalidateObject(D4D_OBJECT_PTR pObject, D4D_BOOL bComplete)
Function invalidate object to redraw on screen.
Byte D4D_KEY_SCANCODE
Type definition of eGUI keys scan code.
Byte D4D_OBJECT_DRAWFLAGS
Drawing object flags type, handled to object in D4D_MSG_DRAW events.
#define D4D_SLDR_F_BAR_AUTOCOLOR
This flag specifies the behavior of the slider. If it is set, the color of a slider bar depends on th...
LWord D4D_COLOR
Type definition of eGUI color variables.
struct D4D_SCREEN_S * pScreen
Pointer to screen who is receiver of this message.
D4D_COLOR D4D_GetGreyScale(D4D_COLOR color)
Compute the grayscale color.
D4D_FONT_SIZE D4D_GetFontHeight(D4D_FONT ix)
Mouse Whell Move Up message - is send in case that mouse whell move up is detected on this object...
#define D4D_SLDR_F_TEXT_AUTOCOLOR
Enable text autocolor based on current value (inverted color to bar color)
D4D_COOR x
Coordination in axis X.
Kill Focus message - is send when the object is losing focus.
union D4D_MESSAGE_S::@0 prm
Additional data for some type of messages.
#define D4D_SLDR_F_AUTOTOUCH_OFF
This option disables auto touch events to prevent fast changing of slider for longer touches...
D4D_BOOL D4D_IsEnabled(D4D_OBJECT *pObject)
Function find out if the object is enabled or not.
#define D4D_SLDR_BAR_OFF_LENGTH
This is slider working bar offset in axis X to object outline. If not defined, it sets to 2 pixels as...
D4D_OBJECT * D4D_GetCapturedObject(void)
Function returns the current keys capturing object pointer.