casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Protected Attributes
casa::PlotFont Class Reference

Abstract class for fonts. More...

#include <PlotOptions.h>

List of all members.

Public Member Functions

 PlotFont ()
 Constructor.
virtual ~PlotFont ()
 Destructor.
virtual double pointSize () const =0
 ABSTRACT METHODS //.
virtual void setPointSize (double size)=0
 Sets the point size of this font to the given.
virtual int pixelSize () const =0
 Returns the pixel size of this font, or -1 if the size was set in points.
virtual void setPixelSize (int size)=0
 Sets the pixel size of this font to the given.
virtual String fontFamily () const =0
 Returns the font family.
virtual void setFontFamily (const String &font)=0
 Sets the font family to the given.
virtual PlotColorPtr color () const =0
 Returns a copy of the color for this font.
virtual void setColor (const PlotColor &color)=0
 Sets the color of this font to the given.
virtual bool italics () const =0
 Gets/sets whether this font is italicized, bolded, and/or underlined, respectively.
virtual void setItalics (bool i=true)=0
virtual bool bold () const =0
virtual void setBold (bool b=true)=0
virtual bool underline () const =0
virtual void setUnderline (bool u=true)=0
virtual void setColor (const PlotColorPtr c)
 CONVENIENCE METHODS //.
virtual void setColor (const String &col)
virtual Record toRecord () const
 RECORD METHODS //.
virtual void fromRecord (const Record &record)
virtual PlotFontoperator= (const PlotFont &rh)
 OPERATORS //.
virtual bool operator== (const PlotFont &rh) const
 Returns true if this PlotFont is equal to the given; false otherwise.
virtual bool operator!= (const PlotFont &rh) const
 Returns true if this PlotFont is NOT equal to the given; false otherwise.

Static Protected Attributes

static const String REC_POINTSIZE
 Record key names.
static const String REC_PIXELSIZE
static const String REC_FAMILY
static const String REC_COLOR
static const String REC_ITALICS
static const String REC_BOLD
static const String REC_UNDERLINE

Detailed Description

Abstract class for fonts.

A font has a family, size, color, bold, italics, and underline properties.

Definition at line 190 of file PlotOptions.h.


Constructor & Destructor Documentation

Constructor.

virtual casa::PlotFont::~PlotFont ( ) [virtual]

Destructor.


Member Function Documentation

virtual bool casa::PlotFont::bold ( ) const [pure virtual]
virtual PlotColorPtr casa::PlotFont::color ( ) const [pure virtual]

Returns a copy of the color for this font.

virtual String casa::PlotFont::fontFamily ( ) const [pure virtual]

Returns the font family.

virtual void casa::PlotFont::fromRecord ( const Record record) [virtual]
virtual bool casa::PlotFont::italics ( ) const [pure virtual]

Gets/sets whether this font is italicized, bolded, and/or underlined, respectively.

virtual bool casa::PlotFont::operator!= ( const PlotFont rh) const [virtual]

Returns true if this PlotFont is NOT equal to the given; false otherwise.

virtual PlotFont& casa::PlotFont::operator= ( const PlotFont rh) [virtual]

OPERATORS //.

Assigns the value of the given PlotFont to this one.

virtual bool casa::PlotFont::operator== ( const PlotFont rh) const [virtual]

Returns true if this PlotFont is equal to the given; false otherwise.

virtual int casa::PlotFont::pixelSize ( ) const [pure virtual]

Returns the pixel size of this font, or -1 if the size was set in points.

virtual double casa::PlotFont::pointSize ( ) const [pure virtual]

ABSTRACT METHODS //.

Returns the point size of this font, or -1 if the size was set in pixels.

virtual void casa::PlotFont::setBold ( bool  b = true) [pure virtual]
virtual void casa::PlotFont::setColor ( const PlotColor color) [pure virtual]

Sets the color of this font to the given.

Referenced by casa::PlotAnnotation::setFontColor().

virtual void casa::PlotFont::setColor ( const PlotColorPtr  c) [virtual]

CONVENIENCE METHODS //.

Convenience methods for setting color.

virtual void casa::PlotFont::setColor ( const String col) [virtual]
virtual void casa::PlotFont::setFontFamily ( const String font) [pure virtual]

Sets the font family to the given.

virtual void casa::PlotFont::setItalics ( bool  i = true) [pure virtual]
virtual void casa::PlotFont::setPixelSize ( int  size) [pure virtual]

Sets the pixel size of this font to the given.

virtual void casa::PlotFont::setPointSize ( double  size) [pure virtual]

Sets the point size of this font to the given.

virtual void casa::PlotFont::setUnderline ( bool  u = true) [pure virtual]
virtual Record casa::PlotFont::toRecord ( ) const [virtual]

RECORD METHODS //.

Gets/Sets the color as a Record.

virtual bool casa::PlotFont::underline ( ) const [pure virtual]

Member Data Documentation

const String casa::PlotFont::REC_BOLD [static, protected]

Definition at line 277 of file PlotOptions.h.

const String casa::PlotFont::REC_COLOR [static, protected]

Definition at line 275 of file PlotOptions.h.

const String casa::PlotFont::REC_FAMILY [static, protected]

Definition at line 274 of file PlotOptions.h.

const String casa::PlotFont::REC_ITALICS [static, protected]

Definition at line 276 of file PlotOptions.h.

const String casa::PlotFont::REC_PIXELSIZE [static, protected]

Definition at line 273 of file PlotOptions.h.

const String casa::PlotFont::REC_POINTSIZE [static, protected]

Record key names.

Definition at line 272 of file PlotOptions.h.

const String casa::PlotFont::REC_UNDERLINE [static, protected]

Definition at line 278 of file PlotOptions.h.


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