![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXGradientBar.h>
The gradient bar is a control that is used to edit color gradient, such as used in texture mapping and shape filling.
See also:
anonymous enum |
FX::FXGradientBar::FXGradientBar | ( | FXComposite * | p, |
FXObject * | tgt = NULL , |
||
FXSelector | sel = 0 , |
||
FXuint | opts = FRAME_NORMAL , |
||
FXint | x = 0 , |
||
FXint | y = 0 , |
||
FXint | w = 0 , |
||
FXint | h = 0 , |
||
FXint | pl = DEFAULT_PAD , |
||
FXint | pr = DEFAULT_PAD , |
||
FXint | pt = DEFAULT_PAD , |
||
FXint | pb = DEFAULT_PAD |
||
) |
Construct a gradient bar.
virtual FX::FXGradientBar::~FXGradientBar | ( | ) | [virtual] |
Destructor.
virtual void FX::FXGradientBar::create | ( | ) | [virtual] |
Create server-side resources.
Reimplemented from FX::FXWindow.
virtual void FX::FXGradientBar::layout | ( | ) | [virtual] |
Perform layout.
Reimplemented from FX::FXWindow.
virtual FXint FX::FXGradientBar::getDefaultWidth | ( | ) | [virtual] |
Return default width.
Reimplemented from FX::FXFrame.
virtual FXint FX::FXGradientBar::getDefaultHeight | ( | ) | [virtual] |
Return default height.
Reimplemented from FX::FXFrame.
FXint FX::FXGradientBar::getSegment | ( | FXint | x, |
FXint | y | ||
) | const |
Obtain segment containing location x, y.
Returns -1 if no matching segment was found.
FXint FX::FXGradientBar::getGrip | ( | FXint | sg, |
FXint | x, | ||
FXint | y | ||
) | const |
Get the grip in segment sg which is closest to location (x, y), one of GRIP_LOWER, GRIP_SEG_LOWER, GRIP_MIDDLE, GRIP_SEG_UPPER, GRIP_UPPER or GRIP_NONE.
FXint FX::FXGradientBar::getNumSegments | ( | ) | const [inline] |
Return the number of segments.
void FX::FXGradientBar::setGradients | ( | const FXGradient * | segments, |
FXint | nsegments | ||
) |
Replace the current gradient segments.
The gradient bar makes a copy of the input segments array.
void FX::FXGradientBar::getGradients | ( | FXGradient *& | segments, |
FXint & | nsegments | ||
) | const |
Return a copy of the gradient segments.
The array of segments is allocated using FXMALLOC and should be freed by the caller using FXFREE.
void FX::FXGradientBar::setCurrentSegment | ( | FXint | index, |
FXbool | notify = FALSE |
||
) |
Change current segment.
FXint FX::FXGradientBar::getCurrentSegment | ( | ) | const [inline] |
Return current segment, or -1 if there is no current segment.
void FX::FXGradientBar::setAnchorSegment | ( | FXint | index | ) |
Change anchor segment.
FXint FX::FXGradientBar::getAnchorSegment | ( | ) | const [inline] |
Return anchor segment, or -1 if there is no anchor segment.
FXbool FX::FXGradientBar::selectSegments | ( | FXint | fm, |
FXint | to, | ||
FXbool | notify = FALSE |
||
) |
Select segment(s)
FXbool FX::FXGradientBar::deselectSegments | ( | FXbool | notify | ) |
Deselect all segments.
FXbool FX::FXGradientBar::isSegmentSelected | ( | FXint | s | ) | const |
Returns TRUE if the specified segment is selected.
void FX::FXGradientBar::setSegmentLowerColor | ( | FXint | s, |
FXColor | clr, | ||
FXbool | notify = FALSE |
||
) |
Set lower color of a segment.
void FX::FXGradientBar::setSegmentUpperColor | ( | FXint | s, |
FXColor | clr, | ||
FXbool | notify = FALSE |
||
) |
Set upper color of a segment.
FXColor FX::FXGradientBar::getSegmentLowerColor | ( | FXint | s | ) | const |
Get lower color of a segment.
FXColor FX::FXGradientBar::getSegmentUpperColor | ( | FXint | s | ) | const |
Get upper color of a segment.
void FX::FXGradientBar::moveSegmentLower | ( | FXint | sg, |
FXdouble | val, | ||
FXbool | notify = FALSE |
||
) |
Move lower point of segment sg.
void FX::FXGradientBar::moveSegmentMiddle | ( | FXint | sg, |
FXdouble | val, | ||
FXbool | notify = FALSE |
||
) |
Move middle point of segment sg.
void FX::FXGradientBar::moveSegmentUpper | ( | FXint | sg, |
FXdouble | val, | ||
FXbool | notify = FALSE |
||
) |
Move upper point of segment sg.
void FX::FXGradientBar::moveSegments | ( | FXint | sglo, |
FXint | sghi, | ||
FXdouble | val, | ||
FXbool | notify = FALSE |
||
) |
Move segments sglo to sghi to new position val.
FXdouble FX::FXGradientBar::getSegmentLower | ( | FXint | sg | ) | const |
Get lower value of segment sg.
FXdouble FX::FXGradientBar::getSegmentMiddle | ( | FXint | sg | ) | const |
Get middle value of segment sg.
FXdouble FX::FXGradientBar::getSegmentUpper | ( | FXint | sg | ) | const |
Get upper value of segment sg.
void FX::FXGradientBar::gradient | ( | FXColor * | ramp, |
FXint | nramp | ||
) |
Get gradient ramp.
The ramp argument should be an array of size nramp, which will be filled with the appropriate color values.
FXuint FX::FXGradientBar::getSegmentBlend | ( | FXint | s | ) | const |
Get blend mode of segment, one of GRADIENT_BLEND_LINEAR, GRADIENT_BLEND_POWER, GRADIENT_BLEND_SINE, GRADIENT_BLEND_INCREASING, or GRADIENT_BLEND_DECREASING.
void FX::FXGradientBar::splitSegments | ( | FXint | sglo, |
FXint | sghi, | ||
FXbool | notify = FALSE |
||
) |
Split segment at the midpoint.
void FX::FXGradientBar::mergeSegments | ( | FXint | sglo, |
FXint | sghi, | ||
FXbool | notify = FALSE |
||
) |
Merge segments.
void FX::FXGradientBar::uniformSegments | ( | FXint | sglo, |
FXint | sghi, | ||
FXbool | notify = FALSE |
||
) |
Make segments uniformly distributed.
void FX::FXGradientBar::blendSegments | ( | FXint | sglo, |
FXint | sghi, | ||
FXuint | blend = GRADIENT_BLEND_LINEAR , |
||
FXbool | notify = FALSE |
||
) |
Change blend mode of segment.
FXuint FX::FXGradientBar::getBarStyle | ( | ) | const |
Get the gradient bar style.
void FX::FXGradientBar::setBarStyle | ( | FXuint | style | ) |
Change the gradient bar style.
void FX::FXGradientBar::setSelectColor | ( | FXColor | clr | ) |
Set color.
FXColor FX::FXGradientBar::getSelectColor | ( | ) | const [inline] |
Get color.
void FX::FXGradientBar::setHelpText | ( | const FXString & | text | ) | [inline] |
Set status line help text for this gradient bar.
const FXString& FX::FXGradientBar::getHelpText | ( | ) | const [inline] |
Get status line help text for this gradient bar.
void FX::FXGradientBar::setTipText | ( | const FXString & | text | ) | [inline] |
Set tool tip message for this gradient bar.
const FXString& FX::FXGradientBar::getTipText | ( | ) | const [inline] |
Get tool tip message for this gradient bar.
virtual void FX::FXGradientBar::save | ( | FXStream & | store | ) | const [virtual] |
Save gradient bar to a stream.
Reimplemented from FX::FXFrame.
virtual void FX::FXGradientBar::load | ( | FXStream & | store | ) | [virtual] |
Load gradient bar from a stream.
Reimplemented from FX::FXFrame.
![]() |