wxWindow::GetBestSize() added

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-11-19 21:01:20 +00:00
parent 33879bb218
commit f68586e51b
61 changed files with 378 additions and 221 deletions

View File

@@ -73,6 +73,9 @@ public:
GtkWidget *m_widgetCheckbox;
GtkWidget *m_widgetLabel;
protected:
virtual wxSize DoGetBestSize() const;
private:
DECLARE_DYNAMIC_CLASS(wxCheckBox)
};

View File

@@ -71,6 +71,8 @@ protected:
virtual void DoSetItemClientObject( int n, wxClientData* clientData );
virtual wxClientData* DoGetItemClientObject( int n ) const;
virtual wxSize DoGetBestSize() const;
private:
// common part of Create() and DoAppend()
size_t AppendHelper(GtkWidget *menu, const wxString& item);

View File

@@ -121,6 +121,9 @@ public:
bool IsOwnGtkWindow( GdkWindow *window );
void ApplyWidgetStyle();
protected:
virtual wxSize DoGetBestSize() const;
private:
DECLARE_DYNAMIC_CLASS(wxComboBox)
DECLARE_EVENT_TABLE()

View File

@@ -46,6 +46,8 @@ public:
virtual wxString GetLabel() const;
protected:
virtual wxSize DoGetBestSize() const;
wxString m_label;
char m_chAccel; // enabled to avoid breaking binary compatibility later on

View File

@@ -96,6 +96,9 @@ public:
bool m_hasCheckBoxes;
#endif // wxUSE_CHECKLISTBOX
protected:
virtual wxSize DoGetBestSize() const;
private:
// this array is only used for controls with wxCB_SORT style, so only
// allocate it if it's needed (hence using pointer)

View File

@@ -80,6 +80,9 @@ public:
SetBitmap( icon );
}
protected:
virtual wxSize DoGetBestSize() const;
private:
// creates the new pixmap widget
void CreatePixmapWidget();

View File

@@ -36,25 +36,35 @@ extern const wxChar *wxStaticTextNameStr;
// wxStaticText
//-----------------------------------------------------------------------------
class wxStaticText: public wxControl
class wxStaticText : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxStaticText)
public:
public:
wxStaticText();
wxStaticText(wxWindow *parent,
wxWindowID id,
const wxString &label,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = 0,
const wxString &name = wxStaticTextNameStr );
wxStaticText(void);
wxStaticText( wxWindow *parent, wxWindowID id, const wxString &label,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
long style = 0, const wxString &name = wxStaticTextNameStr );
bool Create( wxWindow *parent, wxWindowID id, const wxString &label,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
long style = 0, const wxString &name = wxStaticTextNameStr );
wxString GetLabel(void) const;
bool Create(wxWindow *parent,
wxWindowID id,
const wxString &label,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = 0,
const wxString &name = wxStaticTextNameStr );
wxString GetLabel() const;
void SetLabel( const wxString &label );
// implementation
// implementation
void ApplyWidgetStyle();
protected:
DECLARE_DYNAMIC_CLASS(wxStaticText)
};
#endif // __GTKSTATICTEXTH__

View File

@@ -131,6 +131,9 @@ public:
void SetModified() { m_modified = TRUE; }
protected:
virtual wxSize DoGetBestSize() const;
private:
bool m_modified;
GtkWidget *m_text;