37 class UIViewController;
#define CE_FLAGS_OPERATORS(Enum)
Defines global operators for a Flags<Enum, Storage> implementation.
Definition Flags.hpp:216
An equation or inequality involving one or more variables.
Definition Constraint.hpp:38
A variable as used in an expression.
Definition ConstraintVariable.hpp:50
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Pointer get() const noexcept
Definition SmartPtr.hpp:244
An object that represents a graphics context.
Definition GraphicsContext.hpp:45
Definition Optional.hpp:17
A simple reference counter base class.
Definition SmartPtr.hpp:438
An object that describes the appearance of a UI view.
Definition UIAppearance.hpp:93
Definition UILayoutSolver.hpp:16
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
The infrastructure for drawing and handling events in a UI.
Definition UIView.hpp:153
const UILayoutAnchor firstBaseline
The object's baseline.
Definition UIView.hpp:1230
void displayIfNeededIgnoringOpacity(UIGraphicsContext &context)
Acts as displayIfNeeded(), except that this method doesn’t back up to the first opaque ancestor—it si...
void removeConstraints(const Span< const UILayoutConstraint > &constraints)
Removes the specified constraints from the view.
UISize mIntrinsicContentSize
The natural size for the receiving view, considering only properties of the view itself.
Definition UIView.hpp:254
void setBounds(const UIPoint &point, const double width, const double height)
The view's bounds rectangle, which expresses its location and size in its own coordinate system.
Definition UIView.hpp:575
UISize convertToSuperView(const UISize &aSize) const
Converts a point from the view's coordinate system to that of a given view.
Definition UIView.hpp:1745
static const UIPaintAppearanceProperty placeholderTextPaintProperty
The color to use for placeholder text in controls or text views.
Definition UIView.hpp:1882
UIColor getTintColor() const
The first non-default tint color value in the view's hierarchy, ascending from and starting with the ...
static const UIPaintAppearanceProperty selectedControlPaintProperty
The color to use for the face of a selected control—that is, a control that has been clicked or is be...
Definition UIView.hpp:1953
bool mOpaque
A Boolean value indicating whether the view fills its frame rectangle with opaque content.
Definition UIView.hpp:214
static const UIPaintAppearanceProperty selectedControlTextPaintProperty
The color to use for text in a selected control—that is, a control being clicked or dragged.
Definition UIView.hpp:1956
virtual bool getMouseDownCanMoveWindow() const
This property lets you determine the region by which a window can be moved.
Definition UIView.hpp:713
UIPoint convertToBacking(const UIPoint &aPoint) const
Converts a point from the view’s interior coordinate system to its pixel aligned backing store coordi...
void setContentScaleFactor(const Optional< double > &contentScaleFactor)
The scale factor applied to the view.
UIPoint convertFromWindow(const UIPoint &aPoint) const
Converts a point from the coordinate system of a given view to that of the view.
Definition UIView.hpp:1659
void displayIgnoringOpacity(UIGraphicsContext &context)
Displays the view but does not back up to the first opaque ancestor—it simply causes the view and its...
UIRect getVisibleRect() const
Visibility, as reflected by this property, does not account for whether other view or window objects ...
UIRect convertToBacking(const UIRect &aRect) const
Converts a rectangle from the view’s interior coordinate system to its pixel aligned backing store co...
bool isHidden() const
A Boolean value indicating whether the view is hidden.
Definition UIView.hpp:816
AffineTransform mTransformToWindow
A 2D transformation matrix that transforms a point from the view coordinate space into the window coo...
Definition UIView.hpp:232
void layoutIfNeeded()
Updates the layout of the receiving view and its subviews based on the current views and constraints.
virtual UISize calculateFittingLayoutSize(const UISize &targetSize) const
Returns the optimal size of the view based on its current constraints.
const UIAppearance & getAppearance() const noexcept
The UI appearance to be used by the view.
UIView * getPreviousKeyView() const
The value in this property is nullptr if there is no view preceding the current view in the key view ...
Definition UIView.hpp:1587
void invalidateTransforms()
Internal method called by the system whenever it needs to invalidate transforms.
UIRect convertFromSuperView(const UIRect &aRect) const
Converts a point from the coordinate system of a given view to that of the view.
Definition UIView.hpp:1769
UIViewAutoresizingMask mResizingMask
The options that determine how the view is resized relative to its superview.
Definition UIView.hpp:218
virtual void layoutSubviews()
Lays out subviews.
const AffineTransform & getTransformFromBacking() const
UIRect convertTo(const UIRect &aRect, const UIView *aView=nullptr) const
Converts a rectangle from the view's coordinate system to that of another view.
virtual void didMoveToSuperView(UIView *superView)
Informs the view that its superview has changed (possibly to nil).
~UIView() override
Destroys a UIView.
bool isMousePoint(const UIPoint &aPoint, const UIRect &aRect)
Returns whether a region of the view contains a specified point, accounting for whether the view is f...
void setAutoresizesSubViews(bool state)
static const UIPaintAppearanceProperty findHighlightPaintProperty
The highlight color to use for the bubble that shows inline search result values.
Definition UIView.hpp:1978
void invalidateIntrinsicContentSize()
Invalidates the view's intrinsic content size.
const UILayoutAnchor bottom
The bottom of the object's alignment rectangle.
Definition UIView.hpp:1210
static const UIRect kDefaultFrame
A rectangle that represents the default frame set by a view without an explicit frame.
Definition UIView.hpp:296
bool getAutoresizesSubViews() const
A Boolean value indicating whether the view applies the autoresizing behavior to its subviews when it...
UISize calculateMaximumLayoutSize() const
Returns the maximum size of the view based on its current constraints.
Definition UIView.hpp:1029
const UILayoutAnchor centerX
The center along the x-axis of the object's alignment rectangle.
Definition UIView.hpp:1219
double getContentScaleFactor() const
The scale factor applied to the view.
virtual bool acceptsFirstMouse(const UIEvent &theEvent)
Overridden by subclasses to return true if the view should call mouseDown() for an initial mouse-down...
Definition UIView.hpp:634
void addSubView(UIView *view)
Adds a view to the view's subviews so it's displayed above its siblings.
double getLayoutTopMargin() const
The default spacing to use when laying out content in the view.
Definition UIView.hpp:1177
static const UIPaintAppearanceProperty controlBackgroundPaintProperty
The color to use for the background of large controls, such as scroll views or table views.
Definition UIView.hpp:1941
void setConstraints(const Span< const UILayoutConstraint > &constraints)
Returns the constraints held by the view.
void setBoundsOrigin(const double x, const double y)
Sets the origin of the view's bounds rectangle to a specified point.
Definition UIView.hpp:591
static const UIPaintAppearanceProperty currentControlTintProperty
The current system control tint color.
Definition UIView.hpp:1950
AffineTransform getTransformFromSuperView() const
Definition UIView.hpp:1615
const UIColor & getBackgroundColor() const noexcept
The view's background color.
Definition UIView.hpp:739
UIPoint convertToWindow(const UIPoint &aPoint) const
Converts a point from the view's coordinate system to that of a given view.
Definition UIView.hpp:1685
static const UIPaintAppearanceProperty unemphasizedSelectedContentBackgroundPaintProperty
The color to use for selected and unemphasized content.
Definition UIView.hpp:1914
void removeConstraint(const UILayoutConstraint &constraint)
Removes the specified constraint from the view.
bool needsToDraw(const UIRect &aRect) const noexcept
Returns a Boolean value indicating whether the specified rectangle intersects any part of the area th...
void setTopLayoutMargin(double topLayoutMargin)
void displayIfNeededIgnoringOpacity(UIGraphicsContext &context, const UIRect &aRect)
Displays the view but confines drawing to a specified region and does not back up to the first opaque...
void addSubView(const UIViewPtr &view)
Adds a view to the view's subviews so it's displayed above its siblings.
Definition UIView.hpp:390
void removeConstraints(const InitializerList< UILayoutConstraint > constraints)
Removes the specified constraints from the view.
Definition UIView.hpp:1155
UIView(const double x, const double y, const double width, const double height, const String &name="")
Initializes new UIView object with an frame rectangle size.
Definition UIView.hpp:327
void setFrameSize(const UISize &size)
Sets the size of the view's frame rectangle to the specified dimensions, resizing it within its super...
Definition UIView.hpp:538
UIView(const String &name)
Initializes new UIView object with an empty frame rectangle and custom name.
UIView()
Initializes new UIView object with an empty frame rectangle.
void setAppearance(UIAppearance *appearance)
The UI appearance to be used by the view.
UIView * getNextKeyView() const
The view object that follows the current view in the key view loop.
Definition UIView.hpp:1564
UIAppearancePtr mAppearance
The UI appearance to be used by the view.
Definition UIView.hpp:193
bool isOpaque() const noexcept
A Boolean value indicating whether the view fills its frame rectangle with opaque content.
Definition UIView.hpp:770
const UILayoutAnchor bottomMargin
The object's bottom margin.
Definition UIView.hpp:1246
UIRect getFrame() const
The view's frame rectangle, which defines its position and size in its superview's coordinate system.
Definition UIView.hpp:507
bool isFirstResponder() const noexcept
Determines if this view is the current first responder.
const UIViewAutoresizingMask & getAutoresizingMask() const
The options that determine how the view is resized relative to its superview.
Definition UIView.hpp:862
void removeFromSuperview()
Unlinks the view from its superview and its window, removes it from the responder chain,...
virtual void displayIgnoringOpacity(UIGraphicsContext &context, const UIRect &aRect)
Displays the view but confines drawing to a specified region and does not back up to the first opaque...
virtual bool canBecomeKeyView() const
When the value of this property is true, the view can become the key view.
Definition UIView.hpp:1532
virtual void didChangeFrame(const UIRect &oldFrame)
Called whenever the view frame changes, either internally or programmatically by calls to setFrame.
Definition UIView.hpp:608
UISize convertTo(const UISize &aSize, const UIView *aView=nullptr) const
Converts a size from the view's coordinate system to that of another view.
void setNeedsLayout(bool state)
A Boolean value indicating whether the view needs a layout pass before it can be drawn.
const UILayoutAnchor topMargin
The object's top margin.
Definition UIView.hpp:1242
UIView * getOpaqueAncestor() const
The view's closest opaque ancestor, which might be the view itself.
static const UIPaintAppearanceProperty windowFrameTextPaintProperty
The color to use for text in a window's frame.
Definition UIView.hpp:1970
static const UIPaintAppearanceProperty tertiaryLabelPaintProperty
The tertiary color to use for text labels.
Definition UIView.hpp:1871
void registerLayoutAnchor(const UILayoutAnchor &layoutAnchor)
Registers a new layout anchor with the view.
void insertSubView(UIView *view, UInt32 index)
void setFrameOrigin(const UIPoint &point)
Sets the origin of the view's frame rectangle to the specified point, effectively repositioning it wi...
Definition UIView.hpp:526
virtual UISize getIntrinsicContentSize() const
The natural size for the receiving view, considering only properties of the view itself.
void setNeedsLayout()
A Boolean value indicating whether the view needs a layout pass before it can be drawn.
const UICornerRadius & getCornerRadius() const noexcept
The view's background corner radius.
Definition UIView.hpp:745
void setHidden(const bool hidden)
A Boolean value indicating whether the view is hidden.
Definition UIView.hpp:819
void setNeedsDisplay(const UIRect &invalidRect)
Marks the region of the view within the specified rectangle as needing display, increasing the view's...
UISize convertToBacking(const UISize &aSize) const
Converts a size from the view’s interior coordinate system to its pixel aligned backing store coordin...
virtual void setFrame(const UIRect &frame)
The view's frame rectangle, which defines its position and size in its superview's coordinate system.
UIWindow * mWindow
The window this UIView is attached to.
Definition UIView.hpp:165
UInt32 getSubViewIndex(const UIView *view) const
Gtes the sub-view index for the given sub-view, if it is a sub-view.
UIView * getNextValidKeyView() const
The value in this property is nullptr if there is no view that follows the current view and accepts t...
static const UIPaintAppearanceProperty scrubberTexturedBackgroundPaintProperty
The patterned color to use for the background of a scrubber control.
Definition UIView.hpp:1962
static const UIPaintAppearanceProperty textBackgroundPaintProperty
The color to use for the background area behind text.
Definition UIView.hpp:1888
Vector< UIRect > mRectsBeingDrawn
A cache for getRectsBeingDrawn() the values returned.
Definition UIView.hpp:262
void clearTintColor()
Clears the tint color for the current view.
virtual void didUnhide()
Invoked when the view is unhidden, either directly, or in response to an ancestor being unhidden.
void setFrame(const UIPoint &point, const double width, const double height)
The view's frame rectangle, which defines its position and size in its superview's coordinate system.
Definition UIView.hpp:516
UPtr< UILayoutSolver > mLayoutSolver
The layout solver for this view.
Definition UIView.hpp:277
friend UIWindow
Definition UIView.hpp:154
UIViewController * mViewController
The UIView controller, if any.
Definition UIView.hpp:266
void updateConstraintsIfNeeded()
Updates the constraints for the receiving view and its subviews.
static const UIPaintAppearanceProperty unemphasizedSelectedTextBackgroundPaintProperty
The color to use for the text background in an unemphasized context.
Definition UIView.hpp:1900
static const UIPaintAppearanceProperty controlPaintProperty
The color to use for the flat surfaces of a control.
Definition UIView.hpp:1938
void setBoundsSize(const UISize &size)
Sets the size of the view's bounds rectangle to specified dimensions, inversely scaling its coordinat...
Definition UIView.hpp:596
void addConstraints(const InitializerList< UILayoutConstraint > constraints)
Adds multiple constraints on the layout of the receiving view or its subviews.
Definition UIView.hpp:1141
void setLeftLayoutMargin(double leftLayoutMargin)
The default spacing to use when laying out content in the view.
bool isActive() const
A Boolean value indicating whether the view is active.
UISize convertToWindow(const UISize &aSize) const
Converts a point from the view's coordinate system to that of a given view.
Definition UIView.hpp:1742
static const UIPaintAppearanceProperty alternatingContentBackgroundColorsProperty
The colors to use for alternating content, typically found in table views and collection views.
Definition UIView.hpp:1930
void display(UIGraphicsContext &context)
Displays the view and all its subviews if possible.
UISize calculateMinimumLayoutSize() const
Returns the minimum size of the view based on its current constraints.
Definition UIView.hpp:1023
void setVisible(bool visible)
A Boolean value indicating whether the view is visible.
void setWindow(UIWindow *window)
void setViewController(UIViewController *viewController)
The UIView controller, if any.
void setLayoutMargins(const UIEdgeInsets &layoutMargins)
The default spacing to use when laying out content in the view.
UIPoint convertFromBacking(const UIPoint &aPoint) const
Converts a point from its pixel aligned backing store coordinate system to the view’s interior coordi...
static const UIPaintAppearanceProperty unemphasizedSelectedTextPaintProperty
The color to use for selected text in an unemphasized context.
Definition UIView.hpp:1897
void setNeedsDisplay()
The displayIfNeeded methods check the value of this property to avoid unnecessary drawing,...
virtual void updateConstraints()
Updates constraints for the view.
Vector< UIRect > mInvalidRects
Definition UIView.hpp:259
bool getNeedsLayout() const
A Boolean value indicating whether the view needs a layout pass before it can be drawn.
virtual void didAddSubview(UIView &view)
Overridden by subclasses to perform additional actions when subviews are added to the view.
void displayIfNeeded(UIGraphicsContext &context, const UIRect &aRect)
Acts as displayIfNeeded(), but confining drawing to a rectangular region of the view.
UIRect convertToWindow(const UIRect &aRect) const
Converts a point from the view's coordinate system to that of a given view.
Definition UIView.hpp:1792
double getRightLayoutMargin() const
The default spacing to use when laying out content in the view.
Definition UIView.hpp:1195
static const UIPaintAppearanceProperty controlTextPaintProperty
The color to use for text on enabled controls.
Definition UIView.hpp:1944
String mName
A human readable string that represents the view.
Definition UIView.hpp:222
const UILayoutAnchor right
The right side of the object's alignment rectangle.
Definition UIView.hpp:1204
static const UIPaintAppearanceProperty alternateSelectedControlTextPaintProperty
The color to use for text in a selected control.
Definition UIView.hpp:1959
T * addSubView(Args &&... args)
Adds a view to the view's subviews so it's displayed above its siblings.
Definition UIView.hpp:394
Vector< UIRect > mTrackingRects
A list of tracking rectangles.
Definition UIView.hpp:251
void setBounds(const UIPoint &point, const UISize &size)
The view's bounds rectangle, which expresses its location and size in its own coordinate system.
Definition UIView.hpp:572
const AffineTransform & getTransformToBacking() const
virtual void willDraw()
Informs the view that it will be required to draw content.
const UIEdgeInsets & getLayoutMargins() const
The default spacing to use when laying out content in the view.
Definition UIView.hpp:1171
static const UIPaintAppearanceProperty selectedMenuItemTextPaintProperty
The color to use for the text in menu items.
Definition UIView.hpp:1919
UICornerRadius mCornerRadius
The view's background corner radius.
Definition UIView.hpp:203
AffineTransform mTransformFromBacking
A 2D transformation matrix that transforms a point from its pixel aligned backing store coordinate sy...
Definition UIView.hpp:246
AffineTransform getTransformToSuperView() const
Definition UIView.hpp:1638
void setOpaque(bool isOpaque)
A Boolean value indicating whether the view fills its frame rectangle with opaque content.
const UILayoutAnchor height
The height of the object's alignment rectangle.
Definition UIView.hpp:1216
double getLeftLayoutMargin() const
The default spacing to use when laying out content in the view.
Definition UIView.hpp:1189
static const UIPaintAppearanceProperty labelPaintProperty
The primary color to use for text labels.
Definition UIView.hpp:1865
static const UIPaintAppearanceProperty headerTextPaintProperty
The color to use for text in header cells in table views and outline views.
Definition UIView.hpp:1927
AffineTransform mTransformToBacking
A 2D transformation matrix that transforms a point from the view’s interior coordinate system to its ...
Definition UIView.hpp:241
void updateIntrinsicContentSize()
double getBottomLayoutMargin() const
The default spacing to use when laying out content in the view.
Definition UIView.hpp:1183
virtual void willMoveToWindow(UIWindow *window)
Informs the view that it's being added to the view hierarchy of the specified window object (which ma...
UIPoint convertToSuperView(const UIPoint &aPoint) const
Converts a point from the view's coordinate system to that of a given view.
Definition UIView.hpp:1688
void setAutoresizingMask(const UIViewAutoresizingMask &autoresizingMask)
The options that determine how the view is resized relative to its superview.
static const UIColorAppearanceProperty tintColorProperty
Determines the default value for the tintColor property if not overridden by the view.
Definition UIView.hpp:1859
void setName(const String &name)
virtual void didHide()
Invoked when the view is hidden, either directly, or in response to an ancestor being hidden.
void setBoundsSize(const double width, const double height)
Sets the size of the view's bounds rectangle to specified dimensions, inversely scaling its coordinat...
Definition UIView.hpp:603
Vector< UIView * > mSubViews
A list of children views.
Definition UIView.hpp:162
void setFrame(const UIPoint &point, const UISize &size)
The view's frame rectangle, which defines its position and size in its superview's coordinate system.
Definition UIView.hpp:513
void setBackgroundColor(const UIColor &color)
The view's background color.
void replaceSubView(UIView *view, UIView *replacement)
Replaces one of the view's subviews with another view.
void addConstraint(const UILayoutConstraint &constraint)
Adds a constraint on the layout of the receiving view or its subviews.
void setBounds(const double x, const double y, const UISize &size)
The view's bounds rectangle, which expresses its location and size in its own coordinate system.
Definition UIView.hpp:578
void setTintColor(const UIColor &color)
The first non-default tint color value in the view's hierarchy, ascending from and starting with the ...
static const UIFloatAppearanceProperty fontSizeProperty
The default font size used by all UI elements.
Definition UIView.hpp:1991
UIView(const UIPoint &origin, const UISize &size, const String &name="")
Initializes new UIView object with an frame rectangle size.
Definition UIView.hpp:319
const UILayoutAnchor left
The left side of the object's alignment rectangle.
Definition UIView.hpp:1201
UIPoint convertTo(const UIPoint &aPoint, const UIView *aView=nullptr) const
Converts a point from the view's coordinate system to that of a given view.
virtual void willRemoveSubview(UIView &view)
Overridden by subclasses to perform additional actions before subviews are removed from the view.
UIRect convertFrom(const UIRect &aRect, const UIView *aView=nullptr) const
Converts a rectangle from the coordinate system of another view to that of the view.
void setConstraints(Vector< UILayoutConstraint > &&constraints)
Returns the constraints held by the view.
bool isDescendant(const UIView *view) const
Returns true if the view is a subview of a given view or if it's identical to that view; otherwise,...
static const UIFontAppearanceProperty fontProperty
The default font used by all UI elements.
Definition UIView.hpp:1988
UIPoint convertFrom(const UIPoint &aPoint, const UIView *aView=nullptr) const
Converts a point from the coordinate system of a given view to that of the view.
virtual void didRemoveSubview(UIView &view)
Overridden by subclasses to perform additional actions when subviews are removed to the view.
virtual bool needsPanelToBecomeKey() const
The default value of this property is false.
Definition UIView.hpp:1551
const UILayoutAnchor rightMargin
The object's right margin.
Definition UIView.hpp:1238
void setBoundsOrigin(const UIPoint &point)
Sets the origin of the view's bounds rectangle to a specified point.
Definition UIView.hpp:584
UIView * getSuperView() const
The view that is the parent of the current view.
Definition UIView.hpp:344
void layout()
Perform layout in concert with the layout system.
virtual void setBounds(const UIRect &bounds)
The view's bounds rectangle, which expresses its location and size in its own coordinate system.
bool getNeedsDisplay() const
The displayIfNeeded methods check the value of this property to avoid unnecessary drawing,...
static const UIPaintAppearanceProperty gridPaintProperty
The color to use for the optional gridlines, such as those in a table view.
Definition UIView.hpp:1924
bool isVisible() const
A Boolean value indicating whether the view is visible.
void setNextKeyView(UIView *nextKeyView)
The view object that follows the current view in the key view loop.
static const UIPaintAppearanceProperty textPaintProperty
The color to use for text.
Definition UIView.hpp:1879
UIRect convertToSuperView(const UIRect &aRect) const
Converts a point from the view's coordinate system to that of a given view.
Definition UIView.hpp:1795
const UILayoutAnchor leftMargin
The object's left margin.
Definition UIView.hpp:1234
void setNeedsUpdateConstraints()
A Boolean value that determines whether the view’s constraints need updating.
Optional< double > mContentScaleFactor
The scale factor applied to the view.
Definition UIView.hpp:176
void displayIfNeeded(UIGraphicsContext &context)
Displays the view and all its subviews if any part of the view has been marked as needing display.
void display(UIGraphicsContext &context, const UIRect &aRect)
Acts as display(), but confining drawing to a rectangular region of the view.
UInt32 getSubViewCount() const noexcept
Gets the number of sub-views in the view.
Definition UIView.hpp:377
const UILayoutAnchor lastBaseline
The object's baseline.
Definition UIView.hpp:1226
UIView * getSubView(UInt32 index) const
Gets the sub-view at the given index.
virtual void resizeSubviews(const UISize &oldBoundsSize)
Informs the view's subviews that the view's bounds rectangle size has changed.
UIView(const UISize &size, const String &name="")
Initializes new UIView object with an frame rectangle size.
Definition UIView.hpp:313
UIViewStateFlags mFlags
The view flags.
Definition UIView.hpp:183
void setFrame(const double x, const double y, const double width, const double height)
The view's frame rectangle, which defines its position and size in its superview's coordinate system.
Definition UIView.hpp:522
UILayerPtr mLayer
The UI layer that the view uses as its backing store.
Definition UIView.hpp:273
static const UInt32 kInvalidViewIndex
Used to indicate that an invalid view index.
Definition UIView.hpp:292
UIColor mBackgroundColor
The view's background color.
Definition UIView.hpp:199
virtual bool isPointInside(const UIPoint &point, const Optional< const UIEvent & > &event=nullopt)
Returns a Boolean value indicating whether the receiver contains the specified point.
static const UISize kNoIntrinsicSize
Used to indicate that a view has no intrinsic metric for a given size property.
Definition UIView.hpp:289
static const UIPaintAppearanceProperty secondaryLabelPaintProperty
The secondary color to use for text labels.
Definition UIView.hpp:1868
const AffineTransform & getTransformToWindow() const
const AffineTransform & getTransformFromWindow() const
UIPoint convertFromSuperView(const UIPoint &aPoint) const
Converts a point from the coordinate system of a given view to that of the view.
Definition UIView.hpp:1662
UISize convertFromBacking(const UISize &aSize) const
Converts a size from its pixel aligned backing store coordinate system to the view’s interior coordin...
void setFrameOrigin(const double x, const double y)
Sets the origin of the view's frame rectangle to the specified point, effectively repositioning it wi...
Definition UIView.hpp:533
UIView * hitTest(UIPoint aPoint, const Optional< const UIEvent & > &event=nullopt)
Returns the farthest descendant of the view in the view hierarchy (including itself) that contains a ...
const Vector< UIView * > & getSubViews() const
The list of views embedded in the current view.
Definition UIView.hpp:371
static const UIPaintAppearanceProperty shadowPaintProperty
The color to use for virtual shadows cast by raised objects on the screen.
Definition UIView.hpp:1984
AffineTransform getTransformTo(const UIView *aView=nullptr) const
void setFrame(const double x, const double y, const UISize &size)
The view's frame rectangle, which defines its position and size in its superview's coordinate system.
Definition UIView.hpp:519
virtual void didChangeBounds(const UIRect &oldBounds)
Called whenever the view bounds changes, either internally or programmatically by calls to setBounds.
Definition UIView.hpp:612
const UILayoutAnchor centerXWithinMargins
The center along the x-axis between the object's left and right margin.
Definition UIView.hpp:1251
virtual StringView getTypeName() const
A string that represents the view type.
UIView * mSuperView
The parent view.
Definition UIView.hpp:159
Span< const UILayoutConstraint > getConstraints() const
Returns the constraints held by the view.
UIRect getBounds() const
The view's bounds rectangle, which expresses its location and size in its own coordinate system.
Definition UIView.hpp:566
static const UIPaintAppearanceProperty disabledControlTextPaintProperty
The color to use for text on disabled controls.
Definition UIView.hpp:1947
UIView * mPreviousKeyView
The view object preceding the current view in the key view loop.
Definition UIView.hpp:228
friend class UILayoutAnchorVariable
Definition UIView.hpp:1259
void setActive(bool active)
A Boolean value indicating whether the view is active.
void addConstraints(const Span< const UILayoutConstraint > &constraints)
Adds multiple constraints on the layout of the receiving view or its subviews.
const String & getName() const
A human readable string that represents the view.
Definition UIView.hpp:1832
UILayoutSolver & ensureLayoutSolver()
Ensures that a layout solver is present on the view.
static const UIPaintAppearanceProperty quaternaryLabelPaintProperty
The quaternary color to use for text labels and separators.
Definition UIView.hpp:1874
static const UIPaintAppearanceProperty linkPaintProperty
The color to use for links.
Definition UIView.hpp:1905
UIRect mFrame
The view's frame rectangle, which defines its position and size in its superview's coordinate system.
Definition UIView.hpp:169
void setBottomLayoutMargin(double bottomLayoutMargin)
The default spacing to use when laying out content in the view.
virtual void tintColorDidChange()
Called by the system when the tintColor property changes.
double getAlpha() const noexcept
This property contains the opacity value from the view's layer.
Definition UIView.hpp:756
void setSubViews(const Vector< UIView * > &subViews)
The list of views embedded in the current view.
UIRect mBounds
The view's bounds rectangle, which expresses its location and size in its own coordinate system.
Definition UIView.hpp:173
static const UIPaintAppearanceProperty windowBackgroundPaintProperty
The color to use for the window background.
Definition UIView.hpp:1967
void setBounds(const double x, const double y, const double width, const double height)
The view's bounds rectangle, which expresses its location and size in its own coordinate system.
Definition UIView.hpp:581
const UILayoutAnchor width
The width of the object's alignment rectangle.
Definition UIView.hpp:1213
virtual bool getClipsToBounds() const
A Boolean value that determines whether subviews are confined to the bounds of the view.
Definition UIView.hpp:1489
virtual void resize(const UISize &oldBoundsSize)
Informs the view that the bounds size of its superview has changed.
static const UIPaintAppearanceProperty selectedTextBackgroundPaintProperty
The color to use for the background of selected text.
Definition UIView.hpp:1891
static const UIPaintAppearanceProperty controlAccentPaintProperty
The user's current accent color preference.
Definition UIView.hpp:1935
virtual void willMoveToSuperView(UIView *superView)
Informs the view that its superview is about to change to the specified superview (which may be nil).
const UILayoutAnchor top
The top of the object's alignment rectangle.
Definition UIView.hpp:1207
static const UIPaintAppearanceProperty selectedContentBackgroundPaintProperty
The color to use for the background of selected and emphasized content.
Definition UIView.hpp:1911
UIView(const UIRect &frame, const String &name="")
Initializes new UIView object with a frame rectangle.
const UILayoutAnchor centerYWithinMargins
The center along the y-axis between the object's top and bottom margin.
Definition UIView.hpp:1256
void invalidateBackingStore()
Called whenever the UIView backing store must be invalidated.
virtual UIWindow * getWindow() const
The view's window object, if it is installed in a window.
Definition UIView.hpp:422
UIView * getPreviousValidKeyView() const
The value in this property is nullptr if there is no view that precedes the current view and accepts ...
UISize convertFromWindow(const UISize &aSize) const
Converts a point from the coordinate system of a given view to that of the view.
Definition UIView.hpp:1713
AffineTransform getTransformFrom(const UIView *aView=nullptr) const
UIViewController * getViewController() const noexcept
The UIView controller, if any.
Definition UIView.hpp:1823
void setNeedsUpdateConstraints(bool state)
A Boolean value that determines whether the view’s constraints need updating.
Vector< UILayoutAnchor > mLayoutAnchors
A vector that contains all anchors for the view.
Definition UIView.hpp:280
virtual void draw(UIGraphicsContext &context, const UIRect &dirtyRect)
Overridden by subclasses to draw the view's texture within the specified rectangle.
static const double kNoInstrinsicMetric
Used to indicate that a view has no intrinsic metric for a given numeric property.
Definition UIView.hpp:285
virtual UIScrollView * getScrollView() const
Gets the closest parent scroll view to this view.
const UILayoutAnchor centerY
The center along the y-axis of the object's alignment rectangle.
Definition UIView.hpp:1222
bool mCustomBounds
Determines if the view uses a custom bounds rectangle.
Definition UIView.hpp:180
void setFrameSize(const double width, const double height)
Sets the size of the view's frame rectangle to the specified dimensions, resizing it within its super...
Definition UIView.hpp:545
bool isHiddenOrHasHiddenAncestor() const
A Boolean value indicating whether the view is hidden from sight because it, or one of its ancestors,...
static const UIPaintAppearanceProperty highlightPaintProperty
The color to use as a virtual light source on the screen.
Definition UIView.hpp:1981
void setSuperView(UIView *superView)
bool canDraw() const
A Boolean value indicating whether drawing commands will produce any results.
friend UIViewController
Definition UIView.hpp:155
UIEdgeInsets mLayoutMargins
The default spacing to use when laying out content in the view.
Definition UIView.hpp:257
UIRect convertFromWindow(const UIRect &aRect) const
Converts a point from the coordinate system of a given view to that of the view.
Definition UIView.hpp:1766
UIRect convertFromBacking(const UIRect &aRect) const
Converts a rectangle from its pixel aligned backing store coordinate system to the view’s interior co...
static const UIPaintAppearanceProperty separatorPaintProperty
The color to use for separators between different sections of content.
Definition UIView.hpp:1908
Optional< UIColor > mTintColor
The base color to be used for UI tinting.
Definition UIView.hpp:196
bool getNeedsUpdateConstraints() const
A Boolean value that determines whether the view’s constraints need updating.
void setCornerRadius(const UICornerRadius &color)
The view's background corner radius.
void setAlpha(double alpha)
This property contains the opacity value from the view's layer.
virtual void didMoveToWindow(UIWindow *window)
Informs the view that it has been added to a new view hierarchy.
UIResponder * getNextResponder() const final
The next responder after this one, or nil if it has none.
const Vector< UIRect > & getRectsBeingDrawn() const
Returns by a list of non-overlapping rectangles that define the area the view is being asked to draw ...
void updateTransformsIfNeeded()
virtual bool getClearsContextBeforeDrawing() const noexcept
A Boolean value that determines whether the view's bounds should be automatically cleared before draw...
Definition UIView.hpp:1480
AffineTransform mTransformFromWindow
A 2D transformation matrix that transforms a point from the window coordinate space into the view coo...
Definition UIView.hpp:236
static const UIPaintAppearanceProperty keyboardFocusIndicatorPaintProperty
The color to use for the keyboard focus ring around controls.
Definition UIView.hpp:1894
void setRightLayoutMargin(double rightLayoutMargin)
The default spacing to use when laying out content in the view.
static const UIPaintAppearanceProperty underPageBackgroundPaintProperty
The color to use in the area beneath your window's views.
Definition UIView.hpp:1973
static const UIPaintAppearanceProperty selectedTextPaintProperty
The color to use for selected text.
Definition UIView.hpp:1885
UIView * mNextKeyView
The view object that follows the current view in the key view loop.
Definition UIView.hpp:225
UISize convertFromSuperView(const UISize &aSize) const
Converts a point from the coordinate system of a given view to that of the view.
Definition UIView.hpp:1716
UISize convertFrom(const UISize &aSize, const UIView *aView=nullptr) const
Converts a size from another view's coordinate system to that of the view.
A window that an app displays on the screen.
Definition UIWindow.hpp:42
Definition Application.hpp:19
std::unique_ptr< T, Deleter > UPtr
UPtr is a smart pointer that owns and manages another object through a pointer and disposes of that o...
Definition SmartPtr.hpp:28
Color UIColor
Definition UIUtility.hpp:187
Size2 UISize
A type that contains width and height values.
Definition UIUtility.hpp:30
std::initializer_list< T > InitializerList
An object of type InitializerList<T> is a lightweight proxy object that provides access to an array o...
Definition InitializerList.hpp:40
Rect2Edge UIEdgeInsets
The inset distances for views.
Definition UIUtility.hpp:42
UIViewAutoResizing
Definition UIView.hpp:60
@ Width
The view's width is flexible.
@ Position
The view corners are flexible.
@ Size
The view's width & height are flexible.
@ FlexibleRight
The right margin between the view and its superview is flexible.
@ FlexibleBottom
The bottom margin between the view and its superview is flexible.
@ Height
The view's height is flexible.
@ FlexibleTop
The top margin between the view and its superview is flexible.
@ FlexibleLeft
The left margin between the view and its superview is flexible.
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
UIViewState
Definition UIView.hpp:46
@ NeedsIntrinsicContentSizeUpdate
struct CeresEngine::GLState state
Rect2 UIRect
A structure that contains the location and dimensions of a rectangle.
Definition UIUtility.hpp:33
std::uint8_t UInt8
Definition DataTypes.hpp:17
const UISize UILayoutFittingExpandedSize
The option to use the largest possible size.
Point2 UIPoint
A type that contains a point in a two-dimensional coordinate system.
Definition UIUtility.hpp:27
std::uint32_t UInt32
Definition DataTypes.hpp:23
@ All
Specifies all shader stages.
tcb ::span< T, Extent > Span
Span describes an object that can refer to a contiguous sequence of objects with the first element of...
Definition Span.hpp:708
const UISize UILayoutFittingCompressedSize
The option to use the smallest possible size.
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A UI appearance property that returns a color.
Definition UIAppearance.hpp:30
Definition UIUtility.hpp:44
An object that contains information about an input action such as a mouse click or a key press.
Definition UIEvent.hpp:115