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"
8 #include "flat_style.h"
11 namespace xtd {
13  namespace forms {
26  class forms_export_ label : public control {
27  public:
29  label();
34  virtual xtd::forms::border_style border_style() const {return border_style_;}
44  virtual xtd::forms::flat_style flat_style() const {return flat_style_;}
51  xtd::drawing::size default_size() const override {return {100, 23};}
56  virtual xtd::forms::content_alignment text_align() const {return text_align_;}
61  virtual xtd::forms::label& text_align(xtd::forms::content_alignment text_align);
66  protected:
67  xtd::forms::create_params create_params() const override;
69  xtd::drawing::size measure_control() const override;
71  void on_font_changed(const xtd::event_args& e) override;
72  void on_handle_created(const event_args& e) override;
73  void on_paint(xtd::forms::paint_event_args& e) override;
74  void on_resize(const xtd::event_args& e) override;
80  virtual void on_text_align_changed(const xtd::event_args& e);
82  void on_text_changed(const xtd::event_args& e) override;
89  };
90  }
91 }
Specifies the appearance of a control.
Definition: flat_style.h:20
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Represents a standard Windows label.
Definition: label.h:26
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:25
virtual xtd::forms::flat_style flat_style() const
Gets the flat style appearance of the label control.
Definition: label.h:44
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
virtual xtd::forms::border_style border_style() const
Gets the border style for the control.
Definition: label.h:34
virtual xtd::forms::content_alignment text_align() const
Gets the alignment of the text on the button control.
Definition: label.h:56
xtd::drawing::size default_size() const override
Gets the default size of the control.
Definition: label.h:51
Represents an event.
Definition: event.h:21
Provides data for the paint event.
Definition: paint_event_args.h:26
Specifies alignment of content on the drawing surface.
Definition: content_alignment.h:17
Standard style dialog.
Specifies the border style for a control.
Definition: border_style.h:18
Contains xtd::forms::content_alignment enum class.
event< label, event_handler > text_align_changed
Occurs when the value of the xtd::forms::label::text_align property has changed.
Definition: label.h:64
Defines the base class for controls, which are components with visual representation.
Definition: control.h:67
Starts at the upper-left corner of the screen.
Contains xtd::forms::flat_style enum class.
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.