xtd 0.2.0
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
44 loading_indicator(const loading_indicator&) = default;
45 loading_indicator& operator =(const loading_indicator&) = default;
47
49
53
63
66 virtual bool running() const noexcept;
67
70 virtual loading_indicator& running(bool value);
72
74
77 void start();
79 void stop();
81
83
96 static loading_indicator create(const drawing::point& location, const drawing::size& size);
102 static loading_indicator create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
111 static loading_indicator create(const control& parent, const drawing::point& location);
117 static loading_indicator create(const control& parent, const drawing::point& location, const drawing::size& size);
124 static loading_indicator create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
126
127 protected:
129
131 xtd::forms::create_params create_params() const noexcept override;
133
135
141 xtd::uptr<xtd::object> clone() const override;
142
143 xtd::drawing::size measure_control() const noexcept override;
144 void on_handle_created(const event_args& e) override;
145 void on_paint(xtd::forms::paint_event_args& e) override;
147
148 private:
149 void on_timer_tick(object& timer, const xtd::event_args& e);
150
151 xtd::sptr<data> data_;
152 };
153 }
154}
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 forms::control_appearance control_appearance() const noexcept
Gets control appearance.
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.
control & control_appearance(forms::control_appearance value) override
Sets control appearance.
loading_indicator()
Initialize a new instance of loading_indicator class.
xtd::forms::create_params create_params() const noexcept override
Gets the required creation parameters when the control handle is created.
virtual bool running() const noexcept
Gets a valiue that indicates if the loading indicator is running.
void stop()
Stops animation of the loading indicator.
xtd::uptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
xtd::drawing::size measure_control() const noexcept override
Measure this control.
virtual xtd::forms::loading_indicator_style loading_indicator_style() const noexcept
Gets the flat style appearance of the loading_indicator control.
void on_handle_created(const event_args &e) override
Raises the xtd::forms::control::handle_created event.
void start()
Starts animation of the loading indicator.
void on_paint(xtd::forms::paint_event_args &e) override
Raises the xtd::forms::control::paint event.
static loading_indicator create()
A factory to create an xtd::forms::loading_indicator.
Implements a timer that raises an event at user-defined intervals. This timer is optimized for use in...
Definition timer.hpp:38
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
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
loading_indicator_style
Specifies the appearance of a loading indicator control.
Definition loading_indicator_style.hpp:22
control_appearance
Specifies the appearance of a control.
Definition control_appearance.hpp:21
@ e
The E key.
Definition keys.hpp:207
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 const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201