slider.h

Go to the documentation of this file.
00001 /*
00002 **  ClanLib SDK
00003 **  Copyright (c) 1997-2009 The ClanLib Team
00004 **
00005 **  This software is provided 'as-is', without any express or implied
00006 **  warranty.  In no event will the authors be held liable for any damages
00007 **  arising from the use of this software.
00008 **
00009 **  Permission is granted to anyone to use this software for any purpose,
00010 **  including commercial applications, and to alter it and redistribute it
00011 **  freely, subject to the following restrictions:
00012 **
00013 **  1. The origin of this software must not be misrepresented; you must not
00014 **     claim that you wrote the original software. If you use this software
00015 **     in a product, an acknowledgment in the product documentation would be
00016 **     appreciated but is not required.
00017 **  2. Altered source versions must be plainly marked as such, and must not be
00018 **     misrepresented as being the original software.
00019 **  3. This notice may not be removed or altered from any source distribution.
00020 **
00021 **  Note: Some of the libraries ClanLib may link to may have additional
00022 **  requirements or restrictions.
00023 **
00024 **  File Author(s):
00025 **
00026 **    Magnus Norddahl
00027 **    Harry Storbacka
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 

Generated on Thu Dec 3 02:39:32 2009 for ClanLib by  doxygen 1.4.6