FifeGUI 0.2.0
A C++ GUI library designed for games.
actionlistener.hpp
1// SPDX-License-Identifier: LGPL-2.1-or-later OR BSD-3-Clause
2// SPDX-FileCopyrightText: 2004 - 2008 Olof Naessén and Per Larsson
3// SPDX-FileCopyrightText: 2013 - 2026 Fifengine contributors
4
5#ifndef INCLUDE_FIFECHAN_ACTIONLISTENER_HPP_
6#define INCLUDE_FIFECHAN_ACTIONLISTENER_HPP_
7
8#include <string>
9
10#include "fifechan/actionevent.hpp"
11#include "fifechan/platform.hpp"
12
13namespace fcn
14{
23 class FIFEGUI_API ActionListener
24 {
25 public:
26 virtual ~ActionListener() = default;
27
28 ActionListener(ActionListener const &) = delete;
29 ActionListener& operator=(ActionListener const &) = delete;
30 ActionListener(ActionListener&&) = delete;
31 ActionListener& operator=(ActionListener&&) = delete;
32
40 virtual void action(ActionEvent const & actionEvent) = 0;
41
42 protected:
49 ActionListener() = default;
50 };
51} // namespace fcn
52
53#endif // INCLUDE_FIFECHAN_ACTIONLISTENER_HPP_
Represents an action trigger (e.g., button click).
ActionListener()=default
Constructor.
virtual void action(ActionEvent const &actionEvent)=0
Called when an action is received from a widget.