The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
gui2::tclickable_ Class Referenceabstract

Small concept class. More...

#include <clickable.hpp>

Inheritance diagram for gui2::tclickable_:
Inheritance graph

Public Member Functions

virtual ~tclickable_ ()
 
virtual void connect_click_handler (const event::tsignal_function &signal)=0
 Connects a signal handler for a 'click' event. More...
 
virtual void disconnect_click_handler (const event::tsignal_function &signal)=0
 Disconnects a signal handler for a 'click' event. More...
 

Detailed Description

Small concept class.

Parts of the engine inherit this class so we can have generic clickable items. This is mainly for the button and the repeating button classes.

The reason for having the click functions here is that not all subclasses need to implement the click event in the same way; e.g. the repeating button clicks on the mouse down event and the normal button on the mouse click event.

Common signal handlers:

Definition at line 39 of file clickable.hpp.

Constructor & Destructor Documentation

virtual gui2::tclickable_::~tclickable_ ( )
inlinevirtual

Definition at line 42 of file clickable.hpp.

Member Function Documentation

virtual void gui2::tclickable_::connect_click_handler ( const event::tsignal_function signal)
pure virtual

Connects a signal handler for a 'click' event.

What the click is depends on the subclass.

Parameters
signalThe signal to connect.

Implemented in gui2::trepeating_button, and gui2::tbutton.

Referenced by gui2::tscrollbar_container::finalize_setup().

virtual void gui2::tclickable_::disconnect_click_handler ( const event::tsignal_function signal)
pure virtual

Disconnects a signal handler for a 'click' event.

What the click is depends on the subclass.

Parameters
signalThe signal to disconnect (should be the same as send to the connect call.

Implemented in gui2::trepeating_button, and gui2::tbutton.


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