Class | Fox::FXDial |
In: |
rdoc-sources/FXDial.rb
|
Parent: | FXFrame |
The Dial widget is a valuator widget which is able to provide a cyclic value range when the DIAL_CYCLIC is passed, or a simple linear value range. While being turned, the dial sends a SEL_CHANGED message to its target; at the end of the interaction, a SEL_COMMAND message is sent. The message data represents the current value (an integer). The options DIAL_VERTICAL and DIAL_HORIZONTAL control the orientation of the dial. An optional notch can be used to indicate the zero-position of the dial; display of the notch is controlled by the DIAL_HAS_NOTCH option.
The following messages are sent by FXDial 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_CHANGED: | sent when the dial‘s value changes; the message data is the new value (an integer). |
SEL_COMMAND: | sent when the user stops changing the dial‘s value and releases the mouse button; the message data is the new value (an integer). |
DIAL_VERTICAL: | Vertically oriented |
DIAL_HORIZONTAL: | Horizontal oriented |
DIAL_CYCLIC: | Value wraps around |
DIAL_HAS_NOTCH: | Dial has a Center Notch |
DIAL_NORMAL: | same a DIAL_VERTICAL |
dialStyle | [RW] | Current dial style [Integer] |
helpText | [RW] | Status line help text for this dial [String] |
notchColor | [RW] | Center notch color [FXColor] |
notchOffset | [RW] | The notch offset is the position of the center notch; the value should be tenths of degrees in the range [-3600,3600]. [Integer] |
notchSpacing | [RW] | The spacing for the small notches; this should be set in tenths of degrees in the range [1,3600], and the value should be a divisor of 3600, so as to make the notches come out evenly. [Integer] |
range | [RW] | Dial range [Range] |
revolutionIncrement | [RW] | The revolution increment is the amount of change in the position for revolution of the dial; the dial may go through multiple revolutions to go through its whole range. By default it takes one 360 degree turn of the dial to go from the lower to the upper range. [Integer] |
tipText | [RW] | Tool tip message for this dial |
value | [RW] | Dial value [Integer] |
Construct a dial widget
p: | parent widget for this dial [FXComposite] |
target: | message target object for this dial [FXObject] |
selector: | message identifier [Integer] |
opts:: x:: y:: width:: height:: padLeft:: padRight:: padTop:: padBottom::
Set the dial‘s range. If notify is true, and the range modification causes the dial‘s value to change, a SEL_COMMAND message is sent to the dial‘s message target after the value is changed.