Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.4 KiB

  1. //
  2. // mxToolKit (c) 1999 by Mete Ciragan
  3. //
  4. // file: mxSlider.h
  5. // implementation: all
  6. // last modified: Mar 14 1999, Mete Ciragan
  7. // copyright: The programs and associated files contained in this
  8. // distribution were developed by Mete Ciragan. The programs
  9. // are not in the public domain, but they are freely
  10. // distributable without licensing fees. These programs are
  11. // provided without guarantee or warrantee expressed or
  12. // implied.
  13. //
  14. #ifndef INCLUDED_MXSLIDER
  15. #define INCLUDED_MXSLIDER
  16. #ifndef INCLUDED_MXWIDGET
  17. #include "mxtk/mxWidget.h"
  18. #endif
  19. class mxWindow;
  20. class mxSlider_i;
  21. class mxSlider : public mxWidget
  22. {
  23. mxSlider_i *d_this;
  24. float m_min;
  25. float m_max;
  26. int m_ticks;
  27. public:
  28. // ENUMS
  29. enum { Horizontal, Vertical };
  30. // CREATORS
  31. mxSlider (mxWindow *parent, int x, int y, int w, int h, int id = 0, int style = 0);
  32. virtual ~mxSlider ();
  33. // MANIPULATORS
  34. void setValue (float value);
  35. void setRange (float min, float max, int ticks = 100);
  36. void setSteps (int line, int page);
  37. // ACCESSORS
  38. float getValue () const;
  39. float getTrackValue ( int ivalue ) const;
  40. float getMinValue () const;
  41. float getMaxValue () const;
  42. int getLineStep () const;
  43. int getPageStep () const;
  44. private:
  45. // NOT IMPLEMENTED
  46. mxSlider (const mxSlider&);
  47. mxSlider& operator= (const mxSlider&);
  48. };
  49. #endif // INCLUDED_MXSLIDER