papyrus logo

Papyrus::Scaler Class Reference

#include <scaler.h>

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

List of all members.

Public Types

typedef PapyrusPointer< Scalerpointer

Public Member Functions

virtual ~Scaler ()
unsigned sides ()
void set_sides (unsigned sides)
void enable_sides (unsigned sides)
void disable_sides (unsigned sides)

Static Public Member Functions

static Scaler::pointer create (unsigned side=TOP|RIGHT|BOTTOM|LEFT)
static Scaler::pointer create (const Glib::ustring &id, DrawableSet::pointer drawables, unsigned side=TOP|RIGHT|BOTTOM|LEFT)
static Scaler::pointer create (const Glib::ustring &id, unsigned side=TOP|RIGHT|BOTTOM|LEFT)
static Scaler::pointer create (DrawableSet::pointer drawables, unsigned side=TOP|RIGHT|BOTTOM|LEFT)

Protected Member Functions

 Scaler (const Glib::ustring &id, DrawableSet::pointer drawables, unsigned side=0)
virtual bool on_motion (const Event::Motion &event)
virtual bool on_button_press (const Event::ButtonPress &event)

Protected Attributes

double m_last_position [2]
 Gets the current grid size.
double m_original_position [2]
unsigned m_sides
double m_grid [2]

Detailed Description

Author:
Rick L Vinyard Jr <rvinyard@cs.nmsu.edu>

Member Typedef Documentation

typedef PapyrusPointer<Scaler> Papyrus::Scaler::pointer

Reimplemented from Papyrus::AffineController.


Constructor & Destructor Documentation

Papyrus::Scaler::Scaler ( const Glib::ustring &  id,
DrawableSet::pointer  drawables,
unsigned  side = 0 
) [protected]
Papyrus::Scaler::~Scaler (  )  [virtual]

Member Function Documentation

Scaler::pointer Papyrus::Scaler::create ( DrawableSet::pointer  drawables,
unsigned  side = TOP|RIGHT|BOTTOM|LEFT 
) [static]

References PAPYRUS_CREATE, and Scaler().

Scaler::pointer Papyrus::Scaler::create ( const Glib::ustring &  id,
unsigned  side = TOP|RIGHT|BOTTOM|LEFT 
) [static]

References PAPYRUS_CREATE, and Scaler().

Scaler::pointer Papyrus::Scaler::create ( const Glib::ustring &  id,
DrawableSet::pointer  drawables,
unsigned  side = TOP|RIGHT|BOTTOM|LEFT 
) [static]

References PAPYRUS_CREATE, and Scaler().

Scaler::pointer Papyrus::Scaler::create ( unsigned  side = TOP|RIGHT|BOTTOM|LEFT  )  [static]

References PAPYRUS_CREATE, and Scaler().

void Papyrus::Scaler::disable_sides ( unsigned  sides  ) 

References m_sides.

void Papyrus::Scaler::enable_sides ( unsigned  sides  ) 

References m_sides.

bool Papyrus::Scaler::on_button_press ( const Event::ButtonPress event  )  [protected, virtual]

Reimplemented from Papyrus::Controller.

References m_last_position, and m_original_position.

bool Papyrus::Scaler::on_motion ( const Event::Motion event  )  [protected, virtual]
void Papyrus::Scaler::set_sides ( unsigned  sides  ) 

References m_sides.

unsigned Papyrus::Scaler::sides (  ) 

References m_sides.


Member Data Documentation

double Papyrus::Scaler::m_grid[2] [protected]

Referenced by Scaler().

double Papyrus::Scaler::m_last_position[2] [protected]

Gets the current grid size.

Sets the grid x and y sizes. If either is <= 0.0 then the grid will be turned off for that dimension.

Referenced by on_button_press(), and on_motion().

double Papyrus::Scaler::m_original_position[2] [protected]

Referenced by on_button_press(), and Scaler().

unsigned Papyrus::Scaler::m_sides [protected]

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