|
CeresEngine 0.2.0
A game development framework
|
A controller that manages a window. More...
#include <CeresEngine/UI/UIWindowController.hpp>
Public Member Functions | |
| UIWindow * | getWindow () const |
| The window owned by the receiver. | |
| void | setWindow (UIWindow *window) |
| The window owned by the receiver. | |
| virtual void | windowWillLoad () |
| Sent before the window owned by the receiver is loaded. | |
| virtual void | windowDidLoad () |
| Sent after the window owned by the receiver has been loaded. | |
| void | show () |
| Displays the window associated with the receiver. | |
| void | close () |
| Closes the window if it was loaded. | |
| UIViewController * | getContentViewController () const |
| The view controller for the window’s content view. | |
Public Member Functions inherited from CeresEngine::UIResponder | |
| virtual | ~UIResponder ()=default |
| virtual bool | acceptsFirstResponder () const |
| A Boolean value that indicates whether the responder accepts first responder status. | |
| virtual bool | becomeFirstResponder () |
| Notifies the receiver that it's about to become first responder in its window. | |
| virtual bool | resignFirstResponder () |
| Notifies the receiver that it's been asked to relinquish its status as first responder in its window. | |
| virtual UIResponder * | getNextResponder () const |
| The next responder after this one, or nil if it has none. | |
| virtual void | mouseDown (const UIMouseEvent &event) |
| Informs the receiver that the user has pressed the left mouse button. | |
| virtual void | mouseDragged (const UIMouseEvent &event) |
| Informs the receiver that the user has moved the mouse with the left button pressed. | |
| virtual void | mouseUp (const UIMouseEvent &event) |
| Informs the receiver that the user has released the left mouse button. | |
| virtual void | mouseMoved (const UIMouseEvent &event) |
| Informs the receiver that the mouse has moved. | |
| virtual void | mouseEntered (const UIMouseEvent &event) |
| Informs the receiver that the cursor has entered a tracking rectangle. | |
| virtual void | mouseExited (const UIMouseEvent &event) |
| Informs the receiver that the cursor has exited a tracking rectangle. | |
| virtual void | rightMouseDown (const UIMouseEvent &event) |
| Informs the receiver that the user has pressed the right mouse button. | |
| virtual void | rightMouseDragged (const UIMouseEvent &event) |
| Informs the receiver that the user has moved the mouse with the right button pressed. | |
| virtual void | rightMouseUp (const UIMouseEvent &event) |
| Informs the receiver that the user has released the right mouse button. | |
| virtual void | otherMouseDown (const UIMouseEvent &event) |
| Informs the receiver that the user has pressed a mouse button other than the left or right one. | |
| virtual void | otherMouseDragged (const UIMouseEvent &event) |
| Informs the receiver that the user has moved the mouse with a button other than the left or right button pressed. | |
| virtual void | otherMouseUp (const UIMouseEvent &event) |
| Informs the receiver that the user has released a mouse button other than the left or right button. | |
| virtual void | scrollWheel (const UIMouseEvent &event) |
| Informs the receiver that the mouse's scroll wheel has moved. | |
| virtual void | keyDown (const UIKeyEvent &event) |
| Informs the receiver that the user has pressed a key. | |
| virtual void | keyUp (const UIKeyEvent &event) |
| Informs the receiver that the user has released a key. | |
| virtual void | interpretKeyEvents (const Vector< UIKeyEvent > &events) |
| Handles a series of key events. | |
| virtual bool | performKeyEquivalent (const UIKeyEvent &event) |
| Handle a key equivalent. | |
| virtual void | flushBufferedKeyEvents () |
| Clears any unprocessed key events when overridden by subclasses. | |
| virtual void | cursorUpdate (const UIEvent &event) |
| Informs the receiver that the mouse cursor has moved into a cursor rectangle. | |
| virtual void | flagsChanged (const UIEvent &event) |
| Informs the receiver that the user has pressed or released a modifier key (Shift, Control, and so on). | |
Protected Member Functions | |
| virtual UIWindow * | loadWindow () const |
| Loads the controller’s window. | |
Private Attributes | |
| UIWindow * | mWindow = nullptr |
| The window owned by the receiver. | |
| bool | mWindowLoaded = false |
| A Boolean value that indicates whether the nib file containing the receiver’s window has been loaded. | |
Additional Inherited Members | |
Static Public Member Functions inherited from CeresEngine::UIResponder | |
| static void | dispatch (UIResponder *const firstResponder, const UIEvent &event) |
Dispatches a UIEvent to the given first responder. | |
A controller that manages a window.
Managing a window entails:
You should create a subclass of NSWindowController when you want to augment the default behavior, such as to give the window a custom title or to perform some setup tasks before the window is loaded.
| void CeresEngine::UIWindowController::close | ( | ) |
Closes the window if it was loaded.
| UIViewController * CeresEngine::UIWindowController::getContentViewController | ( | ) | const |
The view controller for the window’s content view.
The value of this property tracks the window’s contentView property.
| UIWindow * CeresEngine::UIWindowController::getWindow | ( | ) | const |
The window owned by the receiver.
If the window was loaded, the following methods are called in order: windowWillLoad(), loadWindow(), and windowDidLoad().
Setting this property releases the window controller’s old window, and establishes ownership of the specified new window. Typically, you should not use this property to set the window. Instead, create a new window controller for the new window and then release the old window controller.
Loads the controller’s window.
You should never directly invoke this method. Instead, access the window property so the windowDidLoad and windowWillLoad methods are invoked. Subclasses can override this method if the way it finds and loads the window is not adequate.
The window owned by the receiver.
If the window was loaded, the following methods are called in order: windowWillLoad(), loadWindow(), and windowDidLoad().
Setting this property releases the window controller’s old window, and establishes ownership of the specified new window. Typically, you should not use this property to set the window. Instead, create a new window controller for the new window and then release the old window controller.
| void CeresEngine::UIWindowController::show | ( | ) |
Displays the window associated with the receiver.
Sent after the window owned by the receiver has been loaded.
The default implementation does nothing.
Sent before the window owned by the receiver is loaded.
The default implementation does nothing.
The window owned by the receiver.
If the window was loaded, the following methods are called in order: windowWillLoad(), loadWindow(), and windowDidLoad().
Setting this property releases the window controller’s old window, and establishes ownership of the specified new window. Typically, you should not use this property to set the window. Instead, create a new window controller for the new window and then release the old window controller.
A Boolean value that indicates whether the nib file containing the receiver’s window has been loaded.