1 /////////////////////////////////////////////////////////////////////////////
 
   3 // Purpose:     SWIG interface defs for wxSlider
 
   7 // Created:     10-June-1998
 
   9 // Copyright:   (c) 2003 by Total Control Software
 
  10 // Licence:     wxWindows license
 
  11 /////////////////////////////////////////////////////////////////////////////
 
  16 //---------------------------------------------------------------------------
 
  19 #include <wx/slider.h>
 
  23 MAKE_CONST_WXSTRING(SliderNameStr);
 
  25 //---------------------------------------------------------------------------
 
  44 MustHaveApp(wxSlider);
 
  46 class wxSlider : public wxControl {
 
  48     %pythonPrepend wxSlider         "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']"
 
  49     %pythonPrepend wxSlider()       ""
 
  50     %pythonAppend  wxSlider         "self._setOORInfo(self)"
 
  51     %pythonAppend  wxSlider()       ""
 
  53     wxSlider(wxWindow* parent, wxWindowID id=-1,
 
  54              int value=0, int minValue=0, int maxValue=100,
 
  55              const wxPoint& pos = wxDefaultPosition,
 
  56              const wxSize& size = wxDefaultSize,
 
  57              long style = wxSL_HORIZONTAL,
 
  58              const wxValidator& validator = wxDefaultValidator,
 
  59              const wxString& name = wxPySliderNameStr);
 
  60     %RenameCtor(PreSlider, wxSlider());
 
  62     bool Create(wxWindow* parent, wxWindowID id=-1,
 
  63              int value=0, int minValue=0, int maxValue=100,
 
  64              const wxPoint& pos = wxDefaultPosition,
 
  65              const wxSize& size = wxDefaultSize,
 
  66              long style = wxSL_HORIZONTAL,
 
  67              const wxValidator& validator = wxDefaultValidator,
 
  68              const wxString& name = wxPySliderNameStr);
 
  70     // get/set the current slider value (should be in range)
 
  71     virtual int GetValue() const;
 
  72     virtual void SetValue(int value);
 
  74     // retrieve/change the range
 
  75     virtual void SetRange(int minValue, int maxValue);
 
  76     virtual int GetMin() const;
 
  77     virtual int GetMax() const;
 
  79     void SetMin( int minValue );
 
  80     void SetMax( int maxValue );
 
  82     // the line/page size is the increment by which the slider moves when
 
  83     // cursor arrow key/page up or down are pressed (clicking the mouse is like
 
  84     // pressing PageUp/Down) and are by default set to 1 and 1/10 of the range
 
  85     virtual void SetLineSize(int lineSize);
 
  86     virtual void SetPageSize(int pageSize);
 
  87     virtual int GetLineSize() const;
 
  88     virtual int GetPageSize() const;
 
  90     // these methods get/set the length of the slider pointer in pixels
 
  91     virtual void SetThumbLength(int lenPixels);
 
  92     virtual int GetThumbLength() const;
 
  94     virtual void SetTickFreq(int n, int pos=1);
 
  95     virtual int GetTickFreq() const;
 
  96     virtual void ClearTicks();
 
  97     virtual void SetTick(int tickPos);
 
  99     virtual void ClearSel();
 
 100     virtual int GetSelEnd() const;
 
 101     virtual int GetSelStart() const;
 
 102     virtual void SetSelection(int min, int max);
 
 105     static wxVisualAttributes
 
 106     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 
 109 //---------------------------------------------------------------------------