52 #ifndef _MGNCS_MNAVIGATION_ITEM_H
53 #define _MGNCS_MNAVIGATION_ITEM_H
60 typedef struct _mNavigationItemClass mNavigationItemClass;
61 typedef struct _mNavigationItem mNavigationItem;
65 #define NAVIGATIONITEM_PROP_BEGIN USER_PIECE_PROP_BEGIN + 1
67 NCSP_NAVIGATIONITEM_CONTENT = NAVIGATIONITEM_PROP_BEGIN,
68 NCSP_NAVIGATIONITEM_BACKGROUND,
69 NCSP_NAVIGATIONITEM_BAR_BKG,
70 NCSP_NAVIGATIONITEM_TITLE,
71 NCSP_NAVIGATIONITEM_STYLE,
72 NCSP_NAVIGATIONITEM_LEFT_BUTTON,
73 NCSP_NAVIGATIONITEM_TITLE_BUTTON,
74 NCSP_NAVIGATIONITEM_RIGHT_BUTTON,
75 NCSP_NAVIGATIONITEM_DEFAULT_BUTTON_FONT,
80 NAVIGATION_STYLE_NORMAL = 0x00,
81 NAVIGATION_STYLE_FULLSCREEN = 0x01,
82 NAVIGATION_STYLE_HIDE_BAR = 0x02
83 } navigation_bar_style;
87 #define mNavigationItemClassHeader(clss, superCls) \
88 mObjectClassHeader(clss, superCls) \
89 m3DButtonPiece* (*createDefaultButton)(clss*, const char*, DWORD); \
90 BOOL (*setProperty)(clss*, int, DWORD); \
91 DWORD(*getProperty)(clss*, int);
94 MGNCS_EXPORT
extern mNavigationItem* ncsCreateNavigationItem (mHotPiece *content,
95 const char *title,
unsigned int style);
96 MGNCS_EXPORT
extern void ncsDestroyNavigationItem (mNavigationItem* item);
97 MGNCS_EXPORT
extern void ncsAdjustNavigationItemRectWithTitle (mHotPiece *content,
const char *title, PLOGFONT font);
99 struct _mNavigationItemClass
101 mNavigationItemClassHeader(mNavigationItem, mObject)
104 MGNCS_EXPORT
extern mNavigationItemClass g_stmNavigationItemCls;
108 #define mNavigationItemHeader(clss) \
109 mObjectHeader(clss) \
110 mShapeTransRoundPiece* background; \
111 mHotPiece* content; \
112 mButtonPanelPiece* bar_left_button; \
113 mTextPiece* bar_title_button; \
114 mButtonPanelPiece* bar_right_button; \
115 PLOGFONT default_button_font; \
116 unsigned int style; \
119 struct _mNavigationItem
121 mNavigationItemHeader(mNavigationItem)