xtd 1.0.0
Loading...
Searching...
No Matches
status_bar_panel.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "component.hpp"
7#include "context_menu.hpp"
8#include "control_ref.hpp"
10#include "image_list.hpp"
14#include <xtd/event>
15#include <xtd/event_handler>
16#include <xtd/iequatable>
17
19namespace xtd {
21 namespace forms {
23 class control;
24 class status_bar;
26
45 class status_bar_panel : public xtd::forms::component, public xtd::iequatable<status_bar_panel> {
46 struct data;
47
48 public:
50
67
69
74 [[nodiscard]] auto alignment() const noexcept -> xtd::forms::horizontal_alignment;
80
85 [[nodiscard]] auto auto_size() const noexcept -> xtd::forms::status_bar_panel_auto_size;
92
96 [[nodiscard]] auto border_style() const noexcept -> xtd::forms::status_bar_panel_border_style;
102
106 [[nodiscard]] auto control() const noexcept -> std::optional<control_ref>;
111 auto control(const xtd::forms::control& value) -> status_bar_panel&;
117
122 [[nodiscard]] auto image() const noexcept -> const xtd::drawing::image&;
128 auto image(const xtd::drawing::image& value) -> status_bar_panel&;
129
133 [[nodiscard]] auto min_width() const noexcept -> xtd::int32;
139
143 [[nodiscard]] auto name() const noexcept -> const xtd::string&;
148 auto name(const xtd::string& value) -> status_bar_panel&;
149
152 [[nodiscard]] auto parent() const noexcept -> std::optional<xtd::ref<xtd::forms::status_bar>>;
153
157 [[nodiscard]] auto style() const noexcept -> xtd::forms::status_bar_panel_style;
163
167 [[nodiscard]] auto tag() const noexcept -> const xtd::any_object&;
172 auto tag(const xtd::any_object& value) -> status_bar_panel&;
173
177 [[nodiscard]] auto text() const noexcept -> const xtd::string&;
182 auto text(const xtd::string& value) -> status_bar_panel&;
183
188 [[nodiscard]] auto tool_tip_text() const noexcept -> const xtd::string&;
194 auto tool_tip_text(const xtd::string& value) -> status_bar_panel&;
195
199 [[nodiscard]] auto width() const noexcept -> xtd::int32;
204 auto width(xtd::int32 value) -> status_bar_panel&;
206
208
212 auto begin_init() -> void;
213
217 [[nodiscard]] auto equals(const xtd::object& obj) const noexcept -> bool override;
221 [[nodiscard]] auto equals(const status_bar_panel& other) const noexcept -> bool override;
222
225 auto end_init() -> void;
226
229 [[nodiscard]] auto get_hash_code() const noexcept -> xtd::usize override;
230
234 [[nodiscard]] auto to_string() const noexcept -> xtd::string override;
236
238
244 [[nodiscard]] static auto create_control(const xtd::string& text, const xtd::forms::control& control) -> status_bar_panel;
248 [[nodiscard]] static auto create_control(const xtd::forms::control& control) -> status_bar_panel;
252 [[nodiscard]] static auto create_panel(const xtd::string& text) -> status_bar_panel;
256 [[nodiscard]] static auto create_panel(const xtd::drawing::image& image) -> status_bar_panel;
261 [[nodiscard]] static auto create_panel(const xtd::string& text, const xtd::drawing::image& image) -> status_bar_panel;
263
264 private:
265 friend xtd::forms::status_bar;
266 xtd::sptr<data> data_;
267 };
268
276 }
277}
Represent a polymorphic wrapper capable of holding any type.
Definition any_object.hpp:29
Provides the base implementation and enables object sharing between applications.
Definition component.hpp:26
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
Represents a xtd::forms::status_bar panel.
Definition status_bar_panel.hpp:45
auto auto_size() const noexcept -> xtd::forms::status_bar_panel_auto_size
Gets a value indicating whether the status bar panel is automatically resized.
static auto create_panel(const xtd::string &text) -> status_bar_panel
A factory to create a status bar panel with specified text.
auto alignment() const noexcept -> xtd::forms::horizontal_alignment
Gets the alignment of text and icons within the status bar panel.
static auto create_control(const xtd::string &text, const xtd::forms::control &control) -> status_bar_panel
A factory to create a control status bar panel with specified text and control.
auto control() const noexcept -> std::optional< control_ref >
Gets the control to be displayed in the control status bar panel.
auto width() const noexcept -> xtd::int32
Gets the width of the status bar panel within the xtd::forms::status_bar control.
auto tag() const noexcept -> const xtd::any_object &
Gets an object that contains data about the xtd::forms::status_bar_panel.
auto min_width() const noexcept -> xtd::int32
Gets the minimum allowed width of the status bar panel within the xtd::forms::status_bar control.
auto begin_init() -> void
Begins the initialization of a xtd::forms::status_bar_panel.
status_bar_panel()
Initialises a new instance of xtd::forms::status_bar_panel class.
auto style() const noexcept -> xtd::forms::status_bar_panel_style
Gets the style of the status bar panel.
auto border_style() const noexcept -> xtd::forms::status_bar_panel_border_style
Gets the border style of the status bar panel.
auto image() const noexcept -> const xtd::drawing::image &
Gets the image to display within the status bar panel.
auto tool_tip_text() const noexcept -> const xtd::string &
Gets ToolTip text associated with the status bar panel.
auto parent() const noexcept -> std::optional< xtd::ref< xtd::forms::status_bar > >
Gets the xtd::forms::status_bar control that the status bar panel is assigned to.
auto equals(const xtd::object &obj) const noexcept -> bool override
Determines whether the specified object is equal to the current object.
auto get_hash_code() const noexcept -> xtd::usize override
Serves as a hash function for a particular type.
auto text() const noexcept -> const xtd::string &
Gets the text of the status bar panel.
auto name() const noexcept -> const xtd::string &
Gets the name of the xtd::forms::status_bar_panel.
auto end_init() -> void
Ends the initialization of a xtd::forms::status_bar_panel.
auto to_string() const noexcept -> xtd::string override
Returns a string that represents the xtd::forms::status_bar_panel control.
Represents a Windows status bar control.
Definition status_bar.hpp:48
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:23
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::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
std::nullptr_t null_ptr
Represents the null_opt alias on std::nullptr_t.
Definition null_ptr.hpp:19
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
xtd::reference_wrapper_object< type_t > ref
The xtd::ref object is a reference wrapper.
Definition ref.hpp:25
std::optional< type_t > optional
Represents the optional alias on std::optional.
Definition optional.hpp:26
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
@ other
The operating system is other.
Definition platform_id.hpp:60
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.hpp:22
xtd::ref< status_bar_panel > status_bar_panel_ref
Represents a xtd::forms::status_bar_item reference.
Definition status_bar_panel.hpp:275
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.hpp:23
xtd::ref< xtd::forms::control > control_ref
Represents a control reference.
Definition control_ref.hpp:25
horizontal_alignment
Specifies how an object or text in a control is horizontally aligned relative to an element of the co...
Definition horizontal_alignment.hpp:22
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.hpp:22
Contains xtd::forms::horizontal_alignment enum class.
Contains xtd::forms::image_list component.
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197
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.