casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
casa::PlotButton Class Reference

Generic class for a button that goes on a PlotPanel. More...

#include <PlotPanel.h>

Inheritance diagram for casa::PlotButton:
casa::PlotWidget

List of all members.

Public Member Functions

 PlotButton ()
 Constructor.
virtual ~PlotButton ()
 Destructor.
virtual bool textShown () const =0
 Returns true if text is being shown on the button, false otherwise.
virtual void showText (bool show=true)=0
 Show/hide the set text on the button.
virtual String text () const =0
 Currently set button text.
virtual void setText (const String &text)=0
 Sets the button text.
virtual bool imageShown () const =0
 Returns true if an image is being shown on the button, false otherwise.
virtual void showImage (bool show=true)=0
 Show/hide the set image on the button.
virtual void setImagePath (const String &imgPath)=0
 Set the image path to be shown on the button.
virtual bool isToggleable () const =0
 Returns true if the button is "toggleable", false otherwise.
virtual void setToggleable (bool toggleable=true)=0
 Sets whether this button is "toggleable" or not.
virtual bool isToggled () const =0
 Returns whether this button is in a toggled state or not.
virtual void setToggled (bool toggled=true)=0
 Sets whether this button is in a toggled state or not.
virtual void registerHandler (PlotButtonEventHandlerPtr handler)=0
 Register the given event handler for this button.
virtual vector
< PlotButtonEventHandlerPtr
allHandlers () const =0
 Returns all event handlers currently registered on this button.
virtual void unregisterHandler (PlotButtonEventHandlerPtr handler)=0
 Unregisters the given event handler.

Detailed Description

Generic class for a button that goes on a PlotPanel.

A button has properties that can be set, as well as registration for event handlers. A button can only be seen/interacted with on a PlotPanel.

Definition at line 70 of file PlotPanel.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 73 of file PlotPanel.h.

virtual casa::PlotButton::~PlotButton ( ) [inline, virtual]

Destructor.

Definition at line 76 of file PlotPanel.h.


Member Function Documentation

virtual vector<PlotButtonEventHandlerPtr> casa::PlotButton::allHandlers ( ) const [pure virtual]

Returns all event handlers currently registered on this button.

virtual bool casa::PlotButton::imageShown ( ) const [pure virtual]

Returns true if an image is being shown on the button, false otherwise.

virtual bool casa::PlotButton::isToggleable ( ) const [pure virtual]

Returns true if the button is "toggleable", false otherwise.

A button that is toggleable sticks down when pushed, then comes back up when pushed again. The state can be determined with isToggled().

virtual bool casa::PlotButton::isToggled ( ) const [pure virtual]

Returns whether this button is in a toggled state or not.

virtual void casa::PlotButton::registerHandler ( PlotButtonEventHandlerPtr  handler) [pure virtual]

Register the given event handler for this button.

virtual void casa::PlotButton::setImagePath ( const String imgPath) [pure virtual]

Set the image path to be shown on the button.

virtual void casa::PlotButton::setText ( const String text) [pure virtual]

Sets the button text.

virtual void casa::PlotButton::setToggleable ( bool  toggleable = true) [pure virtual]

Sets whether this button is "toggleable" or not.

virtual void casa::PlotButton::setToggled ( bool  toggled = true) [pure virtual]

Sets whether this button is in a toggled state or not.

(Does not affect buttons that are not toggleable.)

virtual void casa::PlotButton::showImage ( bool  show = true) [pure virtual]

Show/hide the set image on the button.

virtual void casa::PlotButton::showText ( bool  show = true) [pure virtual]

Show/hide the set text on the button.

virtual String casa::PlotButton::text ( ) const [pure virtual]

Currently set button text.

(May not be displayed.)

virtual bool casa::PlotButton::textShown ( ) const [pure virtual]

Returns true if text is being shown on the button, false otherwise.

virtual void casa::PlotButton::unregisterHandler ( PlotButtonEventHandlerPtr  handler) [pure virtual]

Unregisters the given event handler.


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