xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Go to the documentation of this file.
1 #pragma once
5 #include <any>
6 #include <xtd/drawing/image.h>
7 #include "component.h"
11 namespace xtd {
13  namespace forms {
25  class forms_export_ image_list final : public component {
26  public:
38  static image_list empty;
45  image_list();
49  ~image_list();
50  image_list(const image_list&) = default;
51  image_list& operator=(const image_list&) = default;
52  bool operator==(const image_list& value) const {return data_->images_ == value.data_->images_;}
53  bool operator!=(const image_list& value) const {return !operator==(value);}
61  intptr_t handle() const {return data_->handle_;}
65  bool handle_created() const {return data_->handle_ != 0;}
70  image_collection& images() {return data_->images_;}
74  const image_collection& images() const {return data_->images_;}
78  const drawing::size image_size() const {return data_->image_size_;}
84  const image_list& image_size(const drawing::size& value);
88  std::any tag() const {return data_->tag_;}
91  const image_list& tag(std::any& tag) {
92  data_->tag_ = tag;
93  return *this;
94  }
97  private:
98  struct data {
99  intptr_t handle_ = 0;
100  drawing::size image_size_ {16, 16};
101  image_collection images_;
102  std::any tag_;
103  };
104  std::shared_ptr<data> data_ = std::make_shared<data>();
105  };
106  }
107 }
Provides methods to manage a collection of xtd::drawing::image objects. This class cannot be inherite...
Definition: image_list.h:25
Contains xtd::forms::arranged_element_collection collection.
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:25
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
const image_collection & images() const
Gets the xtd::forms::image_list::image_collection for this image list.
Definition: image_list.h:74
const image_list & tag(std::any &tag)
Sets an object that contains additional data about the image_list.
Definition: image_list.h:91
intptr_t handle() const
Gets the handle of the image list object.
Definition: image_list.h:61
Contains xtd::drawing::image class.
std::any tag() const
Gets an object that contains additional data about the image_list.
Definition: image_list.h:88
bool handle_created() const
Gets a value indicating whether the underlying Win32 handle has been created.
Definition: image_list.h:65
static image_list empty
Represents an image_list empty.
Definition: image_list.h:38
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
image_collection & images()
Gets the xtd::forms::image_list::image_collection for this image list.
Definition: image_list.h:70
Contains xtd::forms::component class.
const drawing::size image_size() const
Gets the size of the images in the image list.
Definition: image_list.h:78
Provides the base implementation and enables object sharing between applications. ...
Definition: component.h:21