uEZ GUI Start Here Guide
UEZGUI-1788-43WQR
Rev. 1.11 Aug 31, 2016
Page 12
The remainder of the file contains the emWin event handler function and a window
setup function. Any callback function that is used for widgets will also be placed in this
section.
NOTE: Most of the code segments in this guide are formatted to be copied and pasted
to assist you in easily applying the code to your project.
1.
The “Start Here” text can be replaced with a button by modifying the existing code.
The definitions associated with the “Start Here” text are shown below:
NOTE: Each widget, including the window itself, has a unique ID defined as shown
above. Each additional widget increments by 1 and adding a new ID for an additional
widget is as simple as setting it to the next value. GUI_ID_USER is equal to 0x800 by
default and needs to be used to avoid conflicts with other areas of the program.
/*---------------------------------------------------------------------------*
* Constants:
*--------------------------------------------------------------------------*/
#define
ID_WINDOW (GUI_I 0x00)
#define
ID_TITLE_TEXT (GUI_I 0x01)
#define
ID_STARTHERE_TEXT (GUI_I 0x02)
#define
ID_FDIINFO_TEXT (GUI_I 0x03)
#define
WINDOW_XSIZE (UEZ_LCD_DISPLAY_WIDTH)
#define
WINDOW_YSIZE (UEZ_LCD_DISPLAY_HEIGHT)
#define
WINDOW_XPOS (0)
#define
WINDOW_YPOS (0)
#if
(UEZ_DEFAULT_LCD == LCD_RES_WVGA)
#define
SPACING (10)
#define
FONTSIZE &FONT_LARGE
#else
#define
SPACING (5)
#define
FONTSIZE &FONT_SMALL
#endif
#define
TITLE_TEXT_XSIZE (WINDOW_XSIZE)
#define
TITLE_TEXT_YSIZE ((WINDOW_YSIZE/10))
#define
TITLE_TEXT_XPOS (0)
#define
TITLE_TEXT_YPOS (0)
#define
STARTHERE_TEXT_XSIZE (WINDOW_XSIZE)
#define
STARTHERE_TEXT_YSIZE ((WINDOW_YSIZE/10))
#define
STARTHERE_TEXT_XPOS (0)
#define
STARTHERE_TEXT_YPOS ((WINDOW_YSIZE/10)*4 + 10)