void Move(const wxPoint& pt, int flags = wxSIZE_USE_EXISTING)
{ Move(pt.x, pt.y, flags); }
+ // A 'Smart' SetSize that will fill in default size values with 'best' size
+ void SetBestFittingSize(const wxSize& size=wxDefaultSize);
+
// Z-order
virtual void Raise() = 0;
virtual void Lower() = 0;
virtual wxSize GetMaxSize() const { return wxSize( m_maxWidth, m_maxHeight ); }
virtual wxSize GetMinSize() const { return wxSize( m_minWidth, m_minHeight ); }
+ void SetMinSize(const wxSize& minSize) { SetSizeHints(minSize); }
+ void SetMaxSize(const wxSize& maxSize) { SetSizeHints(GetMinSize(), maxSize); }
+
// Methods for accessing the virtual size of a window. For most
// windows this is just the client area of the window, but for
// some like scrolled windows it is more or less independent of
virtual void SetTmpDefaultItem(wxWindow * WXUNUSED(win)) { }
// Navigates in the specified direction by sending a wxNavigationKeyEvent
- virtual bool Navigate(bool direction = true, bool windowChange = false);
+ virtual bool Navigate(int flags = wxNavigationKeyEvent::IsForward);
// parent/children relations
// -------------------------
static int WidthDefault(int w) { return w == -1 ? 20 : w; }
static int HeightDefault(int h) { return h == -1 ? 20 : h; }
- // set the best size for the control if the default size was given:
- // replaces the fields of size == -1 with the best values for them and
- // calls SetSize() if needed
- //
- // This function is rather unfortunately named.. it's really just a
- // smarter SetSize / convenience function for expanding wxDefaultSize.
- // Note that it does not influence the value returned by GetBestSize
- // at all.
- void SetBestSize(const wxSize& size);
+ // keep the old name for compatibility, at least until all the internal
+ // usages of it are changed to SetBestFittingSize
+ void SetBestSize(const wxSize& size) { SetBestFittingSize(size); }
+
// set the initial window size if none is given (i.e. at least one of the
// components of the size passed to ctor/Create() is -1)