wxArt2D
canext.h
Go to the documentation of this file.
1 /*! \file wx/canextobj/canext.h
2  \author Klaas Holwerda
3 
4  Copyright: 2000-2004 (c) Klaas Holwerda
5 
6  Licence: wxWidgets Licence
7 
8  RCS-ID: $Id: canext.h,v 1.17 2009/09/26 20:40:32 titato Exp $
9 */
10 
11 #ifndef __WXCANEXT_H__
12 #define __WXCANEXT_H__
13 
14 #ifndef WX_PRECOMP
15 #include "wx/wx.h"
16 #endif
17 
18 #include "wx/canvas/canprim.h"
19 #include "wx/canvas/sttool.h"
20 
21 //! to render/hold a groups of text objects.
22 /*!
23  The idea is to more efficiently render lines of text.
24 
25  EXPERIMENTAL, and not yet done.
26 */
27 class A2DEDITORDLLEXP a2dTextGroup: public a2dCanvasObject
28 {
29 public:
30 
31  a2dTextGroup();
32 
33  a2dTextGroup( double x, double y );
34  ~a2dTextGroup();
35  a2dTextGroup( const a2dTextGroup& other, CloneOptions options, a2dRefMap* refs );
36 
37 private:
38  virtual a2dObject* DoClone( CloneOptions options, a2dRefMap* refs ) const;
39 
40  //!to render the child objects
41  virtual void RenderChildObjectsOneLayer( a2dIterC& ic, RenderChild& whichchilds, OVERLAP clipparent );
42 
43  DECLARE_DYNAMIC_CLASS( a2dTextGroup )
44 
45 private:
46  //!this is a not implemented copy constructor that avoids automatic creation of one
47  a2dTextGroup( const a2dTextGroup& other );
48 };
49 
50 //! To use as a drawing frame within a drawing.
51 /*!
52  \ingroup canvasobject
53 */
54 class A2DEDITORDLLEXP a2dDrawingFrame: public a2dPolygonLClipper2
55 {
56 public:
57 
58  //!construct at given position
59  /*!
60  \param x X position
61  \param y Y position
62  \param width width of window
63  \param height height of window
64  */
65  a2dDrawingFrame( double x = 0 , double y = 0, double width = 100, double height = 100 );
66 
67  //! copy/clone constructor
68  a2dDrawingFrame( const a2dDrawingFrame& other, CloneOptions options, a2dRefMap* refs );
69 
70  //!destructor
71  virtual ~a2dDrawingFrame();
72 
73  DECLARE_DYNAMIC_CLASS( a2dDrawingFrame )
74 
75  DECLARE_EVENT_TABLE()
76 
77 protected:
78  virtual a2dObject* DoClone( CloneOptions options, a2dRefMap* refs ) const;
79 
80  virtual void DoWalker( wxObject* parent, a2dWalkerIOHandler& handler );
81 
82  bool DoStartEdit( wxUint16 editmode, wxEditStyle editstyle );
83 
84  void OnCanvasObjectMouseEvent( a2dCanvasObjectMouseEvent& event );
85 
86  bool DoIsHitWorld( a2dIterC& ic, a2dHitEvent& hitEvent );
87 
88 #if wxART2D_USE_CVGIO
89  virtual void DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite );
90 
91  void DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
92 #endif //wxART2D_USE_CVGIO
93 
94  void DoRender( a2dIterC& ic, OVERLAP clipparent );
95 
96 private:
97  //!this is a not implemented copy constructor that avoids automatic creation of one
98  a2dDrawingFrame( const a2dDrawingFrame& other );
99 };
100 
101 #endif
102 
all basic primitives derived from a2dCanvasObject
mouse event sent from a2dCanvasObject to itself
Definition: canglob.h:223
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
Definition: canobj.cpp:1426
class to map references to objects stored in XML, in order to make the connection later on...
Definition: gen.h:3462
Ref Counted base object.
Definition: gen.h:1045
clips all children to a polygon
Definition: polygon.h:676
Input and output handler for the XmlSer format.
Definition: genxmlpars.h:819
OVERLAP
Result of a a2dBoundingBox intersection or hittest.
Definition: bbox.h:24
a2dCanvasObject is the base class for Canvas Objects.
Definition: canobj.h:371
To use as a drawing frame within a drawing.
Definition: canext.h:54
virtual bool DoStartEdit(wxUint16 editmode, wxEditStyle editstyle)
only used for editable objects and under control of a editing tool.
Definition: polygon.cpp:869
Io handler to iterate through a a2dDocument.
Definition: gen.h:3911
virtual void RenderChildObjectsOneLayer(a2dIterC &ic, RenderChild &whichchilds, OVERLAP clipparent)
to render the child objects
Definition: canobj.cpp:6003
to render/hold a groups of text objects.
Definition: canext.h:27
Input and output handler for the XmlSer format.
Definition: genxmlpars.h:862
void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
Definition: polygon.cpp:3377
while iterating a a2dCanvasDocument, this holds the context.
Definition: canobj.h:3212
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
Definition: polygon.cpp:1700
bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
Definition: polygon.cpp:1736
void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
Definition: polygon.cpp:1662
used to tell which child object to render and to detect the need for it.
Definition: canobj.h:381
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
Definition: polygon.cpp:3331
stack based tools controller and tools for drawing and editing.
list of a2dObject's
Definition: gen.h:3157
CloneOptions
options for cloning
Definition: gen.h:1200
structure to give as parameter to member functions of a2dCanvasObject
Definition: canobj.h:252
virtual void DoWalker(wxObject *parent, a2dWalkerIOHandler &handler)
iterate over this object and its children
Definition: canobj.cpp:5504
wxEditStyle
Definition: canobj.h:109
canext.h Source File -- Sun Oct 12 2014 17:04:13 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation