NXP
/
rt1050_emwin_gui_demo
RT1050 GUI demo using emWin library
Embed:
(wiki syntax)
Show/hide line numbers
CHECKBOX_Private.h
00001 /********************************************************************* 00002 * SEGGER Microcontroller GmbH & Co. KG * 00003 * Solutions for real time microcontroller applications * 00004 ********************************************************************** 00005 * * 00006 * (c) 1996 - 2016 SEGGER Microcontroller GmbH & Co. KG * 00007 * * 00008 * Internet: www.segger.com Support: support@segger.com * 00009 * * 00010 ********************************************************************** 00011 00012 ** emWin V5.38 - 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 to NXP Semiconductors USA, Inc. whose 00019 registered office is situated at 411 E. Plumeria Drive, San Jose, 00020 CA 95134, USA solely for the purposes of creating libraries for 00021 NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and 00022 distributed under the terms and conditions of the NXP End User License 00023 Agreement. 00024 Full source code is available at: www.segger.com 00025 00026 We appreciate your understanding and fairness. 00027 ---------------------------------------------------------------------- 00028 Licensing information 00029 00030 Licensor: SEGGER Microcontroller Systems LLC 00031 Licensed to: NXP Semiconductors, 1109 McKay Dr, M/S 76, San Jose, CA 95131, USA 00032 Licensed SEGGER software: emWin 00033 License number: GUI-00186 00034 License model: emWin License Agreement, dated August 20th 2011 00035 Licensed product: - 00036 Licensed platform: NXP's ARM 7/9, Cortex-M0,M3,M4 00037 Licensed number of seats: - 00038 ---------------------------------------------------------------------- 00039 File : CHECKBOX_Private.h 00040 Purpose : CHECKBOX private header file 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef CHECKBOX_PRIVATE_H 00045 #define CHECKBOX_PRIVATE_H 00046 00047 #include "WM.h" 00048 #include "WIDGET.h" 00049 #include "CHECKBOX.h" 00050 00051 #if GUI_WINSUPPORT 00052 00053 /********************************************************************* 00054 * 00055 * Defines 00056 * 00057 ********************************************************************** 00058 */ 00059 #ifndef CHECKBOX_BKCOLOR0_DEFAULT 00060 #define CHECKBOX_BKCOLOR0_DEFAULT 0x808080 /* Inactive color */ 00061 #endif 00062 00063 #ifndef CHECKBOX_BKCOLOR1_DEFAULT 00064 #define CHECKBOX_BKCOLOR1_DEFAULT GUI_WHITE /* Active color */ 00065 #endif 00066 00067 #ifndef CHECKBOX_FGCOLOR0_DEFAULT 00068 #define CHECKBOX_FGCOLOR0_DEFAULT 0x101010 00069 #endif 00070 00071 #ifndef CHECKBOX_FGCOLOR1_DEFAULT 00072 #define CHECKBOX_FGCOLOR1_DEFAULT GUI_BLACK 00073 #endif 00074 00075 #ifndef CHECKBOX_DEFAULT_SIZE 00076 #define CHECKBOX_DEFAULT_SIZE 15 00077 #endif 00078 00079 /********************************************************************* 00080 * 00081 * Object definition 00082 * 00083 ********************************************************************** 00084 */ 00085 typedef struct { 00086 unsigned (* pfGetButtonSize)(void); 00087 WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; 00088 } CHECKBOX_SKIN_PRIVATE; 00089 00090 typedef struct { 00091 const GUI_FONT * pFont; 00092 GUI_COLOR aBkColorBox[2]; /* Colors used to draw the box background */ 00093 GUI_COLOR BkColor; /* Widget background color */ 00094 GUI_COLOR TextColor; 00095 GUI_COLOR FocusColor; 00096 CHECKBOX_SKIN_PRIVATE SkinPrivate; 00097 I16 Align; 00098 U8 Spacing; 00099 const GUI_BITMAP * apBm[6]; 00100 } CHECKBOX_PROPS; 00101 00102 typedef struct { 00103 WIDGET Widget; 00104 CHECKBOX_PROPS Props; 00105 WIDGET_SKIN const * pWidgetSkin; 00106 U8 NumStates; 00107 U8 CurrentState; 00108 WM_HMEM hpText; 00109 U32 ButtonSize; 00110 } CHECKBOX_Obj; 00111 00112 /********************************************************************* 00113 * 00114 * Macros for internal use 00115 * 00116 ********************************************************************** 00117 */ 00118 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00119 #define CHECKBOX_INIT_ID(p) (p->Widget.DebugId = CHECKBOX_ID) 00120 #else 00121 #define CHECKBOX_INIT_ID(p) 00122 #endif 00123 00124 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00125 CHECKBOX_Obj * CHECKBOX_LockH(CHECKBOX_Handle h); 00126 #define CHECKBOX_LOCK_H(h) CHECKBOX_LockH(h) 00127 #else 00128 #define CHECKBOX_LOCK_H(h) (CHECKBOX_Obj *)GUI_LOCK_H(h) 00129 #endif 00130 00131 /********************************************************************* 00132 * 00133 * Private functions 00134 * 00135 ********************************************************************** 00136 */ 00137 unsigned CHECKBOX__GetButtonSize(void); 00138 00139 /********************************************************************* 00140 * 00141 * Public data (internal defaults) 00142 * 00143 ********************************************************************** 00144 */ 00145 extern CHECKBOX_PROPS CHECKBOX__DefaultProps; 00146 00147 extern const WIDGET_SKIN CHECKBOX__SkinClassic; 00148 extern WIDGET_SKIN CHECKBOX__Skin; 00149 00150 extern WIDGET_SKIN const * CHECKBOX__pSkinDefault; 00151 00152 /********************************************************************* 00153 * 00154 * Extern data 00155 * 00156 ********************************************************************** 00157 */ 00158 extern const GUI_BITMAP CHECKBOX__abmCheck[2]; 00159 00160 #endif /* GUI_WINSUPPORT */ 00161 #endif /* CHECKBOX_PRIVATE_H */ 00162 00163 /*************************** End of file ****************************/
Generated on Tue Jul 12 2022 19:43:35 by 1.7.2