mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-11 21:03:55 +00:00
Code polishing no functional changes.
This commit is contained in:
parent
4b8921e8c8
commit
5294d03e7c
@ -42,21 +42,13 @@ public:
|
||||
/** Inherited from tcontrol. */
|
||||
unsigned get_state() const { return state_; }
|
||||
|
||||
/**
|
||||
* Inherited from tclickable.
|
||||
*
|
||||
* @deprecated The function needs to be removed from the base class as well.
|
||||
*/
|
||||
/** Inherited from tclickable. */
|
||||
void connect_click_handler(const event::tsignal_function& signal)
|
||||
{
|
||||
connect_signal_mouse_left_click(*this, signal);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inherited from tclickable.
|
||||
*
|
||||
* @deprecated The function needs to be removed from the base class as well.
|
||||
*/
|
||||
/** Inherited from tclickable. */
|
||||
void disconnect_click_handler(const event::tsignal_function& signal)
|
||||
{
|
||||
disconnect_signal_mouse_left_click(*this, signal);
|
||||
|
@ -18,12 +18,17 @@
|
||||
namespace gui2 {
|
||||
|
||||
/**
|
||||
* Small abstract helper class.
|
||||
* 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:
|
||||
* - connect_signal_mouse_left_click
|
||||
* - disconnect_signal_mouse_left_click
|
||||
@ -40,7 +45,8 @@ public:
|
||||
*
|
||||
* @param signal The signal to connect.
|
||||
*/
|
||||
virtual void connect_click_handler(const event::tsignal_function& signal) = 0;
|
||||
virtual void connect_click_handler(
|
||||
const event::tsignal_function& signal) = 0;
|
||||
|
||||
/**
|
||||
* Disconnects a signal handler for a 'click' event.
|
||||
@ -50,7 +56,8 @@ public:
|
||||
* @param signal The signal to disconnect (should be the same
|
||||
* as send to the connect call.
|
||||
*/
|
||||
virtual void disconnect_click_handler(const event::tsignal_function& signal) = 0;
|
||||
virtual void disconnect_click_handler(
|
||||
const event::tsignal_function& signal) = 0;
|
||||
};
|
||||
|
||||
} // namespace gui2
|
||||
|
Loading…
x
Reference in New Issue
Block a user