Skip to content

HueBar Class

Displays the color hues on a bar.

C#
public class HueBar : ControlBase

Inheritance objectControlBase

Creates a new hue bar control.

C#
public HueBar(int width)

width int
The width of the bar.

Internal use by theme.

C#
public int _positions

The selected color.

C#
public Color SelectedColor { get; set; }

The position on the bar currently selected.

C#
public int SelectedPosition { get; }

Called as the mouse moves around the control area. Raises the MouseMove event and calls the DetermineState() method.

C#
protected override void OnMouseIn(ControlBase.ControlMouseState info)

info ControlBase.ControlMouseState

Checks if the mouse is the control and calls the appropriate mouse methods.

C#
public override bool ProcessMouse(MouseScreenObjectState info)

info MouseScreenObjectState

bool
True when the control is enabled, set to use the mouse and the mouse is over it, otherwise false.

Redraws the control if applicable.

C#
public override void UpdateAndRedraw(TimeSpan time)

time TimeSpan
The duration of thecurrent frame.

Raised when the SelectedColor value changes.

C#
public event EventHandler? ColorChanged

EventHandler