eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
d4d_button.c
Go to the documentation of this file.
1 /**************************************************************************
2 *
3 * Copyright 2014 by Petr Gargulak. eGUI Community.
4 * Copyright 2009-2013 by Petr Gargulak. Freescale Semiconductor, Inc.
5 *
6 ***************************************************************************
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License Version 3
9 * or later (the "LGPL").
10 *
11 * As a special exception, the copyright holders of the eGUI project give you
12 * permission to link the eGUI sources with independent modules to produce an
13 * executable, regardless of the license terms of these independent modules,
14 * and to copy and distribute the resulting executable under terms of your
15 * choice, provided that you also meet, for each linked independent module,
16 * the terms and conditions of the license of that module.
17 * An independent module is a module which is not derived from or based
18 * on this library.
19 * If you modify the eGUI sources, you may extend this exception
20 * to your version of the eGUI sources, but you are not obligated
21 * to do so. If you do not wish to do so, delete this
22 * exception statement from your version.
23 *
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 *
28 * You should have received a copy of the GNU General Public License
29 * and the GNU Lesser General Public License along with this program.
30 * If not, see <http://www.gnu.org/licenses/>.
31 *
32 ***************************************************************************/
46 #include "d4d.h"
48 
49 //Internal API
50 void D4D_BtnOnMessage(D4D_MESSAGE* pMsg);
52 
54 {
55  D4D_DEFSTR("Button"),
57  NULL,
59 };
60 
61 typedef struct
62 {
63  D4D_POINT Position;
64  D4D_GEOMETRY contentGeom;
65  D4D_POINT ButPos;
66  D4D_SIZE ButSize;
67  D4D_COOR ButRadius;
68  D4D_GEOMETRY corGeom1;
69  D4D_GEOMETRY corGeom2;
70 } D4D_BTN_TMP_VAL;
71 
72 #define _calc (*((D4D_BTN_TMP_VAL*)d4d_scratchPad))
73 
74 static void D4D_BtnValue2Coor(D4D_OBJECT* pThis)
75 {
76  D4D_BUTTON* pBtn = D4D_GET_BUTTON(pThis);
77 
78  _calc.Position = D4D_GetClientToScreenPoint(pThis, &pThis->position);
79 
80  D4D_ComputeGeometry(&(_calc.contentGeom), pThis);
81 
82  //---------------- Get Max size of content -----------------
83  // 1. compare bitmap sizes
84  // Get normal bitmap size if exists
85 
86  _calc.ButSize = _calc.contentGeom.sz;
87 
88  if(pThis->initFlags & D4D_BTN_F_3D)
89  {
90  _calc.ButSize.cx -= D4D_BTN_3D_SHIFT;
91  _calc.ButSize.cy -= D4D_BTN_3D_SHIFT;
92  }
93 
94 // 3D Buttons Enabled
95  if(pThis->initFlags & D4D_BTN_F_3D)
96  {
97  _calc.ButPos = _calc.contentGeom.pnt;
98 
99  _calc.corGeom1.sz.cy = (D4D_COOR) D4D_BTN_3D_SHIFT;
100  _calc.corGeom2.sz.cx = (D4D_COOR) D4D_BTN_3D_SHIFT;
101 
102  _calc.corGeom1.pnt = _calc.corGeom2.pnt = _calc.ButPos;
103 
104 
105  #if (D4D_ROUND_CORNER_ENABLE != D4D_FALSE) //if Round corners
106 
107  _calc.ButRadius = 0;
108 
109  if(pThis->radius)
110  {
111  if(pThis->radius > D4D_BEVEL_WIDTH - 1)
112  _calc.ButRadius = (D4D_COOR)(pThis->radius - D4D_BEVEL_WIDTH);
113 
114  _calc.corGeom1.sz.cx = (D4D_COOR)(_calc.ButSize.cx - _calc.ButRadius * 2);
115  _calc.corGeom2.sz.cy = (D4D_COOR)(_calc.ButSize.cy - _calc.ButRadius * 2);
116 
117  _calc.corGeom1.pnt.x += _calc.ButRadius;
118  _calc.corGeom2.pnt.y += _calc.ButRadius;
119 
120 
121  }else
122  #endif
123  {
124  _calc.corGeom1.sz.cx = (D4D_COOR)(_calc.ButSize.cx + D4D_BTN_3D_SHIFT);
125  _calc.corGeom2.sz.cy = (D4D_COOR)(_calc.ButSize.cy + D4D_BTN_3D_SHIFT);
126  }
127 
128 
130  {
131  _calc.ButPos.x += D4D_BTN_3D_SHIFT;
132  _calc.ButPos.y += D4D_BTN_3D_SHIFT;
133  }else
134  {
135  _calc.corGeom1.pnt.y += _calc.ButSize.cy;
136  _calc.corGeom2.pnt.x += _calc.ButSize.cx;
137 
138  }
139  }else
140  {
141  #if (D4D_ROUND_CORNER_ENABLE != D4D_FALSE) //if Round corners
142  _calc.ButRadius = pThis->radius;
143  if(_calc.ButRadius)
144  if(pThis->initFlags & D4D_OBJECT_F_FOCUSRECT)
145  _calc.ButRadius -= pThis->size.cx - _calc.contentGeom.sz.cx ;
146  #endif
147 
148  _calc.ButPos = _calc.contentGeom.pnt;
149  }
150  //D4D_BTN_3D_ENABLE
151 
152 }
153 
154 
155 /*******************************************************
156 *
157 * BUTTON Drawing routine
158 *
159 *******************************************************/
160 
161 static void D4D_BtnOnDraw(D4D_MESSAGE* pMsg)
162 {
163  D4D_OBJECT* pThis = pMsg->pObject;
164  D4D_BUTTON* pBtn = D4D_GET_BUTTON(pThis);
165  D4D_OBJECT_DRAWFLAGS draw = pMsg->prm.draw;
166  D4D_COLOR clrT, clrB;
167  const D4D_BMP* pBmp = pBtn->pBmpNormal;
168  D4D_BOOL pressed = *(pBtn->pStatus) & D4D_BUTTON_STATUS_PRESSED_MASK;
169 
170 //-------- 3D Buttons Enabled --------
171  D4D_BMP_PROPERTIES bmpProp;
172 
174 
175  D4D_BtnValue2Coor(pThis);
176 
177  // focused bitmap (may be also NULL)
178 
179  if (pressed && (pThis->initFlags & D4D_BTN_F_INVERT)) {
180  clrB = D4D_ObjectGetForeColor(pThis, draw);
181  clrT = D4D_ObjectGetBckgColor(pThis, draw);
182  } else {
183  clrT = D4D_ObjectGetForeColor(pThis, draw);
184  clrB = D4D_ObjectGetBckgColor(pThis, draw);
185  }
186 
187  if((draw & D4D_OBJECT_DRAWFLAGS_FOCUSED) && (pBtn->pBmpFocus))
188  pBmp = pBtn->pBmpFocus;
189 
190  if(pThis->initFlags & D4D_BTN_F_3D)
191  {
192  // Draw Button Corners
193  if(pThis->radius)
194  {
195  D4D_POINT shPos = _calc.Position;
196 
197  shPos.x += pThis->radius;
198  shPos.y += pThis->radius;
199  D4D_FillQuadrant(&shPos, pThis->radius, clrB, D4D_QUAD_4);
200  shPos.x += pThis->size.cx - pThis->radius * 2 - 1;
201  D4D_FillQuadrant(&shPos, pThis->radius, clrB, D4D_QUAD_1);
202  shPos.y += pThis->size.cy - pThis->radius * 2 - 1;
203  D4D_FillQuadrant(&shPos, pThis->radius, clrB, D4D_QUAD_2);
204  shPos.x -= (pThis->size.cx - pThis->radius * 2 - 1);
205  D4D_FillQuadrant(&shPos, pThis->radius, clrB, D4D_QUAD_3);
206  }
207 
208  // draw the shading
209  if(pressed)
210  {
211  if(pThis->pData->flags & D4D_OBJECT_F_BEVEL_MASK)
212  {
214  {
215  pThis->pData->flags &= ~D4D_OBJECT_F_BEVEL_MASK;
217  }else
218  {
219  pThis->pData->flags &= ~D4D_OBJECT_F_BEVEL_MASK;
221  }
222  }
223 
224  D4D_DrawFrame(pThis, clrT, clrB);
225 
226  if(pThis->pData->flags & D4D_OBJECT_F_BEVEL_MASK)
227  {
229  {
230  pThis->pData->flags &= ~D4D_OBJECT_F_BEVEL_MASK;
232  }else
233  {
234  pThis->pData->flags &= ~D4D_OBJECT_F_BEVEL_MASK;
236  }
237  }
238  }else
239  {
240  D4D_DrawFrame(pThis, clrT, clrB);
241  }
242 
243  D4D_FillRect(&_calc.corGeom1.pnt, &_calc.corGeom1.sz,clrB);
244  D4D_FillRect(&_calc.corGeom2.pnt, &_calc.corGeom2.sz,clrB);
245 
247  D4D_DrawFrame(pThis, clrT, clrB);
248 
249  // Draw the content of button
250 
252 
253  // Draw the bitmap
254  if(pBmp != NULL)
255  {
256  D4D_DrawRBmpRect(&_calc.ButPos,&_calc.ButSize, pBmp, bmpProp, clrB, (D4D_BOOL)!D4D_IsEnabled(pThis), pThis->radius);
258  }
259 
260  // draw the text
261  if(pBtn->textBuff.pText)
262  D4D_DrawTextRRectTab(&_calc.ButPos, &_calc.ButSize,&pBtn->textBuff, NULL, clrT, clrB, _calc.ButRadius);
263 
264  if(!pBtn->textBuff.pText && !pBmp)
265  D4D_FillRRect(&_calc.ButPos, &_calc.ButSize, clrB, pThis->radius);
266 
267  if(pThis->initFlags & D4D_BTN_F_CONT_RECT)
268  D4D_RRect(&_calc.ButPos, &_calc.ButSize, D4D_LINE_THIN, clrT, _calc.ButRadius);
269 
270 }
271 
272 /*******************************************************
273 *
274 * BUTTON key handling routine
275 *
276 *******************************************************/
277 
278 static void D4D_BtnOnKeyDown(D4D_MESSAGE* pMsg)
279 {
280  // invoke "Click" event when enter key is pressed
281  if(pMsg->prm.key == D4D_KEY_SCANCODE_ENTER)
282  {
284  *pStatus |= D4D_BUTTON_STATUS_PRESSED_MASK;
286 
287  }
288 }
289 
290 /*******************************************************
291 *
292 * BUTTON key handling routine
293 *
294 *******************************************************/
295 
296 static void D4D_BtnOnKeyUp(D4D_MESSAGE* pMsg)
297 {
298 
299  // invoke "Click" event when enter key is pressed
300  if(pMsg->prm.key == D4D_KEY_SCANCODE_ENTER)
301  {
302  D4D_BUTTON* pBtn = D4D_GET_BUTTON(pMsg->pObject);
304 
305  if(*pStatus & D4D_BUTTON_STATUS_PRESSED_MASK)
306  {
307  *pStatus &= ~D4D_BUTTON_STATUS_PRESSED_MASK;
308  if(pBtn->OnClicked)
309  pBtn->OnClicked(pMsg->pObject);
310  }
311 
313  }
314 }
315 
316 /*******************************************************
317 *
318 * BUTTON focus handling routine
319 *
320 *******************************************************/
321 
322 static void D4D_BtnKillFocus(D4D_MESSAGE* pMsg)
323 {
325 
327 
328  if(*pStatus & D4D_BUTTON_STATUS_PRESSED_MASK)
329  {
330  *pStatus &= ~D4D_BUTTON_STATUS_PRESSED_MASK;
332  }
333 
334 }
335 
336 /*******************************************************
337 *
338 * BUTTON Touched Button handling routine
339 *
340 *******************************************************/
341 #if defined(D4D_LLD_TCH) || defined(D4D_LLD_MOUSE)
342 static void D4D_BtnTouched(D4D_MESSAGE* pMsg)
343 {
344  D4D_OBJECT* pThis = pMsg->pObject;
345 
346  if(pThis->pData->flags & D4D_OBJECT_F_TABSTOP)
347  {
348  D4D_BUTTON* pBtn = D4D_GET_BUTTON(pThis);
349 
350  if((D4D_GetFocusedObject(pMsg->pScreen) == pThis) || (pThis->pData->flags & D4D_OBJECT_F_FASTTOUCH))
351  {
354  }else
356 
357  D4D_FocusSet(pMsg->pScreen, pThis);
358 
360  }
361 }
362 
363 /*******************************************************
364 *
365 * BUTTON UnTouched Button handling routine
366 *
367 *******************************************************/
368 static void D4D_BtnUnTouched(D4D_MESSAGE* pMsg)
369 {
370  D4D_BUTTON* pBtn = D4D_GET_BUTTON(pMsg->pObject);
372 
373  if(*pStatus & D4D_BUTTON_STATUS_PRESSED_MASK)
374  {
375  *pStatus &= ~D4D_BUTTON_STATUS_PRESSED_MASK;
376  if(pBtn->OnClicked)
377  pBtn->OnClicked(pMsg->pObject);
378 
380  }
381 
382 }
383 
384 
385 #endif
386 
387 /**************************************************************/
397 /*******************************************************
398 *
399 * The main BUTTON message handler
400 *
401 *******************************************************/
402 
404 {
405 #if defined(D4D_LLD_TCH) || defined(D4D_LLD_MOUSE)
406  D4D_OBJECT* pThis = pMsg->pObject;
407  D4D_BUTTON* pBtn = D4D_GET_BUTTON(pThis);
408 #endif
409 
410  switch(pMsg->nMsgId)
411  {
412  case D4D_MSG_DRAW:
413  D4D_BtnOnDraw(pMsg);
414  break;
415 
416  case D4D_MSG_KEYDOWN:
417  D4D_BtnOnKeyDown(pMsg);
418  break;
419 
420  case D4D_MSG_KEYUP:
421  D4D_BtnOnKeyUp(pMsg);
422  break;
423 
424  case D4D_MSG_KILLFOCUS:
425  D4D_BtnKillFocus(pMsg);
426  break;
427 
428  #if defined(D4D_LLD_TCH) || defined(D4D_LLD_MOUSE)
431 
432  case D4D_MSG_TOUCHED:
433  D4D_BtnTouched(pMsg);
434  break;
435 
436  case D4D_MSG_MOUSE_ENTER:
437  if((*(pBtn->pStatus) & D4D_BUTTON_STATUS_MOUSE_CLICK_MASK) == 0)
438  break;
439 
440  case D4D_MSG_TOUCH_AUTO:
441  if((*(pBtn->pStatus) & (D4D_BUTTON_STATUS_PRESSED_MASK | D4D_BUTTON_STATUS_1ST_TOUCH_MASK)) == 0)
442  {
443  *(pBtn->pStatus) |= D4D_BUTTON_STATUS_PRESSED_MASK;
445  }
446  break;
447 
448  case D4D_MSG_MOUSE_LEAVE:
449  if((*(pBtn->pStatus) & D4D_BUTTON_STATUS_MOUSE_CLICK_MASK) == 0)
450  break;
451 
452  case D4D_MSG_TOUCH_LOST:
453  if((*(pBtn->pStatus) & (D4D_BUTTON_STATUS_PRESSED_MASK | D4D_BUTTON_STATUS_1ST_TOUCH_MASK)) == D4D_BUTTON_STATUS_PRESSED_MASK)
454  {
455  *(pBtn->pStatus) &= ~D4D_BUTTON_STATUS_PRESSED_MASK;
457  }
458  break;
459 
462  case D4D_MSG_UNTOUCHED:
463  D4D_BtnUnTouched(pMsg);
464  break;
465  #endif
466  default:
467  // call the default behavior
468  D4D_ObjOnMessage(pMsg);
469  }
470 }
471 
472 /**************************************************************/
478 {
479  return &(D4D_GET_BUTTON(pThis)->textBuff);
480 }
D4D_COLOR D4D_ObjectGetBckgColor(D4D_OBJECT *pObj, D4D_OBJECT_DRAWFLAGS draw)
Function return object current background color.
Definition: d4d_scheme.c:185
UnTouched message - is send when the screen is untouched.
Definition: d4d_base.h:382
#define D4D_BTN_F_3D
Enable 3D appearence for button.
Definition: d4d_button.h:75
#define D4D_OBJECT_F_FOCUSRECT
Object has an outlined rectangle.
Definition: d4d_object.h:77
#define _calc
Definition: d4d_button.c:72
D4D_COLOR D4D_ObjectGetForeColor(D4D_OBJECT *pObj, D4D_OBJECT_DRAWFLAGS draw)
Function return object current fore color.
Definition: d4d_scheme.c:161
#define D4D_OBJECT_DRAWFLAGS_FOCUSED
Draw fosused state flag.
Definition: d4d_base.h:362
Mouse Left Button Click message - is send in case that mouse left click is detected on this object...
Definition: d4d_base.h:383
#define D4D_ALIGN_V_CENTER_MASK
The vertical center aligment option mask (for texts and also bitmaps).
Definition: d4d_base.h:234
D4D_BUTTON_STATUS * pStatus
Definition: d4d_button.h:152
static void D4D_BtnOnKeyUp(D4D_MESSAGE *pMsg)
Definition: d4d_button.c:296
void D4D_FillRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color)
Function draw filled rectangle on the screen.
const D4D_BMP * pBmpNormal
Definition: d4d_button.h:150
Type definition of eGUI point structure.
Definition: d4d_types.h:223
#define D4D_OBJECT_F_BEVEL_RAISED
Object bevel border raised mask.
Definition: d4d_object.h:84
D4D_BTN_ON_CLICK OnClicked
Definition: d4d_button.h:153
D4D object messages structure.
Definition: d4d_base.h:400
D4D_OBJECT_DATA_PTR pData
Pointer on runtime object data.
Definition: d4d_object.h:180
First quadrant &lt;0-90)
Definition: d4d_types.h:325
const D4D_BMP * pBmpFocus
Definition: d4d_button.h:151
#define D4D_FALSE
This is definition of boolean operation value in eGUI - FALSE.
Definition: d4d_types.h:104
The string type. This structure contains all properties about string in eGUI.
Definition: d4d_string.h:100
D4D_OBJECT_INITFLAGS initFlags
The initializations object flags.
Definition: d4d_object.h:178
#define D4D_OBJECT_F_TABSTOP
Object can be focused.
Definition: d4d_object.h:74
#define D4D_BTN_3D_SHIFT
This is pixel count of 3D appearence button content shift. If not defined, it sets to 1 pixel as a de...
Definition: d4d_button.h:61
Byte D4D_BMP_PROPERTIES
D4D_BMP_PROPERTIES type of image properties.
Definition: d4d_bmp.h:117
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.
D4D_STRING textBuff
Definition: d4d_button.h:149
struct D4D_OBJECT_S * pObject
Pointer to object who is receiver of this message. If the receiver is just screen this field must be ...
Definition: d4d_base.h:402
Third quadrant &lt;180-270)
Definition: d4d_types.h:327
Key Up message - is send when the object get new Key Up event.
Definition: d4d_base.h:377
D4D Driver main header file.
#define D4D_BTN_F_INVERT
Enabel inverting button colours on keypress.
Definition: d4d_button.h:77
#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...
Definition: d4d_base.h:300
#define D4D_GET_BUTTON_STATUS(pObj)
Definition: d4d_button.h:163
D4D_OBJECT_FLAGS flags
runtime object flags
Definition: d4d_object.h:145
Auto Touched message - is send when the object is still keep touch by touch screen driver ...
Definition: d4d_base.h:380
#define D4D_OBJECT_DRAWFLAGS_COMPLETE
Draw complete flag.
Definition: d4d_base.h:361
Mouse Left Button Release message - is send in case that mouse left release is detected on this objec...
Definition: d4d_base.h:384
D4D Driver private header file.
#define D4D_DEFSTR(str)
Macro that helps declare the strings in eGUI.
Definition: d4d_string.h:246
Byte D4D_BUTTON_STATUS
Definition: d4d_button.h:140
D4D_COOR cx
Size in axis X (width)
Definition: d4d_types.h:232
Byte D4D_COOR
Type definition of eGUI coordination variables.
Definition: d4d_types.h:219
D4D_POINT position
Position on the screen/object.
Definition: d4d_object.h:169
#define D4D_BUTTON_STATUS_MOUSE_CLICK_MASK
Definition: d4d_button.h:144
#define D4D_OBJECT_DRAWFLAGS_STATE
Draw just change of state flag.
Definition: d4d_base.h:364
D4D_COOR radius
Object corners radius.
Definition: d4d_object.h:171
#define D4D_DrawRBmpRect(ppt,psz, pBmp, bmpProp, colorBkgd, greyScale, radius)
Definition: d4d.h:188
void D4D_ObjOnMessage(D4D_MESSAGE *pMsg)
Definition: d4d_object.c:443
void D4D_FocusSet(const D4D_SCREEN *pScreen, D4D_OBJECT_PTR pObject)
The function set the obejct focus to new object.
Definition: d4d_screen.c:430
static void D4D_BtnOnDraw(D4D_MESSAGE *pMsg)
Definition: d4d_button.c:161
#define D4D_BUTTON_STATUS_PRESSED_MASK
Definition: d4d_button.h:142
#define D4D_GET_BUTTON(pObj)
Definition: d4d_button.h:162
#define NULL
Type definition of null pointer.
Definition: d4d_types.h:184
D4D_TCHAR * pText
pointer to text array
Definition: d4d_string.h:102
D4D_STR_PROPERTIES * str_properties
pointer to string properties
Definition: d4d_string.h:105
D4D_COOR y
Coordination in axis Y.
Definition: d4d_types.h:226
D4D_BMP eGUI main image structure.
Definition: d4d_bmp.h:100
D4D_OBJECT_PTR D4D_GetFocusedObject(const D4D_SCREEN *pScreen)
The function returns pointer to object that is focused in given screen.
Definition: d4d_screen.c:266
D4D_MSGID nMsgId
Type of message.
Definition: d4d_base.h:404
D4D_SIZE size
Size of the object.
Definition: d4d_object.h:170
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.
#define D4D_FNT_PRTY_TRANSPARENT_MASK
Definition: d4d_font.h:112
D4D_STRING * D4D_BtnGetTextBuffer(D4D_OBJECT *pThis)
Definition: d4d_button.c:477
static void D4D_BtnValue2Coor(D4D_OBJECT *pThis)
Definition: d4d_button.c:74
D4D_KEY_SCANCODE key
There will be stored only code of key without release / press information - is valid with D4D_MSG_KEY...
Definition: d4d_base.h:409
D4D_POINT D4D_GetClientToScreenPoint(D4D_OBJECT *pObject, D4D_POINT *nClientPoint)
The function convert client point on the screen to the global screen point.
Definition: d4d_screen.c:536
The object main structure type definition.
Definition: d4d_object.h:167
#define D4D_BEVEL_WIDTH
D4D_BEVEL_WIDTH constant declaration - can&#39;t be changed!
Draw message - is send when the object should be redrawed.
Definition: d4d_base.h:371
Lost Touch message - is send when the screen is still touch but the coordination leaves the original ...
Definition: d4d_base.h:381
Second quadrant &lt;90-180)
Definition: d4d_types.h:326
#define D4D_OBJECT_F_BEVEL_DENTED
Object bevel border dented mask.
Definition: d4d_object.h:85
void D4D_BtnOnMessage(D4D_MESSAGE *pMsg)
Definition: d4d_button.c:403
Fourth quadrant &lt;270-360)
Definition: d4d_types.h:328
#define D4D_ALIGN_H_CENTER_MASK
The horizontal center aligment option mask (for texts and also bitmaps).
Definition: d4d_base.h:225
void D4D_ComputeGeometry(D4D_GEOMETRY *pGeometry, D4D_OBJECT *pObject)
Definition: d4d_base.c:1047
D4D_COOR cy
Size in axis Y (height)
Definition: d4d_types.h:233
The object system function needed for each object - this is part of D4D_OBJECT main structure...
Definition: d4d_object.h:134
#define D4D_BUTTON_STATUS_1ST_TOUCH_MASK
Definition: d4d_button.h:143
#define D4D_BTN_F_CONT_RECT
Enable content rectangle for button.
Definition: d4d_button.h:76
#define D4D_OBJECT_F_FASTTOUCH
Object has enabled fast touch screen capability. This option supports only a some objects (button...
Definition: d4d_object.h:76
static void D4D_BtnKillFocus(D4D_MESSAGE *pMsg)
Definition: d4d_button.c:322
Touched message - is send when the object is touched by touch screen driver.
Definition: d4d_base.h:379
LWord D4D_BOOL
Type definition of eGUI boolean.
Definition: d4d_types.h:204
void D4D_FillQuadrant(D4D_POINT *pCenter, D4D_COOR radius, D4D_COLOR color, D4D_QUADRANT quadrant)
Function draw fill quadrant of circle on the screen.
Type definition of eGUI size structure.
Definition: d4d_types.h:230
Mouse Cursor Enter message - is send in case that mouse cursor enter to object area.
Definition: d4d_base.h:391
D4D_OBJECT_DRAWFLAGS draw
Contains draw flags - is valid with D4D_MSG_DRAW and D4D_MSG_DRAWDONE message.
Definition: d4d_base.h:408
const D4D_OBJECT_SYS_FUNCTION d4d_btnSysFunc
Definition: d4d_button.c:53
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.
Definition: d4d_types.h:237
Line type thin.
Definition: d4d_types.h:293
void D4D_InvalidateObject(D4D_OBJECT_PTR pObject, D4D_BOOL bComplete)
Function invalidate object to redraw on screen.
Definition: d4d_object.c:71
#define D4D_OBJECT_F_BEVEL_MASK
Object bevel border mask.
Definition: d4d_object.h:81
Key Down message - is send when the object get new Key Down event.
Definition: d4d_base.h:378
Byte D4D_OBJECT_DRAWFLAGS
Drawing object flags type, handled to object in D4D_MSG_DRAW events.
Definition: d4d_base.h:359
LWord D4D_COLOR
Type definition of eGUI color variables.
Definition: d4d_types.h:262
struct D4D_SCREEN_S * pScreen
Pointer to screen who is receiver of this message.
Definition: d4d_base.h:403
D4D_FONT_PROPERTIES font_properties
Font properties structure.
Definition: d4d_string.h:95
D4D_COOR x
Coordination in axis X.
Definition: d4d_types.h:225
Kill Focus message - is send when the object is losing focus.
Definition: d4d_base.h:374
union D4D_MESSAGE_S::@0 prm
Additional data for some type of messages.
static void D4D_BtnOnKeyDown(D4D_MESSAGE *pMsg)
Definition: d4d_button.c:278
D4D_BOOL D4D_IsEnabled(D4D_OBJECT *pObject)
Function find out if the object is enabled or not.
Definition: d4d_object.c:303
Mouse Cursor Leave message - is send in case that mouse cursor leave the object area.
Definition: d4d_base.h:392
void D4D_DrawTextRRectTab(D4D_POINT *ppt, D4D_SIZE *psz, D4D_STRING *buffText, D4D_TAB *pTab, D4D_COLOR colorText, D4D_COLOR colorBkgd, D4D_COOR radius)
Function draw text with TAB function in rectangle with round corners.