xtd - Reference Guide  0.1.0
Modern c++17 framework to create console, gui and unit test applications on Windows, macOS and Linux.
xtd::forms::ibutton_control Class Referenceabstract

Allows a control to act like a button on a form. More...

#include <ibutton_control.h>

Inheritance diagram for xtd::forms::ibutton_control:
xtd::interface xtd::forms::button

Public Member Functions

virtual forms::dialog_result dialog_result () const =0
 Gets the value returned to the parent form when the button is clicked. More...
 
virtual controldialog_result (forms::dialog_result dialog_result)=0
 Sets the value returned to the parent form when the button is clicked. More...
 
virtual void notify_default (bool value)=0
 Notifies a control that it is the default button so that its appearance and behavior is adjusted accordingly. More...
 
virtual void perform_click ()=0
 Generates a click event for the control. More...
 

Detailed Description

Allows a control to act like a button on a form.

Remarks
An example of where this interface might be implemented is default and cancel button processing. Default buttons are notified when an unprocessed ENTER key is entered for a form, just like a dialog box would be closed. Similarly, cancel buttons are notified whenever an unprocessed ESC key is entered on a form, much like a dialog box would be dismissed.
Notes to implementers
Implement this interface in classes that act as button controls. The members of this interface will provide basic button functionality, such as providing a dialog_result to the parent form or the ability to perform a click event, or acting as the default button of a form.

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