FifeGUI 0.2.0
A C++ GUI library designed for games.
visibilityeventhandler.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_VISIBILITYEVENTHANDLER_HPP_
6#define INCLUDE_FIFECHAN_VISIBILITYEVENTHANDLER_HPP_
7
8#include "fifechan/widgetlistener.hpp"
9
10namespace fcn
11{
12 class Event;
13 class Gui;
14 class Widget;
15
24 class FIFEGUI_API VisibilityEventHandler : public WidgetListener
25 {
26 public:
32 explicit VisibilityEventHandler(Gui* gui);
33
34 ~VisibilityEventHandler() override = default;
35
37 VisibilityEventHandler& operator=(VisibilityEventHandler const &) = delete;
40
44 void widgetHidden(Event const & e) override;
45
49 void widgetShown(Event const & e) override;
50
51 protected:
54 };
55} // namespace fcn
56
57#endif // INCLUDE_FIFECHAN_VISIBILITYEVENTHANDLER_HPP_
Base class for all GUI event objects.
Definition event.hpp:24
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.
Abstract base class defining the common behavior, properties, and lifecycle of all GUI elements.
Definition widget.hpp:45