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 {
35 struct data;
36
37 public:
39
43
45
49 virtual forms::border_sides border_sides() const noexcept;
53
57 virtual forms::border_style border_style() const noexcept;
67 virtual picture_box& border_style(std::nullptr_t);
68
72 std::optional<drawing::image> image() const noexcept;
77 picture_box& image(const drawing::image& image);
82 picture_box& image(std::nullptr_t);
83
87 picture_box_size_mode size_mode() const noexcept;
92 picture_box& size_mode(picture_box_size_mode size_mode);
94
96
100 static picture_box create();
104 static picture_box create(const drawing::point& location);
109 static picture_box create( const drawing::point& location, const drawing::size& size);
115 static picture_box create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
119 static picture_box create(const xtd::drawing::image& image);
124 static picture_box create(const xtd::drawing::image& image, const drawing::point& location);
130 static picture_box create(const xtd::drawing::image& image, const drawing::point& location, const drawing::size& size);
137 static picture_box create(const xtd::drawing::image& image, const drawing::point& location, const drawing::size& size, const xtd::string& name);
141 static picture_box create(const control& parent);
146 static picture_box create(const control& parent, const drawing::point& location);
152 static picture_box create(const control& parent, const drawing::point& location, const drawing::size& size);
159 static picture_box create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
164 static picture_box create(const control& parent, const xtd::drawing::image& image);
170 static picture_box create(const control& parent, const xtd::drawing::image& image, const drawing::point& location);
177 static picture_box create(const control& parent, const xtd::drawing::image& image, const drawing::point& location, const drawing::size& size);
185 static picture_box create(const control& parent, const xtd::drawing::image& image, const drawing::point& location, const drawing::size& size, const xtd::string& name);
187
188 protected:
190
192 forms::create_params create_params() const noexcept override;
194
195 protected:
197
203 xtd::uptr<xtd::object> clone() const override;
204
205 drawing::size measure_control() const noexcept override;
206
209 void on_handle_created(const event_args& e) override;
210 void on_paint(paint_event_args& e) override;
212
213 private:
214 xtd::sptr<data> data_;
215 };
216 }
217}
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:81
Encapsulates the information needed when creating a control.
Definition create_params.h:29
Provides data for the xtd::forms::control::paint event.
Definition paint_event_args.h:30
Represents a standard Windows picture box.
Definition picture_box.h:34
virtual forms::border_sides border_sides() const noexcept
Gets the border sides for the control.
#define forms_export_
Define shared library export.
Definition forms_export.h:13
std::optional< type_t > optional
Represents the null_opt alias on std::nullopt_t.
Definition optional.h:181
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
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h:25
picture_box_size_mode
Specifies how an image is positioned within a picture_box.
Definition picture_box_size_mode.h:22
border_sides
Specifies how a control anchors to the edges of its container.
Definition border_sides.h:23
border_style
Specifies the border style for a control.
Definition border_style.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::picture_box_size_mode enum class.
Contains xtd::forms::style_sheets::border_style class.
Contains xtd::forms::style_sheets::control class.