NXP
/
rt1050_emwin_gui_demo
RT1050 GUI demo using emWin library
emwin/emWin_header/CHECKBOX_Private.h@0:dd702039127a, 2018-09-20 (annotated)
- Committer:
- alejandroRL
- Date:
- Thu Sep 20 19:16:34 2018 +0000
- Revision:
- 0:dd702039127a
emWin GUI Demo for RT1050
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
alejandroRL | 0:dd702039127a | 1 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 2 | * SEGGER Microcontroller GmbH & Co. KG * |
alejandroRL | 0:dd702039127a | 3 | * Solutions for real time microcontroller applications * |
alejandroRL | 0:dd702039127a | 4 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 5 | * * |
alejandroRL | 0:dd702039127a | 6 | * (c) 1996 - 2016 SEGGER Microcontroller GmbH & Co. KG * |
alejandroRL | 0:dd702039127a | 7 | * * |
alejandroRL | 0:dd702039127a | 8 | * Internet: www.segger.com Support: support@segger.com * |
alejandroRL | 0:dd702039127a | 9 | * * |
alejandroRL | 0:dd702039127a | 10 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 11 | |
alejandroRL | 0:dd702039127a | 12 | ** emWin V5.38 - Graphical user interface for embedded applications ** |
alejandroRL | 0:dd702039127a | 13 | All Intellectual Property rights in the Software belongs to SEGGER. |
alejandroRL | 0:dd702039127a | 14 | emWin is protected by international copyright laws. Knowledge of the |
alejandroRL | 0:dd702039127a | 15 | source code may not be used to write a similar product. This file may |
alejandroRL | 0:dd702039127a | 16 | only be used in accordance with the following terms: |
alejandroRL | 0:dd702039127a | 17 | |
alejandroRL | 0:dd702039127a | 18 | The software has been licensed to NXP Semiconductors USA, Inc. whose |
alejandroRL | 0:dd702039127a | 19 | registered office is situated at 411 E. Plumeria Drive, San Jose, |
alejandroRL | 0:dd702039127a | 20 | CA 95134, USA solely for the purposes of creating libraries for |
alejandroRL | 0:dd702039127a | 21 | NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and |
alejandroRL | 0:dd702039127a | 22 | distributed under the terms and conditions of the NXP End User License |
alejandroRL | 0:dd702039127a | 23 | Agreement. |
alejandroRL | 0:dd702039127a | 24 | Full source code is available at: www.segger.com |
alejandroRL | 0:dd702039127a | 25 | |
alejandroRL | 0:dd702039127a | 26 | We appreciate your understanding and fairness. |
alejandroRL | 0:dd702039127a | 27 | ---------------------------------------------------------------------- |
alejandroRL | 0:dd702039127a | 28 | Licensing information |
alejandroRL | 0:dd702039127a | 29 | |
alejandroRL | 0:dd702039127a | 30 | Licensor: SEGGER Microcontroller Systems LLC |
alejandroRL | 0:dd702039127a | 31 | Licensed to: NXP Semiconductors, 1109 McKay Dr, M/S 76, San Jose, CA 95131, USA |
alejandroRL | 0:dd702039127a | 32 | Licensed SEGGER software: emWin |
alejandroRL | 0:dd702039127a | 33 | License number: GUI-00186 |
alejandroRL | 0:dd702039127a | 34 | License model: emWin License Agreement, dated August 20th 2011 |
alejandroRL | 0:dd702039127a | 35 | Licensed product: - |
alejandroRL | 0:dd702039127a | 36 | Licensed platform: NXP's ARM 7/9, Cortex-M0,M3,M4 |
alejandroRL | 0:dd702039127a | 37 | Licensed number of seats: - |
alejandroRL | 0:dd702039127a | 38 | ---------------------------------------------------------------------- |
alejandroRL | 0:dd702039127a | 39 | File : CHECKBOX_Private.h |
alejandroRL | 0:dd702039127a | 40 | Purpose : CHECKBOX private header file |
alejandroRL | 0:dd702039127a | 41 | --------------------END-OF-HEADER------------------------------------- |
alejandroRL | 0:dd702039127a | 42 | */ |
alejandroRL | 0:dd702039127a | 43 | |
alejandroRL | 0:dd702039127a | 44 | #ifndef CHECKBOX_PRIVATE_H |
alejandroRL | 0:dd702039127a | 45 | #define CHECKBOX_PRIVATE_H |
alejandroRL | 0:dd702039127a | 46 | |
alejandroRL | 0:dd702039127a | 47 | #include "WM.h" |
alejandroRL | 0:dd702039127a | 48 | #include "WIDGET.h" |
alejandroRL | 0:dd702039127a | 49 | #include "CHECKBOX.h" |
alejandroRL | 0:dd702039127a | 50 | |
alejandroRL | 0:dd702039127a | 51 | #if GUI_WINSUPPORT |
alejandroRL | 0:dd702039127a | 52 | |
alejandroRL | 0:dd702039127a | 53 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 54 | * |
alejandroRL | 0:dd702039127a | 55 | * Defines |
alejandroRL | 0:dd702039127a | 56 | * |
alejandroRL | 0:dd702039127a | 57 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 58 | */ |
alejandroRL | 0:dd702039127a | 59 | #ifndef CHECKBOX_BKCOLOR0_DEFAULT |
alejandroRL | 0:dd702039127a | 60 | #define CHECKBOX_BKCOLOR0_DEFAULT 0x808080 /* Inactive color */ |
alejandroRL | 0:dd702039127a | 61 | #endif |
alejandroRL | 0:dd702039127a | 62 | |
alejandroRL | 0:dd702039127a | 63 | #ifndef CHECKBOX_BKCOLOR1_DEFAULT |
alejandroRL | 0:dd702039127a | 64 | #define CHECKBOX_BKCOLOR1_DEFAULT GUI_WHITE /* Active color */ |
alejandroRL | 0:dd702039127a | 65 | #endif |
alejandroRL | 0:dd702039127a | 66 | |
alejandroRL | 0:dd702039127a | 67 | #ifndef CHECKBOX_FGCOLOR0_DEFAULT |
alejandroRL | 0:dd702039127a | 68 | #define CHECKBOX_FGCOLOR0_DEFAULT 0x101010 |
alejandroRL | 0:dd702039127a | 69 | #endif |
alejandroRL | 0:dd702039127a | 70 | |
alejandroRL | 0:dd702039127a | 71 | #ifndef CHECKBOX_FGCOLOR1_DEFAULT |
alejandroRL | 0:dd702039127a | 72 | #define CHECKBOX_FGCOLOR1_DEFAULT GUI_BLACK |
alejandroRL | 0:dd702039127a | 73 | #endif |
alejandroRL | 0:dd702039127a | 74 | |
alejandroRL | 0:dd702039127a | 75 | #ifndef CHECKBOX_DEFAULT_SIZE |
alejandroRL | 0:dd702039127a | 76 | #define CHECKBOX_DEFAULT_SIZE 15 |
alejandroRL | 0:dd702039127a | 77 | #endif |
alejandroRL | 0:dd702039127a | 78 | |
alejandroRL | 0:dd702039127a | 79 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 80 | * |
alejandroRL | 0:dd702039127a | 81 | * Object definition |
alejandroRL | 0:dd702039127a | 82 | * |
alejandroRL | 0:dd702039127a | 83 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 84 | */ |
alejandroRL | 0:dd702039127a | 85 | typedef struct { |
alejandroRL | 0:dd702039127a | 86 | unsigned (* pfGetButtonSize)(void); |
alejandroRL | 0:dd702039127a | 87 | WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; |
alejandroRL | 0:dd702039127a | 88 | } CHECKBOX_SKIN_PRIVATE; |
alejandroRL | 0:dd702039127a | 89 | |
alejandroRL | 0:dd702039127a | 90 | typedef struct { |
alejandroRL | 0:dd702039127a | 91 | const GUI_FONT * pFont; |
alejandroRL | 0:dd702039127a | 92 | GUI_COLOR aBkColorBox[2]; /* Colors used to draw the box background */ |
alejandroRL | 0:dd702039127a | 93 | GUI_COLOR BkColor; /* Widget background color */ |
alejandroRL | 0:dd702039127a | 94 | GUI_COLOR TextColor; |
alejandroRL | 0:dd702039127a | 95 | GUI_COLOR FocusColor; |
alejandroRL | 0:dd702039127a | 96 | CHECKBOX_SKIN_PRIVATE SkinPrivate; |
alejandroRL | 0:dd702039127a | 97 | I16 Align; |
alejandroRL | 0:dd702039127a | 98 | U8 Spacing; |
alejandroRL | 0:dd702039127a | 99 | const GUI_BITMAP * apBm[6]; |
alejandroRL | 0:dd702039127a | 100 | } CHECKBOX_PROPS; |
alejandroRL | 0:dd702039127a | 101 | |
alejandroRL | 0:dd702039127a | 102 | typedef struct { |
alejandroRL | 0:dd702039127a | 103 | WIDGET Widget; |
alejandroRL | 0:dd702039127a | 104 | CHECKBOX_PROPS Props; |
alejandroRL | 0:dd702039127a | 105 | WIDGET_SKIN const * pWidgetSkin; |
alejandroRL | 0:dd702039127a | 106 | U8 NumStates; |
alejandroRL | 0:dd702039127a | 107 | U8 CurrentState; |
alejandroRL | 0:dd702039127a | 108 | WM_HMEM hpText; |
alejandroRL | 0:dd702039127a | 109 | U32 ButtonSize; |
alejandroRL | 0:dd702039127a | 110 | } CHECKBOX_Obj; |
alejandroRL | 0:dd702039127a | 111 | |
alejandroRL | 0:dd702039127a | 112 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 113 | * |
alejandroRL | 0:dd702039127a | 114 | * Macros for internal use |
alejandroRL | 0:dd702039127a | 115 | * |
alejandroRL | 0:dd702039127a | 116 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 117 | */ |
alejandroRL | 0:dd702039127a | 118 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL |
alejandroRL | 0:dd702039127a | 119 | #define CHECKBOX_INIT_ID(p) (p->Widget.DebugId = CHECKBOX_ID) |
alejandroRL | 0:dd702039127a | 120 | #else |
alejandroRL | 0:dd702039127a | 121 | #define CHECKBOX_INIT_ID(p) |
alejandroRL | 0:dd702039127a | 122 | #endif |
alejandroRL | 0:dd702039127a | 123 | |
alejandroRL | 0:dd702039127a | 124 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL |
alejandroRL | 0:dd702039127a | 125 | CHECKBOX_Obj * CHECKBOX_LockH(CHECKBOX_Handle h); |
alejandroRL | 0:dd702039127a | 126 | #define CHECKBOX_LOCK_H(h) CHECKBOX_LockH(h) |
alejandroRL | 0:dd702039127a | 127 | #else |
alejandroRL | 0:dd702039127a | 128 | #define CHECKBOX_LOCK_H(h) (CHECKBOX_Obj *)GUI_LOCK_H(h) |
alejandroRL | 0:dd702039127a | 129 | #endif |
alejandroRL | 0:dd702039127a | 130 | |
alejandroRL | 0:dd702039127a | 131 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 132 | * |
alejandroRL | 0:dd702039127a | 133 | * Private functions |
alejandroRL | 0:dd702039127a | 134 | * |
alejandroRL | 0:dd702039127a | 135 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 136 | */ |
alejandroRL | 0:dd702039127a | 137 | unsigned CHECKBOX__GetButtonSize(void); |
alejandroRL | 0:dd702039127a | 138 | |
alejandroRL | 0:dd702039127a | 139 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 140 | * |
alejandroRL | 0:dd702039127a | 141 | * Public data (internal defaults) |
alejandroRL | 0:dd702039127a | 142 | * |
alejandroRL | 0:dd702039127a | 143 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 144 | */ |
alejandroRL | 0:dd702039127a | 145 | extern CHECKBOX_PROPS CHECKBOX__DefaultProps; |
alejandroRL | 0:dd702039127a | 146 | |
alejandroRL | 0:dd702039127a | 147 | extern const WIDGET_SKIN CHECKBOX__SkinClassic; |
alejandroRL | 0:dd702039127a | 148 | extern WIDGET_SKIN CHECKBOX__Skin; |
alejandroRL | 0:dd702039127a | 149 | |
alejandroRL | 0:dd702039127a | 150 | extern WIDGET_SKIN const * CHECKBOX__pSkinDefault; |
alejandroRL | 0:dd702039127a | 151 | |
alejandroRL | 0:dd702039127a | 152 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 153 | * |
alejandroRL | 0:dd702039127a | 154 | * Extern data |
alejandroRL | 0:dd702039127a | 155 | * |
alejandroRL | 0:dd702039127a | 156 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 157 | */ |
alejandroRL | 0:dd702039127a | 158 | extern const GUI_BITMAP CHECKBOX__abmCheck[2]; |
alejandroRL | 0:dd702039127a | 159 | |
alejandroRL | 0:dd702039127a | 160 | #endif /* GUI_WINSUPPORT */ |
alejandroRL | 0:dd702039127a | 161 | #endif /* CHECKBOX_PRIVATE_H */ |
alejandroRL | 0:dd702039127a | 162 | |
alejandroRL | 0:dd702039127a | 163 | /*************************** End of file ****************************/ |