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.
control_styles.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/ustring.h>
6 
8 namespace xtd {
10  namespace forms {
29  enum class control_styles {
31  none = 0,
33  container_control = 0b1,
35  user_paint = 0b10,
37  opaque = 0b100,
39  resize_redraw = 0b10000,
41  fixed_width = 0b100000,
43  fixed_height = 0b1000000,
45  standard_click = 0b100000000,
47  selectable = 0b1000000000,
49  user_mouse = 0b10000000000,
51  supports_transparent_back_color = 0b100000000000,
53  standard_double_click = 0b1000000000000,
55  all_painting_in_wm_paint = 0b10000000000000,
57  cache_text = 0b100000000000000,
59  enable_notify_message = 0b1000000000000000,
61  double_buffer = 0b10000000000000000,
63  optimized_double_buffer = 0b100000000000000000,
65  use_text_for_accessibility = 0b1000000000000000000,
66  };
67 
69  inline control_styles& operator +=(control_styles& lhs, control_styles rhs) {lhs = static_cast<control_styles>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); return lhs;}
70  inline control_styles& operator -=(control_styles& lhs, control_styles rhs) {lhs = static_cast<control_styles>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); return lhs;}
71  inline control_styles& operator &=(control_styles& lhs, control_styles rhs) {lhs = static_cast<control_styles>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); return lhs;}
72  inline control_styles& operator |=(control_styles& lhs, control_styles rhs) {lhs = static_cast<control_styles>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); return lhs;}
73  inline control_styles& operator ^=(control_styles& lhs, control_styles rhs) {lhs = static_cast<control_styles>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); return lhs;}
74  inline control_styles operator +(control_styles lhs, control_styles rhs) {return static_cast<control_styles>(static_cast<long long>(lhs) + static_cast<long long>(rhs));}
75  inline control_styles operator -(control_styles lhs, control_styles rhs) {return static_cast<control_styles>(static_cast<long long>(lhs) - static_cast<long long>(rhs));}
76  inline control_styles operator ~(control_styles rhs) {return static_cast<control_styles>(~static_cast<long long>(rhs));}
77  inline control_styles operator &(control_styles lhs, control_styles rhs) {return static_cast<control_styles>(static_cast<long long>(lhs) & static_cast<long long>(rhs));}
78  inline control_styles operator |(control_styles lhs, control_styles rhs) {return static_cast<control_styles>(static_cast<long long>(lhs) | static_cast<long long>(rhs));}
79  inline control_styles operator ^(control_styles lhs, control_styles rhs) {return static_cast<control_styles>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs));}
80  inline std::ostream& operator<<(std::ostream& os, control_styles value) {return os << to_string(value, {{control_styles::container_control, "container_control"}, {control_styles::user_paint, "user_paint"}, {control_styles::opaque, "opaque"}, {control_styles::resize_redraw, "resize_redraw"}, {control_styles::fixed_width, "fixed_width"}, {control_styles::fixed_height, "fixed_height"}, {control_styles::standard_click, "standard_click"}, {control_styles::selectable, "selectable"}, {control_styles::user_mouse, "user_mouse"}, {control_styles::supports_transparent_back_color, "supports_transparent_back_color"}, {control_styles::standard_double_click, "standard_double_click"}, {control_styles::all_painting_in_wm_paint, "all_painting_in_wm_paint"}, {control_styles::cache_text, "cache_text"}, {control_styles::enable_notify_message, "enable_notify_message"}, {control_styles::double_buffer, "double_buffer"}, {control_styles::optimized_double_buffer, "optimized_double_buffer"}, {control_styles::use_text_for_accessibility, "use_text_for_accessibility"}});}
81  inline std::wostream& operator<<(std::wostream& os, control_styles value) {return os << to_string(value, {{control_styles::container_control, L"container_control"}, {control_styles::user_paint, L"user_paint"}, {control_styles::opaque, L"opaque"}, {control_styles::resize_redraw, L"resize_redraw"}, {control_styles::fixed_width, L"fixed_width"}, {control_styles::fixed_height, L"fixed_height"}, {control_styles::standard_click, L"standard_click"}, {control_styles::selectable, L"selectable"}, {control_styles::user_mouse, L"user_mouse"}, {control_styles::supports_transparent_back_color, L"supports_transparent_back_color"}, {control_styles::standard_double_click, L"standard_double_click"}, {control_styles::all_painting_in_wm_paint, L"all_painting_in_wm_paint"}, {control_styles::cache_text, L"cache_text"}, {control_styles::enable_notify_message, L"enable_notify_message"}, {control_styles::double_buffer, L"double_buffer"}, {control_styles::optimized_double_buffer, L"optimized_double_buffer"}, {control_styles::use_text_for_accessibility, L"use_text_for_accessibility"}});}
83  }
84 }
If true, the control implements the standard click behavior.
If true, the control is drawn opaque and the background is not painted.
Provides focus-management functionality for controls that can function as a container for other contr...
Definition: container_control.h:21
If true, the control has a fixed height when auto-scaled. For example, if a layout operation attempts...
If true, the control paints itself rather than the operating system doing so. If false, the paint event is not raised. This style only applies to classes derived from control.
If true, the control ignores the window message WM_ERASEBKGND to reduce flicker. This style should on...
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
If true, the control is redrawn when it is resized.
If true, the control accepts a BackColor with an alpha component of less than 255 to simulate transpa...
Specifies that the value of the control&#39;s text property, if set, determines the control&#39;s default act...
control_styles
Specifies the style and behavior of a control.
Definition: control_styles.h:29
If true, the on_notify_message(message&) method is called for every message sent to the control&#39;s wnd_pro...
Contains xtd::ustring class.
If true, the control is first drawn to a buffer rather than directly to the screen, which can reduce flicker. If you set this property to true, you should also set the all_painting_in_wm_paint to true.
If true, drawing is performed in a buffer, and after it completes, the result is output to the screen...
If true, the control is a container-like control.
If true, the control does its own mouse processing, and mouse events are not handled by the operating...
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
If true, the control has a fixed width when auto-scaled. For example, if a layout operation attempts ...
If true, the control can receive focus.
If true, the control keeps a copy of the text rather than getting it from the handle each time it is ...
If true, the control implements the standard double_click behavior. This style is ignored if the stan...
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