NuMaker emWin HMI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ICONVIEW_Private.h Source File

ICONVIEW_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        : ICONVIEW_Private.h
00040 Purpose     : ICONVIEW private header file
00041 --------------------END-OF-HEADER-------------------------------------
00042 */
00043 
00044 #ifndef ICONVIEW_PRIVATE_H
00045 #define ICONVIEW_PRIVATE_H
00046 
00047 #include "WM.h"
00048 #include "GUI_ARRAY.h"
00049 #include "ICONVIEW.h"
00050 
00051 #if GUI_WINSUPPORT
00052 
00053 #if defined(__cplusplus)
00054   extern "C" {             // Make sure we have C-declarations in C++ programs
00055 #endif
00056 
00057 /*********************************************************************
00058 *
00059 *       Types
00060 *
00061 **********************************************************************
00062 */
00063 typedef struct {
00064   const GUI_FONT * pFont;
00065   GUI_COLOR        aBkColor[3];
00066   GUI_COLOR        aTextColor[3];
00067   int              FrameX, FrameY;
00068   int              SpaceX, SpaceY;
00069   int              TextAlign;
00070   int              IconAlign;
00071   GUI_WRAPMODE     WrapMode;
00072 } ICONVIEW_PROPS;
00073 
00074 typedef struct {
00075   WIDGET                  Widget;
00076   WM_SCROLL_STATE         ScrollStateV;
00077   WM_SCROLL_STATE         ScrollStateH;
00078   ICONVIEW_PROPS          Props;
00079   GUI_ARRAY               ItemArray;
00080   int                     xSizeItems;
00081   int                     ySizeItems;
00082   int                     Sel;
00083   U16                     Flags;
00084   WIDGET_DRAW_ITEM_FUNC * pfDrawItem;
00085   int                     ReleasedItem;
00086 } ICONVIEW_OBJ;
00087 
00088 typedef void tDrawImage    (const void * pData, GUI_GET_DATA_FUNC * pfGetData, int xPos, int yPos);
00089 typedef void tDrawText     (ICONVIEW_OBJ * pObj, GUI_RECT * pRect, const char * s);
00090 typedef void tGetImageSizes(const void * pData, GUI_GET_DATA_FUNC * pfGetData, int * xSize, int * ySize);
00091 
00092 typedef struct {
00093   tDrawImage        * pfDrawImage;
00094   tDrawText         * pfDrawText;
00095   tGetImageSizes    * pfGetImageSizes;
00096   GUI_GET_DATA_FUNC * pfGetData;
00097   const void        * pData;
00098   U32                 UserData;
00099   int                 SizeOfData;
00100   char                acText[1];
00101 } ICONVIEW_ITEM;
00102 
00103 /*********************************************************************
00104 *
00105 *       Macros for internal use
00106 *
00107 **********************************************************************
00108 */
00109 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00110   #define ICONVIEW_INIT_ID(p) (p->Widget.DebugId = ICONVIEW_ID)
00111 #else
00112   #define ICONVIEW_INIT_ID(p)
00113 #endif
00114 
00115 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00116   ICONVIEW_OBJ * ICONVIEW_LockH(ICONVIEW_Handle h);
00117   #define ICONVIEW_LOCK_H(h)   ICONVIEW_LockH(h)
00118 #else
00119   #define ICONVIEW_LOCK_H(h)   (ICONVIEW_OBJ *)GUI_LOCK_H(h)
00120 #endif
00121 
00122 /*********************************************************************
00123 *
00124 *       Private functions
00125 *
00126 **********************************************************************
00127 */
00128 void ICONVIEW__DrawText        (ICONVIEW_OBJ    * pObj, GUI_RECT * pRect, const char * pText);
00129 void ICONVIEW__ManageAutoScroll(ICONVIEW_Handle   hObj);
00130 
00131 #if defined(__cplusplus)
00132   }
00133 #endif
00134 
00135 #endif  // GUI_WINSUPPORT
00136 #endif  // ICONVIEW_H
00137 
00138 /*************************** End of file ****************************/