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

FX::FXKnob Class Reference

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

#include <FXKnob.h>

Inheritance diagram for FX::FXKnob:

FX::FXFrame FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject List of all members.

Public Types

enum  {

Public Member Functions

 FXKnob (FXComposite *p, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=KNOB_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)
virtual bool canFocus () const
virtual FXint getDefaultWidth ()
virtual FXint getDefaultHeight ()
virtual void layout ()
virtual void enable ()
virtual void disable ()
void setValue (FXint value, FXbool notify=FALSE)
FXint getValue () const
void setRange (FXint lo, FXint hi, FXbool notify=FALSE)
void getRange (FXint &lo, FXint &hi) const
void setLimits (FXint start, FXint end, FXbool notify=FALSE)
void getLimits (FXint &start, FXint &end)
FXuint getKnobStyle () const
void setKnobStyle (FXuint style)
FXint getIncrement () const
void setIncrement (FXint inc)
void setTickDelta (FXint dist)
FXint getTickDelta () const
void setLineColor (FXColor clr)
FXColor getLineColor () const
void setHelpText (const FXString &text)
const FXStringgetHelpText () const
void setTipText (const FXString &text)
const FXStringgetTipText () const
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
virtual ~FXKnob ()

Detailed Description

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, of type FXint.

See also:

Member Enumeration Documentation

anonymous enum

Enumeration values:

Constructor & Destructor Documentation

FX::FXKnob::FXKnob FXComposite p,
FXObject tgt = NULL,
FXSelector  sel = 0,
FXuint  opts = KNOB_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,

Construct a knob widget.

virtual FX::FXKnob::~FXKnob  )  [virtual]

Destroy the knob.

Member Function Documentation

virtual bool FX::FXKnob::canFocus  )  const [virtual]

Returns true because a knob can receive focus.

Reimplemented from FX::FXWindow.

virtual FXint FX::FXKnob::getDefaultWidth  )  [virtual]

Return default width.

Reimplemented from FX::FXFrame.

virtual FXint FX::FXKnob::getDefaultHeight  )  [virtual]

Return default height.

Reimplemented from FX::FXFrame.

virtual void FX::FXKnob::layout  )  [virtual]

Perform layout.

Reimplemented from FX::FXWindow.

virtual void FX::FXKnob::enable  )  [virtual]

Enable the knob.

Reimplemented from FX::FXWindow.

virtual void FX::FXKnob::disable  )  [virtual]

Disable the knob.

Reimplemented from FX::FXWindow.

void FX::FXKnob::setValue FXint  value,
FXbool  notify = FALSE

Change knob value.

FXint FX::FXKnob::getValue  )  const [inline]

Return knob value.

void FX::FXKnob::setRange FXint  lo,
FXint  hi,
FXbool  notify = FALSE

Change the knob's range.

void FX::FXKnob::getRange FXint lo,
FXint hi
const [inline]

Get the knob's current range.

void FX::FXKnob::setLimits FXint  start,
FXint  end,
FXbool  notify = FALSE

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

void FX::FXKnob::getLimits FXint start,
FXint end

Get the knob's current limits.

FXuint FX::FXKnob::getKnobStyle  )  const

Change the knob style.

void FX::FXKnob::setKnobStyle FXuint  style  ) 

Get the current knob style.

FXint FX::FXKnob::getIncrement  )  const [inline]

Get the knob's auto-increment/decrement value.

void FX::FXKnob::setIncrement FXint  inc  )  [inline]

Change the knob's auto-increment/decrement value.

void FX::FXKnob::setTickDelta FXint  dist  ) 

Change the delta between ticks.

FXint FX::FXKnob::getTickDelta  )  const [inline]

Get delta between ticks.

void FX::FXKnob::setLineColor FXColor  clr  ) 

Change the indicator needle color.

FXColor FX::FXKnob::getLineColor  )  const [inline]

Get the current indicator needle color.

void FX::FXKnob::setHelpText const FXString text  )  [inline]

Set the help text to be displayed on the status line.

const FXString& FX::FXKnob::getHelpText  )  const [inline]

Get the current help text.

void FX::FXKnob::setTipText const FXString text  )  [inline]

Set the tip text to be displayed in the tooltip.

const FXString& FX::FXKnob::getTipText  )  const [inline]

Get the current tooltip text value.

virtual void FX::FXKnob::save FXStream store  )  const [virtual]

Save to stream.

Reimplemented from FX::FXFrame.

virtual void FX::FXKnob::load FXStream store  )  [virtual]

Load from stream.

Reimplemented from FX::FXFrame.

Copyright © 1997-2005 Jeroen van der Zijp