xtd 0.2.0
Loading...
Searching...
No Matches
status_bar.h
Go to the documentation of this file.
1
4#pragma once
5#include "panel.h"
6#include "status_bar_panel.h"
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
77 status_bar(const status_bar&) = default;
78 status_bar& operator =(const status_bar&) = default;
80
82
84 dock_style dock() const noexcept override;
85 control& dock(dock_style dock) override;
86
90 const status_bar_panel_collection& panels() const noexcept;
95
99 virtual bool show_panels() const noexcept;
104 virtual status_bar& show_panels(bool value);
105
109 virtual bool show_tool_tips() const noexcept;
114 virtual status_bar& show_tool_tips(bool value);
115
119 virtual bool sizing_grip() const noexcept;
124 virtual status_bar& sizing_grip(bool value);
126
128
134
140
142
146 static status_bar create();
150 static status_bar create(const status_bar_panel_collection& panels);
155 static status_bar create(const status_bar_panel_collection& panels, const xtd::string& name);
159 static status_bar create(xtd::forms::dock_style style);
164 static status_bar create(xtd::forms::dock_style style, const status_bar_panel_collection& panels);
170 static status_bar create(xtd::forms::dock_style style, const status_bar_panel_collection& panels, const xtd::string& name);
174 static status_bar create(const xtd::string& text);
179 static status_bar create(const xtd::string& text, const xtd::string& name);
184 static status_bar create(xtd::forms::dock_style style, const xtd::string& text);
190 static status_bar create(xtd::forms::dock_style style, const xtd::string& text, const xtd::string& name);
194 static status_bar create(const control& parent);
199 static status_bar create(const control& parent, const status_bar_panel_collection& panels);
205 static status_bar create(const control& parent, const status_bar_panel_collection& panels, const xtd::string& name);
210 static status_bar create(const control& parent, xtd::forms::dock_style style);
216 static status_bar create(const control& parent, xtd::forms::dock_style style, const status_bar_panel_collection& panels);
223 static status_bar create(const control& parent, xtd::forms::dock_style style, const status_bar_panel_collection& panels, const xtd::string& name);
228 static status_bar create(const control& parent, const xtd::string& text);
234 static status_bar create(const control& parent, const xtd::string& text, const xtd::string& name);
240 static status_bar create(const control& parent, xtd::forms::dock_style style, const xtd::string& text);
247 static status_bar create(const control& parent, xtd::forms::dock_style style, const xtd::string& text, const xtd::string& name);
249
250 protected:
251 friend status_bar_panel;
252 friend form;
253
255
257 forms::create_params create_params() const noexcept override;
258 xtd::drawing::font default_font() const noexcept override;
259 drawing::size default_size() const noexcept override;
261
263
269 xtd::uptr<xtd::object> clone() const override;
270
278 virtual void on_draw_item(xtd::forms::status_bar_draw_item_event_args& e);
279
287 virtual void on_panel_click(const xtd::forms::status_bar_panel_click_event_args& e);
288
289 void on_handle_created(const event_args& e) override;
290 void on_handle_destroyed(const event_args& e) override;
291
292 void on_main_panel_paint(object& sender, xtd::forms::paint_event_args& e);
293
294 void on_paint(xtd::forms::paint_event_args& e) override;
295 void on_resize(const event_args& e) override;
296 void wnd_proc(message& message) override;
298
299 private:
300 void fill();
301
302 bool is_horizontal() const noexcept;
303 bool is_system_status_bar() const noexcept;
304 status_bar& is_system_status_bar(bool value);
305
306 void on_control_appearance_changed(const xtd::event_args&) override;
307 void on_item_added(size_t pos, status_bar_panel_ref item);
308 void on_item_updated(size_t pos, status_bar_panel_ref item);
309 void on_item_removed(size_t pos, status_bar_panel_ref item);
310
311 void resize_spring_panels();
312 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);
313
314 xtd::sptr<data> data_;
315 };
316 }
317}
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:81
Encapsulates the information needed when creating a control.
Definition create_params.h:29
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:54
Represents a collection of objects.
Definition arranged_element_collection.h:34
Implements a Windows message.
Definition message.h:28
Provides data for the xtd::forms::control::paint event.
Definition paint_event_args.h:30
Provides data for the xtd::forms::status_bar::draw_item event.
Definition status_bar_draw_item_event_args.h:25
Provides data for the xtd::forms::tool_bar::button_click event.
Definition status_bar_panel_click_event_args.h:25
Represents a xtd::forms::status_bar panel.
Definition status_bar_panel.h:46
Represents a Windows status bar control.
Definition status_bar.h:48
status_bar()
Initializes a new instance of the xtd::forms::status_bar class.
dock_style dock() const noexcept override
Gets which control borders are docked to its parent control and determines how a control is resized w...
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.h:26
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.h:26
#define forms_export_
Define shared library export.
Definition forms_export.h:13
xtd::forms::style_sheets::control form
The form data allows you to specify the box of a form control.
Definition form.h:23
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
size_t size
Represents a size of any object in bytes.
Definition size.h:23
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.h:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h: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.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
dock_style
Specifies the position and manner in which a control is docked.
Definition dock_style.h: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.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
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_draw_item_event_handler event handler.
Contains xtd::forms::status_bar_panel_click_event_handler event handler.
Contains xtd::forms::style_sheets::panel class.
Contains xtd::forms::style_sheets::status_bar_panel alias.