00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef AEDSLIDER_H
00024 #define AEDSLIDER_H
00025
00026 #include "aedWidget.h"
00027
00028
00029
00030 typedef enum
00031 {
00032 AED_HORIZONTAL,
00033 AED_VERTICAL
00034 } aedOrientation;
00035
00038 class DLLEXPORT aedSlider:public aedWidget
00039 {
00040 public:
00041
00044 aedSlider(aedOrientation orient = AED_VERTICAL);
00045 virtual ~ aedSlider();
00046
00047 virtual int wm_update(Uint32 msdelta);
00048 virtual int wm_lbuttonup(Uint16 x, Uint16 y);
00049 virtual int wm_lbuttondown(Uint16 x, Uint16 y);
00050 virtual void render(void);
00051
00053 void setValue(Uint32 val);
00054
00056 Uint32 getValue() const
00057 {
00058 return m_Value;
00059 }
00060
00064 void setRange(Uint32 minval, Uint32 maxval);
00065
00070 void getRange(Uint32 * minval, Uint32 * maxval) const
00071 {
00072 if(minval)
00073 *minval = m_Min;
00074 if(maxval)
00075 *maxval = m_Max;
00076 }
00077
00078 Uint32 getBigChange() const
00079 {
00080 return m_BigChange;
00081 }
00082
00084 void setBigChange(Uint32 bigchange);
00085
00087 aedOrientation getOrientation() const
00088 {
00089 return m_Orientation;
00090 }
00091
00095 void setOrientation(aedOrientation orient)
00096 {
00097 if(orient != m_Orientation)
00098 {
00099 m_Orientation = orient;
00100 setRenderState(true);
00101 }
00102 }
00103
00106 void incrementValue(bool bigChange = false);
00107
00110 void decrementValue(bool bigChange = false);
00111
00112 aedRect getElevatorRect();
00113
00114 protected:
00115 bool m_Dragging;
00116
00117 private:
00118 Uint32 m_Min, m_Max, m_Value;
00119 Uint32 m_BigChange;
00120 aedOrientation m_Orientation;
00121 };
00122
00123 #if defined(_MSC_VER)
00124 DLLEXTERN template DLLEXPORT aedFunctor1Arg < stub, aedSlider >;
00125 #endif
00126
00127 #endif