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
46 class status_bar_panel : public xtd::forms::component, public iclonable, public xtd::iequatable<status_bar_panel> {
47 struct data;
48
49 public:
51
68
70 status_bar_panel(const status_bar_panel&) noexcept = default;
71 status_bar_panel(status_bar_panel&&) noexcept = default;
72 status_bar_panel& operator =(const status_bar_panel&) noexcept = default;
74
76
87
99
109
113 std::optional<control_ref> control() const noexcept;
123 status_bar_panel& control(std::nullptr_t value);
124
129 const xtd::drawing::image& image() const noexcept;
135 status_bar_panel& image(const xtd::drawing::image& value);
136
140 int32 min_width() const noexcept;
146
150 const xtd::string& name() const noexcept;
155 status_bar_panel& name(const xtd::string& value);
156
159 std::optional<std::reference_wrapper<xtd::forms::status_bar>> parent() const noexcept;
160
170
174 std::any tag() const noexcept;
180
184 const xtd::string& text() const noexcept;
189 status_bar_panel& text(const xtd::string& value);
190
195 const xtd::string& tool_tip_text() const noexcept;
201 status_bar_panel& tool_tip_text(const xtd::string& value);
202
206 int32 width() const noexcept;
213
215
220
221 using object::equals;
222 bool equals(const status_bar_panel& other) const noexcept override;
223
226 void end_init();
227
231 xtd::string to_string() const noexcept override;
233
235
241 static status_bar_panel create_control(const xtd::string& text, const xtd::forms::control& control);
246
250 static status_bar_panel create_panel(const xtd::string& text);
254 static status_bar_panel create_panel(const xtd::drawing::image& image);
259 static status_bar_panel create_panel(const xtd::string& text, const xtd::drawing::image& image);
261
262 protected:
264
270 xtd::uptr<xtd::object> clone() const override;
271
273
274 private:
275 friend xtd::forms::status_bar;
276 xtd::sptr<data> data_;
277 };
278
285 using status_bar_panel_ref = std::reference_wrapper<status_bar_panel>;
286 }
287}
Provides the base implementation and enables object sharing between applications.
Definition component.h:25
Defines the base class for controls, which are components with visual representation.
Definition control.h:81
Represents a xtd::forms::status_bar panel.
Definition status_bar_panel.h:46
const xtd::string & text() const noexcept
Gets the text of the status bar panel.
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.
const xtd::string & name() const noexcept
Gets the name of the xtd::forms::status_bar_panel.
static status_bar_panel create_control(const xtd::string &text, const xtd::forms::control &control)
A factory to create a control status bar panel with specified text and control.
xtd::string to_string() const noexcept override
Returns a string that represents the xtd::forms::status_bar_panel control.
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.
const xtd::string & tool_tip_text() const noexcept
Gets ToolTip text associated with the status bar panel.
xtd::forms::status_bar_panel_style style() const noexcept
Gets the style of the status bar panel.
static status_bar_panel create_panel(const xtd::string &text)
A factory to create a status bar panel with specified text.
xtd::uptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
int32 width() const noexcept
Gets the width of the status bar panel within the xtd::forms::status_bar control.
Represents a Windows status bar control.
Definition status_bar.h:48
Supports cloning, which creates a new instance of a class with the same value as an existing instance...
Definition iclonable.h:21
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.h:22
Contains xtd::forms::component class.
Contains xtd::forms::const_control_ref typedef.
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:25
std::optional< type_t > optional
Represents the null_opt alias on std::nullopt_t.
Definition optional.h:181
int32_t int32
Represents a 32-bit signed integer.
Definition int32.h:23
std::unique_ptr< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.h:25
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h:25
@ 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:22
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:23
border_style
Specifies the border style for a control.
Definition border_style.h:22
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:22
std::reference_wrapper< status_bar_panel > status_bar_panel_ref
Represents a xtd::forms::status_bar_item reference.
Definition status_bar_panel.h:285
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:22
std::reference_wrapper< control > control_ref
Represents a control reference.
Definition control_ref.h:25
Contains xtd::forms::horizontal_alignment enum class.
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.
Contains xtd::forms::context_menu menu.
Contains xtd::forms::image_list component.