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

Small concept class. More...

#include <clickable_item.hpp>

Inheritance diagram for gui2::clickable_item:
Inheritance graph

Public Member Functions

virtual ~clickable_item ()
 
virtual void connect_click_handler (const event::signal_function &signal)=0
 Connects a signal handler for a 'click' event. More...
 
virtual void disconnect_click_handler (const event::signal_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 38 of file clickable_item.hpp.

Constructor & Destructor Documentation

virtual gui2::clickable_item::~clickable_item ( )
inlinevirtual

Definition at line 41 of file clickable_item.hpp.

Member Function Documentation

virtual void gui2::clickable_item::connect_click_handler ( const event::signal_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::repeating_button, and gui2::button.

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

virtual void gui2::clickable_item::disconnect_click_handler ( const event::signal_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::repeating_button, and gui2::button.


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