ScribbleAttributes
Attributes<1>public sealed class ScribbleAttributes : Attributes<ScribbleObject>, IResponsive, IMouseDwellAttributes, ICursorAwareAttributes
Constructors
Properties
AggregateBounds
public RectangleF AggregateBounds { get; }
Gets the aggregate bounds of this object. This will include the bounds of all objects attached in some way to this object.
Implements: AggregateBounds
Bounds
public RectangleF Bounds { get; protected set; }
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.
Implements: Bounds
Owner
public T Owner { get; }
Pivot
public PointF Pivot { get; set; }
Gets or sets the pivot point for these attributes. The pivot is the main point around which the attribute geometry is positioned during layout.
Implements: Pivot
Snappable
#Other objects can snap to a scribble whenever its bounds mean something, which is when the text is axis aligned. A tilted block has bounds whose edges match nothing visible, so it offers no snapping.
Overrides: Attributes<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.
Methods
DefaultTooltipContent
Create the tooltip fields which are associated with this object by default.
Parameters:
| point (PointF) | Point for tooltip. |
| icon (out IIcon) | Icon. |
| caption (out string) | Caption text. |
| message (out string) | Message text. |
| details (out object) | Either text or an Action<Context, Rectangle> or null. |
| warnings (out bool) | Boolean flag indicating the existence of warnings. |
| errors (out bool) | Boolean flag indicating the existence of errors. |
Returns: 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).
Draw
#Overrides: Attributes<T>.Draw
Parameters:
| point (PointF) |
Implements: CursorAt
Parameters:
| control (PointF) | |
| content (PointF) |
Implements: RespondToMouseDwell
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.
Parameters:
| point (PointF) |
Implements: HandleDoubleClick
InvalidateDisplay
public virtual void 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.
Implements: InvalidateDisplay
Layout
#public override void Layout(Shape shape)
Parameters:
| shape (Shape) |
Overrides: Attributes<T>.Layout
PivotMoved
#protected override void PivotMoved(PointF oldPivot, PointF newPivot)
Parameters:
| oldPivot (PointF) | |
| newPivot (PointF) |
Overrides: Attributes<T>.PivotMoved
TooltipDetails
Override this method to return custom details for a tooltip.
Parameters:
| point (PointF) | |
| state (ObjectSolutionState) |
Returns: One of the acceptable types of data for details. For example an array of LazyStrings or a Action<Context, RectangleF>.