Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
Embed:
(wiki syntax)
Show/hide line numbers
LISTVIEW.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 : LISTVIEW.h 00040 Purpose : LISTVIEW include 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef LISTVIEW_H 00045 #define LISTVIEW_H 00046 00047 #include "WM.h" 00048 #include "DIALOG_Intern.h" // Req. for Create indirect data structure 00049 #include "ICONVIEW.h" 00050 #include "HEADER.h" 00051 00052 #if GUI_WINSUPPORT 00053 00054 #if defined(__cplusplus) 00055 extern "C" { /* Make sure we have C-declarations in C++ programs */ 00056 #endif 00057 00058 /********************************************************************* 00059 * 00060 * Defines 00061 */ 00062 #define LISTVIEW_ALL_ITEMS -1 00063 00064 /********************************************************************* 00065 * 00066 * Color indices 00067 */ 00068 #define LISTVIEW_CI_UNSEL 0 00069 #define LISTVIEW_CI_SEL 1 00070 #define LISTVIEW_CI_SELFOCUS 2 00071 #define LISTVIEW_CI_DISABLED 3 00072 00073 /************************************************************ 00074 * 00075 * Create / Status flags 00076 */ 00077 #define LISTVIEW_CF_AUTOSCROLLBAR_H (1 << 0) 00078 #define LISTVIEW_CF_AUTOSCROLLBAR_V (1 << 1) 00079 #define LISTVIEW_CF_CELL_SELECT (1 << 2) // Create Flag used to enable cell selection 00080 #define LISTVIEW_SF_AUTOSCROLLBAR_H LISTVIEW_CF_AUTOSCROLLBAR_H 00081 #define LISTVIEW_SF_AUTOSCROLLBAR_V LISTVIEW_CF_AUTOSCROLLBAR_V 00082 00083 /********************************************************************* 00084 * 00085 * Public Types 00086 * 00087 ********************************************************************** 00088 */ 00089 typedef WM_HMEM LISTVIEW_Handle; 00090 00091 /********************************************************************* 00092 * 00093 * Create functions 00094 * 00095 ********************************************************************** 00096 */ 00097 LISTVIEW_Handle LISTVIEW_Create (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, int SpecialFlags); 00098 LISTVIEW_Handle LISTVIEW_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id); 00099 LISTVIEW_Handle LISTVIEW_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes); 00100 LISTVIEW_Handle LISTVIEW_CreateAttached(WM_HWIN hParent, int Id, int SpecialFlags); 00101 LISTVIEW_Handle LISTVIEW_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); 00102 00103 /********************************************************************* 00104 * 00105 * The callback ... 00106 * 00107 * Do not call it directly ! It is only to be used from within an 00108 * overwritten callback. 00109 */ 00110 void LISTVIEW_Callback(WM_MESSAGE * pMsg); 00111 00112 /********************************************************************* 00113 * 00114 * Member functions 00115 * 00116 ********************************************************************** 00117 */ 00118 int LISTVIEW_AddColumn (LISTVIEW_Handle hObj, int Width, const char * s, int Align); 00119 int LISTVIEW_AddRow (LISTVIEW_Handle hObj, const GUI_ConstString * ppText); 00120 int LISTVIEW_CompareText (const void * p0, const void * p1); 00121 int LISTVIEW_CompareDec (const void * p0, const void * p1); 00122 void LISTVIEW_DecSel (LISTVIEW_Handle hObj); 00123 void LISTVIEW_DeleteAllRows (LISTVIEW_Handle hObj); 00124 void LISTVIEW_DeleteColumn (LISTVIEW_Handle hObj, unsigned Index); 00125 void LISTVIEW_DeleteRow (LISTVIEW_Handle hObj, unsigned Index); 00126 void LISTVIEW_DeleteRowSorted (LISTVIEW_Handle hObj, int Row); 00127 void LISTVIEW_DisableRow (LISTVIEW_Handle hObj, unsigned Row); 00128 void LISTVIEW_DisableSort (LISTVIEW_Handle hObj); 00129 void LISTVIEW_EnableCellSelect (LISTVIEW_Handle hObj, unsigned OnOff); // Enables/disables cell selection 00130 void LISTVIEW_EnableRow (LISTVIEW_Handle hObj, unsigned Row); 00131 void LISTVIEW_EnableSort (LISTVIEW_Handle hObj); 00132 GUI_COLOR LISTVIEW_GetBkColor (LISTVIEW_Handle hObj, unsigned Index); 00133 const GUI_FONT * LISTVIEW_GetFont (LISTVIEW_Handle hObj); 00134 HEADER_Handle LISTVIEW_GetHeader (LISTVIEW_Handle hObj); 00135 void LISTVIEW_GetItemRect (LISTVIEW_Handle hObj, U32 Col, U32 Row, GUI_RECT * pRect); 00136 void LISTVIEW_GetItemText (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, char * pBuffer, unsigned MaxSize); 00137 unsigned LISTVIEW_GetItemTextLen (LISTVIEW_Handle hObj, unsigned Column, unsigned Row); 00138 void LISTVIEW_GetItemTextSorted (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, char * pBuffer, unsigned MaxSize); 00139 unsigned LISTVIEW_GetLBorder (LISTVIEW_Handle hObj); 00140 unsigned LISTVIEW_GetNumColumns (LISTVIEW_Handle hObj); 00141 unsigned LISTVIEW_GetNumRows (LISTVIEW_Handle hObj); 00142 unsigned LISTVIEW_GetRBorder (LISTVIEW_Handle hObj); 00143 int LISTVIEW_GetSel (LISTVIEW_Handle hObj); 00144 int LISTVIEW_GetSelCol (LISTVIEW_Handle hObj); 00145 int LISTVIEW_GetSelUnsorted (LISTVIEW_Handle hObj); 00146 int LISTVIEW_GetTextAlign (LISTVIEW_Handle hObj, unsigned ColIndex); 00147 GUI_COLOR LISTVIEW_GetTextColor (LISTVIEW_Handle hObj, unsigned Index); 00148 int LISTVIEW_GetUserData (LISTVIEW_Handle hObj, void * pDest, int NumBytes); 00149 U32 LISTVIEW_GetUserDataRow (LISTVIEW_Handle hObj, unsigned Row); 00150 GUI_WRAPMODE LISTVIEW_GetWrapMode (LISTVIEW_Handle hObj); 00151 void LISTVIEW_IncSel (LISTVIEW_Handle hObj); 00152 int LISTVIEW_InsertRow (LISTVIEW_Handle hObj, unsigned Index, const GUI_ConstString * ppText); 00153 int LISTVIEW_OwnerDraw (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo); 00154 unsigned LISTVIEW_RowIsDisabled (LISTVIEW_Handle hObj, unsigned Row); 00155 void LISTVIEW_SetAutoScrollH (LISTVIEW_Handle hObj, int OnOff); 00156 void LISTVIEW_SetAutoScrollV (LISTVIEW_Handle hObj, int OnOff); 00157 void LISTVIEW_SetItemBitmap (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, int xOff, int yOff, const GUI_BITMAP * pBitmap); 00158 void LISTVIEW_SetBkColor (LISTVIEW_Handle hObj, unsigned int Index, GUI_COLOR Color); 00159 void LISTVIEW_SetColumnWidth (LISTVIEW_Handle hObj, unsigned int Index, int Width); 00160 void LISTVIEW_SetCompareFunc (LISTVIEW_Handle hObj, unsigned Column, int (* fpCompare)(const void * p0, const void * p1)); 00161 unsigned LISTVIEW_SetFixed (LISTVIEW_Handle hObj, unsigned Fixed); 00162 void LISTVIEW_SetFont (LISTVIEW_Handle hObj, const GUI_FONT * pFont); 00163 int LISTVIEW_SetGridVis (LISTVIEW_Handle hObj, int Show); 00164 void LISTVIEW_SetHeaderHeight (LISTVIEW_Handle hObj, unsigned HeaderHeight); 00165 void LISTVIEW_SetItemBkColor (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, unsigned int Index, GUI_COLOR Color); 00166 void LISTVIEW_SetItemText (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, const char * s); 00167 void LISTVIEW_SetItemTextColor (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, unsigned int Index, GUI_COLOR Color); 00168 void LISTVIEW_SetItemTextSorted (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, const char * pText); 00169 void LISTVIEW_SetLBorder (LISTVIEW_Handle hObj, unsigned BorderSize); 00170 void LISTVIEW_SetOwnerDraw (LISTVIEW_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawItem); 00171 void LISTVIEW_SetRBorder (LISTVIEW_Handle hObj, unsigned BorderSize); 00172 unsigned LISTVIEW_SetRowHeight (LISTVIEW_Handle hObj, unsigned RowHeight); 00173 void LISTVIEW_SetSel (LISTVIEW_Handle hObj, int Sel); 00174 void LISTVIEW_SetSelCol (LISTVIEW_Handle hObj, int NewCol); 00175 void LISTVIEW_SetSelUnsorted (LISTVIEW_Handle hObj, int Sel); 00176 unsigned LISTVIEW_SetSort (LISTVIEW_Handle hObj, unsigned Column, unsigned Reverse); 00177 void LISTVIEW_SetTextAlign (LISTVIEW_Handle hObj, unsigned int Index, int Align); 00178 void LISTVIEW_SetTextColor (LISTVIEW_Handle hObj, unsigned int Index, GUI_COLOR Color); 00179 int LISTVIEW_SetUserData (LISTVIEW_Handle hObj, const void * pSrc, int NumBytes); 00180 void LISTVIEW_SetUserDataRow (LISTVIEW_Handle hObj, unsigned Row, U32 UserData); 00181 void LISTVIEW_SetWrapMode (LISTVIEW_Handle hObj, GUI_WRAPMODE WrapMode); 00182 00183 /********************************************************************* 00184 * 00185 * Managing default values 00186 * 00187 ********************************************************************** 00188 */ 00189 00190 GUI_COLOR LISTVIEW_SetDefaultBkColor (unsigned Index, GUI_COLOR Color); 00191 const GUI_FONT * LISTVIEW_SetDefaultFont (const GUI_FONT * pFont); 00192 GUI_COLOR LISTVIEW_SetDefaultGridColor(GUI_COLOR Color); 00193 GUI_COLOR LISTVIEW_SetDefaultTextColor(unsigned Index, GUI_COLOR Color); 00194 00195 #if defined(__cplusplus) 00196 } 00197 #endif 00198 00199 #endif // GUI_WINSUPPORT 00200 #endif // LISTVIEW_H 00201 00202 /*************************** End of file ****************************/
Generated on Mon Mar 4 2024 07:48:13 by 1.7.2