Andrew Reed / Mbed OS CITY1082-i2c_master_wifi_mqtt
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CHECKBOX_Private.h Source File

CHECKBOX_Private.h

00001 /*********************************************************************
00002 *                SEGGER Microcontroller 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 to  Cypress Semiconductor Corporation,
00019 whose registered  office is situated  at 198 Champion Ct. San Jose, CA 
00020 95134 USA  solely for the  purposes of creating  libraries for Cypress
00021 PSoC3 and  PSoC5 processor-based devices,  sublicensed and distributed
00022 under  the  terms  and  conditions  of  the  Cypress  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 Licensor:                 SEGGER Microcontroller Systems LLC
00030 Licensed to:              Cypress Semiconductor Corp, 198 Champion Ct., San Jose, CA 95134, USA
00031 Licensed SEGGER software: emWin
00032 License number:           GUI-00319
00033 License model:            Services and License Agreement, signed June 10th, 2009
00034 Licensed platform:        Any Cypress platform (Initial targets are: PSoC3, PSoC5)
00035 ----------------------------------------------------------------------
00036 Support and Update Agreement (SUA)
00037 SUA period:               2009-06-12 - 2022-07-27
00038 Contact to extend SUA:    sales@segger.com
00039 ----------------------------------------------------------------------
00040 File        : CHECKBOX_Private.h
00041 Purpose     : CHECKBOX private header file
00042 --------------------END-OF-HEADER-------------------------------------
00043 */
00044 
00045 #ifndef CHECKBOX_PRIVATE_H
00046 #define CHECKBOX_PRIVATE_H
00047 
00048 #include "WM.h"
00049 #include "WIDGET.h"
00050 #include "CHECKBOX.h"
00051 
00052 #if GUI_WINSUPPORT
00053 
00054 /*********************************************************************
00055 *
00056 *       Defines
00057 *
00058 **********************************************************************
00059 */
00060 #ifndef   CHECKBOX_BKCOLOR0_DEFAULT
00061   #define CHECKBOX_BKCOLOR0_DEFAULT 0x808080           /* Inactive color */
00062 #endif
00063 
00064 #ifndef   CHECKBOX_BKCOLOR1_DEFAULT
00065   #define CHECKBOX_BKCOLOR1_DEFAULT GUI_WHITE          /* Active color */
00066 #endif
00067 
00068 #ifndef   CHECKBOX_FGCOLOR0_DEFAULT
00069   #define CHECKBOX_FGCOLOR0_DEFAULT 0x101010
00070 #endif
00071 
00072 #ifndef   CHECKBOX_FGCOLOR1_DEFAULT
00073   #define CHECKBOX_FGCOLOR1_DEFAULT GUI_BLACK
00074 #endif
00075 
00076 #ifndef   CHECKBOX_DEFAULT_SIZE
00077   #define CHECKBOX_DEFAULT_SIZE          15
00078 #endif
00079 
00080 /*********************************************************************
00081 *
00082 *       Object definition
00083 *
00084 **********************************************************************
00085 */
00086 typedef struct {
00087   unsigned              (* pfGetButtonSize)(void);
00088   WIDGET_DRAW_ITEM_FUNC  * pfDrawSkin;
00089 } CHECKBOX_SKIN_PRIVATE;
00090 
00091 typedef struct {
00092   const GUI_FONT      * pFont;
00093   GUI_COLOR             aBkColorBox[2]; /* Colors used to draw the box background */
00094   GUI_COLOR             BkColor;        /* Widget background color */
00095   GUI_COLOR             TextColor;
00096   GUI_COLOR             FocusColor;
00097   CHECKBOX_SKIN_PRIVATE SkinPrivate;
00098   I16                   Align;
00099   U8                    Spacing;
00100   const GUI_BITMAP    * apBm[6];
00101 } CHECKBOX_PROPS;
00102 
00103 typedef struct {
00104   WIDGET              Widget;
00105   CHECKBOX_PROPS      Props;
00106   WIDGET_SKIN const * pWidgetSkin;
00107   U8                  NumStates;
00108   U8                  CurrentState;
00109   WM_HMEM             hpText;
00110   U32                 ButtonSize;
00111 } CHECKBOX_Obj;
00112 
00113 /*********************************************************************
00114 *
00115 *       Macros for internal use
00116 *
00117 **********************************************************************
00118 */
00119 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00120   #define CHECKBOX_INIT_ID(p) (p->Widget.DebugId = CHECKBOX_ID)
00121 #else
00122   #define CHECKBOX_INIT_ID(p)
00123 #endif
00124 
00125 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00126   CHECKBOX_Obj * CHECKBOX_LockH(CHECKBOX_Handle h);
00127   #define CHECKBOX_LOCK_H(h)   CHECKBOX_LockH(h)
00128 #else
00129   #define CHECKBOX_LOCK_H(h)   (CHECKBOX_Obj *)GUI_LOCK_H(h)
00130 #endif
00131 
00132 /*********************************************************************
00133 *
00134 *       Private functions
00135 *
00136 **********************************************************************
00137 */
00138 unsigned CHECKBOX__GetButtonSize(void);
00139 
00140 /*********************************************************************
00141 *
00142 *       Public data (internal defaults)
00143 *
00144 **********************************************************************
00145 */
00146 extern CHECKBOX_PROPS      CHECKBOX__DefaultProps;
00147 
00148 extern const WIDGET_SKIN   CHECKBOX__SkinClassic;
00149 extern       WIDGET_SKIN   CHECKBOX__Skin;
00150 
00151 extern WIDGET_SKIN const * CHECKBOX__pSkinDefault;
00152 
00153 /*********************************************************************
00154 *
00155 *       Extern data
00156 *
00157 **********************************************************************
00158 */
00159 extern const GUI_BITMAP    CHECKBOX__abmCheck[2];
00160 
00161 #endif   /* GUI_WINSUPPORT */
00162 #endif   /* CHECKBOX_PRIVATE_H */
00163 
00164 /*************************** End of file ****************************/