GH_ColourPickerBase
Provides Colour picker GUI not tied to a control-handle.
Inheritance Hierarchy
System.Object
Grasshopper.GUI.Base.GH_ColourPickerBase
Namespace: Grasshopper.GUI.Base
Assembly: Grasshopper (in Grasshopper.dll)
Syntax
public class GH_ColourPickerBase
The GH_ColourPickerBase type exposes the following members.
Constructors
Name
Description
Public Method
GH_ColourPickerBase
Create a new instance of the Colour Picker base control. This constructor assigns the default Colour space model and involves a call to the Grasshopper core settings server. You must call SetupColourPicker() prior to rendering this control on screen.
Properties
Name
Description
Public Property
AutoSize
Gets or sets a value indicating whether the width and height of the Bounds are adjusted to fit the UI.
Public Property
BackColour
Gets or sets the background colour of the picker.
Public Property
BaseColour
Gets the original base colour for this picker. Use SetupColourPicker to assign this colour.
Public Property
Bounds
Gets or sets the Bounds for this control.
Public Property
ColourSpace
Gets the Colour space mode used in this picker.
Public Property
DesiredHeight
Gets the ideal height for this colour picker given it’s width and UI settings.
Public Property
DrawAlphaSlider
Gets or sets whether or not the alpha slider is included in the UI.
Public Property
DrawBackground
Gets or sets whether the background of the picker is drawn.
Public Property
DrawChannelSliders
Gets or sets whether or not the three basic channel sliders are included in the UI.
Public Property
DropperPreviewBox
Gets the rectangle in which the eye-dropped preview will be drawn.
Public Property
Font
Gets or sets the Font used in this Colour Picker. Do not Dispose the Font returned by this property.
Public Property
IsTextInput
Gets whether any of the slider is currently displaying a text input box.
Public Property
Padding
Gets or sets the Padding for this control.
Public Property
PickColour
Gets the picked colour.
Public Property
SRCSpaceBox
Gets the rectangle containing the eye-dropper function.
Methods
Name
Description
Public Method
Invalidate
Raise the Invalidated event.
Public Method
MouseClick
Respond to mouse-click events.
Public Method
MouseDoubleClick
Respond to mouse-doubleclick events.
Public Method
MouseDown
Respond to mouse-down events.
Public Method
MouseMove
Respond to mouse-move events.
Public Method
MouseUp
Respond to mouse-up events.
Public Method
OnColorChanged
Raise the ColorChanged event.
Public Method
Render
Render this slider into a Graphics context.
Public Method
RespondToEnter
Public Method
RespondToEscape
Public Method
SetUiScaling
Public Method
SetupColourPicker(Color, Point4d, GH_ColourSpace)
Setup all UI elements.
Public Method
SetupColourPicker(Color, Color, GH_ColourSpace)
Setup all UI elements.
Events
Name
Description
Public Event
ColorChanged
Raised whenever the color of this picker is changed due to User-Interface methods.
Public Event
Invalidated
Raised whenever a redraw is required.