IFlexControl
ReferencesNothing matches.
Base interface for Grasshopper UI controls. This interface defined functionality to be added to regular Control derived classes.
Properties
ContentBounds
#RectangleF ContentBounds { get; set; }
Gets or sets the bounding box of the content. Use an empty rectangle to indicate boundless content.
ContentToControl
#IMatrix ContentToControl { get; }
Gets the transformation matrix from content coordinates to control coordinates.
ControlToContent
#IMatrix ControlToContent { get; }
Gets the transformation matrix from control coordinates to content coordinates.
DrawEndTime
#Gets the end of the most recent drawing pass. If a drawing is currently in progress, DateTime.Max is returned as it is not yet known when the pass will end.
DrawScrollbars
#Gets whether this control should display scrollbars when needed. Scrollbars will only be displayed when the content exceeds the inner bounds.
InnerBounds
#RectangleF InnerBounds { get; }
Gets the area in control coordinates for the content of the control. This area does not include the control border, nor the scrollbars.
InnerScreenBounds
#RectangleF InnerScreenBounds { get; }
Gets the inner bounds of this control in screen coordinates.
IntegerOrigin
#Gets or sets whether this control only allows integer accuracy coordinates for the origin point.
OuterBounds
#RectangleF OuterBounds { get; }
Gets the bounds of this control in container coordinates.
ResizeBehaviour
#Gets or sets the projection behaviour of the content during control resizing events.
VisibleFrame
#RectangleF VisibleFrame { get; }
Gets the rectangle in content coordinates which represents the visible portion. This basically means the InnerBounds mapped into content coordinates.
Methods
Animate<T>
#Evaluate an animator. This method automatically schedules redraw events if those are needed for smooth animations.
Parameters:
| animated (Animated<T>) | Animator to evaluate. |
Returns: Animated value.
AnimatedZoomFactor
#Gets the normalised factor (0.0, 1.0) which indicates to what extend the display is in the given state.
Parameters:
| threshold (ZoomThreshold) | Threshold. |
Returns: Normalised value.
BeginWindowSelect
#void BeginWindowSelect()
Start a window selection process. This method is typically called from within a MouseDown handler.
ComputeWrappingBounds
#RectangleF ComputeWrappingBounds(PointF location)
Determine the implied wrapping bounds given the control and the screen containing the location. The wrapping bounds are either the bounds of the screen containing the location, or the intersection of the screen containing the location and the bounds of the control if this intersection is not empty.
Parameters:
| location (PointF) | Hint location in control coordinates. |
Returns: Wrapping bounds in control coordinates.
DrawWindowSelectionEdge
#void DrawWindowSelectionEdge()
If a window selection is currently in progress, draw the fill of that window selection fence. By calling this method you override the default window selection drawing pipeline, which allows you to have finer control over the layering of the window rectangle background and foreground.
DrawWindowSelectionEdge
#void DrawWindowSelectionEdge(Pen edge)
If a window selection is currently in progress, draw the fill of that window selection fence. By calling this method you override the default window selection drawing pipeline, which allows you to have finer control over the layering of the window rectangle background and foreground.
Parameters:
| edge (Pen) | Edge edge to use. |
DrawWindowSelectionFill
#void DrawWindowSelectionFill()
If a window selection is currently in progress, draw the fill of that window selection fence. By calling this method you override the default window selection drawing pipeline, which allows you to have finer control over the layering of the window rectangle background and foreground.
DrawWindowSelectionFill
#void DrawWindowSelectionFill(Brush fill)
If a window selection is currently in progress, draw the fill of that window selection fence. By calling this method you override the default window selection drawing pipeline, which allows you to have finer control over the layering of the window rectangle background and foreground.
Parameters:
| fill (Brush) | Fill brush to use. |
EndWindowSelect
#void EndWindowSelect()
If, for any reason, you wish to terminate a window selection process prematuraly, call this method. A window selection process will automatically end on the next mouseup.
Map
#PointF Map(PointF point, CoordinateSystem from, CoordinateSystem to)
Map a point from one coordinate system to another.
Parameters:
| point (PointF) | Point to map. |
| from (CoordinateSystem) | Coordinate system in which the point is currently defined. |
| to (CoordinateSystem) | Target coordinate system. |
Returns: Mapped point.
Map
#RectangleF Map(RectangleF rectangle, CoordinateSystem from, CoordinateSystem to)
Map a rectangle from one coordinate system to another.
Parameters:
| rectangle (RectangleF) | Rectangle to map. |
| from (CoordinateSystem) | Coordinate system in which the rectangle is currently defined. |
| to (CoordinateSystem) | Target coordinate system. |
Returns: Mapped rectangle.
RegisterIResponsive
#Add a responsive object to this control. Responsive objects which have been properly registered will automatically have their response methods invoked in case of mouse/keybaord events on the control. The object will not be drawn though, that is the responsibility of the owner.
Parameters:
| responsive (IResponsive) | Responsive to add. |
ScheduleRedraw
#void ScheduleRedraw()
Schedule a redraw in the near future. Redraw will happen as quickly as possible, though the message queue will be emptied first.
ScheduleRedraw
#Schedule a redraw at a roughly defined delay.
Parameters:
| delay (TimeSpan) | Time until redraw after the current drawing operation completes. |
UnregisterIResponsive
#Remove a responsive object from this control.
Parameters:
| responsive (IResponsive) | Responsive object to remove. |