xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
label.h
Go to the documentation of this file.
1
4#pragma once
5#include "control.h"
6#include "border_style.h"
7#include "content_alignment.h"
8#include "flat_style.h"
9
11namespace xtd {
13 namespace forms {
26 class forms_export_ label : public control {
27 public:
30
34 virtual xtd::forms::border_style border_style() const {return border_style_;}
40
44 virtual xtd::forms::flat_style flat_style() const {return flat_style_;}
50
51 xtd::drawing::size default_size() const override {return {100, 23};}
52
56 virtual xtd::forms::content_alignment text_align() const {return text_align_;}
62
65
66 protected:
67 xtd::forms::create_params create_params() const override;
68
70
71 void on_font_changed(const xtd::event_args& e) override;
72 void on_handle_created(const event_args& e) override;
74 void on_resize(const xtd::event_args& e) override;
75
80 virtual void on_text_align_changed(const xtd::event_args& e);
81
82 void on_text_changed(const xtd::event_args& e) override;
83
89 };
90 }
91}
Contains xtd::forms::border_style enum class.
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:25
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 event.
Definition: event.h:21
Defines the base class for controls, which are components with visual representation.
Definition: control.h:67
Represents a standard Windows label.
Definition: label.h:26
void on_text_changed(const xtd::event_args &e) override
Raises the control::text_changed event.
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
xtd::drawing::size measure_control() const override
Measure this control.
xtd::drawing::size default_size() const override
Gets the default size of the control.
Definition: label.h:51
void on_font_changed(const xtd::event_args &e) override
Raises the control::font_changed event.
virtual xtd::forms::label & border_style(xtd::forms::border_style border_style)
Sets the border style for the control.
virtual xtd::forms::label & flat_style(xtd::forms::flat_style flat_style)
Sets the flat style appearance of the label control.
label()
Initialize a new instance of label class.
void on_resize(const xtd::event_args &e) override
Raises the control::resize event.
virtual xtd::forms::flat_style flat_style() const
Gets the flat style appearance of the label control.
Definition: label.h:44
virtual xtd::forms::label & text_align(xtd::forms::content_alignment text_align)
Gets the alignment of the text on the button control.
xtd::forms::create_params create_params() const override
Gets the required creation parameters when the control handle is created.
virtual xtd::forms::content_alignment text_align() const
Gets the alignment of the text on the button control.
Definition: label.h:56
virtual void on_text_align_changed(const xtd::event_args &e)
Raises the xtd::forms::label::text_align_changed event.
virtual xtd::forms::border_style border_style() const
Gets the border style for the control.
Definition: label.h:34
void on_paint(xtd::forms::paint_event_args &e) override
Raises the control::paint event.
void on_handle_created(const event_args &e) override
Raises the control::handle_created event.
Provides data for the paint event.
Definition: paint_event_args.h:26
Contains xtd::forms::content_alignment enum class.
Contains xtd::forms::control control.
Contains xtd::forms::flat_style enum class.
#define forms_export_
Define shared library export.
Definition: forms_export.h:13
border_style
Specifies the border style for a control.
Definition: border_style.h:18
flat_style
Specifies the appearance of a control.
Definition: flat_style.h:20
content_alignment
Specifies alignment of content on the drawing surface.
Definition: content_alignment.h:17
@ standard
The control appears three-dimensional.
@ top_left
Content is vertically aligned at the top, and horizontally aligned on the left.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17