Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
LISTVIEW.h
00001 /********************************************************************* 00002 * SEGGER Microcontroller 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 to Cypress Semiconductor Corporation, 00019 whose registered office is situated at 198 Champion Ct. San Jose, CA 00020 95134 USA solely for the purposes of creating libraries for Cypress 00021 PSoC3 and PSoC5 processor-based devices, sublicensed and distributed 00022 under the terms and conditions of the Cypress 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 Licensor: SEGGER Microcontroller Systems LLC 00030 Licensed to: Cypress Semiconductor Corp, 198 Champion Ct., San Jose, CA 95134, USA 00031 Licensed SEGGER software: emWin 00032 License number: GUI-00319 00033 License model: Services and License Agreement, signed June 10th, 2009 00034 Licensed platform: Any Cypress platform (Initial targets are: PSoC3, PSoC5) 00035 ---------------------------------------------------------------------- 00036 Support and Update Agreement (SUA) 00037 SUA period: 2009-06-12 - 2022-07-27 00038 Contact to extend SUA: sales@segger.com 00039 ---------------------------------------------------------------------- 00040 File : LISTVIEW.h 00041 Purpose : LISTVIEW include 00042 --------------------END-OF-HEADER------------------------------------- 00043 */ 00044 00045 #ifndef LISTVIEW_H 00046 #define LISTVIEW_H 00047 00048 #include "WM.h" 00049 #include "DIALOG_Intern.h" // Req. for Create indirect data structure 00050 #include "ICONVIEW.h" 00051 #include "HEADER.h" 00052 00053 #if GUI_WINSUPPORT 00054 00055 #if defined(__cplusplus) 00056 extern "C" { /* Make sure we have C-declarations in C++ programs */ 00057 #endif 00058 00059 /********************************************************************* 00060 * 00061 * Defines 00062 */ 00063 #define LISTVIEW_ALL_ITEMS -1 00064 00065 /********************************************************************* 00066 * 00067 * Color indices 00068 */ 00069 #define LISTVIEW_CI_UNSEL 0 00070 #define LISTVIEW_CI_SEL 1 00071 #define LISTVIEW_CI_SELFOCUS 2 00072 #define LISTVIEW_CI_DISABLED 3 00073 00074 /************************************************************ 00075 * 00076 * Create / Status flags 00077 */ 00078 #define LISTVIEW_CF_AUTOSCROLLBAR_H (1 << 0) 00079 #define LISTVIEW_CF_AUTOSCROLLBAR_V (1 << 1) 00080 #define LISTVIEW_CF_CELL_SELECT (1 << 2) // Create Flag used to enable cell selection 00081 #define LISTVIEW_SF_AUTOSCROLLBAR_H LISTVIEW_CF_AUTOSCROLLBAR_H 00082 #define LISTVIEW_SF_AUTOSCROLLBAR_V LISTVIEW_CF_AUTOSCROLLBAR_V 00083 00084 /********************************************************************* 00085 * 00086 * Public Types 00087 * 00088 ********************************************************************** 00089 */ 00090 typedef WM_HMEM LISTVIEW_Handle; 00091 00092 /********************************************************************* 00093 * 00094 * Create functions 00095 * 00096 ********************************************************************** 00097 */ 00098 LISTVIEW_Handle LISTVIEW_Create (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, int SpecialFlags); 00099 LISTVIEW_Handle LISTVIEW_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id); 00100 LISTVIEW_Handle LISTVIEW_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes); 00101 LISTVIEW_Handle LISTVIEW_CreateAttached(WM_HWIN hParent, int Id, int SpecialFlags); 00102 LISTVIEW_Handle LISTVIEW_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); 00103 00104 /********************************************************************* 00105 * 00106 * The callback ... 00107 * 00108 * Do not call it directly ! It is only to be used from within an 00109 * overwritten callback. 00110 */ 00111 void LISTVIEW_Callback(WM_MESSAGE * pMsg); 00112 00113 /********************************************************************* 00114 * 00115 * Member functions 00116 * 00117 ********************************************************************** 00118 */ 00119 int LISTVIEW_AddColumn (LISTVIEW_Handle hObj, int Width, const char * s, int Align); 00120 int LISTVIEW_AddRow (LISTVIEW_Handle hObj, const GUI_ConstString * ppText); 00121 int LISTVIEW_CompareText (const void * p0, const void * p1); 00122 int LISTVIEW_CompareDec (const void * p0, const void * p1); 00123 void LISTVIEW_DecSel (LISTVIEW_Handle hObj); 00124 void LISTVIEW_DeleteAllRows (LISTVIEW_Handle hObj); 00125 void LISTVIEW_DeleteColumn (LISTVIEW_Handle hObj, unsigned Index); 00126 void LISTVIEW_DeleteRow (LISTVIEW_Handle hObj, unsigned Index); 00127 void LISTVIEW_DeleteRowSorted (LISTVIEW_Handle hObj, int Row); 00128 void LISTVIEW_DisableRow (LISTVIEW_Handle hObj, unsigned Row); 00129 void LISTVIEW_DisableSort (LISTVIEW_Handle hObj); 00130 void LISTVIEW_EnableCellSelect (LISTVIEW_Handle hObj, unsigned OnOff); // Enables/disables cell selection 00131 void LISTVIEW_EnableRow (LISTVIEW_Handle hObj, unsigned Row); 00132 void LISTVIEW_EnableSort (LISTVIEW_Handle hObj); 00133 GUI_COLOR LISTVIEW_GetBkColor (LISTVIEW_Handle hObj, unsigned Index); 00134 const GUI_FONT * LISTVIEW_GetFont (LISTVIEW_Handle hObj); 00135 HEADER_Handle LISTVIEW_GetHeader (LISTVIEW_Handle hObj); 00136 void LISTVIEW_GetItemRect (LISTVIEW_Handle hObj, U32 Col, U32 Row, GUI_RECT * pRect); 00137 void LISTVIEW_GetItemText (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, char * pBuffer, unsigned MaxSize); 00138 unsigned LISTVIEW_GetItemTextLen (LISTVIEW_Handle hObj, unsigned Column, unsigned Row); 00139 void LISTVIEW_GetItemTextSorted (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, char * pBuffer, unsigned MaxSize); 00140 unsigned LISTVIEW_GetLBorder (LISTVIEW_Handle hObj); 00141 unsigned LISTVIEW_GetNumColumns (LISTVIEW_Handle hObj); 00142 unsigned LISTVIEW_GetNumRows (LISTVIEW_Handle hObj); 00143 unsigned LISTVIEW_GetRBorder (LISTVIEW_Handle hObj); 00144 int LISTVIEW_GetSel (LISTVIEW_Handle hObj); 00145 int LISTVIEW_GetSelCol (LISTVIEW_Handle hObj); 00146 int LISTVIEW_GetSelUnsorted (LISTVIEW_Handle hObj); 00147 int LISTVIEW_GetTextAlign (LISTVIEW_Handle hObj, unsigned ColIndex); 00148 GUI_COLOR LISTVIEW_GetTextColor (LISTVIEW_Handle hObj, unsigned Index); 00149 int LISTVIEW_GetUserData (LISTVIEW_Handle hObj, void * pDest, int NumBytes); 00150 U32 LISTVIEW_GetUserDataRow (LISTVIEW_Handle hObj, unsigned Row); 00151 GUI_WRAPMODE LISTVIEW_GetWrapMode (LISTVIEW_Handle hObj); 00152 void LISTVIEW_IncSel (LISTVIEW_Handle hObj); 00153 int LISTVIEW_InsertRow (LISTVIEW_Handle hObj, unsigned Index, const GUI_ConstString * ppText); 00154 int LISTVIEW_OwnerDraw (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo); 00155 unsigned LISTVIEW_RowIsDisabled (LISTVIEW_Handle hObj, unsigned Row); 00156 void LISTVIEW_SetAutoScrollH (LISTVIEW_Handle hObj, int OnOff); 00157 void LISTVIEW_SetAutoScrollV (LISTVIEW_Handle hObj, int OnOff); 00158 void LISTVIEW_SetItemBitmap (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, int xOff, int yOff, const GUI_BITMAP * pBitmap); 00159 void LISTVIEW_SetBkColor (LISTVIEW_Handle hObj, unsigned int Index, GUI_COLOR Color); 00160 void LISTVIEW_SetColumnWidth (LISTVIEW_Handle hObj, unsigned int Index, int Width); 00161 void LISTVIEW_SetCompareFunc (LISTVIEW_Handle hObj, unsigned Column, int (* fpCompare)(const void * p0, const void * p1)); 00162 unsigned LISTVIEW_SetFixed (LISTVIEW_Handle hObj, unsigned Fixed); 00163 void LISTVIEW_SetFont (LISTVIEW_Handle hObj, const GUI_FONT * pFont); 00164 int LISTVIEW_SetGridVis (LISTVIEW_Handle hObj, int Show); 00165 void LISTVIEW_SetHeaderHeight (LISTVIEW_Handle hObj, unsigned HeaderHeight); 00166 void LISTVIEW_SetItemBkColor (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, unsigned int Index, GUI_COLOR Color); 00167 void LISTVIEW_SetItemText (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, const char * s); 00168 void LISTVIEW_SetItemTextColor (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, unsigned int Index, GUI_COLOR Color); 00169 void LISTVIEW_SetItemTextSorted (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, const char * pText); 00170 void LISTVIEW_SetLBorder (LISTVIEW_Handle hObj, unsigned BorderSize); 00171 void LISTVIEW_SetOwnerDraw (LISTVIEW_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawItem); 00172 void LISTVIEW_SetRBorder (LISTVIEW_Handle hObj, unsigned BorderSize); 00173 unsigned LISTVIEW_SetRowHeight (LISTVIEW_Handle hObj, unsigned RowHeight); 00174 void LISTVIEW_SetSel (LISTVIEW_Handle hObj, int Sel); 00175 void LISTVIEW_SetSelCol (LISTVIEW_Handle hObj, int NewCol); 00176 void LISTVIEW_SetSelUnsorted (LISTVIEW_Handle hObj, int Sel); 00177 unsigned LISTVIEW_SetSort (LISTVIEW_Handle hObj, unsigned Column, unsigned Reverse); 00178 void LISTVIEW_SetTextAlign (LISTVIEW_Handle hObj, unsigned int Index, int Align); 00179 void LISTVIEW_SetTextColor (LISTVIEW_Handle hObj, unsigned int Index, GUI_COLOR Color); 00180 int LISTVIEW_SetUserData (LISTVIEW_Handle hObj, const void * pSrc, int NumBytes); 00181 void LISTVIEW_SetUserDataRow (LISTVIEW_Handle hObj, unsigned Row, U32 UserData); 00182 void LISTVIEW_SetWrapMode (LISTVIEW_Handle hObj, GUI_WRAPMODE WrapMode); 00183 00184 /********************************************************************* 00185 * 00186 * Managing default values 00187 * 00188 ********************************************************************** 00189 */ 00190 00191 GUI_COLOR LISTVIEW_SetDefaultBkColor (unsigned Index, GUI_COLOR Color); 00192 const GUI_FONT * LISTVIEW_SetDefaultFont (const GUI_FONT * pFont); 00193 GUI_COLOR LISTVIEW_SetDefaultGridColor(GUI_COLOR Color); 00194 GUI_COLOR LISTVIEW_SetDefaultTextColor(unsigned Index, GUI_COLOR Color); 00195 00196 #if defined(__cplusplus) 00197 } 00198 #endif 00199 00200 #endif // GUI_WINSUPPORT 00201 #endif // LISTVIEW_H 00202 00203 /*************************** End of file ****************************/
Generated on Thu Jul 14 2022 12:58:41 by
