IFlexControl
ReferencesNothing matches.
Base interface for Grasshopper UI controls. This interface defined functionality to be added to regular Control derived classes.
Properties
ContentBounds
#Gets or sets the bounding box of the content. Use an empty rectangle to indicate boundless content.
RectangleF ContentBounds { get; set; }
ContentToControl
#Gets the transformation matrix from content coordinates to control coordinates.
IMatrix ContentToControl { get; }
ControlToContent
#Gets the transformation matrix from control coordinates to content coordinates.
IMatrix ControlToContent { get; }
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
#Gets the area in control coordinates for the content of the control. This area does not include the control border, nor the scrollbars.
RectangleF InnerBounds { get; }
InnerScreenBounds
#Gets the inner bounds of this control in screen coordinates.
RectangleF InnerScreenBounds { get; }
IntegerOrigin
#Gets or sets whether this control only allows integer accuracy coordinates for the origin point.
OuterBounds
#Gets the bounds of this control in container coordinates.
RectangleF OuterBounds { get; }
ResizeBehaviour
#Gets or sets the projection behaviour of the content during control resizing events.
VisibleFrame
#Gets the rectangle in content coordinates which represents the visible portion. This basically means the InnerBounds mapped into content coordinates.
RectangleF VisibleFrame { get; }
Methods
Animate<T>
#Evaluate an animator. This method automatically schedules redraw events if those are needed for smooth animations.
Returns: Animated value.
AnimatedZoomFactor
#Gets the normalised factor (0.0, 1.0) which indicates to what extend the display is in the given state.
Returns: Normalised value.
BeginWindowSelect
#Start a window selection process. This method is typically called from within a MouseDown handler.
void BeginWindowSelect()
ComputeWrappingBounds
#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.
RectangleF ComputeWrappingBounds()
PointF
location
Hint location in control coordinates.
Returns: Wrapping bounds in control coordinates.
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.
void DrawWindowSelectionEdge()
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.
void DrawWindowSelectionEdge()
Pen
edge
Edge edge to use.
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.
void DrawWindowSelectionFill()
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.
void DrawWindowSelectionFill()
Brush
fill
Fill brush to use.
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.
void EndWindowSelect()
Map
#Map a point from one coordinate system to another.
PointF Map()
PointF
point,
Point to map.
CoordinateSystem
from,
Coordinate system in which the point is currently defined.
CoordinateSystem
to
Target coordinate system.
Returns: Mapped point.
Map
#Map a rectangle from one coordinate system to another.
RectangleF Map()
RectangleF
rectangle,
Rectangle to map.
CoordinateSystem
from,
Coordinate system in which the rectangle is currently defined.
CoordinateSystem
to
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.
ScheduleRedraw
#Schedule a redraw in the near future. Redraw will happen as quickly as possible, though the message queue will be emptied first.
void ScheduleRedraw()