// creating the window
// -------------------
- // default ctor
- wxWindowBase() { InitBase(); }
+ // default ctor, initializes everything which can be initialized before
+ // Create()
+ wxWindowBase() ;
// pseudo ctor (can't be virtual, called from ctor)
bool CreateBase(wxWindowBase *parent,
virtual void SetThemeEnabled(bool enableTheme) { m_themeEnabled = enableTheme; }
virtual bool GetThemeEnabled() const { return m_themeEnabled; }
+ // Returns true if this class should have the background colour
+ // changed to match the parent window's theme. For example when a
+ // page is added to a notebook it and it's children may need to have
+ // the colours adjusted depending on the current theme settings, but
+ // not all windows/controls can do this without looking wrong.
+ virtual void ApplyParentThemeBackground(const wxColour& WXUNUSED(bg))
+ { /* do nothing */ }
+
// returns true if this window should inherit its parent colours on
// creation
virtual bool ShouldInheritColours() const { return false; }
int m_maxVirtualWidth;
int m_maxVirtualHeight;
- // common part of all ctors: it is not virtual because it is called from
- // ctor
- void InitBase();
-
// override this to change the default (i.e. used when no style is
// specified) border for the window class
virtual wxBorder GetDefaultBorder() const;
- // get the default size for the new window if no explicit size given
- // FIXME why 20 and not 30, 10 or ...?
- static int WidthDefault(int w) { return w == -1 ? 20 : w; }
- static int HeightDefault(int h) { return h == -1 ? 20 : h; }
+ // Get the default size for the new window if no explicit size given If
+ // there are better default sizes then these can be changed, just as long
+ // as they are not too small for TLWs.
+ static int WidthDefault(int w) { return w == -1 ? 400 : w; }
+ static int HeightDefault(int h) { return h == -1 ? 250 : 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