X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5dbe15d0bacde245539f54c4d97af6b4696f01f..fd8734512097f8d12766074c464037d6441cbd27:/include/wx/mac/carbon/window.h?ds=sidebyside diff --git a/include/wx/mac/carbon/window.h b/include/wx/mac/carbon/window.h index aee0e91ffa..53b40f6f5f 100644 --- a/include/wx/mac/carbon/window.h +++ b/include/wx/mac/carbon/window.h @@ -55,8 +55,6 @@ public: virtual void Lower(); virtual bool Show( bool show = true ); - virtual void DoEnable( bool enable ); - virtual void OnEnabled( bool enabled ); virtual void SetFocus(); @@ -67,7 +65,7 @@ public: virtual void Freeze(); virtual void Thaw(); virtual bool IsFrozen() const; - + virtual void Update() ; virtual void ClearBackground(); @@ -85,7 +83,10 @@ public: const wxFont *theFont = NULL ) const; protected: + virtual void DoEnable( bool enable ); + virtual void OnEnabled( bool enabled ); virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); + public: virtual void SetScrollbar( int orient, int pos, int thumbVisible, int range, bool refresh = true ); @@ -95,6 +96,13 @@ public: virtual int GetScrollRange( int orient ) const; virtual void ScrollWindow( int dx, int dy, const wxRect* rect = (wxRect *) NULL ); + virtual void AlwaysShowScrollbars(bool horz = true, bool vert = true); + virtual bool IsScrollbarAlwaysShown(int orient) const + { + return orient == wxHORIZONTAL ? m_hScrollBarAlwaysShown + : m_vScrollBarAlwaysShown; + } + virtual bool Reparent( wxWindowBase *newParent ); #if wxUSE_DRAG_AND_DROP @@ -126,7 +134,7 @@ public: virtual bool SetTransparent(wxByte alpha); virtual bool CanSetTransparent(); virtual wxByte GetTransparent() const ; - + // event handlers // -------------- void OnSetFocus( wxFocusEvent& event ); @@ -302,6 +310,8 @@ protected: wxScrollBar* m_hScrollBar ; wxScrollBar* m_vScrollBar ; + bool m_hScrollBarAlwaysShown; + bool m_vScrollBarAlwaysShown; wxString m_label ; // set to true if we do a sharp clip at the content area of this window @@ -349,6 +359,11 @@ private: // common part of all ctors void Init(); + // show/hide scrollbars as needed, common part of SetScrollbar() and + // AlwaysShowScrollbars() + void DoUpdateScrollbarVisibility(); + + WXEVENTHANDLERREF m_macControlEventHandler ; DECLARE_NO_COPY_CLASS(wxWindowMac)