Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
Embed:
(wiki syntax)
Show/hide line numbers
LISTBOX_Private.h
00001 /********************************************************************* 00002 * SEGGER Software GmbH * 00003 * Solutions for real time microcontroller applications * 00004 ********************************************************************** 00005 * * 00006 * (c) 1996 - 2018 SEGGER Microcontroller GmbH * 00007 * * 00008 * Internet: www.segger.com Support: support@segger.com * 00009 * * 00010 ********************************************************************** 00011 00012 ** emWin V5.48 - Graphical user interface for embedded applications ** 00013 All Intellectual Property rights in the Software belongs to SEGGER. 00014 emWin is protected by international copyright laws. Knowledge of the 00015 source code may not be used to write a similar product. This file may 00016 only be used in accordance with the following terms: 00017 00018 The software has been licensed by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan 00019 for the purposes of creating libraries for its 00020 Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation 00021 under the terms and conditions of an End User 00022 License Agreement supplied with the libraries. 00023 Full source code is available at: www.segger.com 00024 00025 We appreciate your understanding and fairness. 00026 ---------------------------------------------------------------------- 00027 Licensing information 00028 Licensor: SEGGER Software GmbH 00029 Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan 00030 Licensed SEGGER software: emWin 00031 License number: GUI-00735 00032 License model: emWin License Agreement, signed February 27, 2018 00033 Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation 00034 ---------------------------------------------------------------------- 00035 Support and Update Agreement (SUA) 00036 SUA period: 2018-03-26 - 2019-03-27 00037 Contact to extend SUA: sales@segger.com 00038 ---------------------------------------------------------------------- 00039 File : LISTBOX_Private.h 00040 Purpose : Private LISTBOX include 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef LISTBOX_PRIVATE_H 00045 #define LISTBOX_PRIVATE_H 00046 00047 #include "LISTBOX.h" 00048 #include "WM.h" 00049 #include "GUI_ARRAY.h" 00050 #include "WIDGET.h" 00051 00052 #if GUI_WINSUPPORT 00053 00054 /********************************************************************* 00055 * 00056 * Defines 00057 * 00058 ********************************************************************** 00059 */ 00060 #define LISTBOX_ITEM_SELECTED (1 << 0) 00061 #define LISTBOX_ITEM_DISABLED (1 << 1) 00062 00063 /********************************************************************* 00064 * 00065 * Object definition 00066 * 00067 ********************************************************************** 00068 */ 00069 00070 typedef struct { 00071 U16 xSize, ySize; 00072 I32 ItemPosY; 00073 U8 Status; 00074 char acText[1]; 00075 } LISTBOX_ITEM; 00076 00077 typedef struct { 00078 const GUI_FONT * pFont; 00079 U16 ScrollStepH; 00080 GUI_COLOR aBackColor[4]; 00081 GUI_COLOR aTextColor[4]; 00082 GUI_COLOR aScrollbarColor[3]; 00083 I16 Align; 00084 } LISTBOX_PROPS; 00085 00086 typedef struct { 00087 WIDGET Widget; 00088 GUI_ARRAY ItemArray; 00089 WIDGET_DRAW_ITEM_FUNC* pfDrawItem; 00090 WM_SCROLL_STATE ScrollStateV; 00091 WM_SCROLL_STATE ScrollStateH; 00092 LISTBOX_PROPS Props; 00093 WM_HWIN hOwner; 00094 I16 Sel; /* current selection */ 00095 U8 Flags; 00096 U8 ScrollbarWidth; 00097 U16 ItemSpacing; 00098 U16 ContentSizeX; 00099 U16 FixedScrollPos; 00100 } LISTBOX_Obj; 00101 00102 /********************************************************************* 00103 * 00104 * Macros for internal use 00105 * 00106 ********************************************************************** 00107 */ 00108 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00109 #define LISTBOX_INIT_ID(p) p->Widget.DebugId = LISTBOX_ID 00110 #else 00111 #define LISTBOX_INIT_ID(p) 00112 #endif 00113 00114 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00115 LISTBOX_Obj * LISTBOX_LockH(LISTBOX_Handle h); 00116 #define LISTBOX_LOCK_H(h) LISTBOX_LockH(h) 00117 #else 00118 #define LISTBOX_LOCK_H(h) (LISTBOX_Obj *)GUI_LOCK_H(h) 00119 #endif 00120 00121 /********************************************************************* 00122 * 00123 * Private (module internal) data 00124 * 00125 ********************************************************************** 00126 */ 00127 00128 extern LISTBOX_PROPS LISTBOX_DefaultProps; 00129 00130 /********************************************************************* 00131 * 00132 * Private (module internal) functions 00133 * 00134 ********************************************************************** 00135 */ 00136 unsigned LISTBOX__GetNumItems (const LISTBOX_Obj * pObj); 00137 const char * LISTBOX__GetpStringLocked (LISTBOX_Handle hObj, int Index, LISTBOX_ITEM ** ppItem); 00138 void LISTBOX__InvalidateInsideArea (LISTBOX_Handle hObj); 00139 void LISTBOX__InvalidateItem (LISTBOX_Handle hObj, int Sel); 00140 void LISTBOX__InvalidateItemAndBelow(LISTBOX_Handle hObj, int Sel); 00141 void LISTBOX__InvalidateItemSize (const LISTBOX_Obj * pObj, unsigned Index); 00142 void LISTBOX__SetScrollbarColor (LISTBOX_Handle hObj, const LISTBOX_Obj * pObj); 00143 void LISTBOX__SetScrollbarWidth (LISTBOX_Handle hObj, const LISTBOX_Obj * pObj); 00144 void LISTBOX__AddSize (LISTBOX_Obj * pObj, int Index); 00145 00146 #endif /* GUI_WINSUPPORT */ 00147 00148 #else /* Avoid problems with empty object modules */ 00149 void LISTBOX_C(void) {} 00150 #endif 00151 00152 /*************************** End of file ****************************/
Generated on Mon Mar 4 2024 07:48:13 by 1.7.2