CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
UIView.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 "Forward.hpp"
11
12#include "UIAppearance.hpp"
13#include "UIEvent.hpp"
14#include "UILayout.hpp"
15#include "UIResponder.hpp"
16#include "UIUtility.hpp"
17
19
27
29
30#include <optional>
31
32namespace CeresEngine {
33
34 class UIWindow;
35
36 class UIView;
37 class UIViewController;
38
39 class UIScrollView;
40
41 template<typename T> using UIPtr = RC<T>;
42
45
46 enum class UIViewState : UInt8 {
47 NeedsTransformsUpdate = (1u << 0u),
48 NeedsDisplay = (1u << 1u),
49 NeedsLayout = (1u << 2u),
50 NeedsConstraintUpdate = (1u << 3u),
52 Visible = (1u << 5u),
53 Active = (1u << 6u),
54 AutoResize = (1u << 7u),
55 };
56
59
62 None = 0,
63
65 FlexibleLeft = 1 << 0,
66
68 Width = 1 << 1,
69
71 FlexibleRight = 1 << 2,
72
74 FlexibleBottom = 1 << 3,
75
77 Height = 1 << 4,
78
80 FlexibleTop = 1 << 5,
81
83 Size = Width | Height,
84
88
89 All = Size | Position,
90 };
93
96
99
153 class UIView : public UIResponder, public RefCounted<UIView, RefCounter<false>> {
154 friend UIWindow;
156
157 private:
159 UIView* mSuperView = nullptr;
160
163
165 UIWindow* mWindow = nullptr;
166
170
174
177
180 bool mCustomBounds = false;
181
185
194
197
199 UIColor mBackgroundColor = UIColor::white;
200
204
214 bool mOpaque = false;
215
219
223
226
229
232 AffineTransform mTransformToWindow;
233
236 AffineTransform mTransformFromWindow;
237
241 AffineTransform mTransformToBacking;
242
246 AffineTransform mTransformFromBacking;
247
252
255
258
260
263
267
274
275 private: // Layout & constraints
278
281
282 public:
285 static const double kNoInstrinsicMetric;
286
290
293
296 static const UIRect kDefaultFrame;
297
298 public:
301
304 explicit UIView(const String& name);
305
308 explicit UIView(const UIRect& frame, const String& name = "");
309
313 explicit UIView(const UISize& size, const String& name = "") : UIView(UIPoint(0, 0), size, name) {}
314
319 explicit UIView(const UIPoint& origin, const UISize& size, const String& name = "") : UIView(UIRect(origin, size), name) {}
320
327 explicit UIView(const double x, const double y, const double width, const double height, const String& name = "")
328 : UIView(UIRect(x, y, width, height), name) {}
329
331 ~UIView() override;
332
333 public: // View Hierarchy
344 [[nodiscard]] UIView* getSuperView() const { return mSuperView; }
345
371 [[nodiscard]] const Vector<UIView*>& getSubViews() const { return mSubViews; }
372
375
378
381
383 [[nodiscard]] UInt32 getSubViewIndex(const UIView* view) const;
384
387 void addSubView(UIView* view);
388
390 void addSubView(const UIViewPtr& view) { addSubView(view.get()); }
391
394 template<typename T, typename... Args> T* addSubView(Args&&... args) {
395 RC<T> subView = ce_counted_new<T>(std::forward<Args>(args)...);
396 addSubView(static_cast<UIView*>(subView.get()));
397 return subView.get();
398 }
399
402
410
413 [[nodiscard]] bool isDescendant(const UIView* view) const;
414
417
422 [[nodiscard]] virtual UIWindow* getWindow() const { return mWindow; }
423
424 protected:
427 virtual void didAddSubview(UIView& view);
428
431 virtual void willRemoveSubview(UIView& view);
432
435 virtual void didRemoveSubview(UIView& view);
436
440
443
446 virtual void willMoveToWindow(UIWindow* window);
447
449 virtual void didMoveToWindow(UIWindow* window);
450
453 virtual void didHide();
454
457 virtual void didUnhide();
458
477 virtual void willDraw();
478
487 virtual void tintColorDidChange();
488
489 public: // Frame & Bounds Rectangle
507 [[nodiscard]] UIRect getFrame() const { return mFrame; }
508
510 virtual void setFrame(const UIRect& frame);
511
513 void setFrame(const UIPoint& point, const UISize& size) { setFrame(UIRect(point, size)); }
514
516 void setFrame(const UIPoint& point, const double width, const double height) { setFrame(UIRect(point, UISize(width, height))); }
517
519 void setFrame(const double x, const double y, const UISize& size) { setFrame(UIRect(UIPoint(x, y), size)); }
520
522 void setFrame(const double x, const double y, const double width, const double height) { setFrame(UIRect(UIPoint(x, y), UISize(width, height))); }
523
526 void setFrameOrigin(const UIPoint& point) {
528 newFrame.origin = point;
530 }
531
533 void setFrameOrigin(const double x, const double y) { setFrameOrigin(UIPoint(x, y)); }
534
538 void setFrameSize(const UISize& size) {
540 newFrame.size = size;
542 }
543
545 void setFrameSize(const double width, const double height) { setFrameSize(UISize(width, height)); }
546
566 [[nodiscard]] UIRect getBounds() const { return mBounds; }
567
569 virtual void setBounds(const UIRect& bounds);
570
572 void setBounds(const UIPoint& point, const UISize& size) { setBounds(UIRect(point, size)); }
573
575 void setBounds(const UIPoint& point, const double width, const double height) { setBounds(UIRect(point, UISize(width, height))); }
576
578 void setBounds(const double x, const double y, const UISize& size) { setBounds(UIRect(UIPoint(x, y), size)); }
579
581 void setBounds(const double x, const double y, const double width, const double height) { setBounds(UIRect(UIPoint(x, y), UISize(width, height))); }
582
584 void setBoundsOrigin(const UIPoint& point) {
586 newBounds.origin = point;
588 }
589
591 void setBoundsOrigin(const double x, const double y) { setBoundsOrigin(UIPoint(x, y)); }
592
596 void setBoundsSize(const UISize& size) {
598 newBounds.size = size;
600 }
601
603 void setBoundsSize(const double width, const double height) { setBoundsSize(UISize(width, height)); }
604
605 protected:
608 virtual void didChangeFrame(const UIRect& oldFrame) {}
609
612 virtual void didChangeBounds(const UIRect& oldBounds) {}
613
614 public: // Event Handling
634 [[nodiscard]] virtual bool acceptsFirstMouse(const UIEvent& theEvent) { return false; }
635
673
684 [[nodiscard]] virtual bool isPointInside(const UIPoint& point, const Optional<const UIEvent&>& event = nullopt);
685
705
713 [[nodiscard]] virtual bool getMouseDownCanMoveWindow() const { return !isOpaque(); }
714
715 public:
718
721
731
734
737
740
742 void setBackgroundColor(const UIColor& color);
743
746
748 void setCornerRadius(const UICornerRadius& color);
749
757
759 void setAlpha(double alpha);
760
770 [[nodiscard]] bool isOpaque() const noexcept { return mOpaque; }
771
773 void setOpaque(bool isOpaque);
774
784
786 [[nodiscard]] bool isVisible() const;
787
789 void setVisible(bool visible);
790
816 [[nodiscard]] bool isHidden() const { return !isVisible(); }
817
819 void setHidden(const bool hidden) { setVisible(!hidden); }
820
824
826 [[nodiscard]] bool isActive() const;
827
829 void setActive(bool active);
830
831 public: // Resizing Subviews
842
845
863
880
895 virtual void resizeSubviews(const UISize& oldBoundsSize);
896
914 virtual void resize(const UISize& oldBoundsSize);
915
935
936 protected:
944
946
947 public: // Layout
958 [[nodiscard]] bool getNeedsLayout() const;
959
962
965
978 void layout();
979
987
1000 virtual void layoutSubviews();
1001
1018
1024
1030
1031 public: // Managing the View's Constraints
1052
1055
1058
1089 virtual void updateConstraints();
1090
1100
1103
1106
1109
1123 void addConstraint(const UILayoutConstraint& constraint);
1124
1139
1144
1148 void removeConstraint(const UILayoutConstraint& constraint);
1149
1153
1158
1172
1175
1177 [[nodiscard]] double getLayoutTopMargin() const { return mLayoutMargins.top; }
1178
1181
1183 [[nodiscard]] double getBottomLayoutMargin() const { return mLayoutMargins.bottom; }
1184
1187
1189 [[nodiscard]] double getLeftLayoutMargin() const { return mLayoutMargins.left; }
1190
1193
1195 [[nodiscard]] double getRightLayoutMargin() const { return mLayoutMargins.right; }
1196
1199
1202
1205
1208
1211
1214
1217
1220
1223
1227
1231
1235
1239
1243
1247
1252
1257
1258 private:
1260
1263
1267
1268 public: // Display & View Dirty State
1278
1294
1306 [[nodiscard]] bool getNeedsDisplay() const;
1307
1314
1322 void display(UIGraphicsContext& context, const UIRect& aRect);
1323
1330
1340
1349
1357
1363
1372
1373 public: // Drawing
1389 bool canDraw() const;
1390
1427 virtual void draw(UIGraphicsContext& context, const UIRect& dirtyRect);
1428
1449
1462 [[nodiscard]] bool needsToDraw(const UIRect& aRect) const noexcept;
1463
1480 [[nodiscard]] virtual bool getClearsContextBeforeDrawing() const noexcept { return true; }
1481
1489 [[nodiscard]] virtual bool getClipsToBounds() const { return true; }
1490
1512
1515
1516 public: // First responder state
1519
1520 public: // UIScrollView accessor
1523
1524 public: // Key-view Loop Management
1532 [[nodiscard]] virtual bool canBecomeKeyView() const { return false; }
1533
1551 [[nodiscard]] virtual bool needsPanelToBecomeKey() const { return false; }
1552
1565
1568
1578
1588
1597
1598 public: // Converting Coordinate Values
1607 [[nodiscard]] AffineTransform getTransformFrom(const UIView* aView = nullptr) const;
1608
1611 [[nodiscard]] const AffineTransform& getTransformFromWindow() const;
1612
1615 [[nodiscard]] AffineTransform getTransformFromSuperView() const { return getTransformFrom(mSuperView); }
1616
1620 [[nodiscard]] const AffineTransform& getTransformFromBacking() const;
1621
1630 [[nodiscard]] AffineTransform getTransformTo(const UIView* aView = nullptr) const;
1631
1634 [[nodiscard]] const AffineTransform& getTransformToWindow() const;
1635
1638 [[nodiscard]] AffineTransform getTransformToSuperView() const { return getTransformTo(mSuperView); }
1639
1643 [[nodiscard]] const AffineTransform& getTransformToBacking() const;
1644
1656 [[nodiscard]] UIPoint convertFrom(const UIPoint& aPoint, const UIView* aView = nullptr) const;
1657
1660
1663
1670
1682 [[nodiscard]] UIPoint convertTo(const UIPoint& aPoint, const UIView* aView = nullptr) const;
1683
1686
1689
1695
1710 [[nodiscard]] UISize convertFrom(const UISize& aSize, const UIView* aView = nullptr) const;
1711
1714
1717
1724
1739 [[nodiscard]] UISize convertTo(const UISize& aSize, const UIView* aView = nullptr) const;
1740
1743
1746
1752
1763 [[nodiscard]] UIRect convertFrom(const UIRect& aRect, const UIView* aView = nullptr) const;
1764
1767
1770
1777
1789 [[nodiscard]] UIRect convertTo(const UIRect& aRect, const UIView* aView = nullptr) const;
1790
1793
1796
1803
1804 private:
1808
1810
1815
1816 private: // Hierarchy management
1817 void setWindow(UIWindow* window);
1819 void insertSubView(UIView* view, UInt32 index);
1820
1821 public: // UIViewController
1824
1825 private:
1828
1829 public: // Debugging helpers
1832 [[nodiscard]] const String& getName() const { return mName; }
1833
1835 void setName(const String& name);
1836
1838 [[nodiscard]] virtual StringView getTypeName() const;
1839
1840 // public: // Context Menus
1841 // /// Overridden by subclasses to return a context-sensitive pop-up menu
1842 // /// for a given mouse-down event.
1843 // virtual UIMenu getMenu(const UIEvent& event);
1844 //
1845 // /// Called just before a contextual menu for a view is opened on screen.
1846 // virtual void willOpenMenu(UIMenu& menu, const UIEvent& event);
1847 //
1848 // /// Called after a contextual menu that was displayed from the receiving
1849 // /// view has been closed.
1850 // virtual void didCloseMenu(UIMenu& menu, const UIEvent& event);
1851
1852 public: // UIResponder
1855
1856 public: // Appearance properties
1860
1861 public: // Semantic Appearance Properties
1863
1866
1869
1872
1875
1877
1880
1883
1886
1889
1892
1895
1898
1901
1903
1906
1909
1912
1915
1917
1920
1922
1925
1928
1931
1933
1936
1939
1942
1945
1948
1951
1954
1957
1960
1963
1965
1968
1971
1974
1976
1979
1982
1985
1986 public: // Font and sizes
1989
1992 };
1993
1994} // namespace CeresEngine
#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 view that displays a portion of a document view and provides scroll bars that allow the user to mov...
Definition UIScrollView.hpp:29
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
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