xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
image_list.h
Go to the documentation of this file.
1
4#pragma once
5#include <any>
6#include <xtd/drawing/image.h>
7#include "component.h"
9
11namespace xtd {
13 namespace forms {
25 class forms_export_ image_list final : public component {
26 public:
29
34 image_list(const image_list&) = default;
35 image_list& operator=(const image_list&) = default;
36 bool operator==(const image_list& value) const {return data_->images_ == value.data_->images_;}
37 bool operator!=(const image_list& value) const {return !operator==(value);}
39
42 intptr_t handle() const {return data_->handle_;}
43
46 bool handle_created() const {return data_->handle_ != 0;}
47
51 image_collection& images() {return data_->images_;}
55 const image_collection& images() const {return data_->images_;}
56
59 const drawing::size image_size() const {return data_->image_size_;}
65 const image_list& image_size(const drawing::size& value);
66
69 std::any tag() const {return data_->tag_;}
72 const image_list& tag(std::any& tag) {
73 data_->tag_ = tag;
74 return *this;
75 }
76
79
80 private:
81 struct data {
82 intptr_t handle_ = 0;
83 drawing::size image_size_ {16, 16};
84 image_collection images_;
85 std::any tag_;
86 };
87 std::shared_ptr<data> data_ = std::make_shared<data>();
88 };
89 }
90}
Contains xtd::forms::arranged_element_collection collection.
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:25
Provides the base implementation and enables object sharing between applications.
Definition: component.h:21
Provides methods to manage a collection of xtd::drawing::image objects. This class cannot be inherite...
Definition: image_list.h:25
intptr_t handle() const
Gets the handle of the image list object.
Definition: image_list.h:42
const image_list & tag(std::any &tag)
Sets an object that contains additional data about the image_list.
Definition: image_list.h:72
bool handle_created() const
Gets a value indicating whether the underlying Win32 handle has been created.
Definition: image_list.h:46
const image_list & image_size(const drawing::size &value)
Sets the size of the images in the image list.
const image_collection & images() const
Gets the xtd::forms::image_list::image_collection for this image list.
Definition: image_list.h:55
image_list()
Initialize a new instance ao image_list class.
const drawing::size image_size() const
Gets the size of the images in the image list.
Definition: image_list.h:59
std::any tag() const
Gets an object that contains additional data about the image_list.
Definition: image_list.h:69
image_collection & images()
Gets the xtd::forms::image_list::image_collection for this image list.
Definition: image_list.h:51
static image_list empty
Represents an image_list empty.
Definition: image_list.h:78
Contains xtd::forms::component class.
#define forms_export_
Define shared library export.
Definition: forms_export.h:13
Contains xtd::drawing::image class.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17