wxGTK fixes for the yesterday's addition of m_isWindow flag
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -40,7 +40,7 @@ class wxDialog: public wxPanel
|
|||||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxDialog();
|
wxDialog() { Init(); }
|
||||||
wxDialog( wxWindow *parent, wxWindowID id,
|
wxDialog( wxWindow *parent, wxWindowID id,
|
||||||
const wxString &title,
|
const wxString &title,
|
||||||
const wxPoint &pos = wxDefaultPosition,
|
const wxPoint &pos = wxDefaultPosition,
|
||||||
@@ -97,6 +97,9 @@ public:
|
|||||||
wxIcon m_icon;
|
wxIcon m_icon;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
// common part of all ctors
|
||||||
|
void Init();
|
||||||
|
|
||||||
virtual void DoSetSize(int x, int y,
|
virtual void DoSetSize(int x, int y,
|
||||||
int width, int height,
|
int width, int height,
|
||||||
int sizeFlags = wxSIZE_AUTO);
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
|
@@ -532,6 +532,9 @@ public:
|
|||||||
virtual void GetPositionConstraint(int *x, int *y) const ;
|
virtual void GetPositionConstraint(int *x, int *y) const ;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
// common part of all ctors
|
||||||
|
void Init();
|
||||||
|
|
||||||
// this is the virtual function to be overriden in any derived class which
|
// this is the virtual function to be overriden in any derived class which
|
||||||
// wants to change how SetSize() or Move() works - it is called by all
|
// wants to change how SetSize() or Move() works - it is called by all
|
||||||
// versions of these functions in the base class
|
// versions of these functions in the base class
|
||||||
|
@@ -40,7 +40,7 @@ class wxDialog: public wxPanel
|
|||||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxDialog();
|
wxDialog() { Init(); }
|
||||||
wxDialog( wxWindow *parent, wxWindowID id,
|
wxDialog( wxWindow *parent, wxWindowID id,
|
||||||
const wxString &title,
|
const wxString &title,
|
||||||
const wxPoint &pos = wxDefaultPosition,
|
const wxPoint &pos = wxDefaultPosition,
|
||||||
@@ -97,6 +97,9 @@ public:
|
|||||||
wxIcon m_icon;
|
wxIcon m_icon;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
// common part of all ctors
|
||||||
|
void Init();
|
||||||
|
|
||||||
virtual void DoSetSize(int x, int y,
|
virtual void DoSetSize(int x, int y,
|
||||||
int width, int height,
|
int width, int height,
|
||||||
int sizeFlags = wxSIZE_AUTO);
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
|
@@ -532,6 +532,9 @@ public:
|
|||||||
virtual void GetPositionConstraint(int *x, int *y) const ;
|
virtual void GetPositionConstraint(int *x, int *y) const ;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
// common part of all ctors
|
||||||
|
void Init();
|
||||||
|
|
||||||
// this is the virtual function to be overriden in any derived class which
|
// this is the virtual function to be overriden in any derived class which
|
||||||
// wants to change how SetSize() or Move() works - it is called by all
|
// wants to change how SetSize() or Move() works - it is called by all
|
||||||
// versions of these functions in the base class
|
// versions of these functions in the base class
|
||||||
|
@@ -96,9 +96,8 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxPanel)
|
IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxPanel)
|
||||||
|
|
||||||
wxDialog::wxDialog()
|
void wxDialog::Init()
|
||||||
{
|
{
|
||||||
m_title = "";
|
|
||||||
m_sizeSet = FALSE;
|
m_sizeSet = FALSE;
|
||||||
m_modalShowing = FALSE;
|
m_modalShowing = FALSE;
|
||||||
}
|
}
|
||||||
@@ -108,8 +107,8 @@ wxDialog::wxDialog( wxWindow *parent,
|
|||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
m_modalShowing = FALSE;
|
Init();
|
||||||
m_sizeSet = FALSE;
|
|
||||||
Create( parent, id, title, pos, size, style, name );
|
Create( parent, id, title, pos, size, style, name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1309,8 +1309,10 @@ BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler)
|
|||||||
EVT_KEY_DOWN(wxWindow::OnKeyDown)
|
EVT_KEY_DOWN(wxWindow::OnKeyDown)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
wxWindow::wxWindow()
|
void wxWindow::Init()
|
||||||
{
|
{
|
||||||
|
m_isWindow = TRUE;
|
||||||
|
|
||||||
m_widget = (GtkWidget *) NULL;
|
m_widget = (GtkWidget *) NULL;
|
||||||
m_wxwindow = (GtkWidget *) NULL;
|
m_wxwindow = (GtkWidget *) NULL;
|
||||||
m_parent = (wxWindow *) NULL;
|
m_parent = (wxWindow *) NULL;
|
||||||
@@ -1377,11 +1379,17 @@ wxWindow::wxWindow()
|
|||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxWindow::wxWindow()
|
||||||
|
{
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
|
||||||
wxWindow::wxWindow( wxWindow *parent, wxWindowID id,
|
wxWindow::wxWindow( wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
m_insertCallback = wxInsertChildInWindow;
|
Init();
|
||||||
|
|
||||||
Create( parent, id, pos, size, style, name );
|
Create( parent, id, pos, size, style, name );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1389,9 +1397,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
|
|||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
m_isShown = FALSE;
|
wxASSERT_MSG( m_isWindow, "Init() must have been called before!" );
|
||||||
m_isEnabled = TRUE;
|
|
||||||
m_needParent = TRUE;
|
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
PreCreation( parent, id, pos, size, style, name );
|
||||||
|
|
||||||
|
@@ -96,9 +96,8 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxPanel)
|
IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxPanel)
|
||||||
|
|
||||||
wxDialog::wxDialog()
|
void wxDialog::Init()
|
||||||
{
|
{
|
||||||
m_title = "";
|
|
||||||
m_sizeSet = FALSE;
|
m_sizeSet = FALSE;
|
||||||
m_modalShowing = FALSE;
|
m_modalShowing = FALSE;
|
||||||
}
|
}
|
||||||
@@ -108,8 +107,8 @@ wxDialog::wxDialog( wxWindow *parent,
|
|||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
m_modalShowing = FALSE;
|
Init();
|
||||||
m_sizeSet = FALSE;
|
|
||||||
Create( parent, id, title, pos, size, style, name );
|
Create( parent, id, title, pos, size, style, name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1309,8 +1309,10 @@ BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler)
|
|||||||
EVT_KEY_DOWN(wxWindow::OnKeyDown)
|
EVT_KEY_DOWN(wxWindow::OnKeyDown)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
wxWindow::wxWindow()
|
void wxWindow::Init()
|
||||||
{
|
{
|
||||||
|
m_isWindow = TRUE;
|
||||||
|
|
||||||
m_widget = (GtkWidget *) NULL;
|
m_widget = (GtkWidget *) NULL;
|
||||||
m_wxwindow = (GtkWidget *) NULL;
|
m_wxwindow = (GtkWidget *) NULL;
|
||||||
m_parent = (wxWindow *) NULL;
|
m_parent = (wxWindow *) NULL;
|
||||||
@@ -1377,11 +1379,17 @@ wxWindow::wxWindow()
|
|||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxWindow::wxWindow()
|
||||||
|
{
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
|
||||||
wxWindow::wxWindow( wxWindow *parent, wxWindowID id,
|
wxWindow::wxWindow( wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
m_insertCallback = wxInsertChildInWindow;
|
Init();
|
||||||
|
|
||||||
Create( parent, id, pos, size, style, name );
|
Create( parent, id, pos, size, style, name );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1389,9 +1397,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
|
|||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
m_isShown = FALSE;
|
wxASSERT_MSG( m_isWindow, "Init() must have been called before!" );
|
||||||
m_isEnabled = TRUE;
|
|
||||||
m_needParent = TRUE;
|
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
PreCreation( parent, id, pos, size, style, name );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user