eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
d4d_screen.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"
49 
50 
51 
52 static D4D_COOR D4D_GetScrHeaderTitleOffset(const D4D_SCREEN* pScreen);
53 static D4D_BOOL D4D_GetScrHeaderExitBtnCoor(const D4D_SCREEN* pScreen, D4D_POINT* resultPos, D4D_SIZE* resultSize);
54 static void D4D_DrawScreenNC(const D4D_SCREEN* pScreen, D4D_BOOL active);
55 static D4D_OBJECT* D4D_FindObject(const D4D_SCREEN* pScreen, D4D_OBJECT_PTR pObject);
56 static void D4D_ChangeScreen(const D4D_SCREEN* pNewScreen, D4D_SCREEN* pOldScreen);
57 
58 
60 {
61  0, //left
62  0, //top
63  0, //right
64  0 //bottom
65 };
66 
67 /******************************************************************************
68 * Begin of D4D_SCREEN public functions
69 */
73 /**************************************************************************/
79 {
80  // no screen yet shown
81  if(d4d_screenHistoryIndex <= 0)
82  return NULL;
83 
85 }
86 
87 /**************************************************************************/
94 void D4D_ActivateScreen(const D4D_SCREEN* pNewScreen, D4D_BOOL bReplaceCurrent)
95 {
96  D4D_SCREEN* pOldScreen;
97 
98  // can not activate screen (no space left in history array)
99  if(d4d_screenHistoryIndex >= D4D_SCREEN_HISTORY && !bReplaceCurrent)
100  return ;
101 
102  if(!pNewScreen)
103  return;
104 
105  // cancel key capture
107 
108  // deactivate current screen (if any)
109  pOldScreen = D4D_GetActiveScreen();
110 
111  if(pOldScreen != NULL)
112  {
113  // replacing this screen in history?
114  if(bReplaceCurrent)
115  d4d_screenHistoryIndex--; // note that we are sure this is >0
116  }
117 
118  // set the new screen as the active one
121 
122  D4D_ChangeScreen(pNewScreen, pOldScreen);
123 }
124 
125 /**************************************************************************/
131 {
132  D4D_SCREEN* pOldScreen;
133 
134  // can not escape current screen, it is the top one
135  if(d4d_screenHistoryIndex <= 1)
136  return;
137 
138  // cancel key capture
140 
141  pOldScreen = D4D_GetActiveScreen();
142 
143  // pop the history stack
144  if(d4d_screenHistoryIndex > 1)
146 
147  D4D_ChangeScreen(D4D_GetActiveScreen(), pOldScreen);
148 
149 }
150 
151 /**************************************************************************/
157 {
158  D4D_SCREEN* pOldScreen;
159 
160  // can not escape current screen, it is the top one
161  if(d4d_screenHistoryIndex == 0)
162  return;
163 
164  // cancel key capture
166 
167 
168  // I can be sure this is not NULL
169  pOldScreen = D4D_GetActiveScreen();
170 
171  // pop the history stack
173 
174  D4D_ChangeScreen(D4D_GetActiveScreen(), pOldScreen);
175 }
176 
177 /**************************************************************************/
184 void D4D_InitScreen(const D4D_SCREEN* pScreen)
185 {
186  D4D_SCREEN_DATA* pData = pScreen->pData;
187  D4D_OBJECT** pObj;
188  D4D_MESSAGE localMsg;
189 
190 
191  if(!pScreen)
192  return;
193 
194  // prepare message
195  localMsg.pScreen = (D4D_SCREEN*)pScreen;
196  localMsg.nMsgId = D4D_MSG_ONINIT;
197 
198  pObj = (D4D_OBJECT**) pScreen->pObjects;
199 
200  // init objects
201  while(*pObj != NULL)
202  {
203 
204  localMsg.pObject = *pObj;
205 
206  // initialize the pointers on this screen in all screen objects
207  D4D_SetObjectScreenPointer(*pObj, (D4D_SCREEN*)pScreen);
208 
209  // send the ON INIT message
211 
212  pObj++;
213  }
214 
215  if(!(pData->flags & D4D_SCR_FINT_INITDONE))
216  {
217  pData->flags |= D4D_SCR_FINT_INITDONE;
218 
219  D4D_FocusNextObject(pScreen, D4D_TRUE);
220 
221  // user's screen initialization
222  if(pScreen->OnInit)
223  pScreen->OnInit();
224 
225  // Enable natively touch scren for screens if exit button is enabled
226  if(pScreen->flags & D4D_SCR_F_EXIT)
228  }
229 }
230 
231 /**************************************************************************/
238 void D4D_InvalidateScreen(const D4D_SCREEN* pScreen, D4D_BOOL bComplete)
239 {
240  if(!pScreen)
241  return;
242 
244 
245  if(bComplete)
246  {
247  pScreen->pData->flags |= D4D_SCR_FINT_REDRAWC;
248  }
249  else
250  {
251  D4D_OBJECT** pObj = (D4D_OBJECT**)pScreen->pObjects;
252  while(*pObj != NULL)
253  {
255  pObj++;
256  }
257  }
258 }
259 
260 /**************************************************************************/
267 {
268  if(!pScreen)
269  return NULL;
270 
271  // just return the object on a focus index
272  return pScreen->pData->focusedObject;
273 }
274 
275 
276 
277 
278 
279 /**************************************************************************/
286 void D4D_FocusNextObject(const D4D_SCREEN* pScreen, D4D_BOOL bInitialSearch)
287 {
288  D4D_SCREEN_DATA* pData = pScreen->pData;
289  const D4D_OBJECT* const* pObjects = pScreen->pObjects;
290  D4D_OBJECT* pFocusedObj = pData->focusedObject;
291 
292  if(!pScreen)
293  return;
294 
295  // sanity check of list of objects - contains Screen any object?
296  if(*pObjects == NULL)
297  return;
298 
299  // currently focused object already has a tabstop
300  if(bInitialSearch)
301  {
302  //SetUp start object
303  pData->focusedObject = (D4D_OBJECT*)pObjects[0];
304  pFocusedObj = (D4D_OBJECT*)pObjects[0];
306  return ;
307  }
308 
309  do
310  {
311 
312  // get next object
313  pFocusedObj = D4D_FindNextObject(pFocusedObj, (((pFocusedObj->pData->flags) & (D4D_OBJECT_F_ENABLED | D4D_OBJECT_F_VISIBLE)) == (D4D_OBJECT_F_ENABLED | D4D_OBJECT_F_VISIBLE)));
314 
315  // object with focus enabled?
317  break;
318 
319  // avoid endless loop if no focused object can be found
320  }while(((D4D_OBJECT*)pFocusedObj) != pData->focusedObject);
321 
322 
323 
324  if(((D4D_OBJECT*)pFocusedObj) != pData->focusedObject)
325  {
326  // invalidate object which is loosing focus
328 
329  // prepare message KILLFOCUS
330  d4d_msg.pScreen = (D4D_SCREEN*)pScreen;
332  d4d_msg.pObject = pData->focusedObject;
334 
335 
336  // invalidate object which is getting focus
338 
339  // move the focus
340  pData->focusedObject = ((D4D_OBJECT*)pFocusedObj);
341 
342  // prepare message
343  d4d_msg.pScreen = (D4D_SCREEN*)pScreen;
345  d4d_msg.pObject = ((D4D_OBJECT*)pFocusedObj);
347  }
348 }
349 
350 /**************************************************************************/
356 void D4D_FocusPrevObject(const D4D_SCREEN* pScreen)
357 {
358  D4D_SCREEN_DATA* pData = pScreen->pData;
359  const D4D_OBJECT* const* pObjects = pScreen->pObjects;
360  D4D_OBJECT* pFocusedObj = pData->focusedObject;
361 
362  if(!pScreen)
363  return;
364 
365  // sanity check of list of objects - contains Screen any object?
366  if(*pObjects == NULL)
367  return;
368 
369  do
370  {
371 
372  // just get previous object
373  pFocusedObj = D4D_FindPreviousObject(pFocusedObj, (((pFocusedObj->pData->flags) & (D4D_OBJECT_F_ENABLED | D4D_OBJECT_F_VISIBLE)) == (D4D_OBJECT_F_ENABLED | D4D_OBJECT_F_VISIBLE)));
374 
375  // object with focus enabled?
377  {
378  D4D_OBJECT * pParent = pFocusedObj;
379  D4D_BOOL couldBeFocused = D4D_TRUE;
380 
381  // Take care that the parents objects are also visible and enabled
382  while(pParent = D4D_GetParentObject(pParent))
383  {
385  {
386  couldBeFocused = D4D_FALSE;
387  break;
388  }
389  }
390 
391  if(couldBeFocused)
392  break;
393  }
394 
395  // avoid endless loop if no focused object can be found
396  }while(pFocusedObj != pData->focusedObject);
397 
398  if(pFocusedObj != pData->focusedObject)
399  {
400  // invalidate object which is loosing focus
402 
403  // prepare message KILLFOCUS
404  d4d_msg.pScreen = (D4D_SCREEN*)pScreen;
406  d4d_msg.pObject = pData->focusedObject;
408 
409  // invalidate object which is getting focus
411 
412  // move the focus
413  pData->focusedObject = pFocusedObj;
414 
415  // prepare message
416  d4d_msg.pScreen = (D4D_SCREEN*)pScreen;
418  d4d_msg.pObject = pFocusedObj;
420  }
421 }
422 
423 /**************************************************************************/
430 void D4D_FocusSet(const D4D_SCREEN* pScreen, D4D_OBJECT_PTR pObject)
431 {
432  D4D_SCREEN_DATA* pData = pScreen->pData;
433  D4D_OBJECT* pFocusedObj = pData->focusedObject;
434  D4D_OBJECT* pNewFocus;
435 
436  if(pScreen == NULL)
437  return;
438 
439  // check if object is really item of the current screen
440  pNewFocus = D4D_FindObject(pScreen, pObject);
441  if(pNewFocus == NULL)
442  return;
443 
444  if(pNewFocus == pFocusedObj) // is selected object same as focused?
445  return;
446 
447  if((pNewFocus->pData->flags & (D4D_OBJECT_F_TABSTOP | D4D_OBJECT_F_ENABLED)) != (D4D_OBJECT_F_TABSTOP | D4D_OBJECT_F_ENABLED)) // is this object selectable?
448  return;
449 
450  if(!D4D_IsEnabled(pNewFocus))
451  return;
452 
453  // invalidate object which is loosing focus
455 
456  // invalidate object which is getting focus
458 
459  // move the focus
460  pData->focusedObject = pNewFocus;
461 
462  // prepare message
463  d4d_msg.pScreen = (D4D_SCREEN*)pScreen;
465  d4d_msg.pObject = pFocusedObj;
467 
468 
469 
470  // prepare message
471  d4d_msg.pScreen = (D4D_SCREEN*)pScreen;
473  d4d_msg.pObject = pNewFocus;
475 
476 }
477 
478 
479 #ifdef D4D_LLD_TCH
480  /**************************************************************************/
487  void D4D_EnableScrTouchScreen(const D4D_SCREEN* pScr, D4D_BOOL bEnable)
488  {
489  if(bEnable)
491  else
493  }
494 #endif
495 
496 /**************************************************************************/
504 {
505  if(pScreen->textBuff.str_properties->font_properties == property)
506  return; // There is no change needed
507 
508  pScreen->textBuff.str_properties->font_properties = property;
510 }
511 
512 /**************************************************************************/
520 {
521  if(pScreen->textBuff.str_properties->text_properties == property)
522  return; // There is no change needed
523 
524  pScreen->textBuff.str_properties->text_properties = property;
526 
527 }
528 
529 /**************************************************************************/
537 {
538  D4D_POINT tmp_point;
539  D4D_SCREEN* pScreen = pObject->pData->pScreen;
540 
541 
542  if(pScreen == NULL)
543  {
544  return *nClientPoint;
545  }
546 
547  tmp_point.x = (D4D_COOR)(pScreen->position.x + nClientPoint->x);
548  tmp_point.y = (D4D_COOR)(pScreen->position.y + nClientPoint->y);
549 
550  if(pScreen->flags & D4D_SCR_F_BEVEL)
551  tmp_point.x += D4D_BEVEL_WIDTH;
552  else if(pScreen->flags & D4D_SCR_F_OUTLINE)
553  tmp_point.x++;
554 
555  tmp_point.y += D4D_GetScrHeaderSize(pScreen);
556 
557  if(pObject->pRelations)
558  {
560 
561  while(pParent)
562  {
563  tmp_point.x += pParent->position.x;
564  tmp_point.y += pParent->position.y;
565 
566  if(pParent->pMargin)
567  {
568  tmp_point.x += pParent->pMargin->left;
569  tmp_point.y += pParent->pMargin->top;
570  }
571 
573  }
574  }
575 
576  return tmp_point;
577 }
578 
579 /**************************************************************************/
587 {
588  D4D_POINT tmp_point;
589  D4D_SCREEN* pScreen = pObject->pData->pScreen;
590 
591  if(pScreen == NULL)
592  {
593  return *nScreenPoint;
594  }
595 
596  tmp_point.x = (D4D_COOR)(nScreenPoint->x - pScreen->position.x);
597  tmp_point.y = (D4D_COOR)(nScreenPoint->y - pScreen->position.y);
598 
599  if(pScreen->flags & D4D_SCR_F_BEVEL)
600  tmp_point.x -= D4D_BEVEL_WIDTH;
601  else if(pScreen->flags & D4D_SCR_F_OUTLINE)
602  tmp_point.x--;
603 
604  tmp_point.y -= D4D_GetScrHeaderSize(pScreen);
605 
606  if(pObject->pRelations)
607  {
609 
610  while(pParent)
611  {
612  tmp_point.x -= pParent->position.x;
613  tmp_point.y -= pParent->position.y;
614  if(pParent->pMargin)
615  {
616  tmp_point.x -= pParent->pMargin->left;
617  tmp_point.y -= pParent->pMargin->top;
618  }
620  }
621  }
622 
623 
624  return tmp_point;
625 }
626 
627 /**************************************************************************/
635 {
636  if((point->x >= pScreen->position.x) && (point->y >= (pScreen->position.y + D4D_GetScrHeaderSize(pScreen))))
637  {
638  if((point->x <= (pScreen->position.x + pScreen->size.cx)) && (point->y <= (pScreen->position.y + pScreen->size.cy)))
639  return D4D_TRUE;
640  }
641  return D4D_FALSE;
642 }
643 
644 
645 /******************************************************************************
646 * End of public functions */
648 /******************************************************************************/
649 
650 /**************************************************************************/
657 {
658  D4D_OBJECT** pObject;
659 
660  if(!pScreen)
661  return NULL;
662 
663  pObject = (D4D_OBJECT**)pScreen->pObjects;
664 
665  while(*(pObject + 1))
666  pObject++;
667 
668  return *pObject;
669 }
670 
671 /**************************************************************/
676 static D4D_OBJECT* D4D_FindObject(const D4D_SCREEN* pScreen, D4D_OBJECT_PTR pObject)
677 {
678  D4D_OBJECT* pLocObject = pScreen->pData->focusedObject;
679 
680  if(!pScreen || !pLocObject)
681  return NULL;
682 
683  do
684  {
685  // get next object
686  pLocObject = D4D_FindNextObject(pLocObject, D4D_TRUE);
687 
688  if(pLocObject == pObject)
689  return pLocObject;
690 
691  }while(pLocObject != pScreen->pData->focusedObject);
692 
693  // not found
694  return NULL;
695 }
696 
697 /**************************************************************/
702 static void D4D_ChangeScreen(const D4D_SCREEN* pNewScreen, D4D_SCREEN* pOldScreen)
703 {
704  D4D_SCREEN_DATA* pData;
705  D4D_MESSAGE tmp_msg;
706 
707  if(pNewScreen == NULL)
708  return;
709 
710  if(pOldScreen == pNewScreen)
711  return;
712 
713  tmp_msg.pScreen = pOldScreen;
714 
715  if(pOldScreen != NULL)
716  {
718 
719  tmp_msg.nMsgId = D4D_MSG_KILLFOCUS;
720  tmp_msg.pObject = pOldScreen->pData->focusedObject;
721  D4D_SendMessage(&tmp_msg);
722 
723  // Draw NC screen area as an inactivate
724  D4D_DrawScreenNC(pOldScreen, D4D_FALSE);
725 
726  // call de-activate event
727  if(pOldScreen->OnDeactivate != NULL)
728  pOldScreen->OnDeactivate();
729  }
730 
731  // invalidate the new screen (global complete redraw, not individual objects)
732  D4D_InvalidateScreen(pNewScreen, D4D_TRUE);
733 
734  // if this is the first time activating
735  pData = pNewScreen->pData;
736 
737  // Init the screen
738  D4D_InitScreen(pNewScreen);
739 
741 
742  // Send to the object Focus message
743  tmp_msg.pScreen = (D4D_SCREEN*)pNewScreen;
744  tmp_msg.nMsgId = D4D_MSG_SETFOCUS;
745  tmp_msg.pObject = pData->focusedObject;
746  D4D_SendMessage(&tmp_msg);
747 
748  // inform the screen it has been activated
749  if(pNewScreen->OnActivate)
750  pNewScreen->OnActivate();
751 
753 
754  #ifdef D4D_LLD_TCH
755  d4d_LastTouchedObj = NULL;
756  #endif
757 
758  // finish all action for previous screen
760 }
761 
762 /**************************************************************/
768 {
769  D4D_COOR tmp_size = 0;
770 
771  if(pScreen == NULL)
772  return 0;
773 
774  if((pScreen->flags & D4D_SCR_F_TITLEBAR) || pScreen->textBuff.pText)
775  {
776  tmp_size = (D4D_COOR)(D4D_SCR_TITLE_OFF_Y * 2 + D4D_GetFontHeight(pScreen->textBuff.fontId));
777  }
778 
779  if(pScreen->pIcon != NULL)
780  if(tmp_size < (D4D_GetBmpHeight(pScreen->pIcon) + D4D_SCR_TITLE_OFF_Y * 2 + 1))
781  tmp_size = (D4D_COOR)(D4D_GetBmpHeight(pScreen->pIcon) + D4D_SCR_TITLE_OFF_Y * 2 + 1);
782 
783  if(pScreen->flags & D4D_SCR_F_TITLEBAR)
784  if(tmp_size < D4D_SCR_HEADER_SIZE_MIN_SIZE)
785  tmp_size = D4D_SCR_HEADER_SIZE_MIN_SIZE;
786 
787  return tmp_size;
788 }
789 
790 /**************************************************************/
796 {
797  D4D_COOR tmp_off = D4D_SCR_TITLE_OFF_X;
798 
799  if(pScreen == NULL)
800  return 0;
801 
802  if(pScreen->pIcon != NULL)
803  tmp_off = (D4D_COOR)(D4D_GetBmpWidth(pScreen->pIcon) + D4D_SCR_TITLE_OFF_X * 2);
804 
805  #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
806  tmp_off += (pScreen->radius * 2);
807  #endif
808 
809  return tmp_off;
810 }
811 
812 
813 /**************************************************************/
818 static D4D_BOOL D4D_GetScrHeaderExitBtnCoor(const D4D_SCREEN* pScreen, D4D_POINT* resultPos, D4D_SIZE* resultSize)
819 {
820  D4D_COOR tmp_coor = D4D_GetScrHeaderSize((D4D_SCREEN*)pScreen);
821 
822  resultPos->x = 0;
823  resultPos->y = 0;
824 
825  resultSize->cx = 0;
826  resultSize->cy = 0;
827 
828  if(pScreen == NULL)
829  return D4D_FALSE;
830 
831  if((tmp_coor - D4D_SCR_TITLE_EXITBTN_OFFSET * 2) <= 0)
832  return D4D_FALSE;
833 
834  tmp_coor -= D4D_SCR_TITLE_EXITBTN_OFFSET * 2;
835 
836  if(tmp_coor < D4D_SCR_TITLE_EXITBTN_MIN_SIZE)
837  return D4D_FALSE;
838 
839  resultSize->cx = tmp_coor;
840  resultSize->cy = tmp_coor;
841 
842  resultPos->x = (D4D_COOR)(pScreen->position.x + pScreen->size.cx - tmp_coor - D4D_SCR_TITLE_EXITBTN_OFFSET);
843  resultPos->y = (D4D_COOR)(pScreen->position.y + D4D_SCR_TITLE_EXITBTN_OFFSET);
844 
845  if(pScreen->flags & D4D_SCR_F_BEVEL)
846  {
847  resultPos->x -= D4D_BEVEL_WIDTH;
848  resultPos->y += D4D_BEVEL_WIDTH;
849 
850  }else if(pScreen->flags & D4D_SCR_F_OUTLINE)
851  {
852  resultPos->x--;
853  resultPos->y++;
854  }
855 
856  return D4D_TRUE;
857 }
858 
859 /**************************************************************/
864 static void D4D_DrawScreenNC(const D4D_SCREEN* pScreen, D4D_BOOL active)
865 {
866  D4D_CLR_SCHEME *pScheme = D4D_ScreenGetScheme((D4D_SCREEN*)pScreen);
867  D4D_COLOR clr;
868  D4D_GEOMETRY contentGeom;
869  D4D_POINT tmpPoint;
870  D4D_SIZE tmpSize;
871 
872  contentGeom.pnt = pScreen->position;
873  contentGeom.sz = pScreen->size;
874 
875  if(pScreen->flags & D4D_SCR_F_BEVEL)
876  {
877  contentGeom.pnt.x += D4D_BEVEL_WIDTH;
878  contentGeom.pnt.y += D4D_BEVEL_WIDTH;
879  contentGeom.sz.cx -= 2*D4D_BEVEL_WIDTH;
880  contentGeom.sz.cy -= 2*D4D_BEVEL_WIDTH;
881 
882  }else if(pScreen->flags & D4D_SCR_F_OUTLINE)
883  {
884  contentGeom.pnt.x++;
885  contentGeom.pnt.y++;
886  contentGeom.sz.cx -= 2;
887  contentGeom.sz.cy -= 2;
888  }
889 
890  if(active)
891  {
892  if(pScreen->flags & D4D_SCR_F_BCKG)
893  {
894  D4D_FillRRect(&contentGeom.pnt, &contentGeom.sz, pScheme->screen.desktop, pScreen->radius);
895  }
896 
897  if(pScreen->flags & D4D_SCR_F_BEVEL)
898  {
899  D4D_Bevel((D4D_POINT*)&(pScreen->position), (D4D_SIZE*)&(pScreen->size), pScheme->screen.outline, D4D_BEVEL_RAISED, pScreen->radius);
900  }else if(pScreen->flags & D4D_SCR_F_OUTLINE)
901  {
902  D4D_RRect((D4D_POINT*)&(pScreen->position), (D4D_SIZE*)&(pScreen->size), D4D_LINE_THIN, pScheme->screen.outline, pScreen->radius);
903  }
904  }
905 
906  if(pScreen->flags & D4D_SCR_F_TITLEBAR)
907  {
908 
909  clr = pScheme->screen.title_bar;
910 
911  if(!active)
912  clr = D4D_GetGreyScale(clr);
913 
914  tmpSize = contentGeom.sz;
915  tmpSize.cy = D4D_GetScrHeaderSize((D4D_SCREEN*)pScreen);
916 
917  if(tmpSize.cy)
918  tmpSize.cy--;
919 
920  D4D_FillRRect(&contentGeom.pnt, &tmpSize, clr, pScreen->radius);
921  }
922 
923  if(pScreen->pIcon != NULL)
924  {
925  tmpPoint = contentGeom.pnt;
926  tmpPoint.x += D4D_SCR_TITLE_OFF_X;
927  tmpPoint.y += (D4D_COOR)((D4D_GetScrHeaderSize((D4D_SCREEN*)pScreen) - D4D_GetBmpHeight(pScreen->pIcon)) / 2);
928 
929  D4D_DrawRBmp(&tmpPoint, pScreen->pIcon, (D4D_BOOL)!active, pScreen->radius);
930  }
931 
932  if(pScreen->textBuff.pText)
933  {
934  tmpPoint = contentGeom.pnt;
935  tmpPoint.x += D4D_GetScrHeaderTitleOffset(pScreen);
936  tmpPoint.y += (D4D_COOR)((D4D_GetScrHeaderSize((D4D_SCREEN*)pScreen) - D4D_GetFontHeight(pScreen->textBuff.fontId)) / 2);
937 
938  clr = pScheme->screen.title_text;
939 
940  if(!active)
941  clr = D4D_GetGreyScale(clr);
942 
943  D4D_DrawText(&tmpPoint, (D4D_STRING*)&pScreen->textBuff, clr, 0);
944  }
945 
946  if(pScreen->flags & D4D_SCR_F_EXIT)
947  {
948  clr = pScheme->screen.exitBtnFore;
949 
950  if(!active)
951  clr = D4D_GetGreyScale(clr);
952 
953  if(D4D_GetScrHeaderExitBtnCoor(pScreen, &tmpPoint, &tmpSize))
954  {
955  D4D_RBox(&tmpPoint, &tmpSize, D4D_LINE_THIN, clr, pScheme->screen.exitBtnBckg, pScreen->radius);
956 
957  tmpPoint.x += D4D_SCR_EXITBTN_CROSS_SIZE;
958  tmpPoint.y += D4D_SCR_EXITBTN_CROSS_SIZE;
959 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
960  tmpPoint.x += (D4D_COOR)(pScreen->radius / 2);
961  tmpPoint.y += (D4D_COOR)(pScreen->radius / 2);
962 #endif
963 
964  D4D_MoveTo(&tmpPoint);
965  tmpPoint.x += tmpSize.cx - (2 * D4D_SCR_EXITBTN_CROSS_SIZE);
966  tmpPoint.y += tmpSize.cy - (2 * D4D_SCR_EXITBTN_CROSS_SIZE);
967 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
968  tmpPoint.x -= (D4D_COOR)(pScreen->radius);
969  tmpPoint.y -= (D4D_COOR)(pScreen->radius);
970 #endif
971 
972  D4D_LineTo(&tmpPoint, D4D_LINE_THIN, clr);
973 
974  tmpPoint.y -= tmpSize.cy - (2 * D4D_SCR_EXITBTN_CROSS_SIZE);
975 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
976  tmpPoint.y += (D4D_COOR)(pScreen->radius);
977 #endif
978  D4D_MoveTo(&tmpPoint);
979  tmpPoint.x -= tmpSize.cx - (2 * D4D_SCR_EXITBTN_CROSS_SIZE);
980  tmpPoint.y += tmpSize.cy - (2 * D4D_SCR_EXITBTN_CROSS_SIZE);
981 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
982  tmpPoint.x += (D4D_COOR)(pScreen->radius);
983  tmpPoint.y -= (D4D_COOR)(pScreen->radius);
984 #endif
985  D4D_LineTo(&tmpPoint, D4D_LINE_THIN, clr);
986  }
987  }
988 }
989 
990 /**************************************************************/
995 static void D4D_RedrawScreenObject(D4D_OBJECT* pObject, D4D_BOOL complete)
996 {
997  D4D_MESSAGE msg;
998  D4D_OBJECT_FLAGS flags = pObject->pData->flags;
999 
1001 
1002  if(!(flags & D4D_OBJECT_F_VISIBLE))
1003  return;
1004 
1005  msg.pScreen = pObject->pData->pScreen;
1006  msg.pObject = pObject;
1007  msg.prm.draw = 0;
1008 
1009 
1010  if(complete || (flags & (D4D_OBJECT_F_REDRAW | D4D_OBJECT_F_REDRAWC | D4D_OBJECT_F_REDRAWSTATE))) /* object does need to redraw */
1011  {
1012  /* forced complete redraw of all objects or object wants to be completely redrawn*/
1013  if(complete || (flags & D4D_OBJECT_F_REDRAWC))
1015 
1016  /* notify object that state of object has been changed (focus, capture etc)*/
1017  if(flags & D4D_OBJECT_F_REDRAWSTATE)
1019 
1020 
1021  // draw special?
1022  if((pObject == msg.pScreen->pData->focusedObject) && (pObject->pData->flags & D4D_OBJECT_F_TABSTOP))
1023  {
1025 
1026  if(pObject == d4d_pKeysCapturer)
1028  }
1029 
1030  // will draw now
1031  // send the DRAW message
1032  msg.nMsgId = D4D_MSG_DRAW;
1033  D4D_SendMessage(&msg);
1034  // send the DRAWDONE message
1035  msg.nMsgId = D4D_MSG_DRAWDONE;
1036  D4D_SendMessage(&msg);
1037  }
1038 
1039 
1040  if(pObject->pRelations)
1041  {
1042  D4D_OBJECT** pChild = (D4D_OBJECT**)&(pObject->pRelations[D4D_OBJECT_USR_DATA_CHILD_IX]);
1043 
1044  while(*pChild)
1045  {
1046  D4D_RedrawScreenObject(*pChild, complete);
1047  pChild++;
1048  }
1049  }
1050 }
1051 
1052 
1053 /**************************************************************/
1059 {
1060  D4D_SCREEN_DATA data = *pScreen->pData;
1061  D4D_OBJECT** pObj;
1062 
1064 
1065  // prepare message
1066  d4d_msg.pScreen = pScreen;
1067 
1070 
1071  // redraw screen non client area if necessary
1072  if(data.flags & D4D_SCR_FINT_REDRAWC)
1073  {
1074  d4d_msg.pObject = NULL;
1077 
1078  D4D_DrawScreenNC(pScreen, D4D_TRUE);
1079  }
1080 
1081  if(data.flags & D4D_SCR_FINT_CHECKOBJECTS)
1082  {
1083  // redraw objects
1084  pObj = (D4D_OBJECT**)pScreen->pObjects;
1085  // Go through the all top level objects
1086  while(*pObj != NULL)
1087  {
1088  // redraw all top level objects includes it children
1090  pObj++;
1091  }
1092 
1093  d4d_msg.pObject = NULL;
1096  }
1097 
1100 }
1101 
1102 /**************************************************************/
1108 {
1110  {
1111  D4D_OBJECT** pObjects = (D4D_OBJECT**)pScreen->pObjects;
1112  d4d_systemFlags &= ~D4D_SYSTEM_F_TIMETICK;
1113 
1114  d4d_msg.pScreen = pScreen;
1116 
1117  // Go through the all top level objects
1118  while(*pObjects != NULL)
1119  {
1120  d4d_msg.pObject = *pObjects;
1121  // send timeticks to all top level objects includes it children
1123  pObjects++;
1124  }
1125 
1126  }
1127 }
1128 
1129 /**************************************************************/
1135 {
1136  D4D_POINT tmp_pos;
1137  D4D_SIZE tmp_size;
1138 
1139 
1140  if(D4D_GetScrHeaderExitBtnCoor(pScreen, &tmp_pos, &tmp_size))
1141  {
1142  if((point->x >= tmp_pos.x) && (point->y >= tmp_pos.y))
1143  {
1144  if((point->x <= (tmp_pos.x + tmp_size.cx)) && (point->y <= (tmp_pos.y + tmp_size.cy)))
1145  return D4D_TRUE;
1146  }
1147  }
1148  return D4D_FALSE;
1149 }
1150 
#define D4D_SCR_FINT_INITDONE
Definition: d4d_screen.h:127
#define D4D_SCR_FINT_TOUCHENABLE
Definition: d4d_screen.h:128
void D4D_RBox(D4D_POINT *ppt, D4D_SIZE *psz, D4D_LINETYPE ltype, D4D_COLOR colorLine, D4D_COLOR colorFill, D4D_COOR radius)
Function draw filled rectangle with outline on the screen with round corners.
D4D_OBJECT * D4D_GetParentObject(D4D_OBJECT *pObject)
Definition: d4d_object.c:498
D4D_OBJECT * d4d_pKeysCapturer
Definition: d4d_base.c:69
Draw Done message - is send after the object is redrawed.
Definition: d4d_base.h:372
#define D4D_OBJECT_DRAWFLAGS_FOCUSED
Draw fosused state flag.
Definition: d4d_base.h:362
void D4D_InvalidateScreen(const D4D_SCREEN *pScreen, D4D_BOOL bComplete)
The function mark the screen and its abject as &quot;redraw pending&quot;.
Definition: d4d_screen.c:238
D4D_TEXT_PROPERTIES text_properties
Text properties structure.
Definition: d4d_string.h:96
D4D_SYSTEM_FLAGS d4d_systemFlags
Definition: d4d_base.c:89
struct D4D_SCREEN_S * pScreen
pointer to object screen owner - it is placed in RAM bacause one object could be used in multiply scr...
Definition: d4d_object.h:146
Type definition of eGUI point structure.
Definition: d4d_types.h:223
const D4D_OBJECT *const * pObjects
NULL-terminated array of objects (may lay in ROM)
Definition: d4d_screen.h:165
void D4D_SendMessageMask(D4D_MESSAGE *pMsg, D4D_OBJECT_FLAGS parentFlagsMask, D4D_OBJECT_FLAGS endFlagMask)
Definition: d4d_base.c:714
D4D_COOR left
Margin of left side.
Definition: d4d_types.h:246
void(* D4DLCD_FlushBuffer)(D4DLCD_FLUSH_MODE mode)
The LCD driver flush function.
Definition: d4d_lldapi.h:154
On Init message - is send for first time when the object is inicialized.
Definition: d4d_base.h:370
D4D object messages structure.
Definition: d4d_base.h:400
D4D_OBJECT_DATA_PTR pData
Pointer on runtime object data.
Definition: d4d_object.h:180
The notification that the end of screen is draw.
Definition: d4d_lldapi.h:140
D4D_BOOL D4D_ScrCheckExitBtnCoor(D4D_SCREEN *pScreen, D4D_POINT *point)
Definition: d4d_screen.c:1134
static void D4D_DrawScreenNC(const D4D_SCREEN *pScreen, D4D_BOOL active)
Definition: d4d_screen.c:864
#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
#define D4D_DrawRBmp(ppt, pBmp, greyScale, radius)
Definition: d4d.h:192
#define D4D_OBJECT_F_TABSTOP
Object can be focused.
Definition: d4d_object.h:74
#define D4D_OBJECT_F_REDRAWSTATE
Definition: d4d_object.h:112
D4D_OBJECT * D4D_GetLastObject(D4D_SCREEN *pScreen)
The function returns the pointer to last object in the screen.
Definition: d4d_screen.c:656
D4D_FONT fontId
index of used font
Definition: d4d_string.h:104
#define D4D_OBJECT_F_TIMETICK
Object will gets the time tick events.
Definition: d4d_object.h:78
Time Tick Occur message - is send with each time tick to object.
Definition: d4d_base.h:393
#define D4D_OBJECT_F_ENABLED
Object after initialization is enabled.
Definition: d4d_object.h:73
Set Focus message - is send when the object is getting focus.
Definition: d4d_base.h:373
#define D4D_TRUE
This is definition of boolean operation value in eGUI - TRUE.
Definition: d4d_types.h:106
#define D4D_SCR_FINT_REDRAWC
Definition: d4d_screen.h:129
D4D_SCREEN_FLAGS flags
Screen behaviour flags.
Definition: d4d_screen.h:182
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
static D4D_BOOL D4D_GetScrHeaderExitBtnCoor(const D4D_SCREEN *pScreen, D4D_POINT *resultPos, D4D_SIZE *resultSize)
Definition: d4d_screen.c:818
D4D Driver main header file.
#define D4D_OBJECT_F_REDRAW
Definition: d4d_object.h:110
void D4D_InitScreen(const D4D_SCREEN *pScreen)
The function inits the screen and its objects for first time case.
Definition: d4d_screen.c:184
D4D_COOR D4D_GetScrHeaderSize(D4D_SCREEN *pScreen)
Definition: d4d_screen.c:767
D4D_OBJECT_FLAGS flags
runtime object flags
Definition: d4d_object.h:145
D4D_COOR D4D_GetBmpHeight(const D4D_BMP *pBmp)
Function gets information about bitmap height.
Definition: d4d_bmp.c:481
#define D4D_SCREEN_HISTORY
This macro is used to set the screen buffer depth. If not defined, the 5 is used as a default...
Definition: d4d_base.h:73
#define D4D_SCR_F_TITLEBAR
The screen has title bar.
Definition: d4d_screen.h:105
void D4D_ClearKeysBuffer(void)
Clear all rest information about pushed Keys in buffer.
Definition: d4d_base.c:244
#define D4D_OBJECT_DRAWFLAGS_COMPLETE
Draw complete flag.
Definition: d4d_base.h:361
#define D4D_SCR_TITLE_EXITBTN_MIN_SIZE
This is screen exit button minimal size definition. If not defined, it sets to 6 pixels as a default...
Definition: d4d_screen.h:77
D4D Driver private header file.
#define D4D_SCR_TITLE_OFF_Y
This is screen title offset definition in axis Y. If not defined, it sets to 1 pixels as a default...
Definition: d4d_screen.h:65
void D4D_SetObjectFlags(D4D_OBJECT *pObject, D4D_OBJECT_FLAGS flagsMask, D4D_BOOL alsoChildren)
Definition: d4d_object.c:750
This is the main structure of the color scheme in the D4D. It contains all the necessary colors to ru...
Definition: d4d_scheme.h:578
Byte D4D_TEXT_PROPERTIES
The string text properties type. The masks are described here D4D BASE Defines masks of aligment prop...
Definition: d4d_string.h:90
D4D_MESSAGE d4d_msg
Definition: d4d_base.c:72
void D4D_FocusNextObject(const D4D_SCREEN *pScreen, D4D_BOOL bInitialSearch)
The function change focus to the next object in the given screen.
Definition: d4d_screen.c:286
D4D_COOR cx
Size in axis X (width)
Definition: d4d_types.h:232
void D4D_HandleTimeTicks(D4D_SCREEN *pScreen)
Definition: d4d_screen.c:1107
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
D4D_COLOR exitBtnBckg
Background color of screen exit button (if enabled)
Definition: d4d_scheme.h:518
D4D_COOR radius
Screen corner radius.
Definition: d4d_screen.h:177
LWord D4D_OBJECT_FLAGS
The object flags type. The masks are described here D4D OBJECT Defines masks of object behaviour flag...
Definition: d4d_object.h:128
#define D4D_OBJECT_USR_DATA_CHILD_IX
The relations object index to relation array for first child object.
Definition: d4d_object.h:103
#define D4D_OBJECT_DRAWFLAGS_STATE
Draw just change of state flag.
Definition: d4d_base.h:364
void D4D_FocusPrevObject(const D4D_SCREEN *pScreen)
The function change focus to the previous object in the given screen.
Definition: d4d_screen.c:356
D4D_CLR_SCHEME * D4D_ScreenGetScheme(D4D_SCREEN *pScreen)
D4D_MARGIN d4d_screenMarginDflt
Definition: d4d_screen.c:59
#define D4D_MouseChangedScreen()
Definition: d4d_mouse.h:245
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
#define D4D_OBJECT_DRAWFLAGS_CAPTURING
Draw capturing state flag.
Definition: d4d_base.h:363
void D4D_ActivateScreen(const D4D_SCREEN *pNewScreen, D4D_BOOL bReplaceCurrent)
The function activate the new screen.
Definition: d4d_screen.c:94
#define NULL
Type definition of null pointer.
Definition: d4d_types.h:184
D4D_TCHAR * pText
pointer to text array
Definition: d4d_string.h:102
static void D4D_RedrawScreenObject(D4D_OBJECT *pObject, D4D_BOOL complete)
Definition: d4d_screen.c:995
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_SCREEN * D4D_GetActiveScreen(void)
Returns pointer to current active screen.
Definition: d4d_screen.c:78
#define D4D_OBJECT_F_NOTINIT
Definition: d4d_object.h:113
#define D4D_SCR_F_EXIT
The screen has exit button in title bar.
Definition: d4d_screen.h:106
D4D_COLOR title_text
Color of screen title bar text (if enabled)
Definition: d4d_scheme.h:516
D4D_SIZE sz
Size of object.
Definition: d4d_types.h:240
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_COLOR exitBtnFore
Fore color of screen exit button.
Definition: d4d_scheme.h:517
D4D_SIZE size
Screen size (standard screen has full size of physical screen)
Definition: d4d_screen.h:176
Raised bevel type.
Definition: d4d_types.h:335
D4D_MSGID nMsgId
Type of message.
Definition: d4d_base.h:404
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_DrawText(ppt, buffText, colorText, colorBkgd)
Function that draw simple text on the screen.
D4D_CLR_SCHEME_SCR screen
Sub structure of screen colors.
Definition: d4d_scheme.h:580
void D4D_Bevel(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color, D4D_BEVEL type, D4D_COOR radius)
Function draw standard object bevel specified by parameters.
#define D4D_OBJECT_USR_DATA_PARENT_IX
The relations object index to relation array for parent object.
Definition: d4d_object.h:101
Byte flags
Internal screen flags.
Definition: d4d_screen.h:156
D4D_POINT pnt
Left Top corner point.
Definition: d4d_types.h:239
void D4D_SetScreenFontProperties(const D4D_SCREEN *pScreen, D4D_FONT_PROPERTIES property)
The function sets the screen font properties.
Definition: d4d_screen.c:503
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
D4D_COLOR outline
Color of screen outline (if enabled)
Definition: d4d_scheme.h:514
void D4D_CaptureKeys(D4D_OBJECT_PTR pObj)
Function switch on capturing the keys to objects.
Definition: d4d_object.c:190
#define D4D_BEVEL_WIDTH
D4D_BEVEL_WIDTH constant declaration - can&#39;t be changed!
D4D_SCREEN_DATA * pData
pointer to screen private run time data
Definition: d4d_screen.h:186
Draw message - is send when the object should be redrawed.
Definition: d4d_base.h:371
const D4D_BMP * pIcon
Screen title icon.
Definition: d4d_screen.h:180
D4D_COOR D4D_GetBmpWidth(const D4D_BMP *pBmp)
Function gets information about bitmap width.
Definition: d4d_bmp.c:450
#define D4D_SCR_TITLE_OFF_X
This is screen title offset definition in axis X. If not defined, it sets to 3 pixels as a default...
Definition: d4d_screen.h:59
void D4D_EscapeScreen(void)
The function return to previous screen recorded in the history.
Definition: d4d_screen.c:130
void D4D_SetObjectScreenPointer(D4D_OBJECT *pObject, D4D_SCREEN *pScreen)
Definition: d4d_object.c:777
D4D_COOR cy
Size in axis Y (height)
Definition: d4d_types.h:233
void(* OnDeactivate)(void)
Screen event handler of called before deactivating.
Definition: d4d_screen.h:171
D4D_COLOR title_bar
Color of screen title bar (if enabled)
Definition: d4d_scheme.h:515
D4D_POINT position
Screen coordination on physical screen (standard screen has {0,0})
Definition: d4d_screen.h:175
D4D_OBJECT_RELATIONS pRelations
Relationship between the objects.
Definition: d4d_object.h:177
#define D4D_OBJECT_F_VISIBLE
Object after initialization is visible on the screen.
Definition: d4d_object.h:72
const D4DLCD_FUNCTIONS D4D_LLD_LCD
LWord D4D_BOOL
Type definition of eGUI boolean.
Definition: d4d_types.h:204
The notification that the start of screen is done.
Definition: d4d_lldapi.h:139
#define D4D_SCR_F_BCKG
The screen has filled background (desktop)
Definition: d4d_screen.h:107
Type definition of eGUI size structure.
Definition: d4d_types.h:230
D4D_OBJECT * D4D_FindNextObject(D4D_OBJECT *pObject, D4D_BOOL childrenAlso)
Definition: d4d_object.c:587
void(* OnInit)(void)
Screen event handler of one-time initialization.
Definition: d4d_screen.h:168
void D4D_EscapeToBaseScreen(void)
The function return to base screen recorded in the history.
Definition: d4d_screen.c:156
D4D_OBJECT_DRAWFLAGS draw
Contains draw flags - is valid with D4D_MSG_DRAW and D4D_MSG_DRAWDONE message.
Definition: d4d_base.h:408
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.
The screen structure type. The main screen structure that contains all needed data to run the eGUI sc...
Definition: d4d_screen.h:162
Type definition of eGUI geometry structure.
Definition: d4d_types.h:237
Line type thin.
Definition: d4d_types.h:293
#define D4D_SCR_HEADER_SIZE_MIN_SIZE
This is screen header minimal size definition in axis Y. If not defined, it sets to 13 pixels as a de...
Definition: d4d_screen.h:71
#define D4D_SYSTEM_F_TIMETICK
Definition: d4d_base.h:472
Byte d4d_screenHistoryIndex
Definition: d4d_base.c:66
#define D4D_OBJECT_F_REDRAWC
Definition: d4d_object.h:111
D4D_MARGIN * pMargin
Object inner margin.
Definition: d4d_object.h:172
D4D driver - resistive touch screen driver function header file.
#define D4D_EnableScrTouchScreen(pScr, bEnable)
Definition: d4d_screen.h:420
void D4D_SendMessage(D4D_MESSAGE *pMsg)
Definition: d4d_base.c:681
D4D_SCREEN * d4d_screenHistory[D4D_SCREEN_HISTORY]
Definition: d4d_base.c:65
D4D_COLOR desktop
Color of screen desktop.
Definition: d4d_scheme.h:513
void(* OnActivate)(void)
Screen event handler of called before screen activation.
Definition: d4d_screen.h:170
static void D4D_ChangeScreen(const D4D_SCREEN *pNewScreen, D4D_SCREEN *pOldScreen)
Definition: d4d_screen.c:702
static D4D_COOR D4D_GetScrHeaderTitleOffset(const D4D_SCREEN *pScreen)
Definition: d4d_screen.c:795
#define D4D_SCR_FINT_CHECKOBJECTS
Definition: d4d_screen.h:130
void D4D_LineTo(D4D_POINT *ppt, D4D_LINETYPE ltype, D4D_COLOR color)
Function draw line on the screen.
LWord D4D_COLOR
Type definition of eGUI color variables.
Definition: d4d_types.h:262
#define D4D_SCR_TITLE_EXITBTN_OFFSET
This is screen exit button offset definition. If not defined, it sets to 3 pixels as a default...
Definition: d4d_screen.h:89
void D4D_RedrawScreen(D4D_SCREEN *pScreen)
Definition: d4d_screen.c:1058
D4D_OBJECT * focusedObject
Pointer on currently focused object.
Definition: d4d_screen.h:155
struct D4D_SCREEN_S * pScreen
Pointer to screen who is receiver of this message.
Definition: d4d_base.h:403
D4D_COLOR D4D_GetGreyScale(D4D_COLOR color)
Compute the grayscale color.
Definition: d4d_scheme.c:333
D4D_FONT_PROPERTIES font_properties
Font properties structure.
Definition: d4d_string.h:95
#define D4D_SCR_F_BEVEL
The screen has bevel.
Definition: d4d_screen.h:104
void D4D_SetScreenTextProperties(const D4D_SCREEN *pScreen, D4D_TEXT_PROPERTIES property)
The function sets the screen text properties.
Definition: d4d_screen.c:519
Byte D4D_FONT_PROPERTIES
Definition: d4d_font.h:116
D4D_FONT_SIZE D4D_GetFontHeight(D4D_FONT ix)
Definition: d4d_font.c:381
D4D_BOOL D4D_ScrCheckCoor(D4D_SCREEN *pScreen, D4D_POINT *point)
The function check if the coordination are in screen area.
Definition: d4d_screen.c:634
void D4D_MoveTo(D4D_POINT *ppt)
Function move logic cursor to new position.
struct D4D_STRING_S textBuff
Screen title bar text buffer.
Definition: d4d_screen.h:179
#define D4D_SCR_EXITBTN_CROSS_SIZE
This is screen exit button cross minimal size definition. If not defined, it sets to 2 pixels as a de...
Definition: d4d_screen.h:83
#define D4D_SCR_F_OUTLINE
The screen has out line.
Definition: d4d_screen.h:103
D4D_COOR top
Margin of top side.
Definition: d4d_types.h:247
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.
Type definition of eGUI client area margin structure.
Definition: d4d_types.h:244
D4D_BOOL D4D_IsEnabled(D4D_OBJECT *pObject)
Function find out if the object is enabled or not.
Definition: d4d_object.c:303
D4D_POINT D4D_GetScreenToClientPoint(D4D_OBJECT *pObject, D4D_POINT *nScreenPoint)
The function convert global screen point on the screen to the client point.
Definition: d4d_screen.c:586
The screen run time data type. It used to internal store the runtime data by eGUI.
Definition: d4d_screen.h:152
D4D_OBJECT * D4D_FindPreviousObject(D4D_OBJECT *pObject, D4D_BOOL childrenAlso)
Definition: d4d_object.c:697
static D4D_OBJECT * D4D_FindObject(const D4D_SCREEN *pScreen, D4D_OBJECT_PTR pObject)
Definition: d4d_screen.c:676