]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/slider.h
Remove "safety margin" from wxControl::Ellipsize().
[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 14
ffecfa5a 15// Slider
53a2db12 16class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase
ffecfa5a
JS
17{
18public:
721a9626
WS
19 wxSlider()
20 {
21 Init();
22 }
ffecfa5a
JS
23
24 wxSlider(wxWindow *parent, wxWindowID id,
25 int value, int minValue, int maxValue,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize,
28 long style = wxSL_HORIZONTAL,
29 const wxValidator& validator = wxDefaultValidator,
30 const wxString& name = wxSliderNameStr)
31 {
721a9626 32 Init();
ffecfa5a
JS
33 Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
34 }
35
d3c7fc99 36 virtual ~wxSlider();
ffecfa5a
JS
37
38 bool Create(wxWindow *parent, wxWindowID id,
39 int value, int minValue, int maxValue,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 long style = wxSL_HORIZONTAL,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxSliderNameStr);
45
46 virtual int GetValue() const;
47 virtual void SetValue(int);
48
ffecfa5a
JS
49 void SetRange(int minValue, int maxValue);
50
bdb54365
WS
51 int GetMin() const;
52 int GetMax() const;
ffecfa5a
JS
53
54 // For trackbars only
721a9626 55 int GetTickFreq() const;
ffecfa5a
JS
56 void SetPageSize(int pageSize);
57 int GetPageSize() const;
58 void ClearSel();
59 void ClearTicks();
60 void SetLineSize(int lineSize);
61 int GetLineSize() const;
62 int GetSelEnd() const;
63 int GetSelStart() const;
64 void SetSelection(int minPos, int maxPos);
65 void SetThumbLength(int len);
66 int GetThumbLength() const;
67 void SetTick(int tickPos);
68
bdb54365 69 // implementation
ffecfa5a 70 void Command(wxCommandEvent& event);
ffecfa5a 71
9a727a3b
WS
72 // send a notification event, return true if processed
73 bool SendUpdatedEvent();
20bc5ad8 74 bool SendScrollEvent(WXEVENTPTR event);
9a727a3b 75
ffecfa5a 76protected:
0a12e013
VZ
77 // Platform-specific implementation of SetTickFreq
78 virtual void DoSetTickFreq(int freq);
721a9626 79
ffecfa5a 80 virtual wxSize DoGetBestSize() const;
e1d63b79 81
721a9626
WS
82private:
83
84 void Init();
324eeecb 85
8be10866
WS
86 int m_oldPos; // needed for tracing thumb position during scrolling
87 int m_oldValue; // needed for comparing thumb position before and after scrolling
88 int m_lineSize; // imitate line size
721a9626 89
ffecfa5a
JS
90 DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider)
91};
92
93#endif
7d0d80bd 94 // _SLIDERPALM_H_