X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f68586e51b20dccee3fd5645aeaca7cc8ff298c2..afc94fa6b43722d604017798a767fa84ef883b47:/src/gtk1/control.cpp diff --git a/src/gtk1/control.cpp b/src/gtk1/control.cpp index a0b88f5944..959092087b 100644 --- a/src/gtk1/control.cpp +++ b/src/gtk1/control.cpp @@ -13,7 +13,7 @@ #include "wx/control.h" -#include "gtk/gtk.h" +#include //----------------------------------------------------------------------------- // wxControl @@ -36,6 +36,20 @@ wxControl::wxControl( wxWindow *parent, (void)Create(parent, id, pos, size, style, name); } +#if wxUSE_VALIDATORS +wxControl::wxControl( wxWindow *parent, + wxWindowID id, + const wxPoint &pos, + const wxSize &size, + long style, + const wxValidator& validator, + const wxString &name) +{ + (void)Create(parent, id, pos, size, style, name); + SetValidator(validator); +} +#endif + void wxControl::SetLabel( const wxString &label ) { m_label.Empty(); @@ -60,6 +74,9 @@ wxString wxControl::GetLabel() const wxSize wxControl::DoGetBestSize() const { + // Do not return any arbitrary default value... + wxASSERT_MSG( m_widget, wxT("DoGetBestSize called before creation") ); + GtkRequisition req; (* GTK_WIDGET_CLASS( GTK_OBJECT(m_widget)->klass )->size_request ) (m_widget, &req );