35 item(
const char* value) : value_(value) {}
36 item(
const item& value) =
default;
37 virtual ~item() =
default;
38 bool operator==(
const item& value)
const {
return value_ == value.value_;}
39 bool operator!=(
const item& value)
const {
return !operator==(value);}
40 bool operator<(
const item& value)
const {
return value_ < value.value_;}
41 bool operator<=(
const item& value)
const {
return value_ <= value.value_;}
42 bool operator>(
const item& value)
const {
return value_ > value.value_;}
43 bool operator>=(
const item& value)
const {
return value_ >= value.value_;}
44 friend std::ostream& operator<<(std::ostream& os,
const item& value) {
return os << value.to_string();}
53 virtual std::any
tag()
const {
return tag_;}
102 virtual bool wrap() {
return wrap_;}
119 static const size_t npos = std::numeric_limits<size_t>::max();
138 size_t selected_index_ = npos;
Represents an ARGB (alpha, red, green, blue) color.
Definition color.h:39
Stores an ordered pair of integers, which specify a height and width.
Definition size.h:25
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.h:18
Represents an event.
Definition event.h:21
Represent an item contained in the domain_up_down::object_collection collection.
Definition domain_up_down.h:23
item(const xtd::ustring &value)
Initializes a new instance of the item class with specified value.
Definition domain_up_down.h:29
item()=default
Initializes a new instance of the item class.
item(const xtd::ustring &value, const std::any &tag)
Initializes a new instance of the item class with specified value and tag.
Definition domain_up_down.h:33
virtual const xtd::ustring & value() const
Gets the value of the item.
Definition domain_up_down.h:49
virtual std::any tag() const
Gets the tag of the item.
Definition domain_up_down.h:53
xtd::ustring to_string() const
Returns a string containing the vague of the item.
Definition domain_up_down.h:57
Represents a Windows spin box (also known as an up-down control) that displays string values.
Definition domain_up_down.h:20
domain_up_down & selected_item(const item &selected_item)
Gets the selected item based on the index value of the selected item in the collection.
void on_text_changed(const event_args &e) override
Raises the control::text_changed event.
virtual domain_up_down & selected_index(size_t selected_index)
When overridden in a derived class, Sets the zero-based index of the currently selected item.
const item & selected_item() const
Gets the selected item based on the index value of the selected item in the collection.
Definition domain_up_down.h:94
drawing::color default_fore_color() const override
Gets the default foreground color of the control.
Definition domain_up_down.h:124
const object_collection & items() const
Gets an object representing the collection of the items contained in this domain_up_down....
Definition domain_up_down.h:76
const domain_up_down & items(const object_collection &items)
Sets an object representing the collection of the items contained in this domain_up_down....
Definition domain_up_down.h:80
virtual size_t selected_index() const
Gets the zero-based index of the currently selected item.
Definition domain_up_down.h:86
object_collection & items()
Gets an object representing the collection of the items contained in this domain_up_down....
Definition domain_up_down.h:73
drawing::size default_size() const override
Gets the default size of the control.
Definition domain_up_down.h:126
virtual bool wrap()
Gets a value indicating whether the collection of items continues to the first or last item if the us...
Definition domain_up_down.h:102
domain_up_down()
Initializes a new instance of the DomainUpDown class.
void on_handle_created(const event_args &e) override
Raises the control::handle_created event.
virtual void on_selected_item_changed(const event_args &e)
Raises the domain_up_down::selected_item_changed event.
forms::create_params create_params() const override
Gets the required creation parameters when the control handle is created.
drawing::color default_back_color() const override
Gets the default background color of the control.
Definition domain_up_down.h:122
virtual domain_up_down & wrap(bool value)
Sets a value indicating whether the collection of items continues to the first or last item if the us...
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:48
event< domain_up_down, event_handler > value_changed
Occurs when the value property has been changed.
Definition domain_up_down.h:116
event< domain_up_down, event_handler > selected_item_changed
Occurs when the selected_item property has been changed.
Definition domain_up_down.h:112
#define forms_export_
Define shared library export.
Definition forms_export.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition system_report.h:17
Contains xtd::forms::up_down_base control.