remove wxWindow::m_needParent and use GTKNeedsParent() which can be overridden in just wxMenuBar (and not set in each and every wxGTK control)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -40,6 +40,10 @@ public:
|
||||
void SetLayoutDirection(wxLayoutDirection dir);
|
||||
wxLayoutDirection GetLayoutDirection() const;
|
||||
|
||||
// wxMenuBar is not a top level window but it still doesn't need a parent
|
||||
// window
|
||||
virtual bool GTKNeedsParent() const { return false; }
|
||||
|
||||
void Attach(wxFrame *frame);
|
||||
|
||||
// implementation only from now on
|
||||
|
@@ -181,6 +181,11 @@ public:
|
||||
static wxLayoutDirection GTKGetLayout(GtkWidget *widget);
|
||||
static void GTKSetLayout(GtkWidget *widget, wxLayoutDirection dir);
|
||||
|
||||
// return true if this window must have a non-NULL parent, false if it can
|
||||
// be created without parent (normally only top level windows but in wxGTK
|
||||
// there is also the exception of wxMenuBar)
|
||||
virtual bool GTKNeedsParent() const { return !IsTopLevel(); }
|
||||
|
||||
protected:
|
||||
// Override GTKWidgetNeedsMnemonic and return true if your
|
||||
// needs to set its mnemonic widget, such as for a
|
||||
@@ -292,7 +297,6 @@ public:
|
||||
|
||||
|
||||
// extra (wxGTK-specific) flags
|
||||
bool m_needParent:1; // ! wxFrame, wxDialog, wxNotebookPage ?
|
||||
bool m_noExpose:1; // wxGLCanvas has its own redrawing
|
||||
bool m_nativeSizeEvent:1; // wxGLCanvas sends wxSizeEvent upon "alloc_size"
|
||||
bool m_hasScrolling:1;
|
||||
|
Reference in New Issue
Block a user