a2dDrawingFrame Class Reference
[a2dCanvasObject related objects]

To use as a drawing frame within a drawing. More...

#include <canext.h>

Inheritance diagram for a2dDrawingFrame:

Inheritance graph
[legend]
Collaboration diagram for a2dDrawingFrame:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dDrawingFrame (double x=0, double y=0, double width=100, double height=100)
 construct at given position
 a2dDrawingFrame (const a2dDrawingFrame &other, CloneOptions options)
 copy/clone constructor
virtual ~a2dDrawingFrame ()
 destructor
virtual a2dObjectClone (CloneOptions options) const
 Clone this object and return a pointer to the new object.

Protected Member Functions

virtual void DoWalker (wxObject *parent, a2dWalkerIOHandler &handler)
 iterate over this object and its children
bool DoStartEdit (wxUint16 editmode, wxEditStyle editstyle)
 only used for editable objects and under control of a editing tool.
void OnCanvasObjectMouseEvent (a2dCanvasObjectMouseEvent &event)
 default handler for mouse events, sent to the object from the a2dCanvasView.
bool DoIsHitWorld (a2dIterC &ic, a2dHitEvent &hitEvent)
 Does hit test on the object (exclusif child objects).
virtual void DoSave (wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
 write object specific CVGL data
void DoLoad (wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
 load object specific CVG data
void DoRender (a2dIterC &ic, OVERLAP clipparent)
 render derived object


Detailed Description

To use as a drawing frame within a drawing.

Definition at line 56 of file canext.h.


Constructor & Destructor Documentation

a2dDrawingFrame::a2dDrawingFrame ( double  x = 0,
double  y = 0,
double  width = 100,
double  height = 100 
)

construct at given position

Parameters:
x X position
y Y position
width width of window
height height of window

Definition at line 280 of file canext.cpp.


Member Function Documentation

void a2dDrawingFrame::DoWalker ( wxObject *  parent,
a2dWalkerIOHandler handler 
) [protected, virtual]

iterate over this object and its children

This function allows you to extend the functionality of all a2dCanvasObject classes in a a2dCanvasDocument, without adding extra members to these objects.

Default functions are called on the a2dWalkerIOHandler, which redirect the calls to other functions based on this object its classname. On can register classes to a2dWalkerIOHandler or derived classes. This way for each unique object in the document there can be a function in a2dWalkerIOHandler.

Returns:
false if some object did not have a function attached via a2dWalkerIOHandler.
See a2dWalkerIOHandler for more.

Reimplemented from a2dCanvasObject.

Definition at line 115 of file canext.cpp.

bool a2dDrawingFrame::DoStartEdit ( wxUint16  editmode,
wxEditStyle  editstyle 
) [protected, virtual]

only used for editable objects and under control of a editing tool.

If object is editable this function is used to initialize the object for editing. In general this means adding editing handles to the child list. In the event handling of the object those handles are hit and moved, the object itself is changed accordingly.

Returns:
true is this object can be edited and is initialized for that.

Todo:
edit of bbox ( children or not included )

Reimplemented from a2dPolygonL.

Definition at line 122 of file canext.cpp.

void a2dDrawingFrame::OnCanvasObjectMouseEvent ( a2dCanvasObjectMouseEvent event  )  [protected]

default handler for mouse events, sent to the object from the a2dCanvasView.

Mouse events are sent to the object when the mouse pointer is hiting the object. The default is used when the object is in edit mode. Else it will detect if the special object tip property named __OBJECTTIP__ is available, and switch it on or off when the mouse eneter or leaves the object.

&& m_flags.m_subEditAsChild )

Reimplemented from a2dPolygonL.

Definition at line 169 of file canext.cpp.

bool a2dDrawingFrame::DoIsHitWorld ( a2dIterC ic,
a2dHitEvent hitEvent 
) [protected, virtual]

Does hit test on the object (exclusif child objects).

DoIsHitWorld() should return the way the object is hit by filling a2dHitEvent::m_how with the correct info.

Parameters:
ic iterative context ( e.g. current transform WITH the local transform applied )
hitEvent stores hit information
Returns:
true if hit

Reimplemented from a2dPolygonL.

Definition at line 310 of file canext.cpp.

void a2dDrawingFrame::DoLoad ( wxObject *  parent,
a2dIOHandlerXmlSerIn parser,
a2dXmlSer_flag  xmlparts 
) [protected, virtual]

load object specific CVG data

todo ignore until this down here is fully converted.

Reimplemented from a2dPolygonL.

Definition at line 328 of file canext.cpp.

void a2dDrawingFrame::DoRender ( a2dIterC ic,
OVERLAP  clipparent 
) [protected, virtual]

render derived object

if the object has sub objects (apart from the childobject which are handled here), those subobject most rendered by iterating on layer when needed/wanted, simular to child objects. We do not iterate here, since that is only needed if indeed there or subobjects. This will be know in a "wxDerivedCanvasObject DoRender".

SO parent objects that call this function, must:

  • 1- clip object against area to redraw.
  • 2- iterate on layers when needed.
A a2dCanvasObject is rendered as a + (plus sign) when there or no children.

Reimplemented from a2dPolygonLClipper2.

Definition at line 305 of file canext.cpp.


The documentation for this class was generated from the following files:
a2dDrawingFrame Class Reference -- Tue Aug 31 18:24:14 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation