xtd 0.2.0
Loading...
Searching...
No Matches
draw_item_state.h
Go to the documentation of this file.
1
4#pragma once
5#include <xtd/string>
6
8namespace xtd {
10 namespace forms {
18 enum class draw_item_state {
20 none = 0b0,
22 selected = 0b1,
24 grayed = 0b10,
26 disabled = 0b100,
28 checked = 0b1000,
30 focus = 0b1'0000,
32 default_state = 0b10'0000,
34 hot_light = 0b100'0000,
36 inactive = 0b1000'00000,
38 no_accelerator = 0b1'0000'0000,
40 no_focus_rect = 0b10'0000'0000,
42 combo_box_edit = 0b1'0000'0000'0000,
43 };
44
46 inline draw_item_state& operator +=(draw_item_state& lhs, draw_item_state rhs) {lhs = static_cast<draw_item_state>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); return lhs;}
47 inline draw_item_state& operator -=(draw_item_state& lhs, draw_item_state rhs) {lhs = static_cast<draw_item_state>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); return lhs;}
48 inline draw_item_state& operator &=(draw_item_state& lhs, draw_item_state rhs) {lhs = static_cast<draw_item_state>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); return lhs;}
49 inline draw_item_state& operator |=(draw_item_state& lhs, draw_item_state rhs) {lhs = static_cast<draw_item_state>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); return lhs;}
50 inline draw_item_state& operator ^=(draw_item_state& lhs, draw_item_state rhs) {lhs = static_cast<draw_item_state>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); return lhs;}
51 inline draw_item_state operator +(draw_item_state lhs, draw_item_state rhs) {return static_cast<draw_item_state>(static_cast<long long>(lhs) + static_cast<long long>(rhs));}
52 inline draw_item_state operator -(draw_item_state lhs, draw_item_state rhs) {return static_cast<draw_item_state>(static_cast<long long>(lhs) - static_cast<long long>(rhs));}
53 inline draw_item_state operator ~(draw_item_state rhs) {return static_cast<draw_item_state>(~static_cast<long long>(rhs));}
54 inline draw_item_state operator &(draw_item_state lhs, draw_item_state rhs) {return static_cast<draw_item_state>(static_cast<long long>(lhs) & static_cast<long long>(rhs));}
55 inline draw_item_state operator |(draw_item_state lhs, draw_item_state rhs) {return static_cast<draw_item_state>(static_cast<long long>(lhs) | static_cast<long long>(rhs));}
56 inline draw_item_state operator ^(draw_item_state lhs, draw_item_state rhs) {return static_cast<draw_item_state>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs));}
57 inline std::ostream& operator<<(std::ostream& os, draw_item_state value) {return os << to_string(value, {{draw_item_state::none, "none"}, {draw_item_state::selected, "selected"}, {draw_item_state::grayed, "grayed"}, {draw_item_state::disabled, "disabled"}, {draw_item_state::checked, "checked"}, {draw_item_state::focus, "focus"}, {draw_item_state::default_state, "default_state"}, {draw_item_state::hot_light, "hot_light"}, {draw_item_state::inactive, "inactive"}, {draw_item_state::no_accelerator, "no_accelerator"}, {draw_item_state::no_focus_rect, "no_focus_rect"}, {draw_item_state::combo_box_edit, "combo_box_edit"}});}
58 inline std::wostream& operator <<(std::wostream& os, draw_item_state value) {return os << to_string(value, {{draw_item_state::none, L"none"}, {draw_item_state::selected, L"selected"}, {draw_item_state::grayed, L"grayed"}, {draw_item_state::disabled, L"disabled"}, {draw_item_state::checked, L"checked"}, {draw_item_state::focus, L"focus"}, {draw_item_state::default_state, L"default_state"}, {draw_item_state::hot_light, L"hot_light"}, {draw_item_state::inactive, L"inactive"}, {draw_item_state::no_accelerator, L"no_accelerator"}, {draw_item_state::no_focus_rect, L"no_focus_rect"}, {draw_item_state::combo_box_edit, L"combo_box_edit"}});}
60 }
61}
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:41
draw_item_state
Specifies the state of an item that is being drawn. This enumeration supports a bitwise combination o...
Definition draw_item_state.h:18
@ inactive
The button is inactive (grayed).
@ checked
The button has a checked or latched appearance. Use this appearance to show that a toggle button has ...
@ hot_light
The item is being hot-tracked, that is, the item is highlighted as the mouse pointer passes over it.
@ combo_box_edit
The item is the editing portion of a xtd::forms::combo_box.
@ disabled
The item is unavailable.
@ focus
The item has focus.
@ inactive
The item is inactive.
@ no_focus_rect
The item displays without the visual cue that indicates it has focus.
@ none
The item currently has no state.
@ checked
The item is checked. Only menu controls use this value.
@ grayed
The item is grayed. Only menu controls use this value.
@ default_state
The item is in its default visual state.
@ selected
The item is selected.
@ no_accelerator
The item displays without a keyboard accelerator.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10