FifeGUI 0.2.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#include "fifechan/visibilityeventhandler.hpp"
6
7#include "fifechan/event.hpp"
8#include "fifechan/gui.hpp"
9
10namespace fcn
11{
13
15 {
16 mGui->enqueueHiddenWidget(e.getSource());
17 }
18
20 {
21 mGui->enqueueShownWidget(e.getSource());
22 }
23}; // namespace fcn
Base class for all GUI event objects.
Definition event.hpp:24
Widget * getSource() const
Gets the source widget of the event.
Definition event.cpp:11
The central GUI manager.
Definition gui.hpp:101
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.