]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/scrolbar.h
use wxWindowIDRef to transparently implement auto-generated ids ref-counting (slightl...
[wxWidgets.git] / include / wx / mac / carbon / scrolbar.h
CommitLineData
8cf73271
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: scrollbar.h
3// Purpose: wxScrollBar class
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
65571936 9// Licence: wxWindows licence
8cf73271
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_SCROLBAR_H_
13#define _WX_SCROLBAR_H_
14
8cf73271 15// Scrollbar item
3a5b9ee8 16class WXDLLEXPORT wxScrollBar : public wxScrollBarBase
8cf73271 17{
8cf73271 18public:
3a5b9ee8
VZ
19 wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; }
20 virtual ~wxScrollBar();
8cf73271 21
3a5b9ee8
VZ
22 wxScrollBar(wxWindow *parent,
23 wxWindowID id,
24 const wxPoint& pos = wxDefaultPosition,
25 const wxSize& size = wxDefaultSize,
26 long style = wxSB_HORIZONTAL,
27 const wxValidator& validator = wxDefaultValidator,
28 const wxString& name = wxScrollBarNameStr)
29 {
30 Create(parent, id, pos, size, style, validator, name);
31 }
32 bool Create(wxWindow *parent,
33 wxWindowID id,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 long style = wxSB_HORIZONTAL,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxScrollBarNameStr);
8cf73271 39
3a5b9ee8
VZ
40 virtual int GetThumbPosition() const ;
41 virtual int GetThumbSize() const { return m_viewSize; }
42 virtual int GetPageSize() const { return m_pageSize; }
43 virtual int GetRange() const { return m_objectSize; }
8cf73271 44
3a5b9ee8
VZ
45 virtual void SetThumbPosition(int viewStart);
46 virtual void SetScrollbar(int position, int thumbSize, int range,
47 int pageSize, bool refresh = true);
8cf73271 48
3a5b9ee8
VZ
49 // implementation only from now on
50 void Command(wxCommandEvent& event);
51 virtual void MacHandleControlClick( WXWidget control ,
52 wxInt16 controlpart ,
53 bool mouseStillDown ) ;
54 virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler ,
55 WXEVENTREF mevent ) ;
10ae0adb 56
4e7b25f0 57protected:
3a5b9ee8
VZ
58 virtual wxSize DoGetBestSize() const;
59
8cf73271
SC
60 int m_pageSize;
61 int m_viewSize;
62 int m_objectSize;
63
3a5b9ee8
VZ
64 DECLARE_DYNAMIC_CLASS(wxScrollBar)
65 DECLARE_EVENT_TABLE()
8cf73271
SC
66};
67
3a5b9ee8 68#endif // _WX_SCROLBAR_H_