Model Railroad System 2.2.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OvalWidgets::OvalSlider Class Reference

Oval Slider. More...

Public Member Functions

 OvalSlider (name, _canvas,...)
 Construct an oval button. More...
 
 set (value)
 Method to set the value of the slider. More...
 
 get ()
 Method to get the current value. More...
 

Private Member Functions

 _ConfigureL (option, value)
 Method to configure the length option. More...
 
 _ConfigureText (option, value)
 Method to configure the text of the button. More...
 
 _VerifyBitmap (option, value)
 Method to validate a bitmap option. More...
 
 _MoveThumb (mx, my)
 Method bound to the button 1 motion on the thumb. More...
 

Private Attributes

 canvas
 Canvas the widget is on. More...
 
 _value
 Value of the scale. More...
 

Detailed Description

Oval Slider.

This is like the activation control for the Star Trek NG Transporter.

Parameters
_canvasThe canvas to draw the widget on.
...Options:
  • -x The X coordinate (default 0).
  • -y The Y coordinate (default 0).
  • -width The width of the slider button (default 200).
  • -height The height of the slider button (default 40).
  • -length The length of the slider (default 600).
  • -background The background color (default white).
  • -foreground The background color (default black).
  • -fontfamily The font family (default Courier).
  • -rightsquare Should the right end be square (default no)?
  • -leftsquare Should the left end be square (default no)?
  • -text The text of the button (default {}).
  • -command The command of the button (default {}).
  • -from Start value of the scale (readonly, default 0).
  • -to End value of the scale (readonly, defalut 100).
  • -digits Number of digits to display (readonly, default 2).
  • -showvalue Flag to indicate if the value should be displayed (readonly, default yes).
  • -variable Variable name to hold the value (default {}).
  • -stipple Stipple bitmap to use (readonly, default HBar).
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ OvalSlider()

OvalWidgets::OvalSlider::OvalSlider ( name  ,
_canvas  ,
  ... 
)

Construct an oval button.

Parameters
_canvasThe canvas to draw the button on.
...The option value list.

Member Function Documentation

◆ _ConfigureL()

OvalWidgets::OvalSlider::_ConfigureL ( option  ,
value   
)
private

Method to configure the length option.

Parameters
optionThe name of the option to configure.
valueThe value of the option.

◆ _ConfigureText()

OvalWidgets::OvalSlider::_ConfigureText ( option  ,
value   
)
private

Method to configure the text of the button.

Parameters
optionThe name of the option to configure.
valueThe value to configure it to.

◆ _MoveThumb()

OvalWidgets::OvalSlider::_MoveThumb ( mx  ,
my   
)
private

Method bound to the button 1 motion on the thumb.

Parameters
mxMouse X value.
myMouse Y value.

◆ _VerifyBitmap()

OvalWidgets::OvalSlider::_VerifyBitmap ( option  ,
value   
)
private

Method to validate a bitmap option.

Parameters
optionThe name of the option to validate.
valueThe value to validate.

◆ get()

OvalWidgets::OvalSlider::get ( )

Method to get the current value.

◆ set()

OvalWidgets::OvalSlider::set ( value  )

Method to set the value of the slider.

Parameters
valueThe value to set.

Member Data Documentation

◆ _value

OvalWidgets::OvalSlider::_value
private

Value of the scale.

◆ canvas

OvalWidgets::OvalSlider::canvas
private

Canvas the widget is on.