Stores three labels: left, centre, and right. More...

#include <PlotLabel.h>

Inheritance diagram for Pulsar::PlotLabel:
Reference::Able Reference::HeapTracked Pulsar::InfoLabel

Public Member Functions

 PlotLabel ()
 Default constructor.
 
virtual ~PlotLabel ()
 Destructor.
 
void set_left (const std::string &label)
 Set the label to be drawn to the left of the frame.
 
std::string get_left () const
 Get the label to be drawn to the left of the frame.
 
void set_centre (const std::string &label)
 Set the label to be drawn in the centre of the frame.
 
std::string get_centre () const
 Get the label to be drawn in the centre of the frame.
 
void set_right (const std::string &label)
 Set the label to be drawn to the right of the frame.
 
std::string get_right () const
 Get the label to be drawn to the right of the frame.
 
void set_offset (float _offset)
 Set the offset between label and frame (multiple of character height)
 
float get_offset () const
 
void set_spacing (float _spacing)
 Set the spacing between label rows (multiple of character height)
 
float get_spacing () const
 
void set_all (const std::string &label)
 Set all labels to the specified value.
 
virtual void plot (const Archive *)
 Plot the label.
 
float get_margin (pgplot::Units) const
 Get the margin in the specified metric. More...
 
float get_displacement (int row, pgplot::Units) const
 Get the displacement of label[irow] in the specified metric. More...
 
float get_displacement (int row) const
 Get the displacement of label[irow] in units of the character height. More...
 
unsigned get_nrows (const std::string &label) const
 Get the number of rows in the label.
 
- Public Member Functions inherited from Reference::Able
 Able (const Able &)
 
Ableoperator= (const Able &)
 
unsigned get_reference_count () const
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
 
HeapTrackedoperator= (const HeapTracked &)
 
bool __is_on_heap () const
 

Static Public Attributes

static std::string unset = "unset"
 Default label string signifies not set by user.
 

Protected Member Functions

void plot (const Archive *, const std::string &label, float side)
 Plot the label; side=0/.5/1 for left/centre/right.
 
void row (const std::string &, unsigned irow, unsigned nrow, float side)
 Plot a single row of the label.
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Protected Attributes

std::string left
 
std::string right
 
std::string centre
 
float offset
 
float spacing
 

Additional Inherited Members

- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 
static void operator delete (void *location, void *ptr)
 
static void operator delete (void *location)
 
static size_t get_heap_queue_size ()
 

Detailed Description

Stores three labels: left, centre, and right.

Member Function Documentation

◆ get_displacement() [1/2]

float Pulsar::PlotLabel::get_displacement ( int  row) const

Get the displacement of label[irow] in units of the character height.

Get the displacement of row character heights from the viewport edge.

◆ get_displacement() [2/2]

float Pulsar::PlotLabel::get_displacement ( int  row,
pgplot::Units  units 
) const

Get the displacement of label[irow] in the specified metric.

Get the displacement of label[irow] in the specified units.

Referenced by Pulsar::FluxPlot::plot_error_box().

◆ get_margin()

float Pulsar::PlotLabel::get_margin ( pgplot::Units  units) const

Get the margin in the specified metric.

Get the margin in the specified units.

Referenced by Pulsar::FluxPlot::plot_error_box().


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

Generated using doxygen 1.8.17