NAPISD
PAHdb website C++ backend
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Text Class Reference
Inheritance diagram for Text:
CanvasItem

Public Types

enum class  CoordinateSystem : char { DATA , NORMAL }
 
- Public Types inherited from CanvasItem
enum class  Type : char {
  I_None , I_Point , I_Line , I_Curve ,
  I_Plot , I_Text , I_Panels
}
 

Public Member Functions

 Text (std::string_view text)
 
virtual Textclone () const
 
void setCoordinates (const std::array< double, 3 > &coordinates, CoordinateSystem system=CoordinateSystem::DATA)
 
void setCoordinates (double x, double y, double z, CoordinateSystem system=CoordinateSystem::DATA)
 
std::array< double, 3 > const & getCoordinates () const
 
const CoordinateSystem & getSystem () const
 
void setText (std::string_view text)
 
std::string_view getText () const
 
void setColor (std::string_view color)
 
std::string_view getColor () const
 
void setSize (double size)
 
const double & getSize () const
 
void setAngle (double angle)
 
const double & getAngle () const
 
void setJustification (double justification)
 
const double & getJustification () const
 

Static Public Member Functions

static std::string formatChemicalFormula (std::string_view formula)
 

Static Public Attributes

static constexpr double LeftJustification = 0.0
 
static constexpr double CenterJustification = 0.5
 
static constexpr double RightJustification = 1.0
 

Additional Inherited Members

- Public Attributes inherited from CanvasItem
Type type
 

Detailed Description

Definition at line 13 of file Text.h.

Member Enumeration Documentation

◆ CoordinateSystem

enum class Text::CoordinateSystem : char
strong

Definition at line 16 of file Text.h.

Constructor & Destructor Documentation

◆ Text() [1/2]

Text::Text ( )

Definition at line 3 of file Text.cpp.

◆ Text() [2/2]

Text::Text ( std::string_view  text)

Definition at line 10 of file Text.cpp.

Member Function Documentation

◆ clone()

Text * Text::clone ( ) const
virtual

Reimplemented from CanvasItem.

Definition at line 16 of file Text.cpp.

◆ formatChemicalFormula()

std::string Text::formatChemicalFormula ( std::string_view  formula)
static

Definition at line 26 of file Text.cpp.

◆ getAngle()

const double & Text::getAngle ( ) const
inline

Definition at line 100 of file Text.h.

◆ getColor()

std::string_view Text::getColor ( ) const
inline

Definition at line 92 of file Text.h.

◆ getCoordinates()

const std::array< double, 3 > & Text::getCoordinates ( ) const
inline

Definition at line 82 of file Text.h.

◆ getJustification()

const double & Text::getJustification ( ) const
inline

Definition at line 110 of file Text.h.

◆ getSize()

const double & Text::getSize ( ) const
inline

Definition at line 104 of file Text.h.

◆ getSystem()

const Text::CoordinateSystem & Text::getSystem ( ) const
inline

Definition at line 86 of file Text.h.

◆ getText()

std::string_view Text::getText ( ) const
inline

Definition at line 96 of file Text.h.

◆ setAngle()

void Text::setAngle ( double  angle)
inline

Definition at line 98 of file Text.h.

◆ setColor()

void Text::setColor ( std::string_view  color)
inline

Definition at line 90 of file Text.h.

◆ setCoordinates() [1/2]

void Text::setCoordinates ( const std::array< double, 3 > &  coordinates,
CoordinateSystem  system = CoordinateSystem::DATA 
)
inline

Definition at line 76 of file Text.h.

◆ setCoordinates() [2/2]

void Text::setCoordinates ( double  x,
double  y,
double  z,
CoordinateSystem  system = CoordinateSystem::DATA 
)

Definition at line 18 of file Text.cpp.

◆ setJustification()

void Text::setJustification ( double  justification)
inline

Definition at line 106 of file Text.h.

◆ setSize()

void Text::setSize ( double  size)
inline

Definition at line 102 of file Text.h.

◆ setText()

void Text::setText ( std::string_view  text)
inline

Definition at line 94 of file Text.h.

Member Data Documentation

◆ CenterJustification

constexpr double Text::CenterJustification = 0.5
staticconstexpr

Definition at line 20 of file Text.h.

◆ LeftJustification

constexpr double Text::LeftJustification = 0.0
staticconstexpr

Definition at line 18 of file Text.h.

◆ RightJustification

constexpr double Text::RightJustification = 1.0
staticconstexpr

Definition at line 22 of file Text.h.


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

Since FY2019 the NASA Ames PAH IR Spectroscopic Database is being supported through a directed Work Package at NASA Ames titled: "Laboratory Astrophysics - The NASA Ames PAH IR Spectroscopic Database".
Since FY2023 the NASA Ames PAH IR Spectroscopic Database is being supported through the Laboratory Astrophysics Rd 2 directed Work Package at NASA Ames.
© Copyright 2021-2025, Christiaan Boersma