+ // get the size best suited for the window (in fact, minimal
+ // acceptable size using which it will still look "nice")
+ wxSize GetBestSize() const { return DoGetBestSize(); }
+ void GetBestSize(int *w, int *h) const
+ {
+ wxSize s = DoGetBestSize();
+ if ( w )
+ *w = s.x;
+ if ( h )
+ *h = s.y;
+ }
+
+ // the generic centre function - centers the window on parent by
+ // default or on screen if it doesn't have parent or
+ // wxCENTER_ON_SCREEN flag is given
+ void Centre( int direction = wxBOTH );
+ void Center( int direction = wxBOTH ) { Centre(direction); }
+
+ // centre on screen (only works for top level windows)
+ void CentreOnScreen(int dir = wxBOTH) { Centre(dir | wxCENTER_ON_SCREEN); }
+ void CenterOnScreen(int dir = wxBOTH) { CentreOnScreen(dir); }
+