Gtkmm-PLplot 3.0
A scientific plotting library for Gtkmm
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Gtk::PLplot::PlotObject Class Referenceabstract

the abstract base class that will hold a single plot object and its properties More...

#include <gtkmm-plplot/plotobject.h>

Inheritance diagram for Gtk::PLplot::PlotObject:
Inheritance graph
[legend]

Public Member Functions

virtual ~PlotObject ()
 
void show ()
 
void hide ()
 
bool is_showing () const
 
sigc::signal< void(void)> signal_changed ()
 
virtual void draw_plot_object (const Cairo::RefPtr< Cairo::Context > &cr, plstream *pls, PlotObjectAuxData &data)=0
 
- Public Member Functions inherited from Gtk::PLplot::Object
virtual void set_manage ()
 

Protected Member Functions

virtual void on_changed ()
 
 PlotObject ()
 
- Protected Member Functions inherited from Gtk::PLplot::Object
 Object ()
 

Protected Attributes

sigc::signal< void(void)> _signal_changed
 signal that gets emitted whenever any of the plot object properties is changed.
 

Private Member Functions

PlotObjectoperator= (const PlotObject &)=delete
 no move assignment operator
 
 PlotObject (const PlotObject &source)=delete
 no default copy constructor;
 

Private Attributes

bool shown
 true means the plot is currently visible, false means it is not plotted
 

Detailed Description

the abstract base class that will hold a single plot object and its properties

The base class that all other PlotObject classes ultimately derive from. Examples are PlotLine2D and PlotText2D

Constructor & Destructor Documentation

◆ PlotObject() [1/2]

Gtk::PLplot::PlotObject::PlotObject ( const PlotObject source)
privatedelete

no default copy constructor;

◆ PlotObject() [2/2]

Gtk::PLplot::PlotObject::PlotObject ( )
protected

Constructor

◆ ~PlotObject()

virtual Gtk::PLplot::PlotObject::~PlotObject ( )
virtual

Destructor

Member Function Documentation

◆ draw_plot_object()

virtual void Gtk::PLplot::PlotObject::draw_plot_object ( const Cairo::RefPtr< Cairo::Context > &  cr,
plstream *  pls,
PlotObjectAuxData data 
)
pure virtual

Method to draw the object

This method is virtual allowing inheriting classes to implement their own method with the same signature.

Parameters
crthe cairo context to draw to.
plsthe PLplot plstream object that will do the actual plotting on the Cairo context
dataadditional data sent from the Plot to influence drawing

Implemented in Gtk::PLplot::PlotObject2DLine, and Gtk::PLplot::PlotObject2DText.

◆ hide()

void Gtk::PLplot::PlotObject::hide ( )

Hide the object in the plot

◆ is_showing()

bool Gtk::PLplot::PlotObject::is_showing ( ) const

Returns whether or not the object is showing in the plot

Returns
true if the object is visible, false if not

◆ on_changed()

virtual void Gtk::PLplot::PlotObject::on_changed ( )
protectedvirtual

This is a default handler for signal_changed()

This signal is emitted whenever any of the object properties is changed. Currently it does nothing but the signal will get caught by Plot, and will eventually trigger a redrawing of the entire widget.

◆ operator=()

PlotObject & Gtk::PLplot::PlotObject::operator= ( const PlotObject )
privatedelete

no move assignment operator

◆ show()

void Gtk::PLplot::PlotObject::show ( )

Make the object visible in the plot

◆ signal_changed()

sigc::signal< void(void)> Gtk::PLplot::PlotObject::signal_changed ( )
inline

signal_changed is emitted whenever any of the object properties has changed.

See default handler on_changed()

Member Data Documentation

◆ _signal_changed

sigc::signal<void(void)> Gtk::PLplot::PlotObject::_signal_changed
protected

signal that gets emitted whenever any of the plot object properties is changed.

◆ shown

bool Gtk::PLplot::PlotObject::shown
private

true means the plot is currently visible, false means it is not plotted