Constructors

NumberSliderAttributes

#
Create new number slider attributes.
public NumberSliderAttributes()

Properties

AggregateBounds

Gets the aggregate bounds of this object. This will include the bounds of all objects attached in some way to this object.
public RectangleF AggregateBounds { get; }
inherited fromAttributes<T>
AggregateBounds

AllowVerticalResize

Gets whether these attributes can be resized vertically.
public virtual bool AllowVerticalResize { get; }
inherited fromUserInputAttributes<T>

Bounds

Gets the total outer bounds of the attributes. The attributes are assumed not to exist beyond this limit. Note that the bounds are updated during calls to Layout(), so may be out-of-date or even unset when called outside of the usual process.
public RectangleF Bounds { get; protected set; }
inherited fromAttributes<T>
Bounds

DrawOnTop

#
protected override bool DrawOnTop { get; }

HasInlet

public override bool HasInlet { get; }
inherited fromUserInputAttributes<T>

HasOutlet

public override bool HasOutlet { get; }
inherited fromUserInputAttributes<T>

HostingBounds

Gets the hosting bounds as currently layed out.
protected RectangleF HostingBounds { get; }
inherited fromUserInputAttributes<T>

Inlet

public override PointF Inlet { get; }
inherited fromUserInputAttributes<T>

IntegerPivot

Gets whether the pivot of these attributes is always rounded to integer coordinates. By default this property returns true, as the vast majority of objects ought to be laid out in integer coordinates.
protected virtual bool IntegerPivot { get; }
inherited fromAttributes<T>

MaximumHeightUnits

Gets the maximum number of height units for resizable attributes. By default this value is 10.
public virtual int MaximumHeightUnits { get; }
inherited fromUserInputAttributes<T>

MinimumHostingWidth

#
public override int MinimumHostingWidth { get; }

Outlet

public override PointF Outlet { get; }
inherited fromUserInputAttributes<T>

Owner

public T Owner { get; }
inherited fromAttributes<T>

Pivot

Gets or sets the pivot point for these attributes. The pivot is the main point around which the attribute geometry is positioned during layout.
public PointF Pivot { get; set; }
inherited fromAttributes<T>
Pivot

Responder

Gets the Responses dispatcher for these attributes. Subclasses can subscribe to the hook events on the returned object to extend interaction behaviour beyond what the UserInputAttributes<T>.HostMouseDown(ResponseMouseArgs) family covers.
public Responses Responder { get; }
inherited fromUserInputAttributes<T>
Responder

ShowUiButton

public bool ShowUiButton { get; }
inherited fromUserInputAttributes<T>

Snappable

Gets whether these attributes can be used to align other objects on the canvas. Return false specifically when your object shape is not rectangular.
public virtual bool Snappable { get; }
inherited fromAttributes<T>
Snappable

Stack

The horizontal layout stack along the apex row. Derived classes typically (re)assign this during Attributes<T>.Layout(Shape) and reference sub-regions via class-local index constants. The default Attributes<T>.PivotMoved(PointF, PointF) translates the stack along with Attributes<T>.Bounds.
protected StackF Stack { get; set; }
inherited fromAttributes<T>

UiButtonBounds

Gets the bounds of the UI popup button. Empty if the button is not shown. Exposed so external consumers (such as canvas hints) can target the button without reaching into the protected layout stack.
public RectangleF UiButtonBounds { get; }
inherited fromUserInputAttributes<T>

VerticalUnits

public int VerticalUnits { get; set; }
inherited fromUserInputAttributes<T>

Methods

DefaultTooltipContent

Create the tooltip fields which are associated with this object by default.
protected bool DefaultTooltipContent(
PointF
point,
Point for tooltip.
out IIcon
icon,
Icon.
out string
caption,
Caption text.
out string
message,
Message text.
out object
details,
Either text or an Action<Context, Rectangle> or null.
out bool
warnings,
Boolean flag indicating the existence of warnings.
out bool
errors
Boolean flag indicating the existence of errors.
)
inherited fromAttributes<T>
True if a tooltip ought to be shown for this object at the given location.

Draw

Internal drawing method. Consider overriding this one instead of Attributes<T>.Draw(Context, Skin).
protected virtual void Draw(
context,
Graphics context.
skin,
Skin.
capsule
Provided as a courtesy. There is no expectation this is the shape that must be drawn.
)
inherited fromAttributes<T>

Draw

public override void Draw(
context,
skin
)
inherited fromUserInputAttributes<T>

DrawHostedControl

#
protected override void DrawHostedControl(
context,
skin,
RectangleF
bounds
)

HandleDoubleClick

Handle a double click operation on these attributes. Since this is such a common operation it is provided by the base interface, rather than requiring an IResponseAttribues implementation.
public virtual bool HandleDoubleClick(
PointF
point
)
inherited fromAttributes<T>
HandleDoubleClick

HostCursorAt

Override to supply a cursor for a point over the hosted control, e.g. hover feedback over interactive elements the host draws. Called by the ICursorAwareAttributes implementation once the resize-grip cursors have been ruled out. Return null (the default) for the standard cursor.
protected virtual Cursor HostCursorAt(
PointF
point
Cursor location in content coordinates.
)
inherited fromUserInputAttributes<T>

HostingBoundsChanged

#
protected override void HostingBoundsChanged(
RectangleF
newBounds
)

HostKeyDown

#
protected override Response HostKeyDown(
KeyEventArgs
e
)

HostKeyUp

#
protected override Response HostKeyUp(
KeyEventArgs
e
)

HostMouseDoubleClick

#
protected override Response HostMouseDoubleClick()

HostMouseDown

#
protected override Response HostMouseDown()

HostMouseDrag

#
protected override Response HostMouseDrag()

HostMouseLeave

Override to react to the cursor moving off this attribute, e.g. by clearing any cached mouseover index. Default: no-op.
protected virtual void HostMouseLeave()
inherited fromUserInputAttributes<T>

HostMouseOver

Override to respond to mouseover cursor motion (no buttons held). Called on every cursor motion while the cursor is coincident with this attribute. Default: no-op.
protected virtual void HostMouseOver(
e
Mouse event in content coordinates.
)
inherited fromUserInputAttributes<T>

HostMouseSingleClick

protected virtual Response HostMouseSingleClick()
inherited fromUserInputAttributes<T>

HostMouseUp

#
protected override Response HostMouseUp()

HostRotation

#
protected override Response HostRotation()

Intersects

Test whether a given rectangle intersects the shape of these attributes.
public virtual bool Intersects(
RectangleF
box
Intersection box.
)
inherited fromAttributes<T>
True if rectangle intersects these attributes.
Intersects

InvalidateDisplay

Signals that the attribute's visual appearance has changed without affecting layout. Fires the owner's DocumentObject.OnDisplayChanged(), which propagates through the document to the canvas redraw subscription.
public virtual void InvalidateDisplay()
inherited fromAttributes<T>
InvalidateDisplay

InvalidateLayout

Marks the layout as dirty so it gets recomputed on the next draw cycle. Subclasses typically flip an internal _layoutValid flag. Most callers should also raise OnLayoutChanged on the owner to actually trigger a canvas redraw.
public override void InvalidateLayout()
inherited fromUserInputAttributes<T>

IsCoincident

Test whether a given point is considered to be on the interior of these attributes.
public virtual bool IsCoincident(
PointF
point
Test point.
)
inherited fromAttributes<T>
True if point is on the object.
IsCoincident

IsContained

Test whether the shape of these attributes is fully contained within a given rectangle.
public virtual bool IsContained(
RectangleF
box
Containment box.
)
inherited fromAttributes<T>
True if rectangle contains these attributes.
IsContained

Layout

public override void Layout(
Shape
shape
)
inherited fromUserInputAttributes<T>

Move

Move these attributes a certain amount in X and Y.
public virtual void Move(
dx,
Motion in X. Positive is towards the right.
dy
Motion in Y. Positive is downwards.
)
inherited fromAttributes<T>
Move

PivotMoved

Override this method if your attributes need to handle pivot motion. The default implementation translates Bounds and Stack by the pivot delta. Overrides should typically chain to this base implementation.
protected override void PivotMoved(
PointF
oldPivot,
PointF
newPivot
)
inherited fromUserInputAttributes<T>

ShowTooltipAt

public override bool ShowTooltipAt(
PointF
point
)
inherited fromUserInputAttributes<T>

ShowUi

Override this method to handle clicks on the UI button.
protected virtual void ShowUi()
inherited fromUserInputAttributes<T>

TooltipDetails

Override this method to return custom details for a tooltip.
protected virtual object TooltipDetails(
PointF
point,
state
)
inherited fromAttributes<T>
One of the acceptable types of data for details. For example an array of LazyStrings or a Action<Context, RectangleF>.