ClanLib  2.3.7
progressbar.h
Go to the documentation of this file.
1 /*
2 ** ClanLib SDK
3 ** Copyright (c) 1997-2011 The ClanLib Team
4 **
5 ** This software is provided 'as-is', without any express or implied
6 ** warranty. In no event will the authors be held liable for any damages
7 ** arising from the use of this software.
8 **
9 ** Permission is granted to anyone to use this software for any purpose,
10 ** including commercial applications, and to alter it and redistribute it
11 ** freely, subject to the following restrictions:
12 **
13 ** 1. The origin of this software must not be misrepresented; you must not
14 ** claim that you wrote the original software. If you use this software
15 ** in a product, an acknowledgment in the product documentation would be
16 ** appreciated but is not required.
17 ** 2. Altered source versions must be plainly marked as such, and must not be
18 ** misrepresented as being the original software.
19 ** 3. This notice may not be removed or altered from any source distribution.
20 **
21 ** Note: Some of the libraries ClanLib may link to may have additional
22 ** requirements or restrictions.
23 **
24 ** File Author(s):
25 **
26 ** Magnus Norddahl
27 ** Kenneth Gangstoe
28 ** Harry Storbacka
29 */
30 
33 
34 #pragma once
35 
36 #include "../api_gui.h"
37 #include "../gui_component.h"
38 
39 class CL_ProgressBar_Impl;
40 
45 {
48 
49 public:
50 
55 
56  virtual ~CL_ProgressBar();
57 
61 
62 public:
64 
68  static CL_ProgressBar *get_named_item(CL_GUIComponent *reference_component, const CL_StringRef &id);
69 
73  int get_min() const;
74 
78  int get_max() const;
79 
83  int get_step_size() const;
84 
88  int get_position() const;
89 
93  bool is_marquee_mode() const;
94 
98  int get_marquee_animation_speed() const;
99 
103  int get_marquee_box_width() const;
104 
108  int get_marquee_step_size() const;
109 
113 
114 public:
115 
119  void set_min(int progress_min);
120 
124  void set_max(int progress_max);
125 
130  void set_range(int progress_min, int progress_max);
131 
135  void set_step_size(int size);
136 
140  void set_position(int pos);
141 
145  void advance_position(int pos);
146 
148  void step_position();
149 
153  void set_marquee_mode(bool enable);
154 
158  void set_marquee_animation_speed(int milliseconds);
159 
163  void set_marquee_box_width(int width);
164 
168  void set_marquee_step_size(int size);
169 
173 
174 private:
175  CL_SharedPtr<CL_ProgressBar_Impl> impl;
177 };
178