// valid values for Show/HideWithEffect()
enum wxShowEffect
{
+ wxSHOW_EFFECT_NONE,
wxSHOW_EFFECT_ROLL_TO_LEFT,
wxSHOW_EFFECT_ROLL_TO_RIGHT,
wxSHOW_EFFECT_ROLL_TO_TOP,
// Create()
wxWindowBase() ;
- // pseudo ctor (can't be virtual, called from ctor)
- bool CreateBase(wxWindowBase *parent,
- wxWindowID winid,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxPanelNameStr);
-
virtual ~wxWindowBase();
// deleting the window
// acceptable size using which it will still look "nice" in
// most situations)
wxSize GetBestSize() const;
-
+
void GetBestSize(int *w, int *h) const
{
wxSize s = GetBestSize();
// scrollbars
// ----------
- // does the window have the scrollbar for this orientation?
- bool HasScrollbar(int orient) const
+ // can the window have the scrollbar in this orientation?
+ bool CanScroll(int orient) const
{
return (m_windowStyle &
(orient == wxHORIZONTAL ? wxHSCROLL : wxVSCROLL)) != 0;
}
+ // does the window have the scrollbar in this orientation?
+ bool HasScrollbar(int orient) const;
+
// configure the window scrollbars
virtual void SetScrollbar( int orient,
int pos,
virtual bool CanApplyThemeBorder() const { return true; }
protected:
+ // helper for the derived class Create() methods: the first overload, with
+ // validator parameter, should be used for child windows while the second
+ // one is used for top level ones
+ bool CreateBase(wxWindowBase *parent,
+ wxWindowID winid,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxPanelNameStr);
+
+ bool CreateBase(wxWindowBase *parent,
+ wxWindowID winid,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxString& name);
+
// event handling specific to wxWindow
virtual bool TryBefore(wxEvent& event);
virtual bool TryAfter(wxEvent& event);
// of the left and the right border in the x component of the returned size
// and the sum of the heights of the top and bottom borders in the y one
//
- // NB: this is new/temporary API only implemented by wxMSW so far and
- // subject to change, don't use
+ // NB: this is new/temporary API only implemented by wxMSW and wxUniv so
+ // far and subject to change, don't use
virtual wxSize DoGetBorderSize() const
{
wxFAIL_MSG( "must be overridden if called" );