FifeGUI 0.3.0
A C++ GUI library designed for games.
visibilityeventhandler.cpp
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// Corresponding header include
6#include "fifechan/listeners/visibilityeventhandler.hpp"
7
8// Project headers (subdirs before local)
9#include "fifechan/events/event.hpp"
10#include "fifechan/gui.hpp"
11
12namespace fcn
13{
17
19 {
20 mGui->addHiddenWidget(e.getSource());
21 }
22
24 {
25 mGui->addShownWidget(e.getSource());
26 }
27}; // namespace fcn
Base class for all GUI event objects.
Definition event.hpp:25
Widget * getSource() const
Gets the source widget of the event.
Definition event.cpp:20
The central GUI manager.
Definition gui.hpp:108
Gui * mGui
Pointer to the GUI used to handle visibility-related updates.
void widgetHidden(Event const &e) override
Informs gui that a widget was hidden.
void widgetShown(Event const &e) override
Informs gui that a widget was shown.
VisibilityEventHandler(Gui *gui)
Construct a VisibilityEventHandler bound to a Gui instance.
Used replacement tokens by configure_file():