xtd 1.0.0
Loading...
Searching...
No Matches
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 [[nodiscard]] virtual auto marquee_animation_speed() const noexcept -> xtd::usize;
65
70 [[nodiscard]] virtual auto maximum() const noexcept -> xtd::int32;
75 virtual auto maximum(xtd::int32 value) -> progress_bar&;
76
80 [[nodiscard]] virtual auto minimum() const noexcept -> xtd::int32;
84 virtual auto minimum(xtd::int32 value) -> progress_bar&;
85
89 [[nodiscard]] virtual auto orientation() const noexcept -> xtd::forms::orientation;
94
98 [[nodiscard]] virtual auto step() const noexcept -> xtd::int32;
102 virtual auto step(xtd::int32 value) -> progress_bar&;
103
107 [[nodiscard]] virtual auto style() const noexcept -> xtd::forms::progress_bar_style;
112
118 [[nodiscard]] virtual auto value() const noexcept -> xtd::int32;
124 virtual auto value(xtd::int32 value) -> progress_bar&;
126
128
134 auto increment(xtd::int32 value) -> void;
135
138 auto perform_step() -> void;
139
144 auto set_range(xtd::int32 min_value, xtd::int32 max_value) -> void;
145
149 [[nodiscard]] auto to_string() const noexcept -> xtd::string override;
151
153
157 [[nodiscard]] static auto create() -> progress_bar;
161 [[nodiscard]] static auto create(const xtd::drawing::point& location) -> progress_bar;
166 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size) -> progress_bar;
172 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> progress_bar;
176 [[nodiscard]] static auto create(xtd::int32 value) -> progress_bar;
181 [[nodiscard]] static auto create(xtd::int32 value, const xtd::drawing::point& location) -> progress_bar;
187 [[nodiscard]] static auto create(xtd::int32 value, const xtd::drawing::point& location, const xtd::drawing::size& size) -> progress_bar;
194 [[nodiscard]] static auto create(xtd::int32 value, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> progress_bar;
199 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 maximum) -> progress_bar;
205 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 maximum, const xtd::drawing::point& location) -> progress_bar;
212 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size) -> progress_bar;
220 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> progress_bar;
226 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum) -> progress_bar;
233 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum, const xtd::drawing::point& location) -> progress_bar;
241 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size) -> progress_bar;
250 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> progress_bar;
254 [[nodiscard]] static auto create(const xtd::forms::control& parent) -> progress_bar;
259 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location) -> progress_bar;
265 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size) -> progress_bar;
272 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> progress_bar;
277 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value) -> progress_bar;
283 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, const xtd::drawing::point& location) -> progress_bar;
290 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, const xtd::drawing::point& location, const xtd::drawing::size& size) -> progress_bar;
298 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> progress_bar;
304 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 maximum) -> progress_bar;
311 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 maximum, const xtd::drawing::point& location) -> progress_bar;
319 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size) -> progress_bar;
328 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> progress_bar;
335 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum) -> progress_bar;
343 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum, const xtd::drawing::point& location) -> progress_bar;
352 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size) -> progress_bar;
362 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> progress_bar;
364
365 protected:
367
371 [[nodiscard]] auto create_params() const noexcept -> xtd::forms::create_params override;
372
373 [[nodiscard]] auto default_size() const noexcept -> xtd::drawing::size override;
375
377
381 auto on_handle_created(const event_args& e) -> void override;
383
384 private:
385 xtd::sptr<data> data_;
386 };
387 }
388}
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
virtual auto size() const noexcept -> xtd::drawing::size
Gets the height and width of the control.
virtual auto parent() const noexcept -> std::optional< xtd::forms::control_ref >
Gets the parent container of the control.
virtual auto name() const noexcept -> const xtd::string &
Gets the name of the control.
control()
Initializes a new instance of the xtd::forms::control class with default settings.
virtual auto location() const noexcept -> xtd::drawing::point
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
virtual auto value() const noexcept -> xtd::int32
Gets the current position of the progress bar.
auto create_params() const noexcept -> xtd::forms::create_params override
Gets the required creation parameters when the control handle is created.
progress_bar()
Initializes a new instance of the progress_bar class.
virtual auto marquee_animation_speed() const noexcept -> xtd::usize
Gets he time period, in milliseconds, that it takes the progress block to scroll across the progress ...
auto increment(xtd::int32 value) -> void
Advances the current position of the progress bar by the specified amount.
auto on_handle_created(const event_args &e) -> void override
Overrides control::on_handle_created(const event_args&).
virtual auto step() const noexcept -> xtd::int32
Gets the amount by which a call to the PerformStep() method increases the current position of the pro...
auto default_size() const noexcept -> xtd::drawing::size override
Gets the default size of the control.
virtual auto style() const noexcept -> xtd::forms::progress_bar_style
Gets the manner in which progress should be indicated on the progress bar.
auto perform_step() -> void
Advances the current position of the progress bar by the amount of the Step property.
auto to_string() const noexcept -> xtd::string override
Returns a string that represents the progress_bar control.
static auto create() -> progress_bar
A factory to create an xtd::forms::progress_bar.
virtual auto maximum() const noexcept -> xtd::int32
Gets the maximum value of the range of the control.
auto set_range(xtd::int32 min_value, xtd::int32 max_value) -> void
Sets the minimum and maximum values for a xtd::forms::progress_bar.
virtual auto orientation() const noexcept -> xtd::forms::orientation
Gets a value indicating the horizontal or vertical orientation of the progress bar.
virtual auto minimum() const noexcept -> xtd::int32
Gets the minimum value of the range of the control.
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
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
progress_bar_style
Specifies the progress_bar_style of controls or elements of controls.
Definition progress_bar_style.hpp:22
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 auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197
Contains xtd::forms::orientation enum class.
Contains xtd::forms::progress_bar_style enum class.