xtd.forms - Reference Guide  0.1.0
Modern c++17 library containing classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows, Apple macOS and Linux like Ubuntu operating system.
xtd::forms::cancel_event_args Class Reference

Provides data for a cancelable event. More...

#include <cancel_event_args.hpp>

Inheritance diagram for xtd::forms::cancel_event_args:
xtd::event_args xtd::forms::form_closing_event_args

Public Member Functions

 cancel_event_args ()=default
 Initializes a new instance of the cancel_event_args class with the cancel property set to false. More...
 
 cancel_event_args (bool cancel)
 Initializes a new instance of the cancel_event_args class with the cancel property set to the given value. More...
 
virtual bool cancel () const
 Gets a value indicating whether the event should be canceled. More...
 
virtual void cancel (bool cancel)
 Sets a value indicating whether the event should be canceled. More...
 

Protected Attributes

bool cancel_ = false
 

Additional Inherited Members

- Static Public Attributes inherited from xtd::event_args
static const event_args empty
 

Detailed Description

Provides data for a cancelable event.

Remarks
A cancelable event is raised by a component when it is about to perform an action that can be canceled, such as the closing event of a form.

Constructor & Destructor Documentation

§ cancel_event_args() [1/2]

xtd::forms::cancel_event_args::cancel_event_args ( )
default

Initializes a new instance of the cancel_event_args class with the cancel property set to false.

§ cancel_event_args() [2/2]

xtd::forms::cancel_event_args::cancel_event_args ( bool  cancel)
inlineexplicit

Initializes a new instance of the cancel_event_args class with the cancel property set to the given value.

Parameters
canceltrue to cancel the event; otherwise, false.

Member Function Documentation

§ cancel() [1/2]

virtual bool xtd::forms::cancel_event_args::cancel ( ) const
inlinevirtual

Gets a value indicating whether the event should be canceled.

Returns
true if the event should be canceled; otherwise, false.

§ cancel() [2/2]

virtual void xtd::forms::cancel_event_args::cancel ( bool  cancel)
inlinevirtual

Sets a value indicating whether the event should be canceled.

Parameters
canceltrue if the event should be canceled; otherwise, false.

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