xtd 1.0.0
Loading...
Searching...
No Matches
loading_indicator.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "control.hpp"
8
10namespace xtd {
12 namespace forms {
32 struct data;
33
34 public:
36
41
43
47
51 [[nodiscard]] virtual auto loading_indicator_style() const noexcept -> xtd::forms::loading_indicator_style;
57
60 [[nodiscard]] virtual auto running() const noexcept -> bool;
61
64 virtual auto running(bool value) -> loading_indicator&;
66
68
71 auto start() -> void;
73 auto stop() -> void;
75
77
81 [[nodiscard]] static auto create() -> loading_indicator;
85 [[nodiscard]] static auto create(const xtd::drawing::point& location) -> loading_indicator;
90 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size) -> loading_indicator;
96 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> loading_indicator;
100 [[nodiscard]] static auto create(const xtd::forms::control& parent) -> loading_indicator;
105 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location) -> loading_indicator;
111 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size) -> loading_indicator;
118 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> loading_indicator;
120
121 protected:
123
125 [[nodiscard]] auto create_params() const noexcept -> xtd::forms::create_params override;
127
129
131 [[nodiscard]] auto measure_control() const noexcept -> xtd::drawing::size override;
132 auto on_handle_created(const event_args& e) -> void override;
133 auto on_paint(xtd::forms::paint_event_args& e) -> void override;
135
136 private:
137 xtd::sptr<data> data_;
138 };
139 }
140}
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 control_appearance() const noexcept -> xtd::forms::control_appearance
Gets control appearance.
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...
loading_indicator()
Initialize a new instance of loading_indicator class.
auto measure_control() const noexcept -> xtd::drawing::size override
Measure this control.
virtual auto loading_indicator_style() const noexcept -> xtd::forms::loading_indicator_style
Gets the flat style appearance of the loading_indicator control.
static auto create() -> loading_indicator
A factory to create an xtd::forms::loading_indicator.
auto start() -> void
Starts animation of the loading indicator.
virtual auto running() const noexcept -> bool
Gets a valiue that indicates if the loading indicator is running.
auto control_appearance(forms::control_appearance value) -> xtd::forms::control &override
Sets control appearance.
auto on_paint(xtd::forms::paint_event_args &e) -> void override
Raises the xtd::forms::control::paint event.
auto on_handle_created(const event_args &e) -> void override
Raises the xtd::forms::control::handle_created event.
auto stop() -> void
Stops animation of the loading indicator.
auto create_params() const noexcept -> xtd::forms::create_params override
Gets the required creation parameters when the control handle is created.
Contains xtd::forms::content_alignment enum class.
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
control_appearance
Specifies the appearance of a control.
Definition control_appearance.hpp:21
Contains xtd::forms::loading_indicator_style enum class.
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