mGNCS API Reference  v1.5.0
A new control set and a new framework for MiniGUI apps
mlistcolumn.h
Go to the documentation of this file.
1 //
3 // IMPORTANT NOTICE
4 //
5 // The following open source license statement does not apply to any
6 // entity in the Exception List published by FMSoft.
7 //
8 // For more information, please visit:
9 //
10 // https://www.fmsoft.cn/exception-list
11 //
13 
54 #ifndef _MGUI_WIDGET_LSTCLM_H
55 #define _MGUI_WIDGET_LSTCLM_H
56 
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif /* __cplusplus */
61 
67 typedef struct _mListColumn mListColumn;
68 typedef struct _mListColumnClass mListColumnClass;
69 
74 typedef enum
75 {
80 
85 
90 
91  NCSID_LSTCLM_MAXVALUE
93 
98 typedef struct _NCS_LSTCLM_SORTDATA
99 {
103  int column;
104 
108  int losorted;
109 
113  mWidget *obj;
115 
120 typedef int (*NCS_CB_LISTV_CMPCLM)(HITEM nItem1, HITEM nItem2, NCS_LSTCLM_SORTDATA *sortData);
121 
126 #define NCSF_LSTCLM_LEFTALIGN (0x00<<NCSF_ITEM_SHIFT)
127 
132 #define NCSF_LSTCLM_RIGHTALIGN (0x01<<NCSF_ITEM_SHIFT)
133 
138 #define NCSF_LSTCLM_CENTERALIGN (0x02<<NCSF_ITEM_SHIFT)
139 
144 #define NCSF_LSTCLM_TOPALIGN (0x00<<NCSF_ITEM_SHIFT)
145 
150 #define NCSF_LSTCLM_BOTTOMALIGN (0x04<<NCSF_ITEM_SHIFT)
151 
156 #define NCSF_LSTCLM_VCENTERALIGN (0x08<<NCSF_ITEM_SHIFT)
157 
162 #define NCSF_LSTCLM_VALIGNMASK (0x0C<<NCSF_ITEM_SHIFT)
163 
168 #define NCSF_LSTCLM_SHIFT (NCSF_ITEM_SHIFT+4)
169 
170 #define mListColumnHeader(className)\
171  mItemHeader(className) \
172  int startX; \
173  int width; \
174  ncsLstClmSortType sort; \
175  NCS_CB_LISTV_CMPCLM pfnCmp;
176 
193 struct _mListColumn
194 {
195  mListColumnHeader(mListColumn)
196 };
197 
198 #define mListColumnClassHeader(clsName, superCls) \
199  mItemClassHeader(clsName, superCls)
200 
206 struct _mListColumnClass
207 {
208  mListColumnClassHeader(mListColumn, mItem)
209 };
210 
215 typedef enum
216 {
221 
226 
231 
236 
242 
249 MGNCS_EXPORT extern mListColumnClass g_stmListColumnCls;
250 
253 #ifdef __cplusplus
254 }
255 #endif /* __cplusplus */
256 
257 #endif /* _MGUI_WIDGET_LSTCLM_H */
258 
HITEM
GHANDLE HITEM
The handle of item widget.
Definition: mitem.h:75
NCSP_LSTCLM_CMPFUNC
@ NCSP_LSTCLM_CMPFUNC
Definition: mlistcolumn.h:235
NCSID_LSTCLM_HISORTED
@ NCSID_LSTCLM_HISORTED
Definition: mlistcolumn.h:84
mListColumnProp
mListColumnProp
The properties id of mListColumn.
Definition: mlistcolumn.h:215
NCSP_LSTCLM_POSX
@ NCSP_LSTCLM_POSX
Definition: mlistcolumn.h:220
NCSP_LSTCLM_SORTTYPE
@ NCSP_LSTCLM_SORTTYPE
Definition: mlistcolumn.h:230
NCSP_LSTCLM_WIDTH
@ NCSP_LSTCLM_WIDTH
Definition: mlistcolumn.h:225
mWidget
define the mWidget members, inherit from mComponent
NCSID_LSTCLM_NOTSORTED
@ NCSID_LSTCLM_NOTSORTED
Definition: mlistcolumn.h:79
ncsLstClmSortType
ncsLstClmSortType
The sort type.
Definition: mlistcolumn.h:74
NCSP_LSTCLM_MAX
@ NCSP_LSTCLM_MAX
Definition: mlistcolumn.h:240
g_stmListColumnCls
MGNCS_EXPORT mListColumnClass g_stmListColumnCls
The instance of mListColumnClass.
NCSID_LSTCLM_LOSORTED
@ NCSID_LSTCLM_LOSORTED
Definition: mlistcolumn.h:89
mListColumn
The structure of mListColumn. It's used as header by mListView.
NCS_LSTCLM_SORTDATA
The sort type.
mItem
The structure of mItem. It is the abstract superclass of all items occur within specific controls....
NCS_CB_LISTV_CMPCLM
int(* NCS_CB_LISTV_CMPCLM)(HITEM nItem1, HITEM nItem2, NCS_LSTCLM_SORTDATA *sortData)
The callback of comparison column function.
Definition: mlistcolumn.h:120
NCSP_ITEM_MAX
@ NCSP_ITEM_MAX
Definition: mitem.h:298
mListColumnClass
The virtual function table of mListColumn, which derived from mItemClass.