class WXDLLIMPEXP_CORE wxTopLevelWindowGTK : public wxTopLevelWindowBase
{
+ typedef wxTopLevelWindowBase base_type;
public:
// construction
wxTopLevelWindowGTK() { Init(); }
virtual void DoSetClientSize(int width, int height);
virtual void DoGetClientSize(int *width, int *height) const;
+ virtual wxSize DoGetBestSize() const;
// string shown in the title bar
wxString m_title;
HandleWindowEvent(event);
}
- bool change = wxTopLevelWindowBase::Show(show);
+ bool change = base_type::Show(show);
if (change && !show)
{
void wxTopLevelWindowGTK::DoSetClientSize(int width, int height)
{
- wxTopLevelWindowBase::DoSetClientSize(width, height);
+ base_type::DoSetClientSize(width, height);
// Since client size is being explicitly set, don't change it later
// Has to be done after calling base because it calls SetSize,
m_deferShowAllowed = false;
}
+wxSize wxTopLevelWindowGTK::DoGetBestSize() const
+{
+ // temporarily turn off m_isIconized,
+ // so we get an accurate client size from DoGetClientSize
+ const bool save = m_isIconized;
+ const_cast<wxTopLevelWindowGTK*>(this)->m_isIconized = false;
+ const wxSize size = base_type::DoGetBestSize();
+ const_cast<wxTopLevelWindowGTK*>(this)->m_isIconized = save;
+ return size;
+}
+
void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const
{
wxASSERT_MSG(m_widget, wxT("invalid frame"));
int maxW, int maxH,
int incW, int incH )
{
- wxTopLevelWindowBase::DoSetSizeHints( minW, minH, maxW, maxH, incW, incH );
+ base_type::DoSetSizeHints(minW, minH, maxW, maxH, incW, incH);
const wxSize minSize = GetMinSize();
const wxSize maxSize = GetMaxSize();
{
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
- wxTopLevelWindowBase::SetIcons( icons );
+ base_type::SetIcons(icons);
// Setting icons before window is realized can cause a GTK assertion if
// another TLW is realized before this one, and it has this one as it's