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.
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 }
Provides focus-management functionality for controls that can function as a container for other contr...
Definition: container_control.h:21
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
control_styles
Specifies the style and behavior of a control.
Definition: control_styles.h:29
@ container_control
If true, the control is a container-like control.
@ user_paint
If true, the control paints itself rather than the operating system doing so. If false,...
@ enable_notify_message
If true, the on_notify_message(message&) method is called for every message sent to the control's wnd...
@ none
No control style..
@ optimized_double_buffer
If true, the control is first drawn to a buffer rather than directly to the screen,...
@ use_text_for_accessibility
Specifies that the value of the control's text property, if set, determines the control's default act...
@ user_mouse
If true, the control does its own mouse processing, and mouse events are not handled by the operating...
@ fixed_height
If true, the control has a fixed height when auto-scaled. For example, if a layout operation attempts...
@ double_buffer
If true, drawing is performed in a buffer, and after it completes, the result is output to the screen...
@ fixed_width
If true, the control has a fixed width when auto-scaled. For example, if a layout operation attempts ...
@ cache_text
If true, the control keeps a copy of the text rather than getting it from the handle each time it is ...
@ opaque
If true, the control is drawn opaque and the background is not painted.
@ selectable
If true, the control can receive focus.
@ all_painting_in_wm_paint
If true, the control ignores the window message WM_ERASEBKGND to reduce flicker. This style should on...
@ resize_redraw
If true, the control is redrawn when it is resized.
@ standard_double_click
If true, the control implements the standard double_click behavior. This style is ignored if the stan...
@ standard_click
If true, the control implements the standard click behavior.
@ supports_transparent_back_color
If true, the control accepts a BackColor with an alpha component of less than 255 to simulate transpa...
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.