papyrus logo

Papyrus::RegularPolygon Class Reference

#include <regularpolygon.h>

Inheritance diagram for Papyrus::RegularPolygon:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Style { ZERO_RADIUS, ZERO_APOTHEM }
typedef enum
Papyrus::RegularPolygon::Style 
Style

Public Member Functions

 PAPYRUS_DRAWABLE (RegularPolygon)
virtual ~RegularPolygon ()
unsigned int sides ()
void set_sides (unsigned int s)
double radius ()
void set_radius (double r)
void set_sides_radius (unsigned int s, double r)
double edge_length ()
void set_edge_length (double e)
void set_sides_edge_length (unsigned int s, double e)
double apothem_length ()
void set_apothem_length (double a)
void set_sides_apothem_length (unsigned int s, double a)
Style style ()
void set_style (Style)
sigc::signal< void > signal_sides ()
 signal emitted when the number of sides changes
sigc::signal< void > signal_size ()
 signal emitted when the radius, edge length, or apothem length changes
sigc::signal< void > signal_style ()
 signal emitted when the style changes

Static Public Member Functions

static RegularPolygon::pointer create (unsigned int sides=3, double radius=1.0, Style style=ZERO_RADIUS, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer())
static RegularPolygon::pointer create (const Glib::ustring &id, unsigned int sides=3, double radius=1.0, Style style=ZERO_RADIUS, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer())

Protected Member Functions

 RegularPolygon (const Glib::ustring &id, unsigned int sides, double radius, Style style, Fill::pointer fill, Stroke::pointer stroke)
void create_vertices ()

Protected Attributes

unsigned int m_sides
double m_radius
Style m_style
sigc::signal< void > m_signal_sides
sigc::signal< void > m_signal_size
sigc::signal< void > m_signal_style

Detailed Description

Author:
Rick L Vinyard Jr

Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
ZERO_RADIUS 
ZERO_APOTHEM 

Constructor & Destructor Documentation

Papyrus::RegularPolygon::RegularPolygon ( const Glib::ustring &  id,
unsigned int  sides,
double  radius,
Style  style,
Fill::pointer  fill,
Stroke::pointer  stroke 
) [protected]

References create_vertices(), and m_radius.

Papyrus::RegularPolygon::~RegularPolygon (  )  [virtual]

Member Function Documentation

double Papyrus::RegularPolygon::apothem_length (  ) 

References m_radius, and m_sides.

RegularPolygon::pointer Papyrus::RegularPolygon::create ( const Glib::ustring &  id,
unsigned int  sides = 3,
double  radius = 1.0,
Style  style = ZERO_RADIUS,
Fill::pointer  fill = Fill::pointer(),
Stroke::pointer  stroke = Stroke::pointer() 
) [static]

References PAPYRUS_CREATE.

RegularPolygon::pointer Papyrus::RegularPolygon::create ( unsigned int  sides = 3,
double  radius = 1.0,
Style  style = ZERO_RADIUS,
Fill::pointer  fill = Fill::pointer(),
Stroke::pointer  stroke = Stroke::pointer() 
) [static]

References PAPYRUS_CREATE.

void Papyrus::RegularPolygon::create_vertices (  )  [protected]
double Papyrus::RegularPolygon::edge_length (  ) 

References m_radius, and m_sides.

Papyrus::RegularPolygon::PAPYRUS_DRAWABLE ( RegularPolygon   ) 

Reimplemented from Papyrus::Polygon.

double Papyrus::RegularPolygon::radius (  ) 

References m_radius.

void Papyrus::RegularPolygon::set_apothem_length ( double  a  ) 
void Papyrus::RegularPolygon::set_edge_length ( double  e  ) 
void Papyrus::RegularPolygon::set_radius ( double  r  ) 
void Papyrus::RegularPolygon::set_sides ( unsigned int  s  ) 
void Papyrus::RegularPolygon::set_sides_apothem_length ( unsigned int  s,
double  a 
)
void Papyrus::RegularPolygon::set_sides_edge_length ( unsigned int  s,
double  e 
)
void Papyrus::RegularPolygon::set_sides_radius ( unsigned int  s,
double  r 
)
void Papyrus::RegularPolygon::set_style ( Style  i  ) 
unsigned int Papyrus::RegularPolygon::sides (  ) 

References m_sides.

sigc::signal< void > Papyrus::RegularPolygon::signal_sides (  ) 

signal emitted when the number of sides changes

References m_signal_sides.

sigc::signal< void > Papyrus::RegularPolygon::signal_size (  ) 

signal emitted when the radius, edge length, or apothem length changes

References m_signal_size.

sigc::signal< void > Papyrus::RegularPolygon::signal_style (  ) 

signal emitted when the style changes

References m_signal_style.

RegularPolygon::Style Papyrus::RegularPolygon::style (  ) 

References m_style.


Member Data Documentation

unsigned int Papyrus::RegularPolygon::m_sides [protected]
sigc::signal<void> Papyrus::RegularPolygon::m_signal_sides [protected]
sigc::signal<void> Papyrus::RegularPolygon::m_signal_size [protected]
sigc::signal<void> Papyrus::RegularPolygon::m_signal_style [protected]

Referenced by set_style(), and signal_style().

Referenced by create_vertices(), set_style(), and style().


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

Generated on Fri Apr 16 12:41:09 2010 for papyrus by doxygen 1.6.1