Patch #1183952, Create to return bool

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-04-15 19:41:32 +00:00
parent e4f39334ab
commit a48cb41599
8 changed files with 60 additions and 52 deletions

View File

@@ -1507,10 +1507,10 @@ public:
#endif #endif
void Create(wxWindow *parent, wxWindowID id=wxID_ANY, bool Create(wxWindow *parent, wxWindowID id=wxID_ANY,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxSTCNameStr); const wxString& name = wxSTCNameStr);
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@@ -150,19 +150,20 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
} }
void wxStyledTextCtrl::Create(wxWindow *parent, bool wxStyledTextCtrl::Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style, long style,
const wxString& name) const wxString& name)
{ {
#ifdef __WXMAC__ #ifdef __WXMAC__
style |= wxVSCROLL | wxHSCROLL; style |= wxVSCROLL | wxHSCROLL;
#endif #endif
wxControl::Create(parent, id, pos, size, if (!wxControl::Create(parent, id, pos, size,
style | wxWANTS_CHARS | wxCLIP_CHILDREN, style | wxWANTS_CHARS | wxCLIP_CHILDREN,
wxDefaultValidator, name); wxDefaultValidator, name))
return false;
#ifdef LINK_LEXERS #ifdef LINK_LEXERS
Scintilla_LinkLexers(); Scintilla_LinkLexers();
@@ -181,6 +182,7 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
// Reduces flicker on GTK+/X11 // Reduces flicker on GTK+/X11
SetBackgroundStyle(wxBG_STYLE_CUSTOM); SetBackgroundStyle(wxBG_STYLE_CUSTOM);
return true;
} }

View File

@@ -150,19 +150,20 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
} }
void wxStyledTextCtrl::Create(wxWindow *parent, bool wxStyledTextCtrl::Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style, long style,
const wxString& name) const wxString& name)
{ {
#ifdef __WXMAC__ #ifdef __WXMAC__
style |= wxVSCROLL | wxHSCROLL; style |= wxVSCROLL | wxHSCROLL;
#endif #endif
wxControl::Create(parent, id, pos, size, if (!wxControl::Create(parent, id, pos, size,
style | wxWANTS_CHARS | wxCLIP_CHILDREN, style | wxWANTS_CHARS | wxCLIP_CHILDREN,
wxDefaultValidator, name); wxDefaultValidator, name))
return false;
#ifdef LINK_LEXERS #ifdef LINK_LEXERS
Scintilla_LinkLexers(); Scintilla_LinkLexers();
@@ -181,6 +182,7 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
// Reduces flicker on GTK+/X11 // Reduces flicker on GTK+/X11
SetBackgroundStyle(wxBG_STYLE_CUSTOM); SetBackgroundStyle(wxBG_STYLE_CUSTOM);
return true;
} }

View File

@@ -102,10 +102,10 @@ public:
#endif #endif
void Create(wxWindow *parent, wxWindowID id=wxID_ANY, bool Create(wxWindow *parent, wxWindowID id=wxID_ANY,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxSTCNameStr); const wxString& name = wxSTCNameStr);
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@@ -1507,10 +1507,10 @@ public:
#endif #endif
void Create(wxWindow *parent, wxWindowID id=wxID_ANY, bool Create(wxWindow *parent, wxWindowID id=wxID_ANY,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxSTCNameStr); const wxString& name = wxSTCNameStr);
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@@ -150,19 +150,20 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
} }
void wxStyledTextCtrl::Create(wxWindow *parent, bool wxStyledTextCtrl::Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style, long style,
const wxString& name) const wxString& name)
{ {
#ifdef __WXMAC__ #ifdef __WXMAC__
style |= wxVSCROLL | wxHSCROLL; style |= wxVSCROLL | wxHSCROLL;
#endif #endif
wxControl::Create(parent, id, pos, size, if (!wxControl::Create(parent, id, pos, size,
style | wxWANTS_CHARS | wxCLIP_CHILDREN, style | wxWANTS_CHARS | wxCLIP_CHILDREN,
wxDefaultValidator, name); wxDefaultValidator, name))
return false;
#ifdef LINK_LEXERS #ifdef LINK_LEXERS
Scintilla_LinkLexers(); Scintilla_LinkLexers();
@@ -181,6 +182,7 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
// Reduces flicker on GTK+/X11 // Reduces flicker on GTK+/X11
SetBackgroundStyle(wxBG_STYLE_CUSTOM); SetBackgroundStyle(wxBG_STYLE_CUSTOM);
return true;
} }

View File

@@ -150,19 +150,20 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
} }
void wxStyledTextCtrl::Create(wxWindow *parent, bool wxStyledTextCtrl::Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style, long style,
const wxString& name) const wxString& name)
{ {
#ifdef __WXMAC__ #ifdef __WXMAC__
style |= wxVSCROLL | wxHSCROLL; style |= wxVSCROLL | wxHSCROLL;
#endif #endif
wxControl::Create(parent, id, pos, size, if (!wxControl::Create(parent, id, pos, size,
style | wxWANTS_CHARS | wxCLIP_CHILDREN, style | wxWANTS_CHARS | wxCLIP_CHILDREN,
wxDefaultValidator, name); wxDefaultValidator, name))
return false;
#ifdef LINK_LEXERS #ifdef LINK_LEXERS
Scintilla_LinkLexers(); Scintilla_LinkLexers();
@@ -181,6 +182,7 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
// Reduces flicker on GTK+/X11 // Reduces flicker on GTK+/X11
SetBackgroundStyle(wxBG_STYLE_CUSTOM); SetBackgroundStyle(wxBG_STYLE_CUSTOM);
return true;
} }

View File

@@ -102,10 +102,10 @@ public:
#endif #endif
void Create(wxWindow *parent, wxWindowID id=wxID_ANY, bool Create(wxWindow *parent, wxWindowID id=wxID_ANY,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxSTCNameStr); const wxString& name = wxSTCNameStr);
//---------------------------------------------------------------------- //----------------------------------------------------------------------