NuMaker emWin HMI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DROPDOWN_Private.h Source File

DROPDOWN_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        : DROPDOWN_Private.h
00040 Purpose     : DROPDOWN private header file
00041 --------------------END-OF-HEADER-------------------------------------
00042 */
00043 
00044 #ifndef DROPDOWN_PRIVATE_H
00045 #define DROPDOWN_PRIVATE_H
00046 
00047 #include "DROPDOWN.h"
00048 #include "WIDGET.h"
00049 #include "GUI_ARRAY.h"
00050 
00051 #if GUI_WINSUPPORT
00052 
00053 /*********************************************************************
00054 *
00055 *       Defines
00056 *
00057 **********************************************************************
00058 */
00059 #define DROPDOWN_SF_AUTOSCROLLBAR DROPDOWN_CF_AUTOSCROLLBAR
00060 
00061 /*********************************************************************
00062 *
00063 *       Object definition
00064 *
00065 **********************************************************************
00066 */
00067 typedef struct {
00068   WIDGET_DRAW_ITEM_FUNC * pfDrawSkin;
00069 } DROPDOWN_SKIN_PRIVATE;
00070 
00071 typedef struct {
00072   const GUI_FONT * pFont;
00073   GUI_COLOR aBackColor[3];
00074   GUI_COLOR aTextColor[3];
00075   GUI_COLOR aColor[2];
00076   GUI_COLOR aScrollbarColor[3];
00077   DROPDOWN_SKIN_PRIVATE SkinPrivate;
00078   I16       TextBorderSize;
00079   I16       Align;
00080 } DROPDOWN_PROPS;
00081 
00082 typedef struct {
00083   WIDGET  Widget;
00084   I16     Sel;        // Current selection
00085   I16     ySizeLB;    // ySize of assigned LISTBOX in expanded state
00086   I16     TextHeight;
00087   GUI_ARRAY Handles;
00088   WM_SCROLL_STATE ScrollState;
00089   DROPDOWN_PROPS Props;
00090   WIDGET_SKIN const * pWidgetSkin;
00091   WM_HWIN hListWin;
00092   U8      Flags;
00093   U16     ItemSpacing;
00094   U8      ScrollbarWidth;
00095   char  IsPressed;
00096   WM_HMEM hDisabled;
00097 } DROPDOWN_Obj;
00098 
00099 /*********************************************************************
00100 *
00101 *       Macros for internal use
00102 *
00103 **********************************************************************
00104 */
00105 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00106   #define DROPDOWN_INIT_ID(p) (p->Widget.DebugId = DROPDOWN_ID)
00107 #else
00108   #define DROPDOWN_INIT_ID(p)
00109 #endif
00110 
00111 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00112   DROPDOWN_Obj * DROPDOWN_LockH(DROPDOWN_Handle h);
00113   #define DROPDOWN_LOCK_H(h)   DROPDOWN_LockH(h)
00114 #else
00115   #define DROPDOWN_LOCK_H(h)   (DROPDOWN_Obj *)GUI_LOCK_H(h)
00116 #endif
00117 
00118 /*********************************************************************
00119 *
00120 *       Private (module internal) data
00121 *
00122 **********************************************************************
00123 */
00124 
00125 extern DROPDOWN_PROPS DROPDOWN__DefaultProps;
00126 
00127 extern const WIDGET_SKIN DROPDOWN__SkinClassic;
00128 extern       WIDGET_SKIN DROPDOWN__Skin;
00129 
00130 extern WIDGET_SKIN const * DROPDOWN__pSkinDefault;
00131 
00132 /*********************************************************************
00133 *
00134 *       Private functions
00135 *
00136 **********************************************************************
00137 */
00138 
00139 void DROPDOWN__AdjustHeight(DROPDOWN_Handle hObj);
00140 int  DROPDOWN__GetNumItems (DROPDOWN_Obj * pObj);
00141 const char * DROPDOWN__GetpItemLocked(DROPDOWN_Handle hObj, int Index);
00142 
00143 #endif // GUI_WINSUPPORT
00144 #endif // DROPDOWN_PRIVATE_H
00145 
00146 /*************************** End of file ****************************/