]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/scrolbar.h
Applied rowspan patch #15276 (dghart)
[wxWidgets.git] / include / wx / cocoa / scrolbar.h
CommitLineData
5369a054
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/cocoa/scrolbar.h
3// Purpose: wxScrollBar class
4// Author: David Elliott
5// Modified by:
6// Created: 2004/04/25
7// RCS-ID: $Id$
8// Copyright: (c) 2004 David Elliott
1b88201f 9// Licence: wxWindows licence
5369a054
DE
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_COCOA_SCROLBAR_H__
13#define _WX_COCOA_SCROLBAR_H__
14
15#include "wx/cocoa/NSScroller.h"
16
17// ========================================================================
18// wxScrollBar
19// ========================================================================
53a2db12 20class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase, protected wxCocoaNSScroller
5369a054
DE
21{
22 DECLARE_DYNAMIC_CLASS(wxScrollBar)
23 DECLARE_EVENT_TABLE()
24 WX_DECLARE_COCOA_OWNER(NSScroller,NSControl,NSView)
25// ------------------------------------------------------------------------
26// initialization
27// ------------------------------------------------------------------------
28public:
29 wxScrollBar() { }
30 wxScrollBar(wxWindow *parent, wxWindowID winid,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize,
1d39019c 33 long style = wxSB_HORIZONTAL,
5369a054
DE
34 const wxValidator& validator = wxDefaultValidator,
35 const wxString& name = wxScrollBarNameStr)
36 {
37 Create(parent, winid, pos, size, style, validator, name);
38 }
39
40 bool Create(wxWindow *parent, wxWindowID winid,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
1d39019c 43 long style = wxSB_HORIZONTAL,
5369a054
DE
44 const wxValidator& validator = wxDefaultValidator,
45 const wxString& name = wxScrollBarNameStr);
46 virtual ~wxScrollBar();
47
48// ------------------------------------------------------------------------
49// Cocoa callbacks
50// ------------------------------------------------------------------------
51protected:
52 virtual void Cocoa_wxNSScrollerAction(void);
53// ------------------------------------------------------------------------
54// Implementation
55// ------------------------------------------------------------------------
56public:
57 // accessors
58 virtual int GetThumbPosition() const;
59 virtual int GetThumbSize() const { return m_thumbSize; }
60 virtual int GetPageSize() const { return m_pageSize; }
61 virtual int GetRange() const { return m_range; }
62
63 // operations
64 virtual void SetThumbPosition(int viewStart);
65 virtual void SetScrollbar(int position, int thumbSize,
66 int range, int pageSize,
67 bool refresh = TRUE);
68protected:
69 int m_range;
70 int m_thumbSize;
71 int m_pageSize;
72};
73
1b88201f
WS
74#endif
75 // _WX_COCOA_SCROLBAR_H__