xtd 0.2.0
item_check_event_args.h
Go to the documentation of this file.
1 #pragma once
5 #include "check_state.h"
6 #include <xtd/event_args>
7 #include <cstdint>
8 #include <limits>
9 
11 namespace xtd {
13  namespace forms {
15  class control;
17 
28  public:
31  item_check_event_args& operator =(const item_check_event_args& item_check_event_args) = default;
33 
35 
41  item_check_event_args(size_t index, check_state new_value, check_state current_value) : index_(index), new_value_(new_value), current_value_(current_value) {}
43 
45 
50  check_state current_value() const noexcept {return current_value_;}
51 
55  size_t index() const noexcept {return index_;}
56 
60  check_state new_value() const noexcept {return new_value_;}
64  void new_value(check_state new_value) {new_value_ = new_value;}
66 
67  private:
68  size_t index_ = std::numeric_limits<size_t>::max();
70  check_state current_value_ = check_state::unchecked;
71  };
72  }
73 }
check_state
Specifies the state of a control, such as a check box, that can be checked, unchecked, or set to an indeterminate state.
Definition: check_state.h:21
The control is unchecked.
check_state new_value() const noexcept
Gets a value indicating whether to set the check box for the item to be checked, unchecked, or indeterminate.
Definition: item_check_event_args.h:60
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Contains xtd::forms::check_state enum class.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
check_state current_value() const noexcept
Gets a value indicating the current state of the item&#39;s check box.
Definition: item_check_event_args.h:50
void new_value(check_state new_value)
Gets a value indicating whether to set the check box for the item to be checked, unchecked, or indeterminate.
Definition: item_check_event_args.h:64
item_check_event_args(size_t index, check_state new_value, check_state current_value)
Initializes a new instance of the item_check_event_args class.
Definition: item_check_event_args.h:41
The control is indeterminate. An indeterminate control generally has a shaded appearance.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
size_t index() const noexcept
Gets the zero-based index of the item to change.
Definition: item_check_event_args.h:55
Provides data for the item_check event of the checked_list_box and list_view controls.
Definition: item_check_event_args.h:27
The left or right CTRL modifier key.