List of all members.
Detailed Description
Abstract base class for shapes in Hipp.
- Author:
- David Kadish
Shapes are the building blocks of Hipp documents. They know how to represent themselves in the .svg xml format (HippShape::LoadObject and HippShape::SaveObject) and in the HippView (HippShape::OnDraw).
- Todo:
Create shapes for Ellipse, Rectangle, Path, etc.
Figure out how to properly import and convert Path objects that are really shapes
- Author:
- David Kadish
Shapes are the building blocks of Hipp documents. They know how to represent themselves in the .svg xml format (HippShape::LoadObject and HippShape::SaveObject) and in the HippView (HippShape::OnDraw).
- Todo:
Create shapes for Ellipse, Rectangle, Path, etc.
Figure out how to properly import and convert Path objects that are really shapes
Constructor & Destructor Documentation
| HippShape::~HippShape |
( |
|
) |
|
Member Function Documentation
| virtual HippShape* hipp::HippShape::clone |
( |
|
) |
const [pure virtual] |
| void HippShape::cloneMeta |
( |
HippShape * |
hs |
) |
const [virtual] |
| virtual bool hipp::HippShape::containsPoint |
( |
wxPoint |
p |
) |
const [pure virtual] |
| virtual const wxRect& hipp::HippShape::getBounds |
( |
|
) |
const [pure virtual] |
| bool hipp::HippShape::getColourWhite |
( |
|
) |
const [inline] |
| wxString hipp::HippShape::getDescription |
( |
|
) |
const [inline] |
| wxRect HippShape::getFullBounds |
( |
|
) |
const [virtual] |
| int hipp::HippShape::getLineWidth |
( |
|
) |
const [inline] |
| virtual ShapeType hipp::HippShape::getShapeType |
( |
|
) |
[pure virtual] |
| wxString hipp::HippShape::getSoundFile |
( |
|
) |
const [inline] |
| wxString hipp::HippShape::getTitle |
( |
|
) |
const [inline] |
| wxString hipp::HippShape::getTitleOrUntitled |
( |
|
) |
const [inline] |
| bool HippShape::hasMetaInfo |
( |
|
) |
const |
| bool HippShape::hasSound |
( |
|
) |
const |
| bool hipp::HippShape::isFilled |
( |
|
) |
const [inline] |
| void hipp::HippShape::LoadObject |
( |
const XMLCh *const |
chars |
) |
[virtual] |
Loads information associated with the shape from character data.
This version of the LoadObject function is called when the shape encounters the character data inside a <title> or <desc> tag. The appropriate variable is set to the HippShape::awaiting_data pointer in the other version of HippShape::LoadObject. Then, the next character data that comes along is that
- Todo:
- What happens if there is an empty set of character data in one of the tags? This probably breaks. This should look for the SVGHandler::endElement instead of setting HippShape::awaiting_data to NULL inside this function.
| void hipp::HippShape::LoadObject |
( |
const xercesc::Attributes & |
attrs, |
|
|
const XMLCh *const |
localname | |
|
) |
| | [virtual] |
Loads the shape from a set of SVG attributes and the SVG tag name, provided by Xerces-C.
Hipp uses a Xerces-C SAX2 XML parser to traverse a .svg input file. When a known shape is encountered, LoadObject is called with the attributes that are found. The HippShape implementation checks for <title> and <desc> tags, which are universally available to shapes. This function should be overridden in derived classes to load the appropriate object.
Reimplemented in hipp::HippBackground, hipp::HippEllipse, hipp::HippLine, hipp::HippPolyline, and hipp::HippRectangle.
| virtual void hipp::HippShape::move |
( |
int |
diffX, |
|
|
int |
diffY | |
|
) |
| | [pure virtual] |
| void HippShape::OnDraw |
( |
Cairo::RefPtr< Cairo::Context > |
context, |
|
|
bool |
isHaptic = true | |
|
) |
| | const [virtual] |
| virtual std::ostream& hipp::HippShape::SaveObject |
( |
std::ostream & |
stream |
) |
[virtual] |
| void hipp::HippShape::setColourWhite |
( |
bool |
c |
) |
[inline] |
| void hipp::HippShape::setDescription |
( |
wxString |
desc |
) |
[inline] |
| virtual void hipp::HippShape::setLineWidth |
( |
int |
w |
) |
[inline, virtual] |
| void hipp::HippShape::setSoundFile |
( |
wxString |
soundfile |
) |
[inline] |
| void hipp::HippShape::setTitle |
( |
wxString |
title |
) |
[inline] |
| void hipp::HippShape::toggleFill |
( |
|
) |
[inline] |
| virtual void hipp::HippShape::zoom |
( |
double |
scaleX, |
|
|
double |
scaleY | |
|
) |
| | [pure virtual] |
Member Data Documentation
The documentation for this class was generated from the following files: