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 <map>
6 #include <xtd/static.h>
7 #include "../drawing_export.h"
8 #include "bitmap.h"
9 #include "size.h"
12 namespace xtd {
14  namespace drawing {
16  class system_icons;
26  class drawing_export_ system_images final static_ {
27  public:
33  static xtd::drawing::size default_size() {return {32, 32};}
34  static xtd::drawing::image image_loading() {return image_loading(default_size());}
35  static xtd::drawing::image image_loading(const xtd::drawing::size& size) {return system_images::from_name("image-loading", size);}
36  static xtd::drawing::image image_missing() {return image_missing(default_size());}
37  static xtd::drawing::image image_missing(const xtd::drawing::size& size) {return from_name("image-missing", size);}
39  static std::vector<xtd::ustring> contexts();
40  static std::map<xtd::ustring, std::vector<xtd::ustring>> context_names();
41  static std::vector<xtd::ustring> names();
42  static std::vector<xtd::ustring> names(const xtd::ustring& context) {return context_names()[context];}
43  static std::vector<xtd::drawing::size> sizes();
54  static xtd::drawing::image from_name(const xtd::ustring& name) {return from_name(default_theme(), name, default_size());}
60  static xtd::drawing::image from_name(const xtd::ustring& name, const xtd::drawing::size& size) {return from_name(default_theme(), name, size);}
66  static xtd::drawing::image from_name(const xtd::ustring& theme, const xtd::ustring& name) {return from_name(theme, name, default_size());}
72  static xtd::drawing::image from_name(const xtd::ustring& theme, const xtd::ustring& name, const xtd::drawing::size& size);
75  private:
76  friend class system_icons;
77  static xtd::ustring default_theme();
78  static xtd::ustring fallback_theme();
79  static std::vector<xtd::ustring> themes();
80  };
81  }
82 }
static xtd::drawing::size default_size()
Gets system image from specified name.
Definition: system_images.h:33
Contains xtd::static_object class.
#define static_
This keyword is use to represent a static object. A static object can&#39;t be instantiated (constructors...
Definition: static.h:38
Each property of the xtd::drawing::system_images class is an xtd::drawing::image object for Windows s...
Definition: system_images.h:26
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
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:50
Each property of the xtd::drawing::system_icons class is an xtd::drawing::icon object for Windows sys...
Definition: system_icons.h:24
static xtd::drawing::image from_name(const xtd::ustring &name)
Gets system image from specified name.
Definition: system_images.h:54
Contains xtd::drawing::size class.
static xtd::drawing::image from_name(const xtd::ustring &theme, const xtd::ustring &name)
Gets system image from specified them and name.
Definition: system_images.h:66
An abstract base class that provides functionality for the bitmap and metafile descended classes...
Definition: image.h:34
Contains xtd::drawing::bitmap class.
static xtd::drawing::image from_name(const xtd::ustring &name, const xtd::drawing::size &size)
Gets system image from specified name and size.
Definition: system_images.h:60