// temporarily switches event handlers).
// ----------------------------------------------------------------------------
+// different window variants, on platforms like eg mac uses different rendering sizes
+
+enum wxWindowVariant
+{
+ wxWINDOW_VARIANT_NORMAL, // Normal size
+ wxWINDOW_VARIANT_SMALL, // Smaller size (about 25 % smaller than normal )
+ wxWINDOW_VARIANT_MINI, // Mini size (about 33 % smaller than normal )
+ wxWINDOW_VARIANT_LARGE, // Large size (about 25 % larger than normal )
+};
+
class WXDLLEXPORT wxWindowBase : public wxEvtHandler
{
public:
virtual void SetName( const wxString &name ) { m_windowName = name; }
virtual wxString GetName() const { return m_windowName; }
+ // sets the window variant, calls internally DoSetVariant if variant has changed
+ void SetWindowVariant( wxWindowVariant variant ) ;
+ wxWindowVariant GetWindowVariant() const { return m_windowVariant ; }
+
+
// window id uniquely identifies the window among its siblings unless
// it is -1 which means "don't care"
void SetId( wxWindowID winid ) { m_windowId = winid; }
int m_minVirtualHeight;
int m_maxVirtualWidth;
int m_maxVirtualHeight;
+
+ wxWindowVariant m_windowVariant ;
// 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 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; }
+ // Get the default size for the new window if no explicit size given. TLWs
+ // have their own default size so this is just for non top-level windows.
+ 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
virtual void AdjustForParentClientOrigin(int& x, int& y,
int sizeFlags = 0) const;
+ // implements the window variants
+ virtual void DoSetWindowVariant( wxWindowVariant variant ) ;
private: