Class | Fox::FXGradientBar |
In: |
rdoc-sources/FXGradientBar.rb
|
Parent: | FXFrame |
The FXGradientBar is a control that is used to edit color gradient, such as used in texture mapping and shape filling.
The following messages are sent by FXGradientBar to its target:
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 anything about a segment changes; the message data is an integer indicating the segment number |
SEL_SELECTED: | sent when one or more segments are selected. |
SEL_DESELECTED: | sent when one or more segments are deselected. |
GRADIENTBAR_HORIZONTAL: | Gradient bar shown horizontally |
GRADIENTBAR_VERTICAL: | Gradient bar shown vertically |
GRADIENTBAR_NO_CONTROLS: | No controls shown |
GRADIENTBAR_CONTROLS_TOP: | Controls on top |
GRADIENTBAR_CONTROLS_BOTTOM: | Controls on bottom |
GRADIENTBAR_CONTROLS_LEFT: | Controls on left |
GRADIENTBAR_CONTROLS_RIGHT: | Controls on right |
GRADIENT_BLEND_LINEAR: | Linear blend |
GRADIENT_BLEND_POWER: | Power law blend |
GRADIENT_BLEND_SINE: | Sine blend |
GRADIENT_BLEND_INCREASING: | Quadratic increasing blend |
GRADIENT_BLEND_DECREASING: | Quadratic decreasing blend |
ID_LOWER_COLOR: | write me |
ID_UPPER_COLOR: | write me |
ID_BLEND_LINEAR: | write me |
ID_BLEND_POWER: | write me |
ID_BLEND_SINE: | write me |
ID_BLEND_INCREASING: | write me |
ID_BLEND_DECREASING: | write me |
ID_RECENTER: | write me |
ID_SPLIT: | write me |
ID_MERGE: | write me |
ID_UNIFORM: | write me |
barStyle | [RW] | Gradient bar style, some combination of GRADIENTBAR_HORIZONTAL, GRADIENTBAR_VERTICAL, GRADIENTBAR_NO_CONTROLS, GRADIENTBAR_CONTROLS_TOP, GRADIENTBAR_CONTROLS_BOTTOM, GRADIENTBAR_CONTROLS_LEFT and GRADIENTBAR_CONTROLS_RIGHT. |
helpText | [RW] | Status line help text [String] |
selectColor | [RW] | Selection color [FXColor] |
tipText | [RW] | Tool tip text [String] |
Return an initialized FXGradientBar instance.
Change anchor segment to seg. Use a seg value of -1 to indicate that there is no anchor segment. Raises IndexError if seg is out of bounds.
Set the blend mode for segments sglo through sghi to blend, where blend is one of GRADIENT_BLEND_LINEAR, GRADIENT_BLEND_POWER, GRADIENT_BLEND_SINE, GRADIENT_BLEND_INCREASING or GRADIENT_BLEND_DECREASING. If notify is true, a SEL_CHANGED message is sent to the gradient bar‘s message target after this change is completed.
Deselect all segments, and return true if there was a previously selected range. If notify is true, a SEL_DESELECTED message is sent to the gradient bar‘s message target after the current selection is deselected.
Return the grip in segment seg which is closest to location (x, y), one of GRIP_LOWER, GRIP_SEG_LOWER, GRIP_MIDDLE, GRIP_SEG_UPPER, GRIP_UPPER or GRIP_NONE.
Return the zero-based index of the segment containing location (x, y). Returns -1 if no matching segment was found.
Return the blend mode of segment seg, one of GRADIENT_BLEND_LINEAR, GRADIENT_BLEND_POWER, GRADIENT_BLEND_SINE, GRADIENT_BLEND_INCREASING or GRADIENT_BLEND_DECREASING. Raises IndexError if seg is out of bounds.
Return a reference to the array of gradient segments (an array of FXGradient instances).
Replace the current gradient segments with segments, an array of FXGradient instances.
Merge segments. If notify is true, a SEL_CHANGED message is sent to the gradient bar‘s message target after this change is completed.
Move lower point of segment seg to val. If notify is true, a SEL_CHANGED message is sent to the gradient bar‘s message target after the segment‘s lower value is changed. Raises IndexError if seg is out of bounds.
Move middle point of segment seg to val. If notify is true, a SEL_CHANGED message is sent to the gradient bar‘s message target after the segment‘s middle value is changed. Raises IndexError if seg is out of bounds.
Move upper point of segment seg to val. If notify is true, a SEL_CHANGED message is sent to the gradient bar‘s message target after the segment‘s upper value is changed. Raises IndexError if seg is out of bounds.
Select segment(s) fm through to and return true if the selected range is different than it was. If notify is true, a SEL_SELECTED message is sent to the gradient bar‘s message target after the current segment is changed. Raises ArgumentError if fm is greater than to, and IndexError if either fm or to is out of bounds.
Change current segment to index. Use an index of -1 to indicate that there is no current segment. If notify is true, a SEL_CHANGED message is sent to the gradient bar‘s message target after the current segment is changed. Raises IndexError if index is out of bounds.
Set lower color of the segment with index seg. If notify is true, a SEL_CHANGED message is sent to the gradient bar‘s message target after the segment‘s lower color is changed. Raises IndexError if seg is out of bounds.
Set upper color of the segment with index seg. If notify is true, a SEL_CHANGED message is sent to the gradient bar‘s message target after the segment‘s upper color is changed. Raises IndexError if seg is out of bounds.
Split segment at the midpoint If notify is true, a SEL_CHANGED message is sent to the gradient bar‘s message target after this change is completed.
Make segments uniformly distributed. If notify is true, a SEL_CHANGED message is sent to the gradient bar‘s message target after this change is completed.