merging back XTI branch part 2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2011-01-04 08:31:53 +00:00
parent f0c6b96336
commit 2895324520
244 changed files with 4364 additions and 5859 deletions

View File

@@ -392,6 +392,39 @@ protected:
wxDECLARE_NO_COPY_CLASS(wxMenuBase);
};
#if wxUSE_EXTENDED_RTTI
// ----------------------------------------------------------------------------
// XTI accessor
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxMenuInfo : public wxObject
{
public:
wxMenuInfo() { m_menu = NULL; }
virtual ~wxMenuInfo() { }
bool Create( wxMenu *menu, const wxString &title )
{
m_menu = menu;
m_title = title;
return true;
}
wxMenu* GetMenu() const { return m_menu; }
wxString GetTitle() const { return m_title; }
private:
wxMenu *m_menu;
wxString m_title;
DECLARE_DYNAMIC_CLASS(wxMenuInfo)
};
WX_DECLARE_EXPORTED_LIST(wxMenuInfo, wxMenuInfoList );
#endif
// ----------------------------------------------------------------------------
// wxMenuBar
// ----------------------------------------------------------------------------
@@ -508,6 +541,13 @@ public:
virtual bool CanBeOutsideClientArea() const { return true; }
#if wxUSE_EXTENDED_RTTI
// XTI helpers:
bool AppendMenuInfo( const wxMenuInfo *info )
{ return Append( info->GetMenu(), info->GetTitle() ); }
const wxMenuInfoList& GetMenuInfos() const;
#endif
#if WXWIN_COMPATIBILITY_2_8
// get or change the label of the menu at given position
// Deprecated in favour of SetMenuLabel
@@ -520,6 +560,11 @@ protected:
// the list of all our menus
wxMenuList m_menus;
#if wxUSE_EXTENDED_RTTI
// used by XTI
wxMenuInfoList m_menuInfos;
#endif
// the frame we are attached to (may be NULL)
wxFrame *m_menuBarFrame;