]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/slider.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/slider95.h
3 // Purpose: wxSlider class
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by: Wlodzimierz ABX Skiba - native implementation
8 // Copyright: (c) William Osborne, Wlodzimierz Skiba
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "slider95.h"
20 class WXDLLEXPORT wxSlider
: public wxSliderBase
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
)
37 Create(parent
, id
, value
, minValue
, maxValue
, pos
, size
, style
, validator
, name
);
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
);
50 virtual int GetValue() const;
51 virtual void SetValue(int);
53 void SetRange(int minValue
, int maxValue
);
59 void SetTickFreq(int n
, int pos
);
60 int GetTickFreq() const;
61 void SetPageSize(int pageSize
);
62 int GetPageSize() const;
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
);
75 void Command(wxCommandEvent
& event
);
77 // send a notification event, return true if processed
78 bool SendUpdatedEvent();
79 bool SendScrollEvent(EventType
* event
);
83 virtual wxSize
DoGetBestSize() const;
89 int PalmInvertOrNot(int value
) const;
91 int m_oldPos
; // needed for tracing thumb position during scrolling
92 int m_oldValue
; // needed for comparing thumb position before and after scrolling
93 int m_lineSize
; // imitate line size
95 DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider
)