yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
window_context.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_REGISTRY_WINDOW_CONTEXT_H_
2#define YAZE_APP_EDITOR_REGISTRY_WINDOW_CONTEXT_H_
3
4#include <string>
5
7
8namespace yaze::editor {
9
10template <typename EditorT>
12 EditorT* editor = nullptr;
13
14 explicit operator bool() const { return editor != nullptr; }
15 EditorT* operator->() const { return editor; }
16};
17
18template <typename EditorT>
20 const std::string& category) {
21 return {.editor = static_cast<EditorT*>(
23}
24
25} // namespace yaze::editor
26
27#endif // YAZE_APP_EDITOR_REGISTRY_WINDOW_CONTEXT_H_
Editor * editor_window_context(const std::string &category)
Editors are the view controllers for the application.
TypedWindowContext< EditorT > CurrentTypedWindowContext(const std::string &category)