PCL
Button Event Handlers

Typedefs

using pcl::Button::check_event_handler = void(Control::*)(Button &sender, Button::check_state state)
 
using pcl::Button::click_event_handler = void(Control::*)(Button &sender, bool checked)
 
using pcl::Button::press_event_handler = void(Control::*)(Button &sender)
 

Functions

void pcl::Button::OnCheck (check_event_handler handler, Control &receiver)
 
void pcl::Button::OnClick (click_event_handler handler, Control &receiver)
 
void pcl::Button::OnPress (press_event_handler handler, Control &receiver)
 
void pcl::Button::OnRelease (press_event_handler handler, Control &receiver)
 

Detailed Description

Typedef Documentation

◆ check_event_handler

using pcl::Button::check_event_handler = void (Control::*)( Button& sender, Button::check_state state )

Defines the prototype of a button check event handler.

A button check event is generated when a checkable button control changes its check state, either by clicking it with the mouse, or by activating it with the keyboard.

Parameters
senderThe control that sends a button press event.
stateThe current check state of the sender button.

Definition at line 339 of file Button.h.

◆ click_event_handler

using pcl::Button::click_event_handler = void (Control::*)( Button& sender, bool checked )

Defines the prototype of a button click event handler.

A button click event is generated when a button control is clicked with the mouse (pressed down then released while the mouse cursor stays within the button) or activated with the keyboard.

Parameters
senderThe control that sends a button click event.
checkedWhether the sender button is currently checked.

Definition at line 313 of file Button.h.

◆ press_event_handler

using pcl::Button::press_event_handler = void (Control::*)( Button& sender )

Defines the prototype of a button press event handler.

A button press event is generated when a button control is either pressed down with the mouse, or released after having being pressed.

Parameters
senderThe control that sends a button press event.

Definition at line 325 of file Button.h.

Function Documentation

◆ OnCheck()

void pcl::Button::OnCheck ( check_event_handler  handler,
Control receiver 
)

Sets the button check event handler for this button.

Parameters
handlerThe button check event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive check events from this button.

◆ OnClick()

void pcl::Button::OnClick ( click_event_handler  handler,
Control receiver 
)

Sets the button click event handler for this button.

Parameters
handlerThe button click event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive click events from this button.

◆ OnPress()

void pcl::Button::OnPress ( press_event_handler  handler,
Control receiver 
)

Sets the button press event handler for this button.

Parameters
handlerThe button press event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive press events from this button.

◆ OnRelease()

void pcl::Button::OnRelease ( press_event_handler  handler,
Control receiver 
)

Sets the button release event handler for this button.

Parameters
handlerThe button release event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive release events from this button.