CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
UIWindowController.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "UIResponder.hpp"
11
12namespace CeresEngine {
13
14 class UIViewController;
15
32 private:
43 UIWindow* mWindow = nullptr;
44
47 bool mWindowLoaded = false;
48
49 public:
52
54 void setWindow(UIWindow* window);
55
58 virtual void windowWillLoad() {}
59
62 virtual void windowDidLoad() {}
63
64 protected:
71 [[nodiscard]] virtual UIWindow* loadWindow() const;
72
73 public:
75 void show();
76
78 void close();
79
80 public:
84 };
85
86} // namespace CeresEngine
An abstract class that forms the basis of event and command processing in the UI framework.
Definition UIResponder.hpp:33
A controller that manages a view.
Definition UIViewController.hpp:24
A controller that manages a window.
Definition UIWindowController.hpp:31
virtual void windowDidLoad()
Sent after the window owned by the receiver has been loaded.
Definition UIWindowController.hpp:62
void close()
Closes the window if it was loaded.
UIWindow * getWindow() const
The window owned by the receiver.
void setWindow(UIWindow *window)
The window owned by the receiver.
void show()
Displays the window associated with the receiver.
bool mWindowLoaded
A Boolean value that indicates whether the nib file containing the receiver’s window has been loaded.
Definition UIWindowController.hpp:47
UIViewController * getContentViewController() const
The view controller for the window’s content view.
virtual void windowWillLoad()
Sent before the window owned by the receiver is loaded.
Definition UIWindowController.hpp:58
virtual UIWindow * loadWindow() const
Loads the controller’s window.
UIWindow * mWindow
The window owned by the receiver.
Definition UIWindowController.hpp:43
A window that an app displays on the screen.
Definition UIWindow.hpp:42
Definition Application.hpp:19
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25