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.
item_check_event_args.h
Go to the documentation of this file.
1 #pragma once
5 #include <cstdint>
6 #include <limits>
7 #include <xtd/event_args.h>
8 #include "check_state.h"
9 
11 namespace xtd {
13  namespace forms {
15  class control;
17 
26  public:
29  item_check_event_args& operator=(const item_check_event_args& item_check_event_args) = default;
31 
36  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) {}
37 
41  check_state current_value() const {return current_value_;}
42 
46  size_t index() const {return index_;}
47 
51  check_state new_value() const {return new_value_;}
55  void new_value(check_state new_value) {new_value_ = new_value;}
56 
57  private:
58  size_t index_ = std::numeric_limits<size_t>::max();
60  check_state current_value_ = check_state::unchecked;
61  };
62  }
63 }
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:19
The control is unchecked.
Contains xtd::event_args event args.
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.
check_state new_value() const
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:51
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
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:55
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:36
The control is indeterminate. An indeterminate control generally has a shaded appearance.
check_state current_value() const
Gets a value indicating the current state of the item&#39;s check box.
Definition: item_check_event_args.h:41
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
size_t index() const
Gets the zero-based index of the item to change.
Definition: item_check_event_args.h:46
Provides data for the item_check event of the checked_list_box and list_view controls.
Definition: item_check_event_args.h:25
The left or right CTRL modifier key.