Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXSlider Class Reference

The slider widget is a valuator widget which provides simple linear value range. More...

#include <FXSlider.h>

Inheritance diagram for FX::FXSlider:
FX::FXFrame FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject

List of all members.

Public Types

enum  { ID_AUTOSLIDE = FXFrame::ID_LAST, ID_LAST }

Public Member Functions

long onPaint (FXObject *, FXSelector, void *)
long onMotion (FXObject *, FXSelector, void *)
long onMouseWheel (FXObject *, FXSelector, void *)
long onLeftBtnPress (FXObject *, FXSelector, void *)
long onLeftBtnRelease (FXObject *, FXSelector, void *)
long onMiddleBtnPress (FXObject *, FXSelector, void *)
long onMiddleBtnRelease (FXObject *, FXSelector, void *)
long onKeyPress (FXObject *, FXSelector, void *)
long onKeyRelease (FXObject *, FXSelector, void *)
long onUngrabbed (FXObject *, FXSelector, void *)
long onAutoSlide (FXObject *, FXSelector, void *)
long onCmdSetValue (FXObject *, FXSelector, void *)
long onCmdSetIntValue (FXObject *, FXSelector, void *)
long onCmdGetIntValue (FXObject *, FXSelector, void *)
long onCmdSetLongValue (FXObject *, FXSelector, void *)
long onCmdGetLongValue (FXObject *, FXSelector, void *)
long onCmdSetRealValue (FXObject *, FXSelector, void *)
long onCmdGetRealValue (FXObject *, FXSelector, void *)
long onCmdSetIntRange (FXObject *, FXSelector, void *)
long onCmdGetIntRange (FXObject *, FXSelector, void *)
long onCmdSetRealRange (FXObject *, FXSelector, void *)
long onCmdGetRealRange (FXObject *, FXSelector, void *)
long onCmdSetHelp (FXObject *, FXSelector, void *)
long onCmdGetHelp (FXObject *, FXSelector, void *)
long onCmdSetTip (FXObject *, FXSelector, void *)
long onCmdGetTip (FXObject *, FXSelector, void *)
long onQueryHelp (FXObject *, FXSelector, void *)
long onQueryTip (FXObject *, FXSelector, void *)
 FXSlider (FXComposite *p, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=SLIDER_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=0, FXint pr=0, FXint pt=0, FXint pb=0)
 Construct a slider widget.
virtual FXint getDefaultWidth ()
 Return default width.
virtual FXint getDefaultHeight ()
 Return default height.
virtual FXbool canFocus () const
 Returns true because a slider can receive focus.
virtual void layout ()
 Perform layout.
virtual void enable ()
 Enable the slider.
virtual void disable ()
 Disable the slider.
void setValue (FXint value, FXbool notify=false)
 Change slider value.
FXint getValue () const
 Return slider value.
void setRange (FXint lo, FXint hi, FXbool notify=false)
 Change the slider's range.
void getRange (FXint &lo, FXint &hi) const
 Get the slider's current range.
FXuint getSliderStyle () const
 Change the slider style.
void setSliderStyle (FXuint style)
 Get the current slider style.
FXint getHeadSize () const
 Get the slider's head size.
void setHeadSize (FXint hs)
 Change the slider's head size.
FXint getSlotSize () const
 Get the slider's current slot size.
void setSlotSize (FXint bs)
 Change the slider's slot size.
FXint getIncrement () const
 Get the slider's auto-increment/decrement value.
void setIncrement (FXint inc)
 Change the slider's auto-increment/decrement value.
void setTickDelta (FXint dist)
 Change the delta between ticks.
FXint getTickDelta () const
 Get delta between ticks.
void setSlotColor (FXColor clr)
 Change the color of the slot the slider head moves in.
FXColor getSlotColor () const
 Get the current slot color.
void setHelpText (const FXString &text)
 Set the help text to be displayed on the status line.
const FXStringgetHelpText () const
 Get the current help text.
void setTipText (const FXString &text)
 Set the tip text to be displayed in the tooltip.
const FXStringgetTipText () const
 Get the current tooltip text value.
virtual void save (FXStream &store) const
 Save to stream.
virtual void load (FXStream &store)
 Load from stream.
virtual ~FXSlider ()
 Destroy the slider.

Protected Member Functions

void drawSliderHead (FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h)
void drawHorzTicks (FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h)
void drawVertTicks (FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h)

Protected Attributes

FXint headPos
FXint headSize
FXint slotSize
FXColor slotColor
FXint dragPoint
FXint range [2]
FXint delta
FXint incr
FXint pos
FXString help
FXString tip

Detailed Description

The slider widget is a valuator widget which provides simple linear value range.

Two visual appearances are supported:- the sunken look, which is enabled with the SLIDER_INSIDE_BAR option and the regular look. The latter may have optional arrows on the slider thumb. While being moved, the slider 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 slider value, of type FXint.


The documentation for this class was generated from the following file:

Copyright © 1997-2011 Jeroen van der Zijp