Public Member Functions | Protected Member Functions | Protected Attributes

hipp::HippDocument Class Reference
[Doc/View Framework]

Implementation of wxDocument More...

#include <HippDocument.h>

List of all members.

Public Member Functions

 HippDocument (void)
 ~HippDocument (void)
wxCommandProcessor * OnCreateCommandProcessor ()
 Creation of the Command Processor This overwrites the method in wxDocument. It puts a limit to the number of commands held in the command list (undo/redo).
std::ostream & SaveObject (std::ostream &stream)
 Outputs a hipp document into the provided stream.
std::istream & LoadObject (std::istream &stream)
 Reads a .hipp file from a stream and creates the C++ objects.
list< HippShape * > * getShapes ()
HippShapegetTopShapeAt (wxPoint pt)
void setShapes (std::list< HippShape * > *shapes)
HippShapegetSelectedShape () const
void setSelectedShape (HippShape *selected)
virtual void OnCreatePolyline (PolylineEvent &event)
bool getUpdateHaptic ()

Protected Member Functions

virtual bool DoOpenDocument (const wxString &file)

Protected Attributes

std::list< HippShape * > shapes
HippShapeselected
bool updateHaptic

Detailed Description

Implementation of wxDocument

Author:
David Kadish

HippDocument is an implementation of wxDocument. It is responsible for the data associated with a .hipp file. It knows how to load the contents of a file and save the contents of a window to a file.


Constructor & Destructor Documentation

HippDocument::HippDocument ( void   ) 
HippDocument::~HippDocument ( void   ) 

Member Function Documentation

bool HippDocument::DoOpenDocument ( const wxString &  file  )  [protected, virtual]
HippShape* hipp::HippDocument::getSelectedShape (  )  const [inline]
list<HippShape*>* hipp::HippDocument::getShapes (  )  [inline]
HippShape * HippDocument::getTopShapeAt ( wxPoint  pt  ) 
bool HippDocument::getUpdateHaptic (  ) 
std::istream & hipp::HippDocument::LoadObject ( std::istream &  stream  ) 

Reads a .hipp file from a stream and creates the C++ objects.

The LoadObject function is responsible for loading a document from the provided stream so that it may be edited in the Hipp software. The function should be available with the same signature for every document element. Every element should know how to load itself from a stream.

The LoadObject function must also be the inverse of the SaveObject function. Any object saved with SaveObject should be able to be loaded with LoadObject.

wxCommandProcessor * hipp::HippDocument::OnCreateCommandProcessor (  ) 

Creation of the Command Processor This overwrites the method in wxDocument. It puts a limit to the number of commands held in the command list (undo/redo).

void HippDocument::OnCreatePolyline ( PolylineEvent event  )  [virtual]
std::ostream & hipp::HippDocument::SaveObject ( std::ostream &  stream  ) 

Outputs a hipp document into the provided stream.

The SaveObject function is responsible for outputting a document to the provided stream so that it may be written to a file by the wx doc/view system. The function should be available with the same signature for every document element. The parent element should be able to call SaveObject on it's children and they should know how to write themselves to the stream.

The SaveObject function must also be the inverse of the LoadObject function. Any object saved with SaveObject should be able to be loaded with LoadObject.

void HippDocument::setSelectedShape ( HippShape selected  ) 
void hipp::HippDocument::setShapes ( std::list< HippShape * > *  shapes  )  [inline]

Member Data Documentation

std::list<HippShape*> hipp::HippDocument::shapes [protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines