1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/scrolbar.h
3 // Purpose: wxScrollBar class
4 // Author: David Elliott
7 // Copyright: (c) 2004 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_COCOA_SCROLBAR_H__
12 #define _WX_COCOA_SCROLBAR_H__
14 #include "wx/cocoa/NSScroller.h"
16 // ========================================================================
18 // ========================================================================
19 class WXDLLIMPEXP_CORE wxScrollBar
: public wxScrollBarBase
, protected wxCocoaNSScroller
21 DECLARE_DYNAMIC_CLASS(wxScrollBar
)
23 WX_DECLARE_COCOA_OWNER(NSScroller
,NSControl
,NSView
)
24 // ------------------------------------------------------------------------
26 // ------------------------------------------------------------------------
29 wxScrollBar(wxWindow
*parent
, wxWindowID winid
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
32 long style
= wxSB_HORIZONTAL
,
33 const wxValidator
& validator
= wxDefaultValidator
,
34 const wxString
& name
= wxScrollBarNameStr
)
36 Create(parent
, winid
, pos
, size
, style
, validator
, name
);
39 bool Create(wxWindow
*parent
, wxWindowID winid
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
42 long style
= wxSB_HORIZONTAL
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxScrollBarNameStr
);
45 virtual ~wxScrollBar();
47 // ------------------------------------------------------------------------
49 // ------------------------------------------------------------------------
51 virtual void Cocoa_wxNSScrollerAction(void);
52 // ------------------------------------------------------------------------
54 // ------------------------------------------------------------------------
57 virtual int GetThumbPosition() const;
58 virtual int GetThumbSize() const { return m_thumbSize
; }
59 virtual int GetPageSize() const { return m_pageSize
; }
60 virtual int GetRange() const { return m_range
; }
63 virtual void SetThumbPosition(int viewStart
);
64 virtual void SetScrollbar(int position
, int thumbSize
,
65 int range
, int pageSize
,
74 // _WX_COCOA_SCROLBAR_H__