NumberSlider

BarItem
public sealed class NumberSlider : BarItem
A numeric slider.

Constructors

NumberSlider

#
public NumberSlider(Nomen nomen, UiNumber number, Action<decimal> callback = null)
Create a new tool bar number slider.
nomen (Nomen)Nomen.
number (UiNumber)Slider value and limits.
callback (Action<decimal> = null)Callback method for state changes.

Properties

AdjacentOnLeftSide

#
public override bool AdjacentOnLeftSide { get; }

AdjacentOnRightSide

#
public override bool AdjacentOnRightSide { get; }

Bar

public Bar Bar { get; }
Gets the toolbar this element is hosted on. This field may be null, but will be assigned by the Bar itself once this element is added to it.
inherited fromBarItem

Bounds

public Rectangle Bounds { get; }
Gets the visible bounds for this element. These bounds are set by the BarItem.Bar during layout.
inherited fromBarItem

Enabled

public bool Enabled { get; set; }
Gets or sets whether this element is enabled. Note that if the parent toolbar is disabled, this element is disabled by implication. Thus, use the BarItem.IsEnabled() function to determine the real state.
inherited fromBarItem

Icon

public IIcon Icon { get; }
Gets the icon, if any, associated with this element.
inherited fromBarItem

KeyCode

public BarShortcut KeyCode { get; set; }
Gets or sets the shortcut key for this element. Whether or not this is actually used depends on the form hosting this toolbar.
inherited fromBarItem

MaximumWidth

public int MaximumWidth { get; }
Gets the maximum width (in logical pixels) for this element.
inherited fromBarItem

MinimumWidth

public int MinimumWidth { get; }
Gets the minimum width (in logical pixels) for this element.
inherited fromBarItem

Nomen

public Nomen Nomen { get; }
Gets the nomen describing this element.
inherited fromBarItem

OffColour

public Color? OffColour { get; set; }
Gets or sets the colour associated with the Off state, whenever meaningful.
inherited fromBarItem

OnColour

public Color? OnColour { get; set; }
Gets or sets the colour associated with the On state, whenever meaningful.
inherited fromBarItem

Slider

#
public Slider Slider { get; }
Gets the slider hosted in this element.

Methods

CreateOutline

protected GraphicsPath CreateOutline()
inherited fromBarItem

CreateOutline

protected GraphicsPath CreateOutline(bool roundedOnLeft, bool roundedOnRight)
Create a new graphics path representing the outline of this item.
inherited fromBarItem
roundedOnLeft (bool)True if path ought to have rounded corners on the left.
roundedOnRight (bool)True if the path ought to have rounded corners on the right.

Draw

public void Draw(Context context)
inherited fromBarItem
context (Context)

DrawDisabled

#
protected override void DrawDisabled(Context context)
context (Context)

DrawFocus

#
protected override void DrawFocus(Context context)
context (Context)

DrawHover

#
protected override void DrawHover(Context context)
context (Context)

DrawIcon

protected bool DrawIcon(Context context, IIcon icon, Rectangle frame, Color background)
Draw the icon (if any) into the given frame. An automatical 2-pixel paddding is created inside the frame.
inherited fromBarItem
context (Context)
icon (IIcon)
frame (Rectangle)
background (Color)
True if an icon was drawn.

DrawIcon

protected bool DrawIcon(Context context, Rectangle frame, Color background)
Draw the icon (if any) into the given frame. An automatical 2-pixel paddding is created inside the frame.
inherited fromBarItem
context (Context)
frame (Rectangle)
background (Color)
True if an icon was drawn.

DrawIconAndText

protected bool DrawIconAndText(Context context, IconTextStyle style, string text, Color background)
inherited fromBarItem
context (Context)
style (IconTextStyle)
text (string)
background (Color)

DrawNormal

#
protected override void DrawNormal(Context context)
context (Context)

DrawText

protected bool DrawText(Context context, Rectangle frame, string text, Color background)
Draw a string into the frame.
inherited fromBarItem
context (Context)
frame (Rectangle)
text (string)
background (Color)

FindGroupByChapter<T>

protected T[] FindGroupByChapter<T>()
Collect all toolbar elements which share the same nomen chapter as this element. If there is only a single element (i.e. this one) then an empty array is returned.
inherited fromBarItem

FindGroupBySection<T>

protected T[] FindGroupBySection<T>()
Collect all toolbar elements which share the same nomen section as this element, across every bar in the same Bar.Bundle. If there is only a single element (i.e. this one) then an empty array is returned.
inherited fromBarItem

HasNeighbourToTheLeft

protected bool HasNeighbourToTheLeft()
Gets whether the item directly to the left of this item has an outline shape adjacent to this item.
inherited fromBarItem

HasNeighbourToTheRight

protected bool HasNeighbourToTheRight()
Gets whether the item directly to the right of this item has an outline shape adjacent to this item.
inherited fromBarItem

IsEnabled

public bool IsEnabled()
Gets whether both this element and the bar it belongs to are enabled.
inherited fromBarItem

KeyDown

#
public override Response KeyDown(KeyEventArgs e)
e (KeyEventArgs)
BarItem.KeyDown

KeyUp

#
public override Response KeyUp(KeyEventArgs e)
e (KeyEventArgs)
BarItem.KeyUp

Layout

#
protected override void Layout()
BarItem.Layout

MouseDoubleClick

public virtual Response MouseDoubleClick(MouseEventArgs e)
inherited fromBarItem
e (MouseEventArgs)

MouseDown

#
public override Response MouseDown(MouseEventArgs e)
e (MouseEventArgs)

MouseLeave

#
public override Response MouseLeave(MouseEventArgs e)
e (MouseEventArgs)

MouseMove

#
public override Response MouseMove(MouseEventArgs e)
e (MouseEventArgs)

MouseUp

#
public override Response MouseUp(MouseEventArgs e)
e (MouseEventArgs)
BarItem.MouseUp

NeighbourToTheLeft

protected BarItem NeighbourToTheLeft(bool skipSpacers = false)
Gets whether this toolbar element has a neighbour directly to its left.
inherited fromBarItem
skipSpacers (bool = false)

NeighbourToTheRight

protected BarItem NeighbourToTheRight(bool skipSpacers = false)
Gets whether this toolbar element has a neighbour directly to its right.
inherited fromBarItem
skipSpacers (bool = false)

OverrideInfo

public void OverrideInfo(string newInfo)
Override the info of the BarItem.Nomen field.
inherited fromBarItem
newInfo (string)New info to assign.

OverrideText

public void OverrideText(string newName)
Override the name of the BarItem.Nomen field.
inherited fromBarItem
newName (string)New name to assign.

SetSizeLimits

public void SetSizeLimits(int minimum, int maximum)
Set the minimum and maximum width limits.
inherited fromBarItem
minimum (int)
maximum (int)

ShowTooltipAt

#
public override bool ShowTooltipAt(PointF location)
location (PointF)

TextInput

public virtual Response TextInput(TextInputEventArgs e)
inherited fromBarItem
e (TextInputEventArgs)

Events

StateChanged

#
public event EventHandler<decimal> StateChanged
Raised whenever the toggle changes.