xtd 0.2.0
loading_indicator.h
Go to the documentation of this file.
1 #pragma once
5 #include "control.h"
6 #include "content_alignment.h"
8 
10 namespace xtd {
12  namespace forms {
29  class forms_export_ loading_indicator : public control {
30  struct data;
31 
32  public:
34 
39 
41 
45 
55 
58  virtual bool running() const noexcept;
59 
62  virtual loading_indicator& running(bool value);
64 
66 
68  //using control::create;
74  static loading_indicator create(const drawing::point& location = {-1, -1}, const drawing::size& size = {-1, -1}, const xtd::ustring& name = xtd::ustring::empty_string);
81  static loading_indicator create(const control& parent, const drawing::point& location = {-1, -1}, const drawing::size& size = {-1, -1}, const xtd::ustring& name = xtd::ustring::empty_string);
82 
84  void start();
86  void stop();
88 
89  protected:
91 
93  xtd::forms::create_params create_params() const noexcept override;
95 
97 
99  xtd::drawing::size measure_control() const noexcept override;
100  void on_handle_created(const event_args& e) override;
101  void on_paint(xtd::forms::paint_event_args& e) override;
103 
104  private:
105  void on_timer_tick(object& timer, const xtd::event_args& e);
106 
107  std::shared_ptr<data> data_;
108  };
109  }
110 }
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
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
loading_indicator_style
Specifies the appearance of a loading indicator control.
Definition: loading_indicator_style.h:20
control_appearance
Specifies the appearance of a control.
Definition: control_appearance.h:19
Encapsulates the information needed when creating a control.
Definition: create_params.h:27
Implements a timer that raises an event at user-defined intervals. This timer is optimized for use in...
Definition: timer.h:36
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Provides data for the xtd::forms::control::paint event.
Definition: paint_event_args.h:28
virtual forms::control_appearance control_appearance() const noexcept
Gets control appearance.
Contains xtd::forms::content_alignment enum class.
Defines the base class for controls, which are components with visual representation.
Definition: control.h:78
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.
Represents a loading indicator control.
Definition: loading_indicator.h:29
The message box contains a symbol consisting of white X in a circle with a red background.
size_t size
Represents a size of any object in bytes.
Definition: types.h:195
Contains xtd::forms::loading_indicator_style enum class.