18 class UIViewController;
305 template<
typename... Args>
317 if constexpr(std::is_default_constructible_v<ViewType>) {
320 throw std::runtime_error(
"createView not implemented for ViewType.");
341 using TViewControllerType::TViewControllerType;
#define CE_RCPTR_TRAIT_DECL(ClassName)
Definition SmartPtr.hpp:375
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
A simple reference counter base class.
Definition SmartPtr.hpp:438
A templated UIViewController sub-class that specializes it for a specific view type.
Definition UIViewController.hpp:292
void loadView(UIView &view) final
Instantiates a view.
Definition UIViewController.hpp:325
TUIViewController(ViewType *const view)
Creates a new TUIViewController from an existing view instance.
Definition UIViewController.hpp:309
TViewType ViewType
The type of view controlled by the UIViewController.
Definition UIViewController.hpp:297
virtual void loadView(ViewType &view)
Instantiates a view.
Definition UIViewController.hpp:328
TUIViewController(Args &&... args)
Creates a new TUIViewController and instantiates a new view of type ViewType by passing args to the v...
Definition UIViewController.hpp:306
TParentViewControllerType ParentViewControllerType
The parent type of the view controller, usually UIViewController.
Definition UIViewController.hpp:300
UIViewPtr createView() override
Instantiates a view.
Definition UIViewController.hpp:316
TParentViewControllerType super
Definition UIViewController.hpp:293
ViewType * getView() const
The view controller’s primary view.
Definition UIViewController.hpp:313
A UIViewController sub-class that uses a typed represented object.
Definition UIViewController.hpp:332
TViewControllerType ViewControllerType
The view controller type this view controller sub-classes from.
Definition UIViewController.hpp:338
void setRepresentedObject(ModelType &&representedObject)
The object whose value is presented in the receiver’s primary view.
Definition UIViewController.hpp:354
const ModelType & getRepresentedObject() const noexcept
The object whose value is presented in the receiver’s primary view.
Definition UIViewController.hpp:345
ModelType & getRepresentedObject() noexcept
The object whose value is presented in the receiver’s primary view.
Definition UIViewController.hpp:348
TModelType ModelType
The type of model object to be used by the represented object.
Definition UIViewController.hpp:335
void setRepresentedObject(const ModelType &representedObject)
The object whose value is presented in the receiver’s primary view.
Definition UIViewController.hpp:351
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
virtual void willAppear()
Called after the view controller’s view has been loaded into memory is about to be added to the view ...
Definition UIViewController.hpp:103
UIViewPtr mView
The view controller’s primary view.
Definition UIViewController.hpp:34
virtual void didRemoveChildViewController(UIViewController *const childViewController)
Called immediately after a child UIViewController is removed from the hierarchy.
Definition UIViewController.hpp:203
const Vector< UIViewControllerPtr > & getChildViewControllers() const noexcept
An array of view controllers that are hierarchical children of the view controller.
Definition UIViewController.hpp:241
const Any & getRepresentedObject() const noexcept
The object whose value is presented in the receiver’s primary view.
Definition UIViewController.hpp:271
void removeChildViewController(const UIViewControllerPtr &childViewController)
A convenience method for removing a child view controller from the childViewControllers array.
Definition UIViewController.hpp:261
UIView * getView() const
The view controller’s primary view.
UIResponder * getNextResponder() const final
The next responder after this one, or nil if it has none.
virtual void loadView(UIView &view)
Instantiates a view.
virtual void willLayout()
Called just before the layout method of the view controller's view is called.
Definition UIViewController.hpp:168
UIViewController(UIView *view)
void addChildViewController(const UIViewControllerPtr &childViewController)
A convenience method for adding a child view controller at the end of the childViewControllers array.
Definition UIViewController.hpp:251
virtual void didAppear()
Called when the view controller’s view is fully transitioned onto the screen.
Definition UIViewController.hpp:120
bool mViewLoaded
A Boolean value indicating whether the view controller’s view is loaded into memory.
Definition UIViewController.hpp:38
virtual void didLoad()
Called after the view controller’s view has been loaded into memory.
Definition UIViewController.hpp:84
Vector< UIViewControllerPtr > mChildViewControllers
An array of view controllers that are hierarchical children of the view controller.
Definition UIViewController.hpp:53
UIViewController * mParentViewController
The immediate ancestor view controller of the view controller.
Definition UIViewController.hpp:45
virtual UIViewPtr createView()
Instantiates a view.
void removeChildViewController(UIViewController *childViewController)
A convenience method for removing a child view controller from the childViewControllers array.
UIViewController * getParentViewController() const noexcept
The immediate ancestor view controller of the view controller.
Definition UIViewController.hpp:238
~UIViewController() override
void removeFromParentViewController()
Removes the called view controller from its parent view controller.
void setRepresentedObject(const Any &representedObject)
The object whose value is presented in the receiver’s primary view.
virtual void didAddChildViewController(UIViewController *const childViewController)
Called immediately after a child UIViewController is added to the hierarchy.
Definition UIViewController.hpp:191
UIViewController()=default
Any mRepresentedObject
The object whose value is presented in the receiver’s primary view.
Definition UIViewController.hpp:56
UIViewController(UIView &view)
bool isViewLoaded() const noexcept
A Boolean value indicating whether the view controller’s view is loaded into memory.
Definition UIViewController.hpp:70
void addChildViewController(UIViewController *childViewController)
A convenience method for adding a child view controller at the end of the childViewControllers array.
virtual void willDisappear()
Called when the view controller’s view is about to be removed from the view hierarchy in the window.
Definition UIViewController.hpp:142
virtual void didDisappear()
Called after the view controller’s view is removed from the view hierarchy in a window.
Definition UIViewController.hpp:157
virtual void didLayout()
Called immediately after the layout method of the view controller's view is called.
Definition UIViewController.hpp:179
The infrastructure for drawing and handling events in a UI.
Definition UIView.hpp:153
Definition Application.hpp:19
decltype(auto) get(BezierPath::Element &element) noexcept
Decomposes a bezier path element.
Definition BezierPath.hpp:723
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
RC< T > ce_counted_new(Args &&... args)
Definition SmartPtr.hpp:391
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25