xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Go to the documentation of this file.
1 #pragma once
5 #include "control.h"
6 #include "border_style.h"
7 #include "content_alignment.h"
11 namespace xtd {
13  namespace forms {
26  class forms_export_ loading_indicator : public control {
27  public:
38  xtd::drawing::size default_size() const override {return {32, 32};}
43  virtual xtd::forms::loading_indicator_style loading_indicator_style() const {return loading_indicator_style_;}
52  bool is_running() const {return is_running_;}
59  void start();
61  void stop();
64  protected:
68  xtd::forms::create_params create_params() const override;
69  xtd::drawing::size measure_control() const override;
70  void on_handle_created(const event_args& e) override;
71  void on_paint(xtd::forms::paint_event_args& e) override;
74  private:
75  void on_timer_tick(object& timer, const xtd::event_args& e);
77  bool is_running_ = false;
79  xtd::forms::timer timer_;
80  int32_t intervals_ = 8;
81  int32_t radius_factor_ = 10;
82  int32_t frame_ = 0;
83  int32_t interval_ = 150;
84  };
85  }
86 }
virtual xtd::forms::loading_indicator_style loading_indicator_style() const
Gets the flat style appearance of the loading_indicator control.
Definition: loading_indicator.h:43
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:25
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Specifies the appearance of a loading indicator control.
Definition: loading_indicator_style.h:18
Implements a timer that raises an event at user-defined intervals. This timer is optimized for use in...
Definition: timer.h:29
bool is_running() const
Returns if the loading indicator animation is started.
Definition: loading_indicator.h:52
Provides data for the paint event.
Definition: paint_event_args.h:27
Standard style dialog.
Contains xtd::forms::content_alignment enum class.
Defines the base class for controls, which are components with visual representation.
Definition: control.h:68
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
Contains xtd::forms::border_style enum class.
xtd::drawing::size default_size() const override
Gets the default size of the control.
Definition: loading_indicator.h:38
Represents a loading indicator control.
Definition: loading_indicator.h:26
The message box contains a symbol consisting of white X in a circle with a red background.
Contains xtd::forms::loading_indicator_style enum class.