Headers for emWin lib
Dependents: DISCO-F746NG_rtos_test
emWin_header/LISTVIEW.h@0:1bf8f02b0770, 2016-03-26 (annotated)
- Committer:
- redbird
- Date:
- Sat Mar 26 22:49:50 2016 +0000
- Revision:
- 0:1bf8f02b0770
new code integration
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
redbird | 0:1bf8f02b0770 | 1 | /********************************************************************* |
redbird | 0:1bf8f02b0770 | 2 | * SEGGER Microcontroller GmbH & Co. KG * |
redbird | 0:1bf8f02b0770 | 3 | * Solutions for real time microcontroller applications * |
redbird | 0:1bf8f02b0770 | 4 | ********************************************************************** |
redbird | 0:1bf8f02b0770 | 5 | * * |
redbird | 0:1bf8f02b0770 | 6 | * (c) 1996 - 2014 SEGGER Microcontroller GmbH & Co. KG * |
redbird | 0:1bf8f02b0770 | 7 | * * |
redbird | 0:1bf8f02b0770 | 8 | * Internet: www.segger.com Support: support@segger.com * |
redbird | 0:1bf8f02b0770 | 9 | * * |
redbird | 0:1bf8f02b0770 | 10 | ********************************************************************** |
redbird | 0:1bf8f02b0770 | 11 | |
redbird | 0:1bf8f02b0770 | 12 | ** emWin V5.24 - Graphical user interface for embedded applications ** |
redbird | 0:1bf8f02b0770 | 13 | All Intellectual Property rights in the Software belongs to SEGGER. |
redbird | 0:1bf8f02b0770 | 14 | emWin is protected by international copyright laws. Knowledge of the |
redbird | 0:1bf8f02b0770 | 15 | source code may not be used to write a similar product. This file may |
redbird | 0:1bf8f02b0770 | 16 | only be used in accordance with the following terms: |
redbird | 0:1bf8f02b0770 | 17 | |
redbird | 0:1bf8f02b0770 | 18 | The software has been licensed to NXP Semiconductors USA, Inc. whose |
redbird | 0:1bf8f02b0770 | 19 | registered office is situated at 411 E. Plumeria Drive, San Jose, |
redbird | 0:1bf8f02b0770 | 20 | CA 95134, USA solely for the purposes of creating libraries for |
redbird | 0:1bf8f02b0770 | 21 | NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and |
redbird | 0:1bf8f02b0770 | 22 | distributed under the terms and conditions of the NXP End User License |
redbird | 0:1bf8f02b0770 | 23 | Agreement. |
redbird | 0:1bf8f02b0770 | 24 | Full source code is available at: www.segger.com |
redbird | 0:1bf8f02b0770 | 25 | |
redbird | 0:1bf8f02b0770 | 26 | We appreciate your understanding and fairness. |
redbird | 0:1bf8f02b0770 | 27 | ---------------------------------------------------------------------- |
redbird | 0:1bf8f02b0770 | 28 | File : LISTVIEW.h |
redbird | 0:1bf8f02b0770 | 29 | Purpose : LISTVIEW include |
redbird | 0:1bf8f02b0770 | 30 | --------------------END-OF-HEADER------------------------------------- |
redbird | 0:1bf8f02b0770 | 31 | */ |
redbird | 0:1bf8f02b0770 | 32 | |
redbird | 0:1bf8f02b0770 | 33 | #ifndef LISTVIEW_H |
redbird | 0:1bf8f02b0770 | 34 | #define LISTVIEW_H |
redbird | 0:1bf8f02b0770 | 35 | |
redbird | 0:1bf8f02b0770 | 36 | #include "WM.h" |
redbird | 0:1bf8f02b0770 | 37 | #include "DIALOG_Intern.h" // Req. for Create indirect data structure |
redbird | 0:1bf8f02b0770 | 38 | #include "ICONVIEW.h" |
redbird | 0:1bf8f02b0770 | 39 | #include "HEADER.h" |
redbird | 0:1bf8f02b0770 | 40 | |
redbird | 0:1bf8f02b0770 | 41 | #if GUI_WINSUPPORT |
redbird | 0:1bf8f02b0770 | 42 | |
redbird | 0:1bf8f02b0770 | 43 | #if defined(__cplusplus) |
redbird | 0:1bf8f02b0770 | 44 | extern "C" { /* Make sure we have C-declarations in C++ programs */ |
redbird | 0:1bf8f02b0770 | 45 | #endif |
redbird | 0:1bf8f02b0770 | 46 | |
redbird | 0:1bf8f02b0770 | 47 | /********************************************************************* |
redbird | 0:1bf8f02b0770 | 48 | * |
redbird | 0:1bf8f02b0770 | 49 | * Defines |
redbird | 0:1bf8f02b0770 | 50 | */ |
redbird | 0:1bf8f02b0770 | 51 | #define LISTVIEW_ALL_ITEMS -1 |
redbird | 0:1bf8f02b0770 | 52 | |
redbird | 0:1bf8f02b0770 | 53 | /********************************************************************* |
redbird | 0:1bf8f02b0770 | 54 | * |
redbird | 0:1bf8f02b0770 | 55 | * Color indices |
redbird | 0:1bf8f02b0770 | 56 | */ |
redbird | 0:1bf8f02b0770 | 57 | #define LISTVIEW_CI_UNSEL 0 |
redbird | 0:1bf8f02b0770 | 58 | #define LISTVIEW_CI_SEL 1 |
redbird | 0:1bf8f02b0770 | 59 | #define LISTVIEW_CI_SELFOCUS 2 |
redbird | 0:1bf8f02b0770 | 60 | #define LISTVIEW_CI_DISABLED 3 |
redbird | 0:1bf8f02b0770 | 61 | |
redbird | 0:1bf8f02b0770 | 62 | /************************************************************ |
redbird | 0:1bf8f02b0770 | 63 | * |
redbird | 0:1bf8f02b0770 | 64 | * Create / Status flags |
redbird | 0:1bf8f02b0770 | 65 | */ |
redbird | 0:1bf8f02b0770 | 66 | #define LISTVIEW_CF_AUTOSCROLLBAR_H (1 << 0) |
redbird | 0:1bf8f02b0770 | 67 | #define LISTVIEW_CF_AUTOSCROLLBAR_V (1 << 1) |
redbird | 0:1bf8f02b0770 | 68 | #define LISTVIEW_SF_AUTOSCROLLBAR_H LISTVIEW_CF_AUTOSCROLLBAR_H |
redbird | 0:1bf8f02b0770 | 69 | #define LISTVIEW_SF_AUTOSCROLLBAR_V LISTVIEW_CF_AUTOSCROLLBAR_V |
redbird | 0:1bf8f02b0770 | 70 | |
redbird | 0:1bf8f02b0770 | 71 | /********************************************************************* |
redbird | 0:1bf8f02b0770 | 72 | * |
redbird | 0:1bf8f02b0770 | 73 | * Public Types |
redbird | 0:1bf8f02b0770 | 74 | * |
redbird | 0:1bf8f02b0770 | 75 | ********************************************************************** |
redbird | 0:1bf8f02b0770 | 76 | */ |
redbird | 0:1bf8f02b0770 | 77 | typedef WM_HMEM LISTVIEW_Handle; |
redbird | 0:1bf8f02b0770 | 78 | |
redbird | 0:1bf8f02b0770 | 79 | /********************************************************************* |
redbird | 0:1bf8f02b0770 | 80 | * |
redbird | 0:1bf8f02b0770 | 81 | * Create functions |
redbird | 0:1bf8f02b0770 | 82 | * |
redbird | 0:1bf8f02b0770 | 83 | ********************************************************************** |
redbird | 0:1bf8f02b0770 | 84 | */ |
redbird | 0:1bf8f02b0770 | 85 | LISTVIEW_Handle LISTVIEW_Create (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, int SpecialFlags); |
redbird | 0:1bf8f02b0770 | 86 | LISTVIEW_Handle LISTVIEW_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id); |
redbird | 0:1bf8f02b0770 | 87 | LISTVIEW_Handle LISTVIEW_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes); |
redbird | 0:1bf8f02b0770 | 88 | LISTVIEW_Handle LISTVIEW_CreateAttached(WM_HWIN hParent, int Id, int SpecialFlags); |
redbird | 0:1bf8f02b0770 | 89 | LISTVIEW_Handle LISTVIEW_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); |
redbird | 0:1bf8f02b0770 | 90 | |
redbird | 0:1bf8f02b0770 | 91 | /********************************************************************* |
redbird | 0:1bf8f02b0770 | 92 | * |
redbird | 0:1bf8f02b0770 | 93 | * The callback ... |
redbird | 0:1bf8f02b0770 | 94 | * |
redbird | 0:1bf8f02b0770 | 95 | * Do not call it directly ! It is only to be used from within an |
redbird | 0:1bf8f02b0770 | 96 | * overwritten callback. |
redbird | 0:1bf8f02b0770 | 97 | */ |
redbird | 0:1bf8f02b0770 | 98 | void LISTVIEW_Callback(WM_MESSAGE * pMsg); |
redbird | 0:1bf8f02b0770 | 99 | |
redbird | 0:1bf8f02b0770 | 100 | /********************************************************************* |
redbird | 0:1bf8f02b0770 | 101 | * |
redbird | 0:1bf8f02b0770 | 102 | * Standard member functions |
redbird | 0:1bf8f02b0770 | 103 | * |
redbird | 0:1bf8f02b0770 | 104 | ********************************************************************** |
redbird | 0:1bf8f02b0770 | 105 | */ |
redbird | 0:1bf8f02b0770 | 106 | #define LISTVIEW_Delete(hObj) WM_DeleteWindow (hObj) |
redbird | 0:1bf8f02b0770 | 107 | #define LISTVIEW_DisableMemdev(hObj) WM_DisableMemdev (hObj) |
redbird | 0:1bf8f02b0770 | 108 | #define LISTVIEW_EnableMemdev(hObj) WM_EnableMemdev (hObj) |
redbird | 0:1bf8f02b0770 | 109 | #define LISTVIEW_Invalidate(hObj) WM_InvalidateWindow(hObj) |
redbird | 0:1bf8f02b0770 | 110 | #define LISTVIEW_Paint(hObj) WM_Paint (hObj) |
redbird | 0:1bf8f02b0770 | 111 | |
redbird | 0:1bf8f02b0770 | 112 | /********************************************************************* |
redbird | 0:1bf8f02b0770 | 113 | * |
redbird | 0:1bf8f02b0770 | 114 | * Member functions |
redbird | 0:1bf8f02b0770 | 115 | * |
redbird | 0:1bf8f02b0770 | 116 | ********************************************************************** |
redbird | 0:1bf8f02b0770 | 117 | */ |
redbird | 0:1bf8f02b0770 | 118 | int LISTVIEW_AddColumn (LISTVIEW_Handle hObj, int Width, const char * s, int Align); |
redbird | 0:1bf8f02b0770 | 119 | int LISTVIEW_AddRow (LISTVIEW_Handle hObj, const GUI_ConstString * ppText); |
redbird | 0:1bf8f02b0770 | 120 | int LISTVIEW_CompareText (const void * p0, const void * p1); |
redbird | 0:1bf8f02b0770 | 121 | int LISTVIEW_CompareDec (const void * p0, const void * p1); |
redbird | 0:1bf8f02b0770 | 122 | void LISTVIEW_DecSel (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 123 | void LISTVIEW_DeleteAllRows (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 124 | void LISTVIEW_DeleteColumn (LISTVIEW_Handle hObj, unsigned Index); |
redbird | 0:1bf8f02b0770 | 125 | void LISTVIEW_DeleteRow (LISTVIEW_Handle hObj, unsigned Index); |
redbird | 0:1bf8f02b0770 | 126 | void LISTVIEW_DeleteRowSorted (LISTVIEW_Handle hObj, int Row); |
redbird | 0:1bf8f02b0770 | 127 | void LISTVIEW_DisableRow (LISTVIEW_Handle hObj, unsigned Row); |
redbird | 0:1bf8f02b0770 | 128 | void LISTVIEW_DisableSort (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 129 | void LISTVIEW_EnableRow (LISTVIEW_Handle hObj, unsigned Row); |
redbird | 0:1bf8f02b0770 | 130 | void LISTVIEW_EnableSort (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 131 | GUI_COLOR LISTVIEW_GetBkColor (LISTVIEW_Handle hObj, unsigned Index); |
redbird | 0:1bf8f02b0770 | 132 | const GUI_FONT * LISTVIEW_GetFont(LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 133 | HEADER_Handle LISTVIEW_GetHeader (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 134 | void LISTVIEW_GetItemText (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, char * pBuffer, unsigned MaxSize); |
redbird | 0:1bf8f02b0770 | 135 | unsigned LISTVIEW_GetItemTextLen (LISTVIEW_Handle hObj, unsigned Column, unsigned Row); |
redbird | 0:1bf8f02b0770 | 136 | void LISTVIEW_GetItemTextSorted (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, char * pBuffer, unsigned MaxSize); |
redbird | 0:1bf8f02b0770 | 137 | unsigned LISTVIEW_GetLBorder (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 138 | unsigned LISTVIEW_GetNumColumns (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 139 | unsigned LISTVIEW_GetNumRows (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 140 | unsigned LISTVIEW_GetRBorder (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 141 | int LISTVIEW_GetSel (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 142 | int LISTVIEW_GetSelUnsorted (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 143 | int LISTVIEW_GetTextAlign (LISTVIEW_Handle hObj, unsigned ColIndex); |
redbird | 0:1bf8f02b0770 | 144 | GUI_COLOR LISTVIEW_GetTextColor (LISTVIEW_Handle hObj, unsigned Index); |
redbird | 0:1bf8f02b0770 | 145 | int LISTVIEW_GetUserData (LISTVIEW_Handle hObj, void * pDest, int NumBytes); |
redbird | 0:1bf8f02b0770 | 146 | U32 LISTVIEW_GetUserDataRow (LISTVIEW_Handle hObj, unsigned Row); |
redbird | 0:1bf8f02b0770 | 147 | GUI_WRAPMODE LISTVIEW_GetWrapMode (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 148 | void LISTVIEW_IncSel (LISTVIEW_Handle hObj); |
redbird | 0:1bf8f02b0770 | 149 | int LISTVIEW_InsertRow (LISTVIEW_Handle hObj, unsigned Index, const GUI_ConstString * ppText); |
redbird | 0:1bf8f02b0770 | 150 | int LISTVIEW_OwnerDraw (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo); |
redbird | 0:1bf8f02b0770 | 151 | unsigned LISTVIEW_RowIsDisabled (LISTVIEW_Handle hObj, unsigned Row); |
redbird | 0:1bf8f02b0770 | 152 | void LISTVIEW_SetAutoScrollH (LISTVIEW_Handle hObj, int OnOff); |
redbird | 0:1bf8f02b0770 | 153 | void LISTVIEW_SetAutoScrollV (LISTVIEW_Handle hObj, int OnOff); |
redbird | 0:1bf8f02b0770 | 154 | void LISTVIEW_SetItemBitmap (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, int xOff, int yOff, const GUI_BITMAP * pBitmap); |
redbird | 0:1bf8f02b0770 | 155 | void LISTVIEW_SetBkColor (LISTVIEW_Handle hObj, unsigned int Index, GUI_COLOR Color); |
redbird | 0:1bf8f02b0770 | 156 | void LISTVIEW_SetColumnWidth (LISTVIEW_Handle hObj, unsigned int Index, int Width); |
redbird | 0:1bf8f02b0770 | 157 | void LISTVIEW_SetCompareFunc (LISTVIEW_Handle hObj, unsigned Column, int (* fpCompare)(const void * p0, const void * p1)); |
redbird | 0:1bf8f02b0770 | 158 | unsigned LISTVIEW_SetFixed (LISTVIEW_Handle hObj, unsigned Fixed); |
redbird | 0:1bf8f02b0770 | 159 | void LISTVIEW_SetFont (LISTVIEW_Handle hObj, const GUI_FONT * pFont); |
redbird | 0:1bf8f02b0770 | 160 | int LISTVIEW_SetGridVis (LISTVIEW_Handle hObj, int Show); |
redbird | 0:1bf8f02b0770 | 161 | void LISTVIEW_SetHeaderHeight (LISTVIEW_Handle hObj, unsigned HeaderHeight); |
redbird | 0:1bf8f02b0770 | 162 | void LISTVIEW_SetItemBkColor (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, unsigned int Index, GUI_COLOR Color); |
redbird | 0:1bf8f02b0770 | 163 | void LISTVIEW_SetItemText (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, const char * s); |
redbird | 0:1bf8f02b0770 | 164 | void LISTVIEW_SetItemTextColor (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, unsigned int Index, GUI_COLOR Color); |
redbird | 0:1bf8f02b0770 | 165 | void LISTVIEW_SetLBorder (LISTVIEW_Handle hObj, unsigned BorderSize); |
redbird | 0:1bf8f02b0770 | 166 | void LISTVIEW_SetOwnerDraw (LISTVIEW_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawItem); |
redbird | 0:1bf8f02b0770 | 167 | void LISTVIEW_SetRBorder (LISTVIEW_Handle hObj, unsigned BorderSize); |
redbird | 0:1bf8f02b0770 | 168 | unsigned LISTVIEW_SetRowHeight (LISTVIEW_Handle hObj, unsigned RowHeight); |
redbird | 0:1bf8f02b0770 | 169 | void LISTVIEW_SetSel (LISTVIEW_Handle hObj, int Sel); |
redbird | 0:1bf8f02b0770 | 170 | void LISTVIEW_SetSelUnsorted (LISTVIEW_Handle hObj, int Sel); |
redbird | 0:1bf8f02b0770 | 171 | unsigned LISTVIEW_SetSort (LISTVIEW_Handle hObj, unsigned Column, unsigned Reverse); |
redbird | 0:1bf8f02b0770 | 172 | void LISTVIEW_SetTextAlign (LISTVIEW_Handle hObj, unsigned int Index, int Align); |
redbird | 0:1bf8f02b0770 | 173 | void LISTVIEW_SetTextColor (LISTVIEW_Handle hObj, unsigned int Index, GUI_COLOR Color); |
redbird | 0:1bf8f02b0770 | 174 | int LISTVIEW_SetUserData (LISTVIEW_Handle hObj, const void * pSrc, int NumBytes); |
redbird | 0:1bf8f02b0770 | 175 | void LISTVIEW_SetUserDataRow (LISTVIEW_Handle hObj, unsigned Row, U32 UserData); |
redbird | 0:1bf8f02b0770 | 176 | void LISTVIEW_SetWrapMode (LISTVIEW_Handle hObj, GUI_WRAPMODE WrapMode); |
redbird | 0:1bf8f02b0770 | 177 | |
redbird | 0:1bf8f02b0770 | 178 | /********************************************************************* |
redbird | 0:1bf8f02b0770 | 179 | * |
redbird | 0:1bf8f02b0770 | 180 | * Global functions |
redbird | 0:1bf8f02b0770 | 181 | * |
redbird | 0:1bf8f02b0770 | 182 | ********************************************************************** |
redbird | 0:1bf8f02b0770 | 183 | */ |
redbird | 0:1bf8f02b0770 | 184 | |
redbird | 0:1bf8f02b0770 | 185 | GUI_COLOR LISTVIEW_SetDefaultBkColor (unsigned Index, GUI_COLOR Color); |
redbird | 0:1bf8f02b0770 | 186 | const GUI_FONT * LISTVIEW_SetDefaultFont (const GUI_FONT * pFont); |
redbird | 0:1bf8f02b0770 | 187 | GUI_COLOR LISTVIEW_SetDefaultGridColor(GUI_COLOR Color); |
redbird | 0:1bf8f02b0770 | 188 | GUI_COLOR LISTVIEW_SetDefaultTextColor(unsigned Index, GUI_COLOR Color); |
redbird | 0:1bf8f02b0770 | 189 | |
redbird | 0:1bf8f02b0770 | 190 | #if defined(__cplusplus) |
redbird | 0:1bf8f02b0770 | 191 | } |
redbird | 0:1bf8f02b0770 | 192 | #endif |
redbird | 0:1bf8f02b0770 | 193 | |
redbird | 0:1bf8f02b0770 | 194 | #endif // GUI_WINSUPPORT |
redbird | 0:1bf8f02b0770 | 195 | #endif // LISTVIEW_H |
redbird | 0:1bf8f02b0770 | 196 | |
redbird | 0:1bf8f02b0770 | 197 | /*************************** End of file ****************************/ |