mGNCS4Touch API Reference  v1.5.0
A set of mGNCS-compliant controls for devices with a touch screen.
mitembar.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 mitembar.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 
52 #ifndef __NCS4TOUCH_ITEM_BAR_H__
53 #define __NCS4TOUCH_ITEM_BAR_H__
54 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif /* __cplusplus */
62 
67 #define NCSCTRL_ITEMBAR NCSCLASSNAME("itembar")
68 
69 typedef struct _mItemBar mItemBar;
70 typedef struct _mItemBarClass mItemBarClass;
71 typedef struct _mItemBarRenderer mItemBarRenderer;
72 
73 #define mItemBarHeader(clsName) \
74  mWidgetHeader(clsName) \
75  BOOL dotHit; \
76  int tickSize; \
77  int imageSize; \
78  int ltextSize; \
79  int rtextSize; \
80  int angleSize;
81 
88 struct _mItemBar {
89  mItemBarHeader(mItemBar)
90 };
91 
92 #define mItemBarClassHeader(clsName, parentClass) \
93  mWidgetClassHeader(clsName, parentClass)
94 
101 struct _mItemBarClass {
102  mItemBarClassHeader(mItemBar, mWidget)
103 };
104 
105 #define mItemBarRendererHeader(clsName, parentClass) \
106  mWidgetRendererHeader(clsName, parentClass)
107 
114 struct _mItemBarRenderer {
115  mItemBarRendererHeader(mItemBar, mWidget)
116 };
117 
122 MTOUCH_EXPORT extern mItemBarClass g_stmItemBarCls;
123 
138  NCSP_ITEMBAR_CHECKED = NCSP_WIDGET_MAX + 1,
141  NCSP_ITEMBAR_MAX
142 };
143 
152  NCSN_ITEMBAR_CHECKED = NCSN_WIDGET_MAX + 1,
153  NCSN_ITEMBAR_MAX
154 };
155 
166 #define NCSS_ITEMBAR_CHECKABLE (1 << NCSS_WIDGET_SHIFT)
167 #define NCSS_ITEMBAR_HASCHILD (2 << NCSS_WIDGET_SHIFT)
168 #define NCSS_ITEMBAR_SHIFT (NCSS_WIDGET_SHIFT + 2)
169 
177 #ifdef __cplusplus
178 }
179 #endif /* __cplusplus */
180 
181 #endif /* __NCS4TOUCH_ITEM_BAR_H__ */
182 
mItemBarClass
itembar struct of itembar control, derived from mWidgetClass
g_stmItemBarCls
MTOUCH_EXPORT mItemBarClass g_stmItemBarCls
global mItemBarClass
NCSP_ITEMBAR_CHECKED
@ NCSP_ITEMBAR_CHECKED
Identify with NCSS_ITEMBAR_CHECKABLE style controls, is selecte.
Definition: mitembar.h:138
NCSP_ITEMBAR_MARGIN
@ NCSP_ITEMBAR_MARGIN
Both ends of the blank size.
Definition: mitembar.h:140
mItemBarRenderer
ItemBar class renderer interface, derived from mWidgetRenderer.
NCSN_ITEMBAR_CHECKED
@ NCSN_ITEMBAR_CHECKED
Identifies the control with NCSS_ITEMBAR_CHECKABLE style, selection status changes.
Definition: mitembar.h:152
mItemBar
ItemBar class, derived from mWidget.
mItemBarNotify
mItemBarNotify
the notification code of mItemBar
Definition: mitembar.h:151
NCSP_ITEMBAR_IMG
@ NCSP_ITEMBAR_IMG
Displayed as icons with a picture.
Definition: mitembar.h:139
mItemBarProp
mItemBarProp
the properties id of mItemBar
Definition: mitembar.h:137