FifeGUI 0.2.0
A C++ GUI library designed for games.
event.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_EVENT_HPP_
6#define INCLUDE_FIFECHAN_EVENT_HPP_
7
8#include "fifechan/platform.hpp"
9
10namespace fcn
11{
12 class Widget;
13
23 class FIFEGUI_API Event
24 {
25 public:
31 explicit Event(Widget* source);
32
39 Widget* getSource() const;
40
41 protected:
45 Widget* mSource{nullptr};
46 };
47} // namespace fcn
48
49#endif // INCLUDE_FIFECHAN_EVENT_HPP_
Widget * mSource
Holds the source widget of the event.
Definition event.hpp:45
Event(Widget *source)
Constructor.
Definition event.cpp:9
Widget * getSource() const
Gets the source widget of the event.
Definition event.cpp:11
Abstract base class defining the common behavior, properties, and lifecycle of all GUI elements.
Definition widget.hpp:45