CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::UIModelViewController< TModelType, TViewControllerType > Class Template Reference

A UIViewController sub-class that uses a typed represented object. More...

#include <CeresEngine/UI/UIViewController.hpp>

Inheritance diagram for CeresEngine::UIModelViewController< TModelType, TViewControllerType >:
CeresEngine::UIViewController CeresEngine::UIResponder CeresEngine::RefCounted< UIViewController >

Public Types

using ModelType = TModelType
 The type of model object to be used by the represented object.
 
using ViewControllerType = TViewControllerType
 The view controller type this view controller sub-classes from.
 

Public Member Functions

const ModelTypegetRepresentedObject () const noexcept
 The object whose value is presented in the receiver’s primary view.
 
ModelTypegetRepresentedObject () noexcept
 The object whose value is presented in the receiver’s primary view.
 
void setRepresentedObject (const ModelType &representedObject)
 The object whose value is presented in the receiver’s primary view.
 
void setRepresentedObject (ModelType &&representedObject)
 The object whose value is presented in the receiver’s primary view.
 
- Public Member Functions inherited from CeresEngine::UIViewController
 UIViewController ()=default
 
 UIViewController (UIView &view)
 
 UIViewController (UIView *view)
 
 ~UIViewController () override
 
UIViewgetView () const
 The view controller’s primary view.
 
bool isViewLoaded () const noexcept
 A Boolean value indicating whether the view controller’s view is loaded into memory.
 
virtual void didLoad ()
 Called after the view controller’s view has been loaded into memory.
 
virtual void willAppear ()
 Called after the view controller’s view has been loaded into memory is about to be added to the view hierarchy in the window.
 
virtual void didAppear ()
 Called when the view controller’s view is fully transitioned onto the screen.
 
virtual void willDisappear ()
 Called when the view controller’s view is about to be removed from the view hierarchy in the window.
 
virtual void didDisappear ()
 Called after the view controller’s view is removed from the view hierarchy in a window.
 
virtual void willLayout ()
 Called just before the layout method of the view controller's view is called.
 
virtual void didLayout ()
 Called immediately after the layout method of the view controller's view is called.
 
virtual void didAddChildViewController (UIViewController *const childViewController)
 Called immediately after a child UIViewController is added to the hierarchy.
 
virtual void didRemoveChildViewController (UIViewController *const childViewController)
 Called immediately after a child UIViewController is removed from the hierarchy.
 
UIViewControllergetParentViewController () const noexcept
 The immediate ancestor view controller of the view controller.
 
const Vector< UIViewControllerPtr > & getChildViewControllers () const noexcept
 An array of view controllers that are hierarchical children of the view controller.
 
void addChildViewController (UIViewController *childViewController)
 A convenience method for adding a child view controller at the end of the childViewControllers array.
 
void addChildViewController (const UIViewControllerPtr &childViewController)
 A convenience method for adding a child view controller at the end of the childViewControllers array.
 
void removeChildViewController (UIViewController *childViewController)
 A convenience method for removing a child view controller from the childViewControllers array.
 
void removeChildViewController (const UIViewControllerPtr &childViewController)
 A convenience method for removing a child view controller from the childViewControllers array.
 
void removeFromParentViewController ()
 Removes the called view controller from its parent view controller.
 
const AnygetRepresentedObject () const noexcept
 The object whose value is presented in the receiver’s primary view.
 
void setRepresentedObject (const Any &representedObject)
 The object whose value is presented in the receiver’s primary view.
 
UIRespondergetNextResponder () const final
 The next responder after this one, or nil if it has none.
 
- 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 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).
 
- Public Member Functions inherited from CeresEngine::RefCounted< UIViewController >
 RefCounted (Args &&... args)
 Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it.
 
void retain () noexcept
 Retains the object by increment it's reference count by one.
 
bool release () noexcept
 Relases the object by decrementing it's reference count by one.
 

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.
 
- Protected Member Functions inherited from CeresEngine::UIViewController
virtual UIViewPtr createView ()
 Instantiates a view.
 
virtual void loadView (UIView &view)
 Instantiates a view.
 

Detailed Description

template<typename TModelType, typename TViewControllerType = UIViewController>
class CeresEngine::UIModelViewController< TModelType, TViewControllerType >

A UIViewController sub-class that uses a typed represented object.

Member Typedef Documentation

◆ ModelType

The type of model object to be used by the represented object.

◆ ViewControllerType

The view controller type this view controller sub-classes from.

Member Function Documentation

◆ getRepresentedObject() [1/2]

template<typename TModelType , typename TViewControllerType = UIViewController>
const ModelType & CeresEngine::UIModelViewController< TModelType, TViewControllerType >::getRepresentedObject ( ) const
inlinenoexcept

The object whose value is presented in the receiver’s primary view.

◆ getRepresentedObject() [2/2]

template<typename TModelType , typename TViewControllerType = UIViewController>
ModelType & CeresEngine::UIModelViewController< TModelType, TViewControllerType >::getRepresentedObject ( )
inlinenoexcept

The object whose value is presented in the receiver’s primary view.

◆ setRepresentedObject() [1/2]

template<typename TModelType , typename TViewControllerType = UIViewController>
void CeresEngine::UIModelViewController< TModelType, TViewControllerType >::setRepresentedObject ( const ModelType representedObject)
inline

The object whose value is presented in the receiver’s primary view.

◆ setRepresentedObject() [2/2]

template<typename TModelType , typename TViewControllerType = UIViewController>
void CeresEngine::UIModelViewController< TModelType, TViewControllerType >::setRepresentedObject ( ModelType &&  representedObject)
inline

The object whose value is presented in the receiver’s primary view.


The documentation for this class was generated from the following file: