xtd 0.2.0
progress_bar.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "control.hpp"
6#include "orientation.hpp"
8
10namespace xtd {
12 namespace forms {
41 struct data;
42
43 public:
45
51
53
59 virtual size_t marquee_animation_speed() const noexcept;
65
70 virtual int32 maximum() const noexcept;
76
80 virtual int32 minimum() const noexcept;
85
89 virtual forms::orientation orientation() const noexcept;
94
98 virtual int32 step() const noexcept;
103
107 virtual progress_bar_style style() const noexcept;
112
118 virtual int32 value() const noexcept;
126
128
135
139
144 void set_range(int32 min_value, int32 max_value);
145
149 xtd::string to_string() const noexcept override;
151
153
161 static progress_bar create(const drawing::point& location);
166 static progress_bar create(const drawing::point& location, const drawing::size& size);
172 static progress_bar create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
187 static progress_bar create(int32 value, const drawing::point& location, const drawing::size& size);
194 static progress_bar create(int32 value, const drawing::point& location, const drawing::size& size, const xtd::string& name);
220 static progress_bar create(int32 value, int32 maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
250 static progress_bar create(int32 value, int32 minimum, int32 maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
259 static progress_bar create(const control& parent, const drawing::point& location);
265 static progress_bar create(const control& parent, const drawing::point& location, const drawing::size& size);
272 static progress_bar create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
283 static progress_bar create(const control& parent, int32 value, const drawing::point& location);
290 static progress_bar create(const control& parent, int32 value, const drawing::point& location, const drawing::size& size);
298 static progress_bar create(const control& parent, int32 value, const drawing::point& location, const drawing::size& size, const xtd::string& name);
328 static progress_bar create(const control& parent, int32 value, int32 maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
362 static progress_bar create(const control& parent, int32 value, int32 minimum, int32 maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
364
365 protected:
367
371 forms::create_params create_params() const noexcept override;
372
373 drawing::size default_size() const noexcept override;
375
377
383 xtd::uptr<xtd::object> clone() const override;
384
387 void on_handle_created(const event_args& e) override;
389
390 private:
391 xtd::sptr<data> data_;
392 };
393 }
394}
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
virtual drawing::point location() const noexcept
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
virtual const xtd::string & name() const noexcept
Gets the name of the control.
control()
Initializes a new instance of the xtd::forms::control class with default settings.
virtual drawing::size size() const noexcept
Gets the height and width of the control.
virtual std::optional< control_ref > parent() const noexcept
Gets the parent container of the control.
forms::create_params create_params() const noexcept override
Gets the required creation parameters when the control handle is created.
void set_range(int32 min_value, int32 max_value)
Sets the minimum and maximum values for a xtd::forms::progress_bar.
progress_bar()
Initializes a new instance of the progress_bar class.
void increment(int32 value)
Advances the current position of the progress bar by the specified amount.
xtd::uptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
drawing::size default_size() const noexcept override
Gets the default size of the control.
xtd::string to_string() const noexcept override
Returns a string that represents the progress_bar control.
virtual progress_bar_style style() const noexcept
Gets the manner in which progress should be indicated on the progress bar.
virtual size_t marquee_animation_speed() const noexcept
Gets he time period, in milliseconds, that it takes the progress block to scroll across the progress ...
static progress_bar create()
A factory to create an xtd::forms::progress_bar.
virtual int32 value() const noexcept
Gets the current position of the progress bar.
void on_handle_created(const event_args &e) override
Overrides control::on_handle_created(const event_args&)
virtual int32 maximum() const noexcept
Gets the maximum value of the range of the control.
virtual forms::orientation orientation() const noexcept
Gets a value indicating the horizontal or vertical orientation of the progress bar.
virtual int32 step() const noexcept
Gets the amount by which a call to the PerformStep() method increases the current position of the pro...
virtual int32 minimum() const noexcept
Gets the minimum value of the range of the control.
void perform_step()
Advances the current position of the progress bar by the amount of the Step property.
Contains xtd::forms::control control.
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
progress_bar_style
Specifies the progress_bar_style of controls or elements of controls.
Definition progress_bar_style.hpp:22
@ e
The E key.
Definition keys.hpp:207
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201
Contains xtd::forms::orientation enum class.
Contains xtd::forms::progress_bar_style enum class.