Class Fox::FXKnob
In: rdoc-sources/FXKnob.rb
Parent: FXFrame

The knob widget is a valuator widget which provides simple linear value range. While being moved, the knob sends SEL_CHANGED messages to its target; at the end of the interaction, a final SEL_COMMAND message is sent. The message data represents the current knob value (an integer).

Events

The following messages are sent by FXKnob to its target:

SEL_KEYPRESS:sent when a key goes down; the message data is an FXEvent instance.
SEL_KEYRELEASE:sent when a key goes up; the message data is an FXEvent instance.
SEL_LEFTBUTTONPRESS:sent when the left mouse button goes down; the message data is an FXEvent instance.
SEL_LEFTBUTTONRELEASE:sent when the left mouse button goes up; the message data is an FXEvent instance.
SEL_MIDDLEBUTTONPRESS:sent when the middle mouse button goes down; the message data is an FXEvent instance.
SEL_MIDDLEBUTTONRELEASE:sent when the middle mouse button goes up; the message data is an FXEvent instance.
SEL_COMMAND:sent at the end of a knob move; the message data is the new value of the knob.
SEL_CHANGED:sent continuously while the knob is being moved; the message data is an integer indicating the current knob value.

Knob Control styles

KNOB_NEEDLE:Use a needle as indicator
KNOB_DOT:Use a dot as indicator
KNOB_TICKS:Show ticks around the knob
KNOB_INDICATOR:Show only the indicator (like a speedometer)
KNOB_NORMAL:Normal knob looks

Methods

getLimits   new   setLimits  

Attributes

helpText  [RW]  Help text displayed on the status line [String]
increment  [RW]  Knob auto-increment/decrement value [Integer]
knobStyle  [RW]  Knob style [Integer]
lineColor  [RW]  Indicator needle color [FXColor]
range  [RW]  Knob range [Range]
tickDelta  [RW]  Delta between ticks [Integer]
tipText  [RW]  Tooltip text value [String]
value  [RW]  Knob value [Integer]

Public Class methods

Public Instance methods

Return the knob‘s current limits as a two-element array.

Change the knob‘s movement limits (start and ending angles) Accept values in degrees from 0 (south) to 360.

[Validate]