FifeGUI 0.2.0
A C++ GUI library designed for games.
selectionlistener.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_SELECTIONLISTENER_HPP_
6#define INCLUDE_FIFECHAN_SELECTIONLISTENER_HPP_
7
8#include <string>
9
10#include "fifechan/platform.hpp"
11#include "fifechan/selectionevent.hpp"
12
13namespace fcn
14{
25 class FIFEGUI_API SelectionListener
26 {
27 public:
28 virtual ~SelectionListener() = default;
29
30 SelectionListener(SelectionListener const &) = default;
31 SelectionListener& operator=(SelectionListener const &) = default;
32 SelectionListener(SelectionListener&&) = default;
33 SelectionListener& operator=(SelectionListener&&) = default;
34
42 virtual void valueChanged(SelectionEvent const & event) { }
43
44 protected:
51 SelectionListener() = default;
52 };
53} // namespace fcn
54
55#endif // INCLUDE_FIFECHAN_SELECTIONLISTENER_HPP_
Represents a change in selection state (e.g., list item selected).
virtual void valueChanged(SelectionEvent const &event)
Called when the value of a selection has been changed in a Widget.
SelectionListener()=default
Constructor.