added wxWindow::AlwaysShowScrollbars() and its wxMac implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -65,7 +65,7 @@ public:
|
||||
virtual void Freeze();
|
||||
virtual void Thaw();
|
||||
virtual bool IsFrozen() const;
|
||||
|
||||
|
||||
virtual void Update() ;
|
||||
virtual void ClearBackground();
|
||||
|
||||
@@ -86,6 +86,7 @@ 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)
|
||||
|
@@ -52,6 +52,9 @@ public:
|
||||
int range, int pageSize,
|
||||
bool refresh = true) = 0;
|
||||
|
||||
// implementation-only
|
||||
bool IsNeeded() const { return GetRange() > GetThumbSize(); }
|
||||
|
||||
private:
|
||||
DECLARE_NO_COPY_CLASS(wxScrollBarBase)
|
||||
};
|
||||
|
@@ -1044,6 +1044,20 @@ public:
|
||||
bool PageUp() { return ScrollPages(-1); }
|
||||
bool PageDown() { return ScrollPages(1); }
|
||||
|
||||
// call this to always show one or both scrollbars, even if the window
|
||||
// is big enough to not require them
|
||||
virtual void AlwaysShowScrollbars(bool WXUNUSED(horz) = true,
|
||||
bool WXUNUSED(vert) = true)
|
||||
{
|
||||
}
|
||||
|
||||
// return true if AlwaysShowScrollbars() had been called before for the
|
||||
// corresponding orientation
|
||||
virtual bool IsScrollbarAlwaysShown(int WXUNUSED(orient)) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// context-sensitive help
|
||||
// ----------------------
|
||||
|
||||
@@ -1249,7 +1263,6 @@ protected:
|
||||
// implementation of Navigate() and NavigateIn()
|
||||
virtual bool DoNavigateIn(int flags);
|
||||
|
||||
|
||||
#if wxUSE_CONSTRAINTS
|
||||
// satisfy the constraints for the windows but don't set the window sizes
|
||||
void SatisfyConstraints();
|
||||
|
Reference in New Issue
Block a user