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:
Vadim Zeitlin 1999-02-24 13:15:42 +00:00
parent 21f280f4ec
commit 68995f26e8
8 changed files with 42 additions and 20 deletions

View File

@ -40,7 +40,7 @@ class wxDialog: public wxPanel
DECLARE_DYNAMIC_CLASS(wxDialog)
public:
wxDialog();
wxDialog() { Init(); }
wxDialog( wxWindow *parent, wxWindowID id,
const wxString &title,
const wxPoint &pos = wxDefaultPosition,
@ -97,6 +97,9 @@ public:
wxIcon m_icon;
protected:
// common part of all ctors
void Init();
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);

View File

@ -532,6 +532,9 @@ public:
virtual void GetPositionConstraint(int *x, int *y) const ;
protected:
// common part of all ctors
void Init();
// 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
// versions of these functions in the base class

View File

@ -40,7 +40,7 @@ class wxDialog: public wxPanel
DECLARE_DYNAMIC_CLASS(wxDialog)
public:
wxDialog();
wxDialog() { Init(); }
wxDialog( wxWindow *parent, wxWindowID id,
const wxString &title,
const wxPoint &pos = wxDefaultPosition,
@ -97,6 +97,9 @@ public:
wxIcon m_icon;
protected:
// common part of all ctors
void Init();
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);

View File

@ -532,6 +532,9 @@ public:
virtual void GetPositionConstraint(int *x, int *y) const ;
protected:
// common part of all ctors
void Init();
// 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
// versions of these functions in the base class

View File

@ -96,9 +96,8 @@ END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxPanel)
wxDialog::wxDialog()
void wxDialog::Init()
{
m_title = "";
m_sizeSet = FALSE;
m_modalShowing = FALSE;
}
@ -108,8 +107,8 @@ wxDialog::wxDialog( wxWindow *parent,
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
m_modalShowing = FALSE;
m_sizeSet = FALSE;
Init();
Create( parent, id, title, pos, size, style, name );
}

View File

@ -1309,8 +1309,10 @@ BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler)
EVT_KEY_DOWN(wxWindow::OnKeyDown)
END_EVENT_TABLE()
wxWindow::wxWindow()
void wxWindow::Init()
{
m_isWindow = TRUE;
m_widget = (GtkWidget *) NULL;
m_wxwindow = (GtkWidget *) NULL;
m_parent = (wxWindow *) NULL;
@ -1377,11 +1379,17 @@ wxWindow::wxWindow()
#endif // wxUSE_TOOLTIPS
}
wxWindow::wxWindow()
{
Init();
}
wxWindow::wxWindow( wxWindow *parent, wxWindowID id,
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
m_insertCallback = wxInsertChildInWindow;
Init();
Create( parent, id, pos, size, style, name );
}
@ -1389,9 +1397,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
m_isShown = FALSE;
m_isEnabled = TRUE;
m_needParent = TRUE;
wxASSERT_MSG( m_isWindow, "Init() must have been called before!" );
PreCreation( parent, id, pos, size, style, name );

View File

@ -96,9 +96,8 @@ END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxPanel)
wxDialog::wxDialog()
void wxDialog::Init()
{
m_title = "";
m_sizeSet = FALSE;
m_modalShowing = FALSE;
}
@ -108,8 +107,8 @@ wxDialog::wxDialog( wxWindow *parent,
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
m_modalShowing = FALSE;
m_sizeSet = FALSE;
Init();
Create( parent, id, title, pos, size, style, name );
}

View File

@ -1309,8 +1309,10 @@ BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler)
EVT_KEY_DOWN(wxWindow::OnKeyDown)
END_EVENT_TABLE()
wxWindow::wxWindow()
void wxWindow::Init()
{
m_isWindow = TRUE;
m_widget = (GtkWidget *) NULL;
m_wxwindow = (GtkWidget *) NULL;
m_parent = (wxWindow *) NULL;
@ -1377,11 +1379,17 @@ wxWindow::wxWindow()
#endif // wxUSE_TOOLTIPS
}
wxWindow::wxWindow()
{
Init();
}
wxWindow::wxWindow( wxWindow *parent, wxWindowID id,
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
m_insertCallback = wxInsertChildInWindow;
Init();
Create( parent, id, pos, size, style, name );
}
@ -1389,9 +1397,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
m_isShown = FALSE;
m_isEnabled = TRUE;
m_needParent = TRUE;
wxASSERT_MSG( m_isWindow, "Init() must have been called before!" );
PreCreation( parent, id, pos, size, style, name );