00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00032
00033 #pragma once
00034
00035 #include "../api_gui.h"
00036 #include "../gui_component.h"
00037
00038 class CL_Slider_Impl;
00039
00043 class CL_API_GUI CL_Slider : public CL_GUIComponent
00044 {
00047
00048 public:
00049
00053 CL_Slider(CL_GUIComponent *parent);
00054
00055 virtual ~CL_Slider();
00056
00060
00061 public:
00062
00066 bool is_vertical() const;
00067
00071 bool is_horizontal() const;
00072
00076 int get_min() const;
00077
00081 int get_max() const;
00082
00086 int get_tick_count() const;
00087
00091 int get_page_step() const;
00092
00096 int get_position() const;
00097
00101 bool get_lock_to_ticks() const;
00102
00106 CL_Size get_preferred_size() const;
00107
00111
00112 public:
00113
00117 void set_vertical(bool enable);
00118
00122 void set_horizontal(bool enable);
00123
00127 void set_min(int slider_min);
00128
00132 void set_max(int slider_max);
00133
00137 void set_tick_count(int tick_count);
00138
00142 void set_page_step(int steps);
00143
00147 void set_lock_to_ticks(bool lock);
00148
00155 void set_ranges(int slider_min, int slider_max, unsigned int tick_count, int page_step);
00156
00160 void set_position(int pos);
00161
00165
00166 public:
00168 CL_Callback_v0 &func_value_changed();
00169
00171
00172 CL_Callback_v0 &func_value_decremented();
00173
00175
00176 CL_Callback_v0 &func_value_incremented();
00177
00179 CL_Callback_v0 &func_slider_moved();
00180
00184
00185 private:
00186 CL_SharedPtr<CL_Slider_Impl> impl;
00188 };
00189