xtd 0.2.0
system_images_base.h
Go to the documentation of this file.
1 #pragma once
5 #include "../drawing_export.h"
6 #include "bitmap.h"
7 #include "size.h"
8 #include <xtd/static>
9 #include <map>
10 
12 namespace xtd {
14  namespace drawing {
16  class system_icons;
18 
31  class drawing_export_ system_images_base static_ {
32  protected:
34 
38  static xtd::drawing::size default_size() noexcept;
39 
59  static std::vector<xtd::ustring> contexts() noexcept;
453  static std::map<xtd::ustring, std::vector<xtd::ustring>> context_names() noexcept;
846  static std::vector<xtd::ustring> names() noexcept;
1241  static std::vector<xtd::ustring> names(const xtd::ustring& context) noexcept;
1245  static std::vector<xtd::drawing::size> sizes() noexcept;
1247 
1249 
1256  static xtd::drawing::image from_name(const xtd::ustring& name);
1262  static xtd::drawing::image from_name(const xtd::ustring& name, const xtd::drawing::size& size);
1268  static xtd::drawing::image from_name(const xtd::ustring& theme, const xtd::ustring& name);
1274  static xtd::drawing::image from_name(const xtd::ustring& theme, const xtd::ustring& name, const xtd::drawing::size& size);
1276 
1277  private:
1278  // This method is only needed to disable the native::system::image::form_name function during unit testing.
1279  static bool native_system_images_from_name_enabled() noexcept {return __XTD_CURRENT_TARGET_ID__ != __XTD_TARGET_ID_TEST_APPLICATION__;}
1280  friend class system_icons;
1281  static xtd::ustring default_theme() noexcept;
1282  static xtd::ustring fallback_theme() noexcept;
1283  static std::vector<xtd::ustring> themes() noexcept;
1284  };
1285  }
1286 }
1287 
#define static_
This keyword is use to represent a static object. A static object can&#39;t be instantiated (constructors...
Definition: static.h:37
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:31
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:46
Each property of the xtd::drawing::system_icons class is an xtd::drawing::icon object for Windows sys...
Definition: system_icons.h:28
An abstract base class that provides functionality for the bitmap and metafile descended classes...
Definition: image.h:48
Contains xtd::drawing::bitmap class.
Contains xtd::drawing::size class.
Represents the base for all system_images clases (xtd::drawing::system_images).
Definition: system_images_base.h:31