Implemented tearoff menus, please see my posting to wxwin-developers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -618,7 +618,13 @@ enum wxOrientation
|
||||
*/
|
||||
// use native docking
|
||||
#define wxMB_DOCKABLE 0x0001
|
||||
// make all menus tearoff menus, even if not set on per-menu basis
|
||||
#define wxMB_TEAROFF 0x0002
|
||||
|
||||
/*
|
||||
* wxMenu style flags
|
||||
*/
|
||||
#define wxMENU_TEAROFF 0x0001
|
||||
|
||||
/*
|
||||
* Apply to all panel items
|
||||
|
@@ -100,6 +100,9 @@ enum wxStockCursor
|
||||
wxCURSOR_WAIT,
|
||||
wxCURSOR_WATCH,
|
||||
wxCURSOR_BLANK,
|
||||
#ifdef __WXGTK__
|
||||
wxCURSOR_DEFAULT, // standard X11 cursor
|
||||
#endif
|
||||
#ifdef __X__
|
||||
// Not yet implemented for Windows
|
||||
wxCURSOR_CROSS_REVERSE,
|
||||
|
@@ -16,8 +16,6 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CHOICE
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
@@ -99,6 +97,5 @@ public:
|
||||
void ApplyWidgetStyle();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // __GTKCHOICEH__
|
||||
|
@@ -100,6 +100,7 @@ public:
|
||||
GtkItemFactory *m_factory;
|
||||
wxList m_menus;
|
||||
GtkWidget *m_menubar;
|
||||
long m_style;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -112,7 +113,9 @@ class wxMenu : public wxEvtHandler
|
||||
|
||||
public:
|
||||
wxMenu( const wxString& title = wxEmptyString,
|
||||
const wxFunction func = (wxFunction) NULL );
|
||||
const wxFunction func = (wxFunction) NULL,
|
||||
long style = 0);
|
||||
wxMenu( long style );
|
||||
~wxMenu();
|
||||
|
||||
// operations
|
||||
@@ -182,7 +185,13 @@ public:
|
||||
GtkAccelGroup *m_accel;
|
||||
GtkItemFactory *m_factory;
|
||||
|
||||
private:
|
||||
// used by wxMenuBar
|
||||
inline long GetStyle(void) const { return m_style; }
|
||||
private:
|
||||
// common code for both constructors:
|
||||
void Init( const wxString& title,
|
||||
const wxFunction func,
|
||||
long style);
|
||||
|
||||
wxString m_title;
|
||||
wxList m_items;
|
||||
@@ -190,6 +199,7 @@ private:
|
||||
wxFunction m_callback;
|
||||
wxEvtHandler *m_eventHandler;
|
||||
void *m_clientData;
|
||||
long m_style;
|
||||
};
|
||||
|
||||
#endif // __GTKMENUH__
|
||||
|
@@ -16,8 +16,6 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CHOICE
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
@@ -99,6 +97,5 @@ public:
|
||||
void ApplyWidgetStyle();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // __GTKCHOICEH__
|
||||
|
@@ -100,6 +100,7 @@ public:
|
||||
GtkItemFactory *m_factory;
|
||||
wxList m_menus;
|
||||
GtkWidget *m_menubar;
|
||||
long m_style;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -112,7 +113,9 @@ class wxMenu : public wxEvtHandler
|
||||
|
||||
public:
|
||||
wxMenu( const wxString& title = wxEmptyString,
|
||||
const wxFunction func = (wxFunction) NULL );
|
||||
const wxFunction func = (wxFunction) NULL,
|
||||
long style = 0);
|
||||
wxMenu( long style );
|
||||
~wxMenu();
|
||||
|
||||
// operations
|
||||
@@ -182,7 +185,13 @@ public:
|
||||
GtkAccelGroup *m_accel;
|
||||
GtkItemFactory *m_factory;
|
||||
|
||||
private:
|
||||
// used by wxMenuBar
|
||||
inline long GetStyle(void) const { return m_style; }
|
||||
private:
|
||||
// common code for both constructors:
|
||||
void Init( const wxString& title,
|
||||
const wxFunction func,
|
||||
long style);
|
||||
|
||||
wxString m_title;
|
||||
wxList m_items;
|
||||
@@ -190,6 +199,7 @@ private:
|
||||
wxFunction m_callback;
|
||||
wxEvtHandler *m_eventHandler;
|
||||
void *m_clientData;
|
||||
long m_style;
|
||||
};
|
||||
|
||||
#endif // __GTKMENUH__
|
||||
|
Reference in New Issue
Block a user