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/events/selectionevent.hpp"
11#include "fifechan/platform.hpp"
12
13namespace fcn
14{
25 class FIFEGUI_API SelectionListener
26 {
27 public:
28 virtual ~SelectionListener() = default;
29
38
46 virtual void valueChanged(SelectionEvent const & event) { }
47
48 protected:
55 SelectionListener() = default;
56 };
57} // namespace fcn
58
59#endif // INCLUDE_FIFECHAN_SELECTIONLISTENER_HPP_
Represents a change in selection state (e.g., list item selected).
SelectionListener & operator=(SelectionListener const &)=default
Copy assignment operator.
SelectionListener(SelectionListener &&)=default
Move constructor.
SelectionListener & operator=(SelectionListener &&)=default
Move assignment operator.
SelectionListener(SelectionListener const &)=default
Copy constructor.
virtual void valueChanged(SelectionEvent const &event)
Called when the value of a selection has been changed in a Widget.
SelectionListener()=default
Constructor.