mGNCS4Touch API Reference  v1.5.0
A set of mGNCS-compliant controls for devices with a touch screen.
mbtnnavbar.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 mbtnnavbar.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 __MGNCS4TOUCH_BNB_H__
53 #define __MGNCS4TOUCH_BNB_H__
54 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif /* __cplusplus */
62 
67 #define NCSCTRL_BTNNAVBAR NCSCLASSNAME("btnnavbar")
68 
69 typedef struct _mBtnNavBar mBtnNavBar;
70 typedef struct _mBtnNavBarClass mBtnNavBarClass;
71 typedef struct _mBtnNavBarRenderer mBtnNavBarRenderer;
72 
94 #define NCSS_BNB_LRECT (0x01 << NCSS_WIDGET_SHIFT)
95 #define NCSS_BNB_LOPT (0x02 << NCSS_WIDGET_SHIFT)
96 #define NCSS_BNB_LNONE (0x04 << NCSS_WIDGET_SHIFT)
97 #define NCSS_BNB_RRECT (0x08 << NCSS_WIDGET_SHIFT)
98 #define NCSS_BNB_ROPT (0x10 << NCSS_WIDGET_SHIFT)
99 #define NCSS_BNB_RNONE (0x20 << NCSS_WIDGET_SHIFT)
100 #define NCSS_BNB_SHIFT (NCSS_WIDGET_SHIFT + 6)
101 
132  NCSP_BNB_LSTRING = NCSP_WIDGET_MAX + 1,
139  NCSP_BNB_MAX
140 };
141 
142 #define mBtnNavBarHeader(clsName) \
143  mWidgetHeader(clsName) \
144  PLOGFONT caption_font; \
145  char *left_str; \
146  char *right_str; \
147  int margin_w; \
148  int leftbt_w; \
149  int rightbt_w; \
150  int button_h;
151 
158 struct _mBtnNavBar {
159  mBtnNavBarHeader(mBtnNavBar)
160 };
161 
162 #define mBtnNavBarClassHeader(clsName, parentClass) \
163  mWidgetClassHeader(clsName, parentClass)
164 
171 struct _mBtnNavBarClass {
172  mBtnNavBarClassHeader(mBtnNavBar, mWidget)
173 };
174 
175 #define mBtnNavBarRendererHeader(clsName, parentClass) \
176  mWidgetRendererHeader(clsName, parentClass)
177 
184 struct _mBtnNavBarRenderer {
185  mBtnNavBarRendererHeader(mBtnNavBar, mWidget)
186 };
187 
192 MTOUCH_EXPORT extern mBtnNavBarClass g_stmBtnNavBarCls;
193 
207 };
208 
217  NCSN_BNB_BTNCLICK = NCSN_WIDGET_MAX + 1,
218  NCSN_BNB_MAX,
219 };
220 
233  // 1 is the text piece (NULL)
235  BNB_MAX_PIECE_ID,
236 };
237 
238 #define GetLeftBtnPiece(self) _M((mHBoxLayoutPiece *)self->body, getCell, BNB_LEFT_PIECE_ID)
239 #define GetRightBtnPiece(self) _M((mHBoxLayoutPiece *)self->body, getCell, BNB_RIGHT_PIECE_ID)
240 
244 #ifdef __cplusplus
245 }
246 #endif /* __cplusplus */
247 
248 #endif /* __MGNCS4TOUCH_BNB_H__ */
249 
BNB_RIGHT_PIECE_ID
@ BNB_RIGHT_PIECE_ID
The right piece of the index id.
Definition: mbtnnavbar.h:234
NCSP_BNB_RIGHT_W
@ NCSP_BNB_RIGHT_W
The width of the right button.
Definition: mbtnnavbar.h:137
NCSP_BNB_BTN_H
@ NCSP_BNB_BTN_H
Left and right buttons of the high.
Definition: mbtnnavbar.h:138
NCSP_BNB_LSTRING
@ NCSP_BNB_LSTRING
Store the string on the left button.
Definition: mbtnnavbar.h:132
NCSP_BNB_FONT
@ NCSP_BNB_FONT
Set the font size on the navigation bar.
Definition: mbtnnavbar.h:134
mBtnNavBarClass
toolcaption struct of toolcaption control, derived from mWidgetClass
mBtnNavBarProp
mBtnNavBarProp
the properties id of mBtnNavBar
Definition: mbtnnavbar.h:131
mBtnNavBarBoxLayoutPieceIndexID
mBtnNavBarBoxLayoutPieceIndexID
the piece index id of mBtnNavBar
Definition: mbtnnavbar.h:231
BNB_LEFT_PIECE_ID
@ BNB_LEFT_PIECE_ID
The left piece of the index id.
Definition: mbtnnavbar.h:232
mBtnNavBarRenderer
BtnNavBar class renderer interface, derived from mWidgetRenderer.
NCSD_BNB_RIGHT
@ NCSD_BNB_RIGHT
Right button click event listener param.
Definition: mbtnnavbar.h:206
NCSP_BNB_MARGIN
@ NCSP_BNB_MARGIN
Left and right ends of the blank reserved for control.
Definition: mbtnnavbar.h:135
NCSP_BNB_LEFT_W
@ NCSP_BNB_LEFT_W
The width of the left button.
Definition: mbtnnavbar.h:136
mBtnNavBar
BtnNavBar class, derived from mWidget.
NCSN_BNB_BTNCLICK
@ NCSN_BNB_BTNCLICK
Around both ends of the button click event listener.
Definition: mbtnnavbar.h:217
mBtnNavBarData
mBtnNavBarData
define the clicked add of param
Definition: mbtnnavbar.h:204
NCSD_BNB_LEFT
@ NCSD_BNB_LEFT
Left button click event listener param.
Definition: mbtnnavbar.h:205
NCSP_BNB_RSTRING
@ NCSP_BNB_RSTRING
Store the string on the right button.
Definition: mbtnnavbar.h:133
g_stmBtnNavBarCls
MTOUCH_EXPORT mBtnNavBarClass g_stmBtnNavBarCls
global mBtnNavBarClass
mBtnNavBarNotify
mBtnNavBarNotify
the notification code of mBtnNavBar
Definition: mbtnnavbar.h:216