int GetMaxWidth() const { return m_maxWidth; }
int GetMaxHeight() const { return m_maxHeight; }
+ // Override this method to control the values given to Sizers etc.
+ virtual wxSize GetMaxSize() const { return wxSize( m_maxWidth, m_maxHeight ); }
+
// window state
// ------------
// extra style: the less often used style bits which can't be set with
// SetWindowStyleFlag()
- void SetExtraStyle(long exStyle) { m_exStyle = exStyle; }
+ virtual void SetExtraStyle(long exStyle) { m_exStyle = exStyle; }
long GetExtraStyle() const { return m_exStyle; }
// make the window modal (all other windows unresponsive)
void SetConstraints( wxLayoutConstraints *constraints );
wxLayoutConstraints *GetConstraints() const { return m_constraints; }
- // when using constraints, it makes sense to update children positions
- // automatically whenever the window is resized - this is done if
- // autoLayout is on
- void SetAutoLayout( bool autoLayout ) { m_autoLayout = autoLayout; }
- bool GetAutoLayout() const { return m_autoLayout; }
-
- // do layout the window and its children
- virtual bool Layout();
-
// implementation only
void UnsetConstraints(wxLayoutConstraints *c);
wxWindowList *GetConstraintsInvolvedIn() const
virtual void GetClientSizeConstraint(int *w, int *h) const ;
virtual void GetPositionConstraint(int *x, int *y) const ;
+#endif // wxUSE_CONSTRAINTS
+
+ // when using constraints or sizers, it makes sense to update
+ // children positions automatically whenever the window is resized
+ // - this is done if autoLayout is on
+ void SetAutoLayout( bool autoLayout ) { m_autoLayout = autoLayout; }
+ bool GetAutoLayout() const { return m_autoLayout; }
+
+ // lay out the window and its children
+ virtual bool Layout();
+
// sizers
- void SetSizer( wxSizer *sizer );
+ void SetSizer(wxSizer *sizer, bool deleteOld = TRUE );
wxSizer *GetSizer() const { return m_windowSizer; }
// Track if this window is a member of a sizer
void SetContainingSizer(wxSizer* sizer) { m_containingSizer = sizer; }
wxSizer *GetContainingSizer() const { return m_containingSizer; }
-#endif // wxUSE_CONSTRAINTS
-
// backward compatibility
// ----------------------
#if WXWIN_COMPATIBILITY
// constraints this window is involved in
wxWindowList *m_constraintsInvolvedIn;
+#endif // wxUSE_CONSTRAINTS
// this window's sizer
wxSizer *m_windowSizer;
// Layout() window automatically when its size changes?
bool m_autoLayout:1;
-#endif // wxUSE_CONSTRAINTS
// window state
bool m_isShown:1;
// Makes an adjustment to the window position (for example, a frame that has
// a toolbar that it manages itself).
- virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
+ virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) const;
private:
#endif
// _WX_WINDOW_H_BASE_
+
+// vi:sts=4:sw=4:et