mGNCS4Touch API Reference  v1.5.0
A set of mGNCS-compliant controls for devices with a touch screen.
mnavigationpanelpiece.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
15  * \author FMSoft
16  * \date
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 _MGNCS_MNAVIGATION_PANEL_PIECE_H
53 #define _MGNCS_MNAVIGATION_PANEL_PIECE_H
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 typedef struct _mNavigationPanelPieceClass mNavigationPanelPieceClass;
60 typedef struct _mNavigationPanelPiece mNavigationPanelPiece;
61 
62 
63 /* NavigationItem list */
64 typedef struct _item_list_t {
65  list_t list;
66  mNavigationItem* item;
67 } item_list_t;
68 
69 
70 /* NavigationPanelPiece set and get properties */
71 #define NAVIGATIONPANELPIECE_PROP_BEGIN USER_PIECE_PROP_BEGIN + 100
72 enum {
73  NCSP_NAVIGATIONPANELPIECE_BAR = NAVIGATIONBARPIECE_PROP_BEGIN,
74  NCSP_NAVIGATIONPANELPIECE_BAR_BKG,
75 };
76 
77 
78 /* NaviagtionPanelPiece methods */
79 #define mNavigationPanelPieceClassHeader(clss, superCls) \
80  mPanelPieceClassHeader(clss, superCls) \
81  void (*push)(clss*, mNavigationItem*); \
82  void (*pop)(clss*); \
83  void (*showNavigationBar)(clss*, BOOL, BOOL); \
84  BOOL (*currentIsRoot)(clss*);
85 
86 /* static interface*/
87 MGNCS_EXPORT extern mNavigationPanelPiece* ncsCreateNavigationPanelPieceWithRootView (mNavigationItem *rootItem);
88 
89 struct _mNavigationPanelPieceClass
90 {
91  mNavigationPanelPieceClassHeader(mNavigationPanelPiece, mPanelPiece)
92 };
93 
94 MGNCS_EXPORT extern mNavigationPanelPieceClass g_stmNavigationPanelPieceCls;
95 
96 
97 /* NaviagtioPanelPiece data members */
98 #define mNavigationPanelPieceHeader(clss) \
99  mPanelPieceHeader(clss) \
100  PLOGFONT default_title_font; \
101  list_t item_head; \
102  mNavigationBarPiece* bar;
103 
104 struct _mNavigationPanelPiece
105 {
106  mNavigationPanelPieceHeader(mNavigationPanelPiece)
107 };
108 
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
114 #endif /*_MGNCS_MNAVIGATION_PANEL_PIECE_H*/
115