1998-08-07 21:32:13 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: slider.h
|
1998-08-12 09:16:21 +00:00
|
|
|
// Purpose: wxSlider class
|
|
|
|
// Author: AUTHOR
|
|
|
|
// Modified by:
|
|
|
|
// Created: ??/??/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) AUTHOR
|
1998-08-07 21:32:13 +00:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-12 09:16:21 +00:00
|
|
|
#ifndef _WX_SLIDER_H_
|
|
|
|
#define _WX_SLIDER_H_
|
1998-08-07 21:32:13 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
1998-08-12 09:16:21 +00:00
|
|
|
#pragma interface "slider.h"
|
1998-08-07 21:32:13 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
1998-08-12 09:16:21 +00:00
|
|
|
WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
|
1998-08-07 21:32:13 +00:00
|
|
|
|
1998-08-12 09:16:21 +00:00
|
|
|
// Slider
|
|
|
|
class WXDLLEXPORT wxSlider: public wxControl
|
1998-08-07 21:32:13 +00:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxSlider)
|
|
|
|
|
1998-08-12 09:16:21 +00:00
|
|
|
public:
|
|
|
|
wxSlider();
|
|
|
|
|
|
|
|
inline wxSlider(wxWindow *parent, wxWindowID id,
|
1998-08-07 21:32:13 +00:00
|
|
|
int value, int minValue, int maxValue,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxSL_HORIZONTAL,
|
1998-08-12 09:16:21 +00:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxSliderNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
~wxSlider();
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
1998-08-07 21:32:13 +00:00
|
|
|
int value, int minValue, int maxValue,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxSL_HORIZONTAL,
|
1998-08-12 09:16:21 +00:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
1998-08-07 21:32:13 +00:00
|
|
|
const wxString& name = wxSliderNameStr);
|
1998-08-12 09:16:21 +00:00
|
|
|
|
|
|
|
virtual int GetValue() const ;
|
|
|
|
virtual void SetValue(int);
|
|
|
|
void GetSize(int *x, int *y) const ;
|
|
|
|
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
|
|
|
void GetPosition(int *x, int *y) const ;
|
|
|
|
bool Show(bool show);
|
|
|
|
|
|
|
|
void SetRange(int minValue, int maxValue);
|
|
|
|
|
|
|
|
inline int GetMin() const { return m_rangeMin; }
|
|
|
|
inline int GetMax() const { return m_rangeMax; }
|
|
|
|
|
|
|
|
// For trackbars only
|
|
|
|
void SetTickFreq(int n, int pos);
|
|
|
|
inline int GetTickFreq() const { return m_tickFreq; }
|
|
|
|
void SetPageSize(int pageSize);
|
|
|
|
int GetPageSize() const ;
|
|
|
|
void ClearSel() ;
|
|
|
|
void ClearTicks() ;
|
|
|
|
void SetLineSize(int lineSize);
|
|
|
|
int GetLineSize() const ;
|
|
|
|
int GetSelEnd() const ;
|
|
|
|
int GetSelStart() const ;
|
|
|
|
void SetSelection(int minPos, int maxPos);
|
|
|
|
void SetThumbLength(int len) ;
|
|
|
|
int GetThumbLength() const ;
|
|
|
|
void SetTick(int tickPos) ;
|
|
|
|
|
|
|
|
void Command(wxCommandEvent& event);
|
|
|
|
protected:
|
|
|
|
int m_rangeMin;
|
|
|
|
int m_rangeMax;
|
|
|
|
int m_pageSize;
|
|
|
|
int m_lineSize;
|
|
|
|
int m_tickFreq;
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-08-07 21:32:13 +00:00
|
|
|
};
|
|
|
|
|
1998-08-12 09:16:21 +00:00
|
|
|
#endif
|
|
|
|
// _WX_SLIDER_H_
|