Class ScrollableControl
Base class for container controls that can offset controls in a view (eg. scroll panels).
Implements
Namespace: FlaxEngine.GUI
Assembly: FlaxEngine.CSharp.dll
Syntax
public class ScrollableControl : ContainerControl, IComparable, IDrawable
Constructors
ScrollableControl()
Declaration
public ScrollableControl()
Fields
_viewOffset
The view offset. Useful to offset contents of the container (used by the scrollbars and drop panels).
Declaration
protected Float2 _viewOffset
Field Value
|
Float2
|
Methods
DrawChildren()
Draws the children. Can be overridden to provide some customizations. Draw is performed with applied clipping mask for the client area.
Declaration
protected override void DrawChildren()
Overrides
IntersectsChildContent(Control, Float2, out Float2)
Checks if given point in this container control space intersects with the child control content. Also calculates result location in child control space which can be used to feed control with event at that point.
Declaration
public override bool IntersectsChildContent(Control child, Float2 location, out Float2 childSpaceLocation)
Parameters
|
Control
child
The child control to check. |
|
Float2
location
The location in this container control space. |
|
Float2
childSpaceLocation
The output location in child control space. |
Returns
|
System.Boolean
True if point is over the control content, otherwise false. |
Overrides
IntersectsContent(ref Float2, out Float2)
Checks if given location point in Parent Space intersects with the control content and calculates local position.
Declaration
public override bool IntersectsContent(ref Float2 locationParent, out Float2 location)
Parameters
|
Float2
locationParent
The location in Parent Space. |
|
Float2
location
The location of intersection in Control Space. |
Returns
|
System.Boolean
True if given point in Parent Space intersects with this control content, otherwise false. |
Overrides
OnViewOffsetChanged()
Called when view offset gets changed.
Declaration
protected virtual void OnViewOffsetChanged()
PointFromParent(ref Float2)
Converts point in parent control coordinates into local control's space.
Declaration
public override Float2 PointFromParent(ref Float2 location)
Parameters
|
Float2
location
|
Returns
|
Float2
The converted point location in control's space. |
Overrides
PointToParent(ref Float2)
Converts point in local control's space into parent control coordinates.
Declaration
public override Float2 PointToParent(ref Float2 location)
Parameters
|
Float2
location
The input location of the point to convert. |
Returns
|
Float2
The converted point location in parent control coordinates. |
Overrides
SetViewOffset(ref Float2)
Sets the view offset.
Declaration
protected virtual void SetViewOffset(ref Float2 value)
Parameters
|
Float2
value
The value. |