AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
FocusEvent.hpp
1/*
2Copyright (C) 2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGUI_DOM_FOCUSEVENT_H
17#define AEONGUI_DOM_FOCUSEVENT_H
18#include "aeongui/dom/UIEvent.hpp"
19
20namespace AeonGUI
21{
22 namespace DOM
23 {
24 class EventTarget;
25
33
40 class FocusEvent : public UIEvent
41 {
42 public:
47 DLL FocusEvent ( const DOMString& type, const FocusEventInit& eventInitDict = {} );
48
51 DLL EventTarget* relatedTarget() const;
52
53 private:
54 EventTarget* m_relatedTarget{nullptr};
55 };
56 }
57}
58#endif
constexpr const DOMString & type() const
Get the event type.
Definition Event.hpp:73
Base class for objects that can receive DOM events.
Definition EventTarget.hpp:58
FocusEvent(const DOMString &type, const FocusEventInit &eventInitDict={})
Construct a FocusEvent.
Definition FocusEvent.cpp:22
EventTarget * relatedTarget() const
Get the related target.
Definition FocusEvent.cpp:28
UIEvent(const DOMString &type, const UIEventInit &eventInitDict={})
Construct a UIEvent.
Definition UIEvent.cpp:21
Initialization dictionary for FocusEvent construction.
Definition FocusEvent.hpp:30
EventTarget * relatedTarget
The secondary target losing or gaining focus.
Definition FocusEvent.hpp:31
Initialization dictionary for UIEvent construction.
Definition UIEvent.hpp:29