FifeGUI 0.3.0
A C++ GUI library designed for games.
containerlistener.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_CONTAINERLISTENER_HPP_
6#define INCLUDE_FIFECHAN_CONTAINERLISTENER_HPP_
7
8// Platform config include
9#include "fifechan/platform.hpp"
10
11// Project headers (subdirs before local)
12#include "fifechan/events/containerevent.hpp"
13
14namespace fcn
15{
24 class FIFEGUI_API ContainerListener
25 {
26 public:
27 virtual ~ContainerListener() = default;
28
29 // Hide from doxygen - special member functions
31 ContainerListener(ContainerListener const &) = default;
32 ContainerListener& operator=(ContainerListener const &) = default;
34 ContainerListener& operator=(ContainerListener&&) = default;
36
42 virtual void widgetAdded(ContainerEvent const & containerEvent) = 0;
43
49 virtual void widgetRemoved(ContainerEvent const & containerEvent) = 0;
50
51 protected:
58 ContainerListener() = default;
59 };
60} // namespace fcn
61
62#endif // INCLUDE_FIFECHAN_CONTAINERLISTENER_HPP_
Represents changes within a container (e.g., widget added/removed).
virtual void widgetAdded(ContainerEvent const &containerEvent)=0
Called when a widget is added to a container.
ContainerListener()=default
Protected default constructor.
virtual void widgetRemoved(ContainerEvent const &containerEvent)=0
Called when a widget is removed from a container.
Used replacement tokens by configure_file():