xtd 1.0.0
Loading...
Searching...
No Matches
status_bar.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "panel.hpp"
9#include <memory>
10#include <vector>
11
13namespace xtd {
15 namespace forms {
17 class form;
19
49 struct data;
50 class status_bar_panel_control;
51 class sizing_grip_control;
52
53 public:
55
60
62
74
76
78 dock_style dock() const noexcept override;
80
84 const status_bar_panel_collection& panels() const noexcept;
89
93 virtual bool show_panels() const noexcept;
98 virtual status_bar& show_panels(bool value);
99
103 virtual bool show_tool_tips() const noexcept;
108 virtual status_bar& show_tool_tips(bool value);
109
113 virtual bool sizing_grip() const noexcept;
118 virtual status_bar& sizing_grip(bool value);
120
122
128
134
136
168 static status_bar create(const xtd::string& text);
173 static status_bar create(const xtd::string& text, const xtd::string& name);
178 static status_bar create(xtd::forms::dock_style style, const xtd::string& text);
184 static status_bar create(xtd::forms::dock_style style, const xtd::string& text, const xtd::string& name);
222 static status_bar create(const control& parent, const xtd::string& text);
228 static status_bar create(const control& parent, const xtd::string& text, const xtd::string& name);
234 static status_bar create(const control& parent, xtd::forms::dock_style style, const xtd::string& text);
241 static status_bar create(const control& parent, xtd::forms::dock_style style, const xtd::string& text, const xtd::string& name);
243
244 protected:
245 friend status_bar_panel;
246 friend form;
247
249
251 forms::create_params create_params() const noexcept override;
252 xtd::drawing::font default_font() const noexcept override;
253 drawing::size default_size() const noexcept override;
255
257
267
276
277 void on_handle_created(const event_args& e) override;
278 void on_handle_destroyed(const event_args& e) override;
279 void on_paint(xtd::forms::paint_event_args& e) override;
280 void on_resize(const event_args& e) override;
281 void wnd_proc(message& message) override;
283
284 private:
285 void fill();
286
287 bool is_horizontal() const noexcept;
288 bool is_system_status_bar() const noexcept;
289 status_bar& is_system_status_bar(bool value);
290
291 void on_control_appearance_changed(const xtd::event_args&) override;
292
293 void resize_spring_panels();
294 void update_status_bar_panel_control(intptr handle, const xtd::string& text, const xtd::string& tool_tip_text, const xtd::drawing::image& image, xtd::forms::horizontal_alignment alignment, xtd::forms::status_bar_panel_auto_size auto_size, xtd::forms::status_bar_panel_border_style border_style, xtd::forms::status_bar_panel_style panel_style, int32 min_width, int32 width);
295
296 xtd::sptr<data> data_;
297 };
298 }
299}
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
Represents an event.
Definition event.hpp:23
auto handle() const -> xtd::intptr override
Gets the window handle that the control is bound to.
virtual auto size() const noexcept -> xtd::drawing::size
Gets the height and width of the control.
virtual auto width() const noexcept -> xtd::int32
Gets the width of the control.
virtual auto font() const noexcept -> xtd::drawing::font
Gets the font of the text displayed by the control.
virtual auto parent() const noexcept -> std::optional< xtd::forms::control_ref >
Gets the parent container of the control.
virtual auto text() const noexcept -> const xtd::string &
Gets the text associated with this control.
virtual auto auto_size() const noexcept -> bool
Gets a value that indicates whether the control resizes based on its contents.
virtual auto name() const noexcept -> const xtd::string &
Gets the name of the control.
control()
Initializes a new instance of the xtd::forms::control class with default settings.
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
Represents a collection of objects.
Definition arranged_element_collection.hpp:41
Provides data for the xtd::forms::status_bar::draw_item event.
Definition status_bar_draw_item_event_args.hpp:25
Provides data for the xtd::forms::tool_bar::button_click event.
Definition status_bar_panel_click_event_args.hpp:25
void on_paint(xtd::forms::paint_event_args &e) override
Raises the xtd::forms::control::paint event.
status_bar()
Initializes a new instance of the xtd::forms::status_bar class.
void on_resize(const event_args &e) override
Raises the xtd::forms::control::region event.
virtual void on_draw_item(xtd::forms::status_bar_draw_item_event_args &e)
Raises the xtd::forms::status_bar::daw_item event.
xtd::event< status_bar, xtd::forms::status_bar_draw_item_event_handler > draw_item
Occurs when a visual aspect of an owner-drawn status bar control changes.
Definition status_bar.hpp:127
dock_style dock() const noexcept override
Gets which control borders are docked to its parent control and determines how a control is resized w...
static status_bar create()
A factory to create an xtd::forms::status_bar.
drawing::size default_size() const noexcept override
Gets the default size of the control.
void on_handle_created(const event_args &e) override
Raises the xtd::forms::control::handle_created event.
xtd::event< status_bar, xtd::forms::status_bar_panel_click_event_handler > panel_click
Occurs when a xtd::forms::status_bar_panel object on a xtd::forms::status_bar control is clicked.
Definition status_bar.hpp:132
void wnd_proc(message &message) override
Processes Windows messages.
forms::create_params create_params() const noexcept override
Gets the required creation parameters when the control handle is created.
virtual bool sizing_grip() const noexcept
Gets a value indicating whether a sizing grip is displayed in the lower-right corner of the control.
const status_bar_panel_collection & panels() const noexcept
Gets the collection of xtd::forms::status_bar panels contained within the control.
void on_handle_destroyed(const event_args &e) override
Raises the xtd::forms::control::handle_destroyed event.
virtual void on_panel_click(const xtd::forms::status_bar_panel_click_event_args &e)
Raises the xtd::forms::status_bar::panel_click event.
virtual bool show_tool_tips() const noexcept
Gets a value indicating whether the status bar displays a xtd::forms::tool_tip for each button.
xtd::forms::layout::arranged_element_collection< status_bar_panel_ref > status_bar_panel_collection
Represents the collection of panels in a xtd::forms::status_bar control.
Definition status_bar.hpp:58
virtual bool show_panels() const noexcept
Gets a value indicating whether any panels that have been added to the control are displayed.
xtd::drawing::font default_font() const noexcept override
Gets the default font of the control.
xtd::delegate< void(object &sender, const status_bar_panel_click_event_args &e)> status_bar_panel_click_event_handler
Represents the method that will handle the xtd::forms::tool_bar::button_click event of a xtd::forms::...
Definition status_bar_panel_click_event_handler.hpp:29
xtd::delegate< void(object &sender, const status_bar_draw_item_event_args &e)> status_bar_draw_item_event_handler
Represents the method that will handle the xtd::forms::status_bar::draw_item event of a xtd::forms::s...
Definition status_bar_draw_item_event_handler.hpp:29
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
std::intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
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
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
border_style
Specifies the border style for a control.
Definition border_style.hpp:22
dock_style
Specifies the position and manner in which a control is docked.
Definition dock_style.hpp:23
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
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::panel container.
Contains xtd::forms::status_bar_draw_item_event_handler handler.
Contains xtd::forms::status_bar_panel container.
Contains xtd::forms::status_bar_panel_click_event_handler handler.
Implements a Windows message.
Definition message.hpp:33