NuMaker emWin HMI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LISTWHEEL.h Source File

LISTWHEEL.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        : LISTWHEEL.h
00040 Purpose     : LISTWHEEL widget include
00041 --------------------END-OF-HEADER-------------------------------------
00042 */
00043 
00044 #ifndef LISTWHEEL_H
00045 #define LISTWHEEL_H
00046 
00047 #include "WM.h"
00048 #include "DIALOG_Intern.h"
00049 #include "WIDGET.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 *       Defines
00060 *
00061 **********************************************************************
00062 */
00063 #define LISTWHEEL_CI_UNSEL 0
00064 #define LISTWHEEL_CI_SEL   1
00065 
00066 /*********************************************************************
00067 *
00068 *       Types
00069 *
00070 **********************************************************************
00071 */
00072 typedef WM_HMEM LISTWHEEL_Handle;
00073 
00074 /*********************************************************************
00075 *
00076 *       Standard member functions
00077 *
00078 **********************************************************************
00079 */
00080 /*********************************************************************
00081 *
00082 *       Create functions
00083 *
00084 **********************************************************************
00085 */
00086 LISTWHEEL_Handle LISTWHEEL_Create        (const GUI_ConstString * ppText, int x0, int y0, int xSize, int ySize, int Flags);
00087 LISTWHEEL_Handle LISTWHEEL_CreateAsChild (const GUI_ConstString * ppText, WM_HWIN hWinParent, int x0, int y0, int xSize, int ySize, int Flags);
00088 LISTWHEEL_Handle LISTWHEEL_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
00089 LISTWHEEL_Handle LISTWHEEL_CreateEx      (int x0, int y0, int xSize, int ySize, WM_HWIN hParent,
00090                                           int WinFlags, int ExFlags, int Id, const GUI_ConstString * ppText);
00091 LISTWHEEL_Handle LISTWHEEL_CreateUser    (int x0, int y0, int xSize, int ySize, WM_HWIN hParent,
00092                                           int WinFlags, int ExFlags, int Id, const GUI_ConstString * ppText, int NumExtraBytes);
00093 
00094 /*********************************************************************
00095 *
00096 *       The callback ...
00097 *
00098 * Do not call it directly ! It is only to be used from within an
00099 * overwritten callback.
00100 */
00101 void LISTWHEEL_Callback(WM_MESSAGE * pMsg);
00102 
00103 /*********************************************************************
00104 *
00105 *       Member functions
00106 *
00107 **********************************************************************
00108 */
00109 void      LISTWHEEL_AddString      (LISTWHEEL_Handle hObj, const char * s);
00110 GUI_COLOR LISTWHEEL_GetBkColor     (LISTWHEEL_Handle hObj, unsigned int Index);
00111 void *    LISTWHEEL_GetItemData    (LISTWHEEL_Handle hObj, unsigned Index); /* not to be documented */
00112 void      LISTWHEEL_GetItemText    (LISTWHEEL_Handle hObj, unsigned Index, char * pBuffer, int MaxSize);
00113 int       LISTWHEEL_GetItemFromPos (LISTWHEEL_Handle hObj, int yPos);
00114 int       LISTWHEEL_GetLBorder     (LISTWHEEL_Handle hObj);
00115 unsigned  LISTWHEEL_GetLineHeight  (LISTWHEEL_Handle hObj);
00116 int       LISTWHEEL_GetNumItems    (LISTWHEEL_Handle hObj);
00117 int       LISTWHEEL_GetPos         (LISTWHEEL_Handle hObj);
00118 int       LISTWHEEL_GetRBorder     (LISTWHEEL_Handle hObj);
00119 int       LISTWHEEL_GetSel         (LISTWHEEL_Handle hObj);
00120 int       LISTWHEEL_GetSnapPosition(LISTWHEEL_Handle hObj);
00121 int       LISTWHEEL_GetTextAlign   (LISTWHEEL_Handle hObj);
00122 GUI_COLOR LISTWHEEL_GetTextColor   (LISTWHEEL_Handle hObj, unsigned int Index);
00123 int       LISTWHEEL_GetUserData    (LISTWHEEL_Handle hObj, void * pDest, int NumBytes);
00124 int       LISTWHEEL_IsMoving       (LISTWHEEL_Handle hObj);
00125 void      LISTWHEEL_MoveToPos      (LISTWHEEL_Handle hObj, unsigned int Index);
00126 int       LISTWHEEL_OwnerDraw      (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo);
00127 void      LISTWHEEL_SetBkColor     (LISTWHEEL_Handle hObj, unsigned int Index, GUI_COLOR Color);
00128 void      LISTWHEEL_SetDeceleration(LISTWHEEL_Handle hObj, unsigned Deceleration);
00129 void      LISTWHEEL_SetFont        (LISTWHEEL_Handle hObj, const GUI_FONT * pFont);
00130 void      LISTWHEEL_SetItemData    (LISTWHEEL_Handle hObj, unsigned Index, void * pData); /* not to be documented */
00131 void      LISTWHEEL_SetLBorder     (LISTWHEEL_Handle hObj, unsigned BorderSize);
00132 void      LISTWHEEL_SetLineHeight  (LISTWHEEL_Handle hObj, unsigned LineHeight);
00133 void      LISTWHEEL_SetOwnerDraw   (LISTWHEEL_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfOwnerDraw);
00134 void      LISTWHEEL_SetPos         (LISTWHEEL_Handle hObj, unsigned int Index);
00135 void      LISTWHEEL_SetRBorder     (LISTWHEEL_Handle hObj, unsigned BorderSize);
00136 void      LISTWHEEL_SetSel         (LISTWHEEL_Handle hObj, int Sel);
00137 void      LISTWHEEL_SetSnapPosition(LISTWHEEL_Handle hObj, int SnapPosition);
00138 void      LISTWHEEL_SetText        (LISTWHEEL_Handle hObj, const GUI_ConstString * ppText);
00139 void      LISTWHEEL_SetTextAlign   (LISTWHEEL_Handle hObj, int Align);
00140 void      LISTWHEEL_SetTextColor   (LISTWHEEL_Handle hObj, unsigned int Index, GUI_COLOR Color);
00141 void      LISTWHEEL_SetTimerPeriod (LISTWHEEL_Handle hObj, GUI_TIMER_TIME TimerPeriod);
00142 int       LISTWHEEL_SetUserData    (LISTWHEEL_Handle hObj, const void * pSrc, int NumBytes);
00143 void      LISTWHEEL_SetVelocity    (LISTWHEEL_Handle hObj, int Velocity);
00144 
00145 const GUI_FONT * LISTWHEEL_GetFont(LISTWHEEL_Handle hObj);
00146 
00147 #if defined(__cplusplus)
00148   }
00149 #endif
00150 
00151 #endif  // GUI_WINSUPPORT
00152 #endif  // LISTWHEEL_H
00153 
00154 /*************************** End of file ****************************/