Pioneer
Loading...
Searching...
No Matches
Modal.h
Go to the documentation of this file.
1// Copyright © 2008-2024 Pioneer Developers. See AUTHORS.txt for details
2// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4#pragma once
5
6#include "RefCounted.h"
7
8// forward declaration
9using ImGuiID = unsigned int;
10
11namespace Editor {
12
13 class EditorApp;
14
15 class Modal : public RefCounted {
16 public:
17 Modal(EditorApp *app, const char *title, bool canClose);
18
19 bool Ready();
20 void Close();
21
22 virtual void Draw();
23
24 protected:
25 virtual void DrawInternal() {}
26
28 const char *m_title;
32 };
33
34} // namespace Editor
unsigned int ImGuiID
Definition: Modal.h:9
Definition: EditorApp.h:20
Definition: Modal.h:15
const char * m_title
Definition: Modal.h:28
virtual void Draw()
Definition: Modal.cpp:34
bool m_canClose
Definition: Modal.h:31
ImGuiID m_id
Definition: Modal.h:29
bool m_shouldClose
Definition: Modal.h:30
void Close()
Definition: Modal.cpp:29
bool Ready()
Definition: Modal.cpp:24
EditorApp * m_app
Definition: Modal.h:27
virtual void DrawInternal()
Definition: Modal.h:25
Definition: RefCounted.h:11
Definition: ActionBinder.h:14