xtd 0.2.0
progress_bar.h
Go to the documentation of this file.
1 #pragma once
5 #include "control.h"
6 #include "orientation.h"
7 #include "progress_bar_style.h"
8 
10 namespace xtd {
12  namespace forms {
38  class forms_export_ progress_bar : public control {
39  struct data;
40 
41  public:
43 
47  progress_bar();
49 
51 
57  virtual size_t marquee_animation_speed() const noexcept;
62  virtual progress_bar& marquee_animation_speed(size_t marquee_animation_speed);
63 
68  virtual int32 maximum() const noexcept;
73  virtual progress_bar& maximum(int32 maximum);
74 
78  virtual int32 minimum() const noexcept;
82  virtual progress_bar& minimum(int32 minimum);
83 
87  virtual forms::orientation orientation() const noexcept;
92 
96  virtual int32 step() const noexcept;
100  virtual progress_bar& step(int32 step);
101 
105  virtual progress_bar_style style() const noexcept;
109  virtual progress_bar& style(progress_bar_style style);
110 
116  virtual int32 value() const noexcept;
122  virtual progress_bar& value(int32 value);
124 
126 
128  using control::create;
137  static progress_bar create(int32 value, int32 minimum = 0, int32 maximum = 100, const drawing::point& location = {-1, -1}, const drawing::size& size = {-1, -1}, const xtd::ustring& name = xtd::ustring::empty_string);
147  static progress_bar create(const control& parent, int32 value, int32 minimum = 0, int32 maximum = 100, const drawing::point& location = {-1, -1}, const drawing::size& size = {-1, -1}, const xtd::ustring& name = xtd::ustring::empty_string);
148 
153  void increment(int32 value);
154 
157  void perform_step();
158 
163  void set_range(int32 min_value, int32 max_value);
164 
168  xtd::ustring to_string() const noexcept override;
170 
171  protected:
173 
177  forms::create_params create_params() const noexcept override;
178 
179  drawing::size default_size() const noexcept override;
181 
183 
187  void on_handle_created(const event_args& e) override;
189 
190  private:
191  std::shared_ptr<data> data_;
192  };
193  }
194 }
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Contains xtd::forms::orientation enum class.
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition: point.h:54
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:31
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Encapsulates the information needed when creating a control.
Definition: create_params.h:27
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: date_time.h:1063
static control create(const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const xtd::ustring &name=xtd::ustring::empty_string)
A factory to create a specified control with specified location, size, and name.
orientation
Specifies the orientation of controls or elements of controls.
Definition: orientation.h:20
Represents a Windows progress bar control.
Definition: progress_bar.h:38
progress_bar_style
Specifies the progress_bar_style of controls or elements of controls.
Definition: progress_bar_style.h:20
Contains xtd::forms::progress_bar_style enum class.
Defines the base class for controls, which are components with visual representation.
Definition: control.h:78
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
Contains xtd::forms::control control.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
static const ustring empty_string
Represents the empty string.
Definition: ustring.h:53
Specifies that both the x and y coordinates of the control are defined.
size_t size
Represents a size of any object in bytes.
Definition: types.h:195