RT1050 GUI demo using emWin library

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DROPDOWN_Private.h Source File

DROPDOWN_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        : 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