|
CeresEngine 0.2.0
A game development framework
|
A display of a bar representing a continuous range of numerical values and a knob representing the currently selected value. More...
#include <CeresEngine/UI/UISlider.hpp>
Public Member Functions | |
| UISlider () | |
| ~UISlider () override | |
| double | getValue () const |
| The slider's current value. | |
| void | setValue (double value) |
| The slider's current value. | |
| double | getMinimumValue () const |
| The minimum value of the slider. | |
| void | setMinimumValue (double minimumValue) |
| The minimum value of the slider. | |
| double | getMaximumValue () const |
| The maximum value of the slider. | |
| void | setMaximumValue (double maximumValue) |
| The maximum value of the slider. | |
| bool | isContinuous () const |
| A Boolean value indicating whether changes in the slider's value generate continuous update events. | |
| void | setContinuous (bool isContinuous) |
| A Boolean value indicating whether changes in the slider's value generate continuous update events. | |
| UIColor | getThumbTintColor () const |
| The color used to tint the slider's thumb. | |
| void | setThumbTintColor (UIColor thumbTintColor) |
| The color used to tint the slider's thumb. | |
| UIColor | getMinimumTrackTintColor () const |
| The color used to tint the slider's minimum track. | |
| void | setMinimumTrackTintColor (UIColor minimumTrackTintColor) |
| The color used to tint the slider's minimum track. | |
| UIColor | getMaximumTrackTintColor () const |
| The color used to tint the slider's maximum track. | |
| void | setMaximumTrackTintColor (UIColor maximumTrackTintColor) |
| The color used to tint the slider's maximum track. | |
| bool | needsPanelToBecomeKey () const override |
The default value of this property is false. | |
| UISize | getIntrinsicContentSize () const override |
| The natural size for the receiving view, considering only properties of the view itself. | |
| void | draw (UIGraphicsContext &context, const UIRect &dirtyRect) override |
| Displays the view and all its subviews if possible. | |
| void | keyDown (const UIKeyEvent &event) override |
| Informs the receiver that the user has pressed a key. | |
| void | mouseDown (const UIMouseEvent &event) override |
| Informs the receiver that the user has pressed the left mouse button. | |
| void | mouseDragged (const UIMouseEvent &event) override |
| Informs the receiver that the user has moved the mouse with the left button pressed. | |
| void | scrollWheel (const UIMouseEvent &event) override |
| Informs the receiver that the mouse's scroll wheel has moved. | |
Public Member Functions inherited from CeresEngine::UIControl | |
| UIControl () | |
| UIControl (const UIRect &frame) | |
| ~UIControl () override | |
| const State & | getState () const noexcept |
| The state of the control, specified as a bit mask value. | |
| void | setState (const State &state) |
| The state of the control, specified as a bit mask value. | |
| bool | isEnabled () const noexcept |
| A Boolean value indicating whether the control is in the enabled state. | |
| bool | isDisabled () const noexcept |
| A Boolean value indicating whether the control is in the enabled state. | |
| void | setEnabled (bool enabled) |
| A Boolean value indicating whether the control is in the enabled state. | |
| bool | isHighlighted () const noexcept |
| A Boolean value indicating whether the control draws a highlight. | |
| void | setHighlighted (bool highlighted) |
| A Boolean value indicating whether the control draws a highlight. | |
| bool | isSelected () const noexcept |
| A Boolean value indicating whether the control is in the selected state. | |
| void | setSelected (bool selected) |
| A Boolean value indicating whether the control is in the selected state. | |
| ContentVerticalAlignment | getContentVerticalAlignment () const |
| The vertical alignment of content within the control's bounds. | |
| void | setContentVerticalAlignment (ContentVerticalAlignment contentVerticalAlignment) |
| The vertical alignment of content within the control's bounds. | |
| ContentHorizontalAlignment | getContentHorizontalAlignment () const |
| The horizontal alignment of content within the control's bounds. | |
| void | setContentHorizontalAlignment (ContentHorizontalAlignment contentHorizontalAlignment) |
| The horizontal alignment of content within the control's bounds. | |
| bool | acceptsFirstResponder () const override |
| A Boolean value that indicates whether the responder accepts first responder status. | |
| bool | becomeFirstResponder () override |
| Notifies the receiver that it's about to become first responder in its window. | |
| bool | resignFirstResponder () override |
| Notifies the receiver that it's been asked to relinquish its status as first responder in its window. | |
| void | mouseUp (const UIMouseEvent &event) override |
| Informs the receiver that the user has released the left mouse button. | |
| void | rightMouseDown (const UIMouseEvent &event) override |
| Informs the receiver that the user has pressed the right mouse button. | |
| void | rightMouseUp (const UIMouseEvent &event) override |
| Informs the receiver that the user has released the right mouse button. | |
| void | mouseMoved (const UIMouseEvent &event) override |
| Informs the receiver that the mouse has moved. | |
| void | mouseEntered (const UIMouseEvent &event) override |
| Informs the receiver that the cursor has entered a tracking rectangle. | |
| void | mouseExited (const UIMouseEvent &event) override |
| Informs the receiver that the cursor has exited a tracking rectangle. | |
Public Member Functions inherited from CeresEngine::UIView | |
| UIView () | |
Initializes new UIView object with an empty frame rectangle. | |
| UIView (const String &name) | |
Initializes new UIView object with an empty frame rectangle and custom name. | |
| UIView (const UIRect &frame, const String &name="") | |
Initializes new UIView object with a frame rectangle. | |
| UIView (const UISize &size, const String &name="") | |
Initializes new UIView object with an frame rectangle size. | |
| UIView (const UIPoint &origin, const UISize &size, const String &name="") | |
Initializes new UIView object with an frame rectangle size. | |
| 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. | |
| ~UIView () override | |
Destroys a UIView. | |
| UIView * | getSuperView () const |
| The view that is the parent of the current view. | |
| const Vector< UIView * > & | getSubViews () const |
| The list of views embedded in the current view. | |
| void | setSubViews (const Vector< UIView * > &subViews) |
| The list of views embedded in the current view. | |
| UInt32 | getSubViewCount () const noexcept |
| Gets the number of sub-views in the view. | |
| UIView * | getSubView (UInt32 index) const |
| Gets the sub-view at the given index. | |
| UInt32 | getSubViewIndex (const UIView *view) const |
| Gtes the sub-view index for the given sub-view, if it is a sub-view. | |
| void | addSubView (UIView *view) |
| Adds a view to the view's subviews so it's displayed above its siblings. | |
| void | addSubView (const UIViewPtr &view) |
| Adds a view to the view's subviews so it's displayed above its siblings. | |
| template<typename T , typename... Args> | |
| T * | addSubView (Args &&... args) |
| Adds a view to the view's subviews so it's displayed above its siblings. | |
| void | replaceSubView (UIView *view, UIView *replacement) |
| Replaces one of the view's subviews with another view. | |
| void | removeFromSuperview () |
| Unlinks the view from its superview and its window, removes it from the responder chain, and invalidates its cursor rectangles. | |
| 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, it returns false. | |
| UIView * | getOpaqueAncestor () const |
| The view's closest opaque ancestor, which might be the view itself. | |
| virtual UIWindow * | getWindow () const |
| The view's window object, if it is installed in a window. | |
| UIRect | getFrame () const |
| The view's frame rectangle, which defines its position and size in its superview's coordinate system. | |
| virtual void | setFrame (const UIRect &frame) |
| The view's frame rectangle, which defines its position and size in its superview's coordinate system. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| void | setFrameOrigin (const UIPoint &point) |
| Sets the origin of the view's frame rectangle to the specified point, effectively repositioning it within its superview. | |
| void | setFrameOrigin (const double x, const double y) |
| Sets the origin of the view's frame rectangle to the specified point, effectively repositioning it within its superview. | |
| void | setFrameSize (const UISize &size) |
| Sets the size of the view's frame rectangle to the specified dimensions, resizing it within its superview without affecting its coordinate system. | |
| 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 superview without affecting its coordinate system. | |
| UIRect | getBounds () const |
| The view's bounds rectangle, which expresses its location and size in its own coordinate system. | |
| virtual void | setBounds (const UIRect &bounds) |
| The view's bounds rectangle, which expresses its location and size in its own coordinate system. | |
| void | setBounds (const UIPoint &point, const UISize &size) |
| The view's bounds rectangle, which expresses its location and size in its own coordinate system. | |
| 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. | |
| 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. | |
| 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. | |
| void | setBoundsOrigin (const UIPoint &point) |
| Sets the origin of the view's bounds rectangle to a specified point. | |
| void | setBoundsOrigin (const double x, const double y) |
| Sets the origin of the view's bounds rectangle to a specified point. | |
| void | setBoundsSize (const UISize &size) |
| Sets the size of the view's bounds rectangle to specified dimensions, inversely scaling its coordinate system relative to its frame rectangle. | |
| void | setBoundsSize (const double width, const double height) |
| Sets the size of the view's bounds rectangle to specified dimensions, inversely scaling its coordinate system relative to its frame rectangle. | |
| virtual bool | acceptsFirstMouse (const UIEvent &theEvent) |
Overridden by subclasses to return true if the view should call mouseDown() for an initial mouse-down event, false if not. | |
| 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 specified point, or nil if that point lies completely outside the view. | |
| virtual bool | isPointInside (const UIPoint &point, const Optional< const UIEvent & > &event=nullopt) |
| Returns a Boolean value indicating whether the receiver contains the specified point. | |
| 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 flipped or not. | |
| virtual bool | getMouseDownCanMoveWindow () const |
| This property lets you determine the region by which a window can be moved. | |
| const UIAppearance & | getAppearance () const noexcept |
| The UI appearance to be used by the view. | |
| void | setAppearance (UIAppearance *appearance) |
| The UI appearance to be used by the view. | |
| UIColor | getTintColor () const |
| The first non-default tint color value in the view's hierarchy, ascending from and starting with the view itself. | |
| void | setTintColor (const UIColor &color) |
| The first non-default tint color value in the view's hierarchy, ascending from and starting with the view itself. | |
| void | clearTintColor () |
| Clears the tint color for the current view. | |
| const UIColor & | getBackgroundColor () const noexcept |
| The view's background color. | |
| void | setBackgroundColor (const UIColor &color) |
| The view's background color. | |
| const UICornerRadius & | getCornerRadius () const noexcept |
| The view's background corner radius. | |
| void | setCornerRadius (const UICornerRadius &color) |
| The view's background corner radius. | |
| double | getAlpha () const noexcept |
| This property contains the opacity value from the view's layer. | |
| void | setAlpha (double alpha) |
| This property contains the opacity value from the view's layer. | |
| bool | isOpaque () const noexcept |
| A Boolean value indicating whether the view fills its frame rectangle with opaque content. | |
| void | setOpaque (bool isOpaque) |
| A Boolean value indicating whether the view fills its frame rectangle with opaque content. | |
| UIRect | getVisibleRect () const |
| Visibility, as reflected by this property, does not account for whether other view or window objects overlap the current view or whether the current view is installed in a window at all. | |
| bool | isVisible () const |
| A Boolean value indicating whether the view is visible. | |
| void | setVisible (bool visible) |
| A Boolean value indicating whether the view is visible. | |
| bool | isHidden () const |
| A Boolean value indicating whether the view is hidden. | |
| void | setHidden (const bool hidden) |
| A Boolean value indicating whether the view is hidden. | |
| bool | isHiddenOrHasHiddenAncestor () const |
| A Boolean value indicating whether the view is hidden from sight because it, or one of its ancestors, is marked as hidden. | |
| bool | isActive () const |
| A Boolean value indicating whether the view is active. | |
| void | setActive (bool active) |
| A Boolean value indicating whether the view is active. | |
| bool | getAutoresizesSubViews () const |
| A Boolean value indicating whether the view applies the autoresizing behavior to its subviews when its frame size changes. | |
| void | setAutoresizesSubViews (bool state) |
| Generates a hash for the provided type. | |
| const UIViewAutoresizingMask & | getAutoresizingMask () const |
| The options that determine how the view is resized relative to its superview. | |
| void | setAutoresizingMask (const UIViewAutoresizingMask &autoresizingMask) |
| The options that determine how the view is resized relative to its superview. | |
| virtual void | resizeSubviews (const UISize &oldBoundsSize) |
| Informs the view's subviews that the view's bounds rectangle size has changed. | |
| virtual void | resize (const UISize &oldBoundsSize) |
| Informs the view that the bounds size of its superview has changed. | |
| bool | getNeedsLayout () const |
| A Boolean value indicating whether the view needs a layout pass before it can be drawn. | |
| void | setNeedsLayout () |
| A Boolean value indicating whether the view needs a layout pass before it can be drawn. | |
| void | setNeedsLayout (bool state) |
| A Boolean value indicating whether the view needs a layout pass before it can be drawn. | |
| void | layout () |
| Perform layout in concert with the layout system. | |
| void | layoutIfNeeded () |
| Updates the layout of the receiving view and its subviews based on the current views and constraints. | |
| virtual void | layoutSubviews () |
| Lays out subviews. | |
| virtual UISize | calculateFittingLayoutSize (const UISize &targetSize) const |
| Returns the optimal size of the view based on its current constraints. | |
| UISize | calculateMinimumLayoutSize () const |
| Returns the minimum size of the view based on its current constraints. | |
| UISize | calculateMaximumLayoutSize () const |
| Returns the maximum size of the view based on its current constraints. | |
| bool | getNeedsUpdateConstraints () const |
| A Boolean value that determines whether the view’s constraints need updating. | |
| void | setNeedsUpdateConstraints () |
| A Boolean value that determines whether the view’s constraints need updating. | |
| void | setNeedsUpdateConstraints (bool state) |
| A Boolean value that determines whether the view’s constraints need updating. | |
| virtual void | updateConstraints () |
| Updates constraints for the view. | |
| void | updateConstraintsIfNeeded () |
| Updates the constraints for the receiving view and its subviews. | |
| Span< const UILayoutConstraint > | getConstraints () const |
| Returns the constraints held by the view. | |
| void | setConstraints (Vector< UILayoutConstraint > &&constraints) |
| Returns the constraints held by the view. | |
| void | setConstraints (const Span< const UILayoutConstraint > &constraints) |
| Returns the constraints held by the view. | |
| void | addConstraint (const UILayoutConstraint &constraint) |
| Adds a constraint on the layout of the receiving view or its subviews. | |
| void | addConstraints (const Span< const UILayoutConstraint > &constraints) |
| Adds multiple constraints on the layout of the receiving view or its subviews. | |
| void | addConstraints (const InitializerList< UILayoutConstraint > constraints) |
| Adds multiple constraints on the layout of the receiving view or its subviews. | |
| void | removeConstraint (const UILayoutConstraint &constraint) |
| Removes the specified constraint from the view. | |
| void | removeConstraints (const Span< const UILayoutConstraint > &constraints) |
| Removes the specified constraints from the view. | |
| void | removeConstraints (const InitializerList< UILayoutConstraint > constraints) |
| Removes the specified constraints from the view. | |
| const UIEdgeInsets & | getLayoutMargins () const |
| The default spacing to use when laying out content in the view. | |
| void | setLayoutMargins (const UIEdgeInsets &layoutMargins) |
| The default spacing to use when laying out content in the view. | |
| double | getLayoutTopMargin () const |
| The default spacing to use when laying out content in the view. | |
| void | setTopLayoutMargin (double topLayoutMargin) |
| Generates a hash for the provided type. | |
| double | getBottomLayoutMargin () const |
| The default spacing to use when laying out content in the view. | |
| void | setBottomLayoutMargin (double bottomLayoutMargin) |
| The default spacing to use when laying out content in the view. | |
| double | getLeftLayoutMargin () const |
| The default spacing to use when laying out content in the view. | |
| void | setLeftLayoutMargin (double leftLayoutMargin) |
| The default spacing to use when laying out content in the view. | |
| double | getRightLayoutMargin () const |
| The default spacing to use when laying out content in the view. | |
| void | setRightLayoutMargin (double rightLayoutMargin) |
| The default spacing to use when laying out content in the view. | |
| void | setNeedsDisplay () |
| The displayIfNeeded methods check the value of this property to avoid unnecessary drawing, and all display methods set the value back to false when the view is up to date. | |
| void | setNeedsDisplay (const UIRect &invalidRect) |
| Marks the region of the view within the specified rectangle as needing display, increasing the view's existing invalid region to include it. | |
| bool | getNeedsDisplay () const |
| The displayIfNeeded methods check the value of this property to avoid unnecessary drawing, and all display methods set the value back to false when the view is up to date. | |
| void | display (UIGraphicsContext &context) |
| Displays the view and all its subviews if possible. | |
| void | display (UIGraphicsContext &context, const UIRect &aRect) |
Acts as display(), but confining drawing to a rectangular region of the view. | |
| void | displayIgnoringOpacity (UIGraphicsContext &context) |
| Displays the view but does not back up to the first opaque ancestor—it simply causes the view and its descendants to execute their drawing code. | |
| 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 ancestor—it simply causes the view and its descendants to execute their drawing code. | |
| void | displayIfNeeded (UIGraphicsContext &context) |
| Displays the view and all its subviews if any part of the view has been marked as needing display. | |
| void | displayIfNeeded (UIGraphicsContext &context, const UIRect &aRect) |
Acts as displayIfNeeded(), but confining drawing to a rectangular region of the view. | |
| void | displayIfNeededIgnoringOpacity (UIGraphicsContext &context) |
Acts as displayIfNeeded(), except that this method doesn’t back up to the first opaque ancestor—it simply causes the view and its descendants to execute their drawing code. | |
| 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 ancestor—it simply causes the view and its descendants to execute their drawing code. | |
| bool | canDraw () const |
| A Boolean value indicating whether drawing commands will produce any results. | |
| const Vector< UIRect > & | getRectsBeingDrawn () const |
Returns by a list of non-overlapping rectangles that define the area the view is being asked to draw in draw(). | |
| bool | needsToDraw (const UIRect &aRect) const noexcept |
| Returns a Boolean value indicating whether the specified rectangle intersects any part of the area that the view is being asked to draw. | |
| virtual bool | getClearsContextBeforeDrawing () const noexcept |
| A Boolean value that determines whether the view's bounds should be automatically cleared before drawing. | |
| virtual bool | getClipsToBounds () const |
| A Boolean value that determines whether subviews are confined to the bounds of the view. | |
| double | getContentScaleFactor () const |
| The scale factor applied to the view. | |
| void | setContentScaleFactor (const Optional< double > &contentScaleFactor) |
| The scale factor applied to the view. | |
| bool | isFirstResponder () const noexcept |
| Determines if this view is the current first responder. | |
| virtual UIScrollView * | getScrollView () const |
| Gets the closest parent scroll view to this view. | |
| virtual bool | canBecomeKeyView () const |
| When the value of this property is true, the view can become the key view. | |
| UIView * | getNextKeyView () const |
| The view object that follows the current view in the key view loop. | |
| void | setNextKeyView (UIView *nextKeyView) |
| The view object that follows the current view in the key view loop. | |
| UIView * | getNextValidKeyView () const |
The value in this property is nullptr if there is no view that follows the current view and accepts the first responder status. | |
| UIView * | getPreviousKeyView () const |
The value in this property is nullptr if there is no view preceding the current view in the key view loop. | |
| UIView * | getPreviousValidKeyView () const |
The value in this property is nullptr if there is no view that precedes the current view and accepts the first responder status. | |
| AffineTransform | getTransformFrom (const UIView *aView=nullptr) const |
| const AffineTransform & | getTransformFromWindow () const |
| AffineTransform | getTransformFromSuperView () const |
| const AffineTransform & | getTransformFromBacking () const |
| AffineTransform | getTransformTo (const UIView *aView=nullptr) const |
| const AffineTransform & | getTransformToWindow () const |
| AffineTransform | getTransformToSuperView () const |
| const AffineTransform & | getTransformToBacking () const |
| 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. | |
| UIPoint | convertFromWindow (const UIPoint &aPoint) const |
| Converts a point from the coordinate system of a given view to that of the view. | |
| UIPoint | convertFromSuperView (const UIPoint &aPoint) const |
| Converts a point from the coordinate system of a given view to that of the view. | |
| UIPoint | convertFromBacking (const UIPoint &aPoint) const |
| Converts a point from its pixel aligned backing store coordinate system to the view’s interior coordinate system. | |
| 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. | |
| UIPoint | convertToWindow (const UIPoint &aPoint) const |
| Converts a point from the view's coordinate system to that of a given view. | |
| UIPoint | convertToSuperView (const UIPoint &aPoint) const |
| Converts a point from the view's coordinate system to that of a given view. | |
| UIPoint | convertToBacking (const UIPoint &aPoint) const |
| Converts a point from the view’s interior coordinate system to its pixel aligned backing store coordinate system. | |
| UISize | convertFrom (const UISize &aSize, const UIView *aView=nullptr) const |
| Converts a size from another view's coordinate system to that of the view. | |
| UISize | convertFromWindow (const UISize &aSize) const |
| Converts a point from the coordinate system of a given view to that of the view. | |
| UISize | convertFromSuperView (const UISize &aSize) const |
| Converts a point from the coordinate system of a given view to that of the view. | |
| UISize | convertFromBacking (const UISize &aSize) const |
| Converts a size from its pixel aligned backing store coordinate system to the view’s interior coordinate system. | |
| UISize | convertTo (const UISize &aSize, const UIView *aView=nullptr) const |
| Converts a size from the view's coordinate system to that of another view. | |
| UISize | convertToWindow (const UISize &aSize) const |
| Converts a point from the view's coordinate system to that of a given view. | |
| UISize | convertToSuperView (const UISize &aSize) const |
| Converts a point from the view's coordinate system to that of a given view. | |
| UISize | convertToBacking (const UISize &aSize) const |
| Converts a size from the view’s interior coordinate system to its pixel aligned backing store coordinate system. | |
| 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. | |
| UIRect | convertFromWindow (const UIRect &aRect) const |
| Converts a point from the coordinate system of a given view to that of the view. | |
| UIRect | convertFromSuperView (const UIRect &aRect) const |
| Converts a point from the coordinate system of a given view to that of the view. | |
| UIRect | convertFromBacking (const UIRect &aRect) const |
| Converts a rectangle from its pixel aligned backing store coordinate system to the view’s interior coordinate system. | |
| UIRect | convertTo (const UIRect &aRect, const UIView *aView=nullptr) const |
| Converts a rectangle from the view's coordinate system to that of another view. | |
| UIRect | convertToWindow (const UIRect &aRect) const |
| Converts a point from the view's coordinate system to that of a given view. | |
| UIRect | convertToSuperView (const UIRect &aRect) const |
| Converts a point from the view's coordinate system to that of a given view. | |
| UIRect | convertToBacking (const UIRect &aRect) const |
| Converts a rectangle from the view’s interior coordinate system to its pixel aligned backing store coordinate system. | |
| UIViewController * | getViewController () const noexcept |
| The UIView controller, if any. | |
| const String & | getName () const |
| A human readable string that represents the view. | |
| void | setName (const String &name) |
| Generates a hash for the provided type. | |
| virtual StringView | getTypeName () const |
| A string that represents the view type. | |
| UIResponder * | getNextResponder () const final |
| The next responder after this one, or nil if it has none. | |
Public Member Functions inherited from CeresEngine::UIResponder | |
| virtual | ~UIResponder ()=default |
| virtual void | rightMouseDragged (const UIMouseEvent &event) |
| Informs the receiver that the user has moved the mouse with the right button pressed. | |
| virtual void | otherMouseDown (const UIMouseEvent &event) |
| Informs the receiver that the user has pressed a mouse button other than the left or right one. | |
| virtual void | otherMouseDragged (const UIMouseEvent &event) |
| Informs the receiver that the user has moved the mouse with a button other than the left or right button pressed. | |
| virtual void | otherMouseUp (const UIMouseEvent &event) |
| Informs the receiver that the user has released a mouse button other than the left or right button. | |
| virtual void | keyUp (const UIKeyEvent &event) |
| Informs the receiver that the user has released a key. | |
| virtual void | interpretKeyEvents (const Vector< UIKeyEvent > &events) |
| Handles a series of key events. | |
| virtual bool | performKeyEquivalent (const UIKeyEvent &event) |
| Handle a key equivalent. | |
| virtual void | flushBufferedKeyEvents () |
| Clears any unprocessed key events when overridden by subclasses. | |
| virtual void | cursorUpdate (const UIEvent &event) |
| Informs the receiver that the mouse cursor has moved into a cursor rectangle. | |
| virtual void | flagsChanged (const UIEvent &event) |
| Informs the receiver that the user has pressed or released a modifier key (Shift, Control, and so on). | |
Public Member Functions inherited from CeresEngine::RefCounted< UIView, RefCounter< false > > | |
| RefCounted (Args &&... args) | |
Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it. | |
| void | retain () noexcept |
| Retains the object by increment it's reference count by one. | |
| bool | release () noexcept |
| Relases the object by decrementing it's reference count by one. | |
Public Attributes | |
| Event< void(double)> | didChangeValue |
Public Attributes inherited from CeresEngine::UIControl | |
| Event< void()> | didGainFocus |
| A signal dispatched to a UIControl once it gains focus. | |
| Event< void()> | didLostFocus |
| A signal dispatched to a UIControl once it loses focus. | |
Public Attributes inherited from CeresEngine::UIView | |
| const UILayoutAnchor | left |
| The left side of the object's alignment rectangle. | |
| const UILayoutAnchor | right |
| The right side of the object's alignment rectangle. | |
| const UILayoutAnchor | top |
| The top of the object's alignment rectangle. | |
| const UILayoutAnchor | bottom |
| The bottom of the object's alignment rectangle. | |
| const UILayoutAnchor | width |
| The width of the object's alignment rectangle. | |
| const UILayoutAnchor | height |
| The height of the object's alignment rectangle. | |
| const UILayoutAnchor | centerX |
| The center along the x-axis of the object's alignment rectangle. | |
| const UILayoutAnchor | centerY |
| The center along the y-axis of the object's alignment rectangle. | |
| const UILayoutAnchor | lastBaseline |
| The object's baseline. | |
| const UILayoutAnchor | firstBaseline |
| The object's baseline. | |
| const UILayoutAnchor | leftMargin |
| The object's left margin. | |
| const UILayoutAnchor | rightMargin |
| The object's right margin. | |
| const UILayoutAnchor | topMargin |
| The object's top margin. | |
| const UILayoutAnchor | bottomMargin |
| The object's bottom margin. | |
| const UILayoutAnchor | centerXWithinMargins |
| The center along the x-axis between the object's left and right margin. | |
| const UILayoutAnchor | centerYWithinMargins |
| The center along the y-axis between the object's top and bottom margin. | |
Protected Member Functions | |
| double | clamp (double value) const |
| virtual UIRect | calcThumbRect (const UIRect &bounds) const |
Protected Member Functions inherited from CeresEngine::UIControl | |
| virtual void | didChangeState (const State &oldState, const State &newState) |
| A internal method called whenever the internal control state changes. | |
| virtual void | confirmAction () |
| An internal method that can be overridden by control implementations that will be triggered once the user presses the the "Return" key. | |
| virtual void | cancelAction () |
| An internal method that can be overridden by control implementations that will be triggered once the user presses the the "Esc" key. | |
Protected Member Functions inherited from CeresEngine::UIView | |
| virtual void | didAddSubview (UIView &view) |
| Overridden by subclasses to perform additional actions when subviews are added to the view. | |
| virtual void | willRemoveSubview (UIView &view) |
| Overridden by subclasses to perform additional actions before subviews are removed from the view. | |
| virtual void | didRemoveSubview (UIView &view) |
| Overridden by subclasses to perform additional actions when subviews are removed to the view. | |
| virtual void | willMoveToSuperView (UIView *superView) |
| Informs the view that its superview is about to change to the specified superview (which may be nil). | |
| virtual void | didMoveToSuperView (UIView *superView) |
| Informs the view that its superview has changed (possibly to nil). | |
| virtual void | willMoveToWindow (UIWindow *window) |
| Informs the view that it's being added to the view hierarchy of the specified window object (which may be nil). | |
| virtual void | didMoveToWindow (UIWindow *window) |
| Informs the view that it has been added to a new view hierarchy. | |
| virtual void | didHide () |
| Invoked when the view is hidden, either directly, or in response to an ancestor being hidden. | |
| virtual void | didUnhide () |
| Invoked when the view is unhidden, either directly, or in response to an ancestor being unhidden. | |
| virtual void | willDraw () |
| Informs the view that it will be required to draw content. | |
| virtual void | tintColorDidChange () |
| Called by the system when the tintColor property changes. | |
| virtual void | didChangeFrame (const UIRect &oldFrame) |
Called whenever the view frame changes, either internally or programmatically by calls to setFrame. | |
| virtual void | didChangeBounds (const UIRect &oldBounds) |
Called whenever the view bounds changes, either internally or programmatically by calls to setBounds. | |
| void | invalidateIntrinsicContentSize () |
| Invalidates the view's intrinsic content size. | |
| void | updateIntrinsicContentSize () |
Private Types | |
| using | super = UIControl |
Private Attributes | |
| double | mValue = 0.0 |
| The slider's current value. | |
| double | mMinimumValue = 0.0 |
| The minimum value of the slider. | |
| double | mMaximumValue = 1.0 |
| The maximum value of the slider. | |
| bool | mIsContinuous = true |
| A Boolean value indicating whether changes in the slider's value generate continuous update events. | |
| UIColor | mThumbTintColor |
| The color used to tint the slider's thumb. | |
| UIColor | mMinimumTrackTintColor |
| The color used to tint the slider's minimum track. | |
| UIColor | mMaximumTrackTintColor |
| The color used to tint the slider's maximum track. | |
Additional Inherited Members | |
Public Types inherited from CeresEngine::UIControl | |
| enum class | ContentVerticalAlignment { Center , Top , Bottom , Fill } |
| Constants for specifying the vertical alignment of content (text and textures) in a control. More... | |
| enum class | ContentHorizontalAlignment { Center , Left , Right , Fill , Leading , Trailing } |
| The horizontal alignment of content (text and textures) within a control. More... | |
Static Public Member Functions inherited from CeresEngine::UIResponder | |
| static void | dispatch (UIResponder *const firstResponder, const UIEvent &event) |
Dispatches a UIEvent to the given first responder. | |
A display of a bar representing a continuous range of numerical values and a knob representing the currently selected value.
A slider is a UI element that displays a range of values in the app. Sliders can be vertical or horizontal bars or circular dials. An indicator, or knob, notes the current setting. The user can move the knob in the slider's bar—or rotate the knob in a circular slider—to change the setting.
|
private |
| CeresEngine::UISlider::UISlider | ( | ) |
|
override |
|
overridevirtual |
Displays the view and all its subviews if possible.
If the view isn't opaque, this method backs up the view hierarchy to the first opaque ancestor, calculates the portion of the opaque ancestor covered by the view, and begins displaying from there.
Reimplemented from CeresEngine::UIView.
|
overridevirtual |
The natural size for the receiving view, considering only properties of the view itself.
The default width and height values of this property are set to NSViewNoInstrinsicMetric. For a custom view, you can override this property and use it to communicate what size you would like your view to be based on its content. You might do this in cases where the layout system cannot determine the size of the view based solely on its current constraints. For example, a text field might override this method and return an intrinsic size based on the text it contains. The intrinsic size you supply must be independent of the content frame, because there's no way to dynamically communicate a changed width to the layout system based on a changed height. If your custom view has no intrinsic size for a given dimension, you can set the corresponding dimension to the UIViewNoInstrinsicMetric.
Reimplemented from CeresEngine::UIView.
|
inline |
The color used to tint the slider's maximum track.
|
inline |
The maximum value of the slider.
Use this property to set the value that the trailing end of the slider represents. If you change the value of this property, and the current value of the slider is above the new maximum, the slider adjusts the value property to match the new maximum. If you set the maximum value to a value smaller than the minimum, the slider updates the minimum value to equal the maximum.
The default value of this property is 1.0.
|
inline |
The color used to tint the slider's minimum track.
|
inline |
The minimum value of the slider.
Use this property to set the value that the leading end of the slider represents. If you change the value of this property, and the current value of the slider is below the new minimum, the slider adjusts the value property to match the new minimum. If you set the minimum value to a value larger than the maximum, the slider updates the maximum value to equal the minimum.
The default value of this property is 0.0.
|
inline |
The color used to tint the slider's thumb.
|
inline |
The slider's current value.
Use this property to get and set the slider's current value.
If you try to set a value that is below the minimum or above the maximum, the minimum or maximum value is set instead. The default value of this property is 0.0.
|
inline |
A Boolean value indicating whether changes in the slider's value generate continuous update events.
If true, the slider triggers the associated event repeatedly, as the user moves the thumb. If false, the slider triggers the associated event just once, when the user releases the slider's thumb control to set the final value.
The default value of this property is true.
|
overridevirtual |
Informs the receiver that the user has pressed a key.
Reimplemented from CeresEngine::UIControl.
|
overridevirtual |
Informs the receiver that the user has pressed the left mouse button.
Reimplemented from CeresEngine::UIControl.
|
overridevirtual |
Informs the receiver that the user has moved the mouse with the left button pressed.
Reimplemented from CeresEngine::UIResponder.
|
inlineoverridevirtual |
The default value of this property is false.
Subclasses can override this property and use their implementation to determine if the view requires its panel to become the key window so that it can handle keyboard input and navigation. Such a subclass should also override acceptsFirstResponder to return true.
This property is also used in keyboard navigation. It determines if a mouse click should give focus to a view—that is, make it the first responder). Some views (for example, text fields) want to receive the keyboard focus when you click in them. Other views (for example, buttons) receive focus only when you tab to them. You wouldn't want focus to shift from a textfield that has editing in progress simply because you clicked on a check box.
Reimplemented from CeresEngine::UIView.
|
overridevirtual |
Informs the receiver that the mouse's scroll wheel has moved.
Reimplemented from CeresEngine::UIResponder.
A Boolean value indicating whether changes in the slider's value generate continuous update events.
If true, the slider triggers the associated event repeatedly, as the user moves the thumb. If false, the slider triggers the associated event just once, when the user releases the slider's thumb control to set the final value.
The default value of this property is true.
The color used to tint the slider's maximum track.
The maximum value of the slider.
Use this property to set the value that the trailing end of the slider represents. If you change the value of this property, and the current value of the slider is above the new maximum, the slider adjusts the value property to match the new maximum. If you set the maximum value to a value smaller than the minimum, the slider updates the minimum value to equal the maximum.
The default value of this property is 1.0.
The color used to tint the slider's minimum track.
The minimum value of the slider.
Use this property to set the value that the leading end of the slider represents. If you change the value of this property, and the current value of the slider is below the new minimum, the slider adjusts the value property to match the new minimum. If you set the minimum value to a value larger than the maximum, the slider updates the maximum value to equal the minimum.
The default value of this property is 0.0.
The color used to tint the slider's thumb.
The slider's current value.
Use this property to get and set the slider's current value.
If you try to set a value that is below the minimum or above the maximum, the minimum or maximum value is set instead. The default value of this property is 0.0.
|
static |
|
static |
|
static |
A Boolean value indicating whether changes in the slider's value generate continuous update events.
If true, the slider triggers the associated event repeatedly, as the user moves the thumb. If false, the slider triggers the associated event just once, when the user releases the slider's thumb control to set the final value.
The default value of this property is true.
|
private |
The color used to tint the slider's maximum track.
|
private |
The maximum value of the slider.
Use this property to set the value that the trailing end of the slider represents. If you change the value of this property, and the current value of the slider is above the new maximum, the slider adjusts the value property to match the new maximum. If you set the maximum value to a value smaller than the minimum, the slider updates the minimum value to equal the maximum.
The default value of this property is 1.0.
|
private |
The color used to tint the slider's minimum track.
|
private |
The minimum value of the slider.
Use this property to set the value that the leading end of the slider represents. If you change the value of this property, and the current value of the slider is below the new minimum, the slider adjusts the value property to match the new minimum. If you set the minimum value to a value larger than the maximum, the slider updates the maximum value to equal the minimum.
The default value of this property is 0.0.
|
private |
The color used to tint the slider's thumb.
|
private |
The slider's current value.
Use this property to get and set the slider's current value.
If you try to set a value that is below the minimum or above the maximum, the minimum or maximum value is set instead. The default value of this property is 0.0.
|
static |
|
static |
|
static |
|
static |
|
static |