xtd 0.2.0
Loading...
Searching...
No Matches
status_bar_panel.h
Go to the documentation of this file.
1
4#pragma once
5#include "component.h"
6#include "const_control_ref.h"
7#include "context_menu.h"
8#include "control_ref.h"
10#include "image_list.h"
14#include <xtd/event>
15#include <xtd/event_handler>
16#include <xtd/iclonable>
17#include <xtd/iequatable>
18
20namespace xtd {
22 namespace forms {
24 class control;
25 class status_bar;
27
44 class status_bar_panel : public xtd::forms::component, public iclonable, public xtd::iequatable<status_bar_panel> {
45 struct data;
46
47 public:
49
66
68 status_bar_panel(const status_bar_panel&) noexcept = default;
69 status_bar_panel(status_bar_panel&&) noexcept = default;
70 status_bar_panel& operator =(const status_bar_panel&) noexcept = default;
72
74
85
97
107
111 std::optional<control_ref> control() const noexcept;
121 status_bar_panel& control(std::nullptr_t value);
122
127 const xtd::drawing::image& image() const noexcept;
133 status_bar_panel& image(const xtd::drawing::image& value);
134
138 int32 min_width() const noexcept;
144
148 const xtd::ustring& name() const noexcept;
154
157 std::optional<std::reference_wrapper<xtd::forms::status_bar>> parent() const noexcept;
158
168
172 std::any tag() const noexcept;
178
182 const xtd::ustring& text() const noexcept;
188
193 const xtd::ustring& tool_tip_text() const noexcept;
200
204 int32 width() const noexcept;
211
213
218
219 bool equals(const status_bar_panel& other) const noexcept override;
220
223 void end_init();
224
228 xtd::ustring to_string() const noexcept override;
230
232
243
251 static status_bar_panel create_panel(const xtd::drawing::image& image);
256 static status_bar_panel create_panel(const xtd::ustring& text, const xtd::drawing::image& image);
258
259 protected:
261
267 std::unique_ptr<xtd::object> clone() const override;
268
270
271 private:
272 friend xtd::forms::status_bar;
273 std::shared_ptr<data> data_;
274 };
275
282 using status_bar_panel_ref = std::reference_wrapper<status_bar_panel>;
283 }
284}
Provides the base implementation and enables object sharing between applications.
Definition component.h:23
Defines the base class for controls, which are components with visual representation.
Definition control.h:79
Represents a xtd::forms::status_bar panel.
Definition status_bar_panel.h:44
xtd::forms::horizontal_alignment alignment() const noexcept
Gets the alignment of text and icons within the status bar panel.
void begin_init()
Begins the initialization of a xtd::forms::status_bar_panel.
static status_bar_panel create_panel(const xtd::ustring &text)
A factory to create a status bar panel with specified text.
static status_bar_panel create_control(const xtd::ustring &text, const xtd::forms::control &control)
A factory to create a control status bar panel with specified text and control.
const xtd::ustring & text() const noexcept
Gets the text of the status bar panel.
const xtd::ustring & tool_tip_text() const noexcept
Gets ToolTip text associated with the status bar panel.
std::any tag() const noexcept
Gets an object that contains data about the xtd::forms::status_bar_panel.
const xtd::drawing::image & image() const noexcept
Gets the image to display within the status bar panel.
int32 min_width() const noexcept
Gets the minimum allowed width of the status bar panel within the xtd::forms::status_bar control.
std::optional< std::reference_wrapper< xtd::forms::status_bar > > parent() const noexcept
Gets the xtd::forms::status_bar control that the status bar panel is assigned to.
xtd::forms::status_bar_panel_auto_size auto_size() const noexcept
Gets a value indicating whether the status bar panel is automatically resized.
void end_init()
Ends the initialization of a xtd::forms::status_bar_panel.
status_bar_panel()
Initialises a new instance of xtd::forms::status_bar_panel class.
xtd::forms::status_bar_panel_style style() const noexcept
Gets the style of the status bar panel.
xtd::ustring to_string() const noexcept override
Returns a string that represents the xtd::forms::status_bar_panel control.
int32 width() const noexcept
Gets the width of the status bar panel within the xtd::forms::status_bar control.
const xtd::ustring & name() const noexcept
Gets the name of the xtd::forms::status_bar_panel.
std::unique_ptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
Represents a Windows status bar control.
Definition status_bar.h:46
Supports cloning, which creates a new instance of a class with the same value as an existing instance...
Definition iclonable.h:19
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.h:18
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
Contains xtd::forms::component class.
Contains xtd::forms::const_control_ref typedef.
Contains xtd::forms::context_menu menu.
Contains xtd::forms::control_ref typedef.
xtd::forms::style_sheets::control status_bar
The status_bar data allows you to specify the box of a status_bar control.
Definition status_bar.h:23
int_least32_t int32
Represents a 32-bit signed integer.
Definition types.h:131
@ any
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
@ other
The operating system is other.
@ control
The left or right CTRL modifier key.
status_bar_panel_border_style
Specifies the appearance of the border for a xtd::forms::status_bar_panel on a xtd::forms::status_bar...
Definition status_bar_panel_border_style.h:20
status_bar_panel_style
Specifies whether a xtd::forms::status_bar_panel object on a xtd::forms::status_bar control is owner-...
Definition status_bar_panel_style.h:21
border_style
Specifies the border style for a control.
Definition border_style.h:20
horizontal_alignment
Specifies how an object or text in a control is horizontally aligned relative to an element of the co...
Definition horizontal_alignment.h:20
std::reference_wrapper< status_bar_panel > status_bar_panel_ref
Represents a xtd::forms::status_bar_item reference.
Definition status_bar_panel.h:282
status_bar_panel_auto_size
Specifies how a xtd::forms::status_bar_panel on a xtd::forms::status_bar content behaves when the con...
Definition status_bar_panel_auto_size.h:20
std::reference_wrapper< control > control_ref
Represents a control reference.
Definition control_ref.h:23
Contains xtd::forms::horizontal_alignment enum class.
Contains xtd::forms::image_list component.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::status_bar_panel_auto_size enum class.
Contains xtd::forms::status_bar_panel_border_style enum class.
Contains xtd::forms::status_bar_panel_style enum class.