casa
5.7.0-16
|
Generic class for a button that goes on a PlotPanel. More...
#include <PlotPanel.h>
Public Member Functions | |
PlotButton () | |
Constructor. More... | |
virtual | ~PlotButton () |
Destructor. More... | |
virtual bool | textShown () const =0 |
Returns true if text is being shown on the button, false otherwise. More... | |
virtual void | showText (bool show=true)=0 |
Show/hide the set text on the button. More... | |
virtual casacore::String | text () const =0 |
Currently set button text. More... | |
virtual void | setText (const casacore::String &text)=0 |
Sets the button text. More... | |
virtual bool | imageShown () const =0 |
Returns true if an image is being shown on the button, false otherwise. More... | |
virtual void | showImage (bool show=true)=0 |
Show/hide the set image on the button. More... | |
virtual void | setImagePath (const casacore::String &imgPath)=0 |
Set the image path to be shown on the button. More... | |
virtual bool | isToggleable () const =0 |
Returns true if the button is "toggleable", false otherwise. More... | |
virtual void | setToggleable (bool toggleable=true)=0 |
Sets whether this button is "toggleable" or not. More... | |
virtual bool | isToggled () const =0 |
Returns whether this button is in a toggled state or not. More... | |
virtual void | setToggled (bool toggled=true)=0 |
Sets whether this button is in a toggled state or not. More... | |
virtual void | registerHandler (PlotButtonEventHandlerPtr handler)=0 |
Register the given event handler for this button. More... | |
virtual std::vector < PlotButtonEventHandlerPtr > | allHandlers () const =0 |
Returns all event handlers currently registered on this button. More... | |
virtual void | unregisterHandler (PlotButtonEventHandlerPtr handler)=0 |
Unregisters the given event handler. More... | |
Public Member Functions inherited from casa::PlotWidget | |
PlotWidget () | |
Constructor. More... | |
virtual | ~PlotWidget () |
Destructor. More... | |
virtual bool | isEnabled () const =0 |
Returns true if the widget is currently enabled, false otherwise. More... | |
virtual void | setEnabled (bool enabled=true)=0 |
Enables/disables the widget. More... | |
virtual bool | isVisible () const =0 |
Returns true if the widget is currently visible. More... | |
virtual void | setVisible (bool visible=true)=0 |
Show/hide the widget. More... | |
virtual casacore::String | tooltip () const =0 |
Returns the tooltip for this widget. More... | |
virtual void | setTooltip (const casacore::String &text)=0 |
Sets the tooltip for this widget. More... | |
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 68 of file PlotPanel.h.
|
inline |
Constructor.
Definition at line 71 of file PlotPanel.h.
|
inlinevirtual |
Destructor.
Definition at line 74 of file PlotPanel.h.
|
pure virtual |
Returns all event handlers currently registered on this button.
|
pure virtual |
Returns true if an image is being shown on the button, false otherwise.
|
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().
|
pure virtual |
Returns whether this button is in a toggled state or not.
|
pure virtual |
Register the given event handler for this button.
|
pure virtual |
Set the image path to be shown on the button.
|
pure virtual |
Sets the button text.
|
pure virtual |
Sets whether this button is "toggleable" or not.
|
pure virtual |
Sets whether this button is in a toggled state or not.
(Does not affect buttons that are not toggleable.)
|
pure virtual |
Show/hide the set image on the button.
|
pure virtual |
Show/hide the set text on the button.
|
pure virtual |
Currently set button text.
(May not be displayed.)
|
pure virtual |
Returns true if text is being shown on the button, false otherwise.
|
pure virtual |
Unregisters the given event handler.