Base type for container widgets that can be repositioned through pointer dragging.
More...
|
| | DraggableContainerWidget (RenderSurfaceHostBase renderSurfaceHost, DirectDrawingMode mode, PointF anchor=default, string? nickname=null) |
| | Initializes a new instance of the DraggableContainerWidget class.
|
| override void | ProcessHidden () |
| | Performs processing when the widget is hidden before notification callbacks are invoked.
|
| override void | ProcessCancelled () |
| | Performs processing when the widget is cancelled before notification callbacks are invoked.
|
| override void | ProcessPointerDown (WidgetPointerEventArgs args) |
| | Performs processing when a pointer press begins on the widget before notification callbacks are invoked.- Parameters
-
| args | The pointer event data. |
|
| override void | ProcessPointerMove (WidgetPointerEventArgs args) |
| | Performs processing when pointer movement is routed to the widget before notification callbacks are invoked.- Parameters
-
| args | The pointer event data. |
|
| override void | ProcessPointerUp (WidgetPointerEventArgs args) |
| | Performs processing when a pointer press is released for the widget before notification callbacks are invoked.- Parameters
-
| args | The pointer event data. |
|
| override bool | ShouldDispatchPointerClick (WidgetPointerEventArgs args) |
| | Determines whether a pointer-click event should be dispatched for the specified pointer event data.- Parameters
-
| args | The pointer event data. |
- Returns
true if the pointer-click event should be dispatched; otherwise, false.
|
| virtual bool | CanStartDrag (WidgetPointerEventArgs args) |
| | Determines whether a pointer-down event may begin drag tracking.
|
| virtual Vector2 | ConvertScreenDeltaToPositionDelta (Vector2 totalScreenDeltaPx, View view) |
| | Converts total screen movement into this widget's coordinate space.
|
| virtual Vector2 | ConstrainDragPosition (Vector2 proposedPositionPx) |
| | Constrains a proposed anchor position before it is applied.
|
| virtual void | OnDragStarted (WidgetDragEventArgs args) |
| | Called when dragging begins.
|
| virtual void | OnDragged (WidgetDragEventArgs args) |
| | Called after the container moves during dragging.
|
| virtual void | OnDragEnded (WidgetDragEventArgs args) |
| | Called when dragging ends.
|
| | ContainerWidget (RenderSurfaceHostBase renderSurfaceHost, DirectDrawingMode mode, PointF anchor=default, string? nickname=null) |
| | Initializes a new instance of the ContainerWidget class.
|
| TWidget | Add< TWidget > (TWidget widget, Vector2 localOffsetPx) |
| | Adds a child widget at a local offset from this container's anchor.
|
| bool | RemoveChild (WidgetBase widget, bool dispose=false) |
| | Removes a child widget from the container.
|
| override void | OnChildAdded (IDirectCompositeChild child) |
| | Called after a child has been successfully added.- Parameters
-
| child | The child that was added. |
Overrides should perform only non-throwing bookkeeping. Derived types that need additional validation should override Add, perform that validation before calling the base implementation, and then allow this callback to perform the resulting bookkeeping.
|
| override void | OnChildRemoved (IDirectCompositeChild child) |
| | Called after a child has been removed from the composite.- Parameters
-
| child | The child that was removed. |
|
| override void | ProcessShown () |
| | Performs processing when the widget is shown before notification callbacks are invoked.
|
| override void | ProcessActivated () |
| | Performs processing when the widget is activated before notification callbacks are invoked.
|
| | WidgetBase (RenderSurfaceHostBase renderSurfaceHost, DirectDrawingMode mode, PointF anchor=default, string? nickname=null) |
| | Initializes a new instance of the WidgetBase class.
|
| virtual void | ProcessPointerEnter (WidgetPointerEventArgs args) |
| | Performs processing when a pointer enters the widget before notification callbacks are invoked.
|
| virtual void | ProcessPointerLeave (WidgetPointerEventArgs args) |
| | Performs processing when a pointer leaves the widget before notification callbacks are invoked.
|
| virtual void | ProcessFocusGained () |
| | Performs processing when the widget gains focus before notification callbacks are invoked.
|
| virtual void | ProcessFocusLost () |
| | Performs processing when the widget loses focus before notification callbacks are invoked.
|
| virtual void | ProcessKeyboardInput (WidgetKeyboardEventArgs args) |
| | Performs processing when keyboard input is routed to the widget before notification callbacks are invoked.
|
| virtual void | OnShown () |
| | Called when the widget is shown.
|
| virtual void | OnHidden () |
| | Called when the widget is hidden.
|
| virtual void | OnActivated () |
| | Called when the widget is activated.
|
| virtual void | OnCancelled () |
| | Called when the widget is cancelled.
|
| virtual void | OnPointerEnter (WidgetPointerEventArgs args) |
| | Called when a pointer enters the widget bounds.
|
| virtual void | OnPointerLeave (WidgetPointerEventArgs args) |
| | Called when a pointer leaves the widget bounds.
|
| virtual void | OnPointerDown (WidgetPointerEventArgs args) |
| | Called when a pointer press begins on the widget.
|
| virtual void | OnPointerMove (WidgetPointerEventArgs args) |
| | Called when pointer movement is routed to the widget.
|
| virtual void | OnPointerUp (WidgetPointerEventArgs args) |
| | Called when a pointer press is released for the widget.
|
| virtual void | OnMouseWheel (WidgetMouseWheelEventArgs args) |
| | Called when mouse-wheel input is routed to the widget.
|
| virtual void | OnPointerClick (WidgetPointerEventArgs args) |
| | Called when a pointer click is dispatched to the widget.
|
| virtual void | OnFocusGained () |
| | Called when the widget gains focus.
|
| virtual void | OnFocusLost () |
| | Called when the widget loses focus.
|
| virtual void | OnKeyboardInput (WidgetKeyboardEventArgs args) |
| | Called when keyboard input is routed to the widget.
|
|
| bool | IsDragEnabled [get, set] |
| | Gets or sets whether new drag operations may begin.
|
| bool | IsDragging [get] |
| | Gets whether a drag operation is active.
|
| float | DragThresholdPx [get, set] |
| | Gets or sets the minimum pointer movement required to begin dragging.
|
| IReadOnlyList< WidgetBase > | ChildWidgets [get] |
| | Gets a snapshot of the child widgets directly owned by this container.
|
| bool | IsInputEnabled [get, set] |
| | Gets or sets a value indicating whether the widget can participate in input routing.
|
| bool | IsPointerInputEnabled [get, set] |
| | Gets or sets a value indicating whether the widget can receive pointer input.
|
| bool | IsKeyboardInputEnabled [get, set] |
| | Gets or sets a value indicating whether the widget can receive keyboard input.
|
| bool | CanReceiveFocus [get, set] |
| | Gets or sets a value indicating whether the widget can receive keyboard focus.
|
| bool | IsFocused [get, set] |
| | Gets a value indicating whether the widget currently has keyboard focus.
|
| Guid | Id = Guid.NewGuid() [get] |
| | Gets the unique identifier of the composite.
|
| string? | Nickname [get] |
| | Gets the optional diagnostic nickname of the composite.
|
| RenderSurfaceHostBase | RenderSurfaceHost [get] |
| | Gets the render surface host shared by the composite and its children.
|
| DirectDrawingMode | Mode [get] |
| | Gets the coordinate mode shared by the composite and its children.
|
| SceneLayer? | SceneLayer [get] |
| | Gets the scene layer shared by all children in scene-layer mode.
|
| View? | View [get] |
| | Gets the view shared by all children in view mode.
|
| ReadOnlyCollection< IDirectCompositeChild > | Children [get] |
| | Gets the children owned by the composite.
|
| MovementController | Movement [get] |
| | Gets the movement controller used to move the composite anchor.
|
| MovementSpace | PositionSpace [get] |
| | Gets the coordinate space used by the movement controller.
|
| bool | Visible [get, set] |
| | Gets or sets the visibility of all descendants.
|
| int | ZOrder [get] |
| | Gets the composite Z-order.
|
| Rectangle | ScreenBounds [get] |
| | Gets the union of all visible descendants' screen-space bounds.
|
| Rectangle | WorldBounds [get] |
| | Gets the union of all visible descendants' world-space bounds.
|
|
| override DirectComposite | Add (IDirectCompositeChild child, bool keepCurrentOffset=true, Vector2? explicitLocalOffsetPx=null) |
| | Adds a composite-compatible direct drawable as a child.- Parameters
-
| child | The child to add. |
| keepCurrentOffset | true to preserve the child's current offset from the composite anchor. |
| explicitLocalOffsetPx | The offset to use when keepCurrentOffset is false. |
- Returns
- The current composite.
- Exceptions
-
| ArgumentException | Thrown when the child uses another render surface, mode, view, or scene layer. |
| InvalidOperationException | Thrown when the child already has another parent or would create a cycle. |
|
| override DirectComposite | Remove (IDirectCompositeChild child) |
| | Removes a child without disposing it.- Parameters
-
| child | The child to detach. |
- Returns
- The current composite.
|
| override DirectComposite | Clear () |
| | Removes every child without disposing them.- Returns
- The current composite.
|
| virtual bool | HitTest (View view, Point screenPositionPx) |
| | Determines whether the widget can be hit at the specified screen position within the specified view.
|
| virtual bool | HitTest (Point screenPositionPx) |
| | Determines whether the widget can be hit at the specified screen position.
|
| WidgetBase | Show () |
| | Shows the widget and registers it for input routing.
|
| WidgetBase | Hide () |
| | Hides the widget and releases any routed input state.
|
| WidgetBase | Activate () |
| | Activates the widget and brings it to the front of the input order.
|
| WidgetBase | Cancel () |
| | Cancels the widget.
|
| | DirectComposite (RenderSurfaceHostBase renderSurfaceHost, DirectDrawingMode mode, PointF anchor=default, string? nickname=null) |
| | Initializes a new instance of the DirectComposite class.
|
| Vector2 | GetPosition () |
| | Gets the current composite anchor.
|
| void | SetPosition (Vector2 position) |
| | Sets the composite anchor and repositions all children from their stored offsets.
|
| DirectComposite | SetPosition (float x, float y) |
| | Sets the composite anchor and repositions all children from their stored offsets.
|
| DirectComposite | SetLocalOffset (IDirectCompositeChild child, Vector2 newLocalOffsetPx) |
| | Changes one child's local offset and reapplies its position.
|
| DirectComposite | SetZOrder (int zOrder) |
| | Applies one Z-order to every descendant.
|
| DirectComposite | SetOpacity (float opacity) |
| | Applies one opacity to every descendant.
|
| DirectComposite | SetIsVisible (bool visible) |
| | Applies one visibility value to every descendant.
|
| DirectComposite | FadeTo (float targetOpacity, float durationSec) |
| | Fades every descendant to the requested opacity.
|
| DirectComposite | FadeIn (float durationSec) |
| | Fades every descendant to full opacity.
|
| DirectComposite | FadeOut (float durationSec) |
| | Fades every descendant to zero opacity.
|
| RectangleF | GetDrawLocationScreen (View view) |
| | Gets the union of all visible descendants as projected through a view.
|
| void | Draw (BackbufferBase backbuffer, RectangleF destRectScreen) |
| | Performs no direct rendering because descendants render independently.
|
| virtual void | Update (long tick) |
| | Advances composite movement.
|
| virtual void | Dispose () |
| | Disposes the composite and every child it owns.
|
Base type for container widgets that can be repositioned through pointer dragging.
Definition at line 12 of file DraggableContainerWidget.cs.