xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
picture_box_size_mode.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/ustring.h>
6 
8 namespace xtd {
10  namespace forms {
18  enum class picture_box_size_mode {
20  normal = 0,
22  stretch_image = 1,
24  auto_size = 2,
26  center_image = 3,
28  zoom = 4,
29  };
30 
32  inline std::ostream& operator<<(std::ostream& os, picture_box_size_mode value) {return os << to_string(value, {{picture_box_size_mode::normal, "normal"}, {picture_box_size_mode::stretch_image, "stretch_image"}, {picture_box_size_mode::auto_size, "auto_size"}, {picture_box_size_mode::center_image, "center_image"}, {picture_box_size_mode::zoom, "zoom"}});}
33  inline std::wostream& operator<<(std::wostream& os, picture_box_size_mode value) {return os << to_string(value, {{picture_box_size_mode::normal, L"normal"}, {picture_box_size_mode::stretch_image, L"stretch_image"}, {picture_box_size_mode::auto_size, L"auto_size"}, {picture_box_size_mode::center_image, L"center_image"}, {picture_box_size_mode::zoom, L"zoom"}});}
35  }
36 }
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: to_string.h:37
picture_box_size_mode
Specifies how an image is positioned within a picture_box.
Definition: picture_box_size_mode.h:18
@ center_image
The image is displayed in the center if the picture_box is larger than the image. If the image is lar...
@ zoom
The size of the image is increased or decreased maintaining the size ratio.
@ stretch_image
The image within the picture_box is stretched or shrunk to fit the size of the picture_box.
@ auto_size
The picture_box is sized equal to the size of the image that it contains.
@ normal
The image is placed in the upper-left corner of the picture_box. The image is clipped if it is larger...
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
Contains xtd::ustring class.