xtd 0.2.0
Loading...
Searching...
No Matches
picture_box.h
Go to the documentation of this file.
1
4#pragma once
5#include "border_sides.h"
6#include "border_style.h"
7#include "control.h"
9#include <xtd/drawing/image>
10#include <xtd/optional>
11
13namespace xtd {
15 namespace forms {
33 struct data;
34
35 public:
37
41
43
47 virtual forms::border_sides border_sides() const noexcept;
51
55 virtual forms::border_style border_style() const noexcept;
65 virtual picture_box& border_style(std::nullptr_t);
66
70 std::optional<drawing::image> image() const noexcept;
75 picture_box& image(const drawing::image& image);
80 picture_box& image(std::nullptr_t);
81
85 picture_box_size_mode size_mode() const noexcept;
90 picture_box& size_mode(picture_box_size_mode size_mode);
92
94
98 static picture_box create();
102 static picture_box create(const drawing::point& location);
107 static picture_box create( const drawing::point& location, const drawing::size& size);
113 static picture_box create(const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
117 static picture_box create(const xtd::drawing::image& image);
122 static picture_box create(const xtd::drawing::image& image, const drawing::point& location);
128 static picture_box create(const xtd::drawing::image& image, const drawing::point& location, const drawing::size& size);
135 static picture_box create(const xtd::drawing::image& image, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
139 static picture_box create(const control& parent);
144 static picture_box create(const control& parent, const drawing::point& location);
150 static picture_box create(const control& parent, const drawing::point& location, const drawing::size& size);
157 static picture_box create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
162 static picture_box create(const control& parent, const xtd::drawing::image& image);
168 static picture_box create(const control& parent, const xtd::drawing::image& image, const drawing::point& location);
175 static picture_box create(const control& parent, const xtd::drawing::image& image, const drawing::point& location, const drawing::size& size);
183 static picture_box create(const control& parent, const xtd::drawing::image& image, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
185
186 protected:
188
190 forms::create_params create_params() const noexcept override;
192
193 protected:
195
201 std::unique_ptr<xtd::object> clone() const override;
202
203 drawing::size measure_control() const noexcept override;
204
207 void on_handle_created(const event_args& e) override;
208 void on_paint(paint_event_args& e) override;
210
211 private:
212 std::shared_ptr<data> data_;
213 };
214 }
215}
Contains xtd::forms::border_sides enum class.
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.h:18
Defines the base class for controls, which are components with visual representation.
Definition control.h:79
Encapsulates the information needed when creating a control.
Definition create_params.h:27
Provides data for the xtd::forms::control::paint event.
Definition paint_event_args.h:28
Represents a standard Windows picture box.
Definition picture_box.h:32
virtual forms::border_sides border_sides() const noexcept
Gets the border sides for the control.
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
#define forms_export_
Define shared library export.
Definition forms_export.h:13
size_t size
Represents a size of any object in bytes.
Definition types.h:197
picture_box_size_mode
Specifies how an image is positioned within a picture_box.
Definition picture_box_size_mode.h:20
border_sides
Specifies how a control anchors to the edges of its container.
Definition border_sides.h:21
border_style
Specifies the border style for a control.
Definition border_style.h:20
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::picture_box_size_mode enum class.
Contains xtd::forms::style_sheets::border_style class.
Contains xtd::forms::style_sheets::control class.