xtd 0.2.0
xtd::event_args Class Reference

Definition

Represents the base class for classes that contain event data, and provides a value to use for events that do not include event data.

Namespace
xtd
Library
xtd.core
Remarks
This class serves as the base class for all classes that represent event data. For example, the xtd::forms::form_closing_event_args class derives from event_args and is used to hold information when form closing. To create a custom event data class, create a class that derives from the event_args class and provide the properties to store the necessary data. The name of your custom event data class should end with _event_args.
To pass an object that does not contain any data, use the empty field.
Examples:
animation.cpp, application_enable_dark_mode.cpp, application_enable_light_mode.cpp, application_idle.cpp, calculator.cpp, choice.cpp, combo_box.cpp, context_menu.cpp, demo.cpp, enable_changed_event.cpp, event.cpp, font_changed_event.cpp, form_background_image2.cpp, forms_timer.cpp, hello_world_xtd.cpp, main_menu.cpp, main_menu_create_standard_items.cpp, minesweeper.cpp, month_calendar.cpp, numeric_text_box.cpp, painting.cpp, some_controls.cpp, some_system_controls.cpp, stopwatch_form.cpp, themes.cpp, toggle_button2.cpp, toggle_light.cpp, tool_bar.cpp, tutorial_button.cpp, user_control.cpp, and wiggly.cpp.

Fields

static const event_args empty
 Provides a value to use with events that do not have event data. More...
 

Constructors

 event_args ()=default
 Initializes a new instance of the event_args class. More...
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object. More...
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance. More...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const noexcept
 Creates a shallow copy of the current object. More...
 
virtual xtd::ustring to_string () const noexcept
 Returns a sxd::ustring that represents the current object. More...
 
- Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 

Constructor & Destructor Documentation

◆ event_args()

xtd::event_args::event_args ( )
default

Initializes a new instance of the event_args class.

Remarks
To pass an object that does not contain any data, use the empty field.

Member Data Documentation

◆ empty

const event_args xtd::event_args::empty
static

Provides a value to use with events that do not have event data.

Remarks
Pass this value to event handlers that are associated with events that do not have data.
Examples:
event.cpp, send_message_to_form.cpp, and toggle_button2.cpp.

The documentation for this class was generated from the following file: