FifeGUI 0.3.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// Standard library includes
9#include <string>
10
11// Platform config include
12#include "fifechan/platform.hpp"
13
14// Project headers (subdirs before local)
15#include "fifechan/events/actionevent.hpp"
16
17namespace fcn
18{
27 class FIFEGUI_API ActionListener
28 {
29 public:
30 virtual ~ActionListener() = default;
31
32 ActionListener(ActionListener const &) = delete;
33 ActionListener& operator=(ActionListener const &) = delete;
34 ActionListener(ActionListener&&) = delete;
35 ActionListener& operator=(ActionListener&&) = delete;
36
45 virtual void action(ActionEvent const & actionEvent) = 0;
46
47 protected:
54 ActionListener() = default;
55 };
56} // namespace fcn
57
58#endif // INCLUDE_FIFECHAN_ACTIONLISTENER_HPP_
Represents an action trigger (e.g., button click).
ActionListener()=default
Protected default constructor.
virtual void action(ActionEvent const &actionEvent)=0
Handles an action event emitted by a widget.
Used replacement tokens by configure_file():