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

Oval button. More...

Public Member Functions

 OvalButton (name, _canvas,...)
 Construct an oval button. More...
 
 invoke ()
 Method for invoking the button. More...
 
 ~OvalButton ()
 Destructor, free up all resources. More...
 

Private Member Functions

 _ConfigureText (option, value)
 Method to configure the text of the button. More...
 

Private Attributes

 canvas
 Canvas the widget is on. More...
 

Detailed Description

Oval button.

Works just like a normal button widget.

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 button (default 200).
  • -height The height of the button (default 40).
  • -background The background color (default white).
  • -foreground The foreground 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 {}).
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ OvalButton()

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

Construct an oval button.

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

◆ ~OvalButton()

OvalWidgets::OvalButton::~OvalButton ( )

Destructor, free up all resources.

Member Function Documentation

◆ _ConfigureText()

OvalWidgets::OvalButton::_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.

◆ invoke()

OvalWidgets::OvalButton::invoke ( )

Method for invoking the button.

Member Data Documentation

◆ canvas

OvalWidgets::OvalButton::canvas
private

Canvas the widget is on.