]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/slider.h
Native spline drawing.
[wxWidgets.git] / include / wx / palmos / slider.h
CommitLineData
ffecfa5a 1/////////////////////////////////////////////////////////////////////////////
7d0d80bd 2// Name: wx/palmos/slider.h
ffecfa5a 3// Purpose: wxSlider class
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
bdb54365 5// Modified by: Wlodzimierz ABX Skiba - native implementation
ffecfa5a 6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
bdb54365 8// Copyright: (c) William Osborne, Wlodzimierz Skiba
ffecfa5a
JS
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
7d0d80bd
WS
12#ifndef _SLIDERPALM_H_
13#define _SLIDERPALM_H_
ffecfa5a
JS
14
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
7d0d80bd 16#pragma interface "slider.h"
ffecfa5a
JS
17#endif
18
19// Slider
20class WXDLLEXPORT wxSlider : public wxSliderBase
21{
22public:
721a9626
WS
23 wxSlider()
24 {
25 Init();
26 }
ffecfa5a
JS
27
28 wxSlider(wxWindow *parent, wxWindowID id,
29 int value, int minValue, int maxValue,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
32 long style = wxSL_HORIZONTAL,
33 const wxValidator& validator = wxDefaultValidator,
34 const wxString& name = wxSliderNameStr)
35 {
721a9626 36 Init();
ffecfa5a
JS
37 Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
38 }
39
40 ~wxSlider();
41
42 bool Create(wxWindow *parent, wxWindowID id,
43 int value, int minValue, int maxValue,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 long style = wxSL_HORIZONTAL,
47 const wxValidator& validator = wxDefaultValidator,
48 const wxString& name = wxSliderNameStr);
49
50 virtual int GetValue() const;
51 virtual void SetValue(int);
52
ffecfa5a
JS
53 void SetRange(int minValue, int maxValue);
54
bdb54365
WS
55 int GetMin() const;
56 int GetMax() const;
ffecfa5a
JS
57
58 // For trackbars only
59 void SetTickFreq(int n, int pos);
721a9626 60 int GetTickFreq() const;
ffecfa5a
JS
61 void SetPageSize(int pageSize);
62 int GetPageSize() const;
63 void ClearSel();
64 void ClearTicks();
65 void SetLineSize(int lineSize);
66 int GetLineSize() const;
67 int GetSelEnd() const;
68 int GetSelStart() const;
69 void SetSelection(int minPos, int maxPos);
70 void SetThumbLength(int len);
71 int GetThumbLength() const;
72 void SetTick(int tickPos);
73
bdb54365 74 // implementation
ffecfa5a 75 void Command(wxCommandEvent& event);
ffecfa5a 76
9a727a3b
WS
77 // send a notification event, return true if processed
78 bool SendUpdatedEvent();
20bc5ad8 79 bool SendScrollEvent(WXEVENTPTR event);
9a727a3b 80
ffecfa5a 81protected:
721a9626 82
ffecfa5a 83 virtual wxSize DoGetBestSize() const;
e1d63b79 84
721a9626
WS
85private:
86
87 void Init();
324eeecb 88
8be10866
WS
89 int m_oldPos; // needed for tracing thumb position during scrolling
90 int m_oldValue; // needed for comparing thumb position before and after scrolling
91 int m_lineSize; // imitate line size
721a9626 92
ffecfa5a
JS
93 DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider)
94};
95
96#endif
7d0d80bd 97 // _SLIDERPALM_H_