FifeGUI 0.2.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#include "fifechan/containerevent.hpp"
9#include "fifechan/platform.hpp"
10
11namespace fcn
12{
21 class FIFEGUI_API ContainerListener
22 {
23 public:
24 virtual ~ContainerListener() = default;
25
26 // Hide from doxygen - special member functions
28 ContainerListener(ContainerListener const &) = default;
29 ContainerListener& operator=(ContainerListener const &) = default;
31 ContainerListener& operator=(ContainerListener&&) = default;
33
39 virtual void widgetAdded(ContainerEvent const & containerEvent) = 0;
40
46 virtual void widgetRemoved(ContainerEvent const & containerEvent) = 0;
47
48 protected:
55 ContainerListener() = default;
56 };
57} // namespace fcn
58
59#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
Constructor.
virtual void widgetRemoved(ContainerEvent const &containerEvent)=0
Called when a widget is removed from a container.