mGNCS4Touch API Reference  v1.5.0
A set of mGNCS-compliant controls for devices with a touch screen.
mcombopicker.h
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 /*
14  * \file mcombopicker.h
15  * \author miniStudio team of FMSoft
16  * \date 2010/10/09
17  *
18  \verbatim
19 
20  This file is part of mGNCS4Touch, one of MiniGUI components.
21 
22  Copyright (C) 2008-2018 FMSoft (http://www.fmsoft.cn).
23 
24  This program is free software: you can redistribute it and/or modify
25  it under the terms of the GNU General Public License as published by
26  the Free Software Foundation, either version 3 of the License, or
27  (at your option) any later version.
28 
29  This program is distributed in the hope that it will be useful,
30  but WITHOUT ANY WARRANTY; without even the implied warranty of
31  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32  GNU General Public License for more details.
33 
34  You should have received a copy of the GNU General Public License
35  along with this program. If not, see <http://www.gnu.org/licenses/>.
36 
37  Or,
38 
39  As this program is a library, any link to this program must follow
40  GNU General Public License version 3 (GPLv3). If you cannot accept
41  GPLv3, you need to be licensed from FMSoft.
42 
43  If you have got a commercial license of this program, please use it
44  under the terms and conditions of the commercial license.
45 
46  For more information about the commercial license, please refer to
47  <http://www.minigui.com/blog/minigui-licensing-policy/>.
48 
49  \endverbatim
50 */
51 #ifndef __MGNCS4TOUCH_COMBOPICKER_H__
52 #define __MGNCS4TOUCH_COMBOPICKER_H__
53 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif /* __cplusplus */
61 
62 typedef struct _PICKITM {
63  list_t list;
64  mPicker* picker;
65  int pickerID;
66 } CMBPICKITM, *PCMBPICKITM;
67 
72 #define NCSCTRL_CMBPICKER NCSCLASSNAME("combopicker")
73 
74 typedef struct _mComboPicker mComboPicker;
75 typedef struct _mComboPickerClass mComboPickerClass;
76 typedef struct _mComboPickerRenderer mComboPickerRenderer;
77 
78 #define mComboPickerHeader(clsName) \
79  mPanelHeader(clsName) \
80  list_t pickerList; \
81  int pickerCount; \
82  int hMargin; \
83  int vMargin; \
84  int visLine;
85 
86 struct _mComboPicker {
87  mComboPickerHeader(mComboPicker)
88 };
89 
90 #define mComboPickerClassHeader(clsName, parentClass) \
91  mPanelClassHeader(clsName, parentClass) \
92  BOOL (*addPicker)(clsName*, const NCS_WND_TEMPLATE* pick, int idx); \
93  BOOL (*removePicker)(clsName*, int id); \
94  BOOL (*removePickerByIdx)(clsName*, int idx); \
95  BOOL (*removeAllPickers)(clsName*); \
96  void (*getClientArea)(clsName*, PRECT prc); \
97  BOOL (*listenerCallBack)(mObject* self, \
98  mObject* sender, int eventId, DWORD param);
99 
100 struct _mComboPickerClass {
101  mComboPickerClassHeader(mComboPicker, mPanel)
102 };
103 
104 #define mComboPickerRendererHeader(clsName, parentClass) \
105  mPanelRendererHeader(clsName, parentClass)
106 
112 struct _mComboPickerRenderer {
113  mComboPickerRendererHeader(mComboPicker, mPanel)
114 };
115 
122 MTOUCH_EXPORT extern mComboPickerClass g_stmComboPickerCls;
123 
128 #define NCSS_CMBPCK_SHIFT NCSS_PANEL_SHIFT
129 
144  NCSP_CMBPCK_HMARGIN = NCSP_PANEL_MAX + 1,
147  NCSP_CMBPCK_MAX,
148 };
149 
158  NCSN_CMBPCK_MAX = NCSN_PANEL_MAX + 1
159 };
160 
164 #ifdef __cplusplus
165 }
166 #endif /* __cplusplus */
167 
168 #endif /* __MGNCS4TOUCH_COMBOPICKER_H__ */
169 
mComboPickerRenderer
The renderer structure of mComboPicker, which inheried from mComboPickerRenderer.
g_stmComboPickerCls
MTOUCH_EXPORT mComboPickerClass g_stmComboPickerCls
The instance of mComboPickerClass.
NCSP_CMBPCK_VMARGIN
@ NCSP_CMBPCK_VMARGIN
Reserved for the upper and lower ends of the blank.
Definition: mcombopicker.h:145
NCSP_CMBPCK_HMARGIN
@ NCSP_CMBPCK_HMARGIN
Left and right ends of the blank reserved.
Definition: mcombopicker.h:144
mComboPickerNotify
mComboPickerNotify
The notification code id of mComboPicker.
Definition: mcombopicker.h:154
NCSP_CMBPCK_VISLINE
@ NCSP_CMBPCK_VISLINE
Information on the number of rows to display.
Definition: mcombopicker.h:146
mComboPickerProperty
mComboPickerProperty
the properties id of mComboPicker
Definition: mcombopicker.h:143
NCSN_CMBPCK_MAX
@ NCSN_CMBPCK_MAX
Definition: mcombopicker.h:158