21 #include <wx/wfstream.h>
22 #include <wx/module.h>
23 #include <wx/clipbrd.h>
34 #if defined(__WXMSW__) && defined(__MEMDEBUG__)
35 #include <wx/msw/msvcrt.h>
51 a2dRectMM::a2dRectMM()
63 a2dRectMM::a2dRectMM(
double x,
double y,
double w,
double h ,
double radius,
double contourwidth )
87 a2dRectMM::a2dRectMM(
const a2dBoundingBox& bbox,
double radius,
double contourwidth )
99 a2dRectMM::~a2dRectMM()
117 return new a2dRectMM( *
this, options, refs );
122 returnIsPolygon =
true;
131 for ( i = 0; i < segments->size(); i++ )
135 pointlist->push_back( point );
152 canpath->
SetFill( this->GetFill() );
286 canpathlist->push_back( canpath );
337 Append( handle =
new a2dHandle(
this, x + w, y + h , wxT(
"handle3" ) ) );
341 Append( handle =
new a2dHandle(
this, x, y + h / 2 , wxT(
"handle12" ) ) );
343 Append( handle =
new a2dHandle(
this, x + w / 2, y + h, wxT(
"handle23" ) ) );
345 Append( handle =
new a2dHandle(
this, x + w, y + h / 2 , wxT(
"handle34" ) ) );
347 Append( handle =
new a2dHandle(
this, x + w / 2, y, wxT(
"handle41" ) ) );
379 a2dHandle* draghandle =
event.GetCanvasHandle();
409 if ( draghandle->
GetName() == wxT(
"__rounding__" ) )
415 original->
SetMin( m_minx, m_miny );
421 if ( restrictEngine )
425 if ( draghandle->
GetName() == wxT(
"__rounding__" ) )
428 if ( (
m_maxx - m_minx < 0 && xwi < 0 ) || (
m_maxx - m_minx > 0 && xwi > 0 ) )
431 if ( fabs( xwi ) < fabs( (
m_maxx - m_minx ) / 2 ) && fabs( xwi ) < fabs( (
m_maxy - m_miny ) / 2 ) )
434 draghandle->
SetPosXY( xwi, m_miny );
441 draghandle->
SetPosXY( xwi, m_miny );
445 else if ( draghandle->
GetName() == wxT(
"handle1" ) )
450 else if ( draghandle->
GetName() == wxT(
"handle2" ) )
455 else if ( draghandle->
GetName() == wxT(
"handle3" ) )
460 else if ( draghandle->
GetName() == wxT(
"handle4" ) )
465 else if ( draghandle->
GetName() == wxT(
"handle12" ) )
469 else if ( draghandle->
GetName() == wxT(
"handle23" ) )
473 else if ( draghandle->
GetName() == wxT(
"handle34" ) )
477 else if ( draghandle->
GetName() == wxT(
"handle41" ) )
489 SetHandlePos( wxT(
"handle12" ), m_minx, m_miny + h / 2 );
492 SetHandlePos( wxT(
"handle41" ), m_minx + w / 2, m_miny );
510 bbox.
Expand( m_minx, m_miny );
550 #if wxART2D_USE_CVGIO
555 if ( xmlparts == a2dXmlSer_attrib )
559 out.WriteAttribute( wxT(
"minx" ), m_minx );
560 out.WriteAttribute( wxT(
"miny" ), m_miny );
561 out.WriteAttribute( wxT(
"maxx" ),
m_maxx );
562 out.WriteAttribute( wxT(
"maxy" ),
m_maxy );
563 out.WriteAttribute( wxT(
"radius" ),
m_radius );
575 if ( xmlparts == a2dXmlSer_attrib )
588 #endif //wxART2D_USE_CVGIO
610 if (
GetGeneratePins() && ( toCreate = toConnectTo->GetPinClassForTask( task,
this ) ) )
687 a2dWindowMM::a2dWindowMM(
double x,
double y,
double w,
double h )
705 a2dWindowMM::~a2dWindowMM()
712 m_style = other.m_style;
713 m_state = other.m_state;
715 m_backStroke = other.m_backStroke;
716 m_darkStroke = other.m_darkStroke;
717 m_lightStroke = other.m_lightStroke;
718 m_whiteStroke = other.m_whiteStroke;
719 m_blackStroke = other.m_blackStroke;
720 m_hoverStroke = other.m_hoverStroke;
751 m_state &= ( ALL ^ HOVER );
763 if ( m_style & SUNKEN )
766 if ( m_state & FOCUS )
801 if ( m_state & FOCUS )
843 if ( m_state &= HOVER )
857 #if wxART2D_USE_CVGIO
862 if ( xmlparts == a2dXmlSer_attrib )
876 if ( xmlparts == a2dXmlSer_attrib )
883 #endif //wxART2D_USE_CVGIO
897 const long a2dCLOSE_BUTTON = wxNewId();
913 m_close->SetFill( wxColour( 195, 195, 195 ) );
914 m_close->SetStroke( wxColour( 195, 0, 0 ) );
915 m_close->SetName( wxT(
"__CLOSE_BUTTON__" ) );
916 m_close->SetDraggable(
false );
918 a2dSLine* ll =
new a2dSLine( 0, 0, m_initialTitleHeight, m_initialTitleHeight );
919 ll->
SetStroke( wxColour( 252, 0, 252 ), 1.0 );
920 a2dSLine* ll2 =
new a2dSLine( 0, m_initialTitleHeight, m_initialTitleHeight, 0 );
921 ll2->
SetStroke( wxColour( 252, 0, 252 ), 1.0 );
925 m_close->SetContentObject( cont );
933 m_title =
new a2dText( wxT(
"" ), 0, 0,
a2dFont( m_initialTitleHeight, wxSWISS ) );
934 m_title->SetName( wxT(
"__TITLE__" ) );
935 m_title->SetDraggable(
false );
936 m_title->SetSubEditAsChild(
true );
938 m_titleObj->Append( m_close );
939 m_titleObj->Append( m_title );
944 a2dRectWindowT2::a2dRectWindowT2()
950 a2dRectWindowT2::a2dRectWindowT2(
a2dCanvasObject* parent,
double x,
double y,
double w,
double h ,
double radius )
977 m_parent = other.m_parent;
978 m_flipIn = other.m_flipIn;
979 m_titleObj = other.m_titleObj->TClone( clone_flat );
994 if ( title.IsEmpty() )
1003 textobj->
SetName( _T(
"__TITLE__" ) );
1056 m_titleObj->
Walker(
this, handler );
1077 m_titleObj->
Update( mode );
1087 m_titleObj->
Render( ic, clipparent );
1120 #if wxART2D_USE_CVGIO
1125 if ( xmlparts == a2dXmlSer_attrib )
1136 if ( xmlparts == a2dXmlSer_attrib )
1143 #endif //wxART2D_USE_CVGIO
1201 m_close =
new a2dWidgetButton(
this, a2dCLOSE_BUTTON, 0, 0, m_initialTitleHeight, m_initialTitleHeight );
1205 m_close->SetFill( wxColour( 195, 195, 195 ) );
1206 m_close->SetStroke( wxColour( 195, 0, 0 ) );
1207 m_close->SetName( wxT(
"__CLOSE_BUTTON__" ) );
1208 m_close->SetDraggable(
false );
1216 m_title =
new a2dText( wxT(
"" ), 0, 0,
a2dFont( m_initialTitleHeight, wxSWISS ) );
1218 m_title->SetName( wxT(
"__TITLE__" ) );
1219 m_title->SetDraggable(
false );
1220 m_title->SetSubEditAsChild(
true );
1221 m_title->SetMultiLine(
false );
1224 m_canvas->SetBorder( 20 );
1225 m_canvas->SetResizeOnChildBox(
true );
1226 m_canvas->SetSubEdit(
true );
1227 m_canvas->SetName( wxT(
"__CANVAS__" ) );
1228 m_canvas->SetSubEdit(
true );
1229 m_canvas->SetSubEditAsChild(
true );
1234 a2dRectWindow::a2dRectWindow()
1240 a2dRectWindow::a2dRectWindow(
a2dCanvasObject* parent,
double x,
double y,
double w,
double h )
1258 a2dRectWindow::~a2dRectWindow()
1274 m_canvas->SetSubEditAsChild(
true );
1285 if ( title.IsEmpty() )
1294 textobj->
SetName( _T(
"__TITLE__" ) );
1317 void a2dRectWindow::OnCloseWindow( wxCommandEvent& event )
1374 #if wxART2D_USE_CVGIO
1379 if ( xmlparts == a2dXmlSer_attrib )
1390 if ( xmlparts == a2dXmlSer_attrib )
1397 #endif //wxART2D_USE_CVGIO
a2dHit m_how
return in which way the object was hit (stroke, fill, ...)
bool m_processed
set if event was processed sofar
void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
virtual bool ProcessCanvasObjectEvent(a2dIterC &ic, a2dHitEvent &hitEvent)
Hit objects will receive the event.
~a2dRectWindowT2()
destructor
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
wxPoint2DDouble a2dPoint2D
this to define if coordinate numbers are integer or doubles
double m_relx
(world coordinates) hit point x relative to the canvas object its parent object(s) ...
double GetHeight() const
returns height of the boundingbox
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
virtual void Render(a2dIterC &ic, OVERLAP clipparent)
Render this object to the active a2dDrawingPart.
void SetCanvas(a2dWindowMM *canvas)
Set canvas object.
bool SetSpecificFlags(bool setOrClear, a2dCanvasObjectFlagsMask which, const wxString &classname=wxT(""), a2dCanvasObjectFlagsMask whichobjects=a2dCanvasOFlags::ALL, const a2dBoundingBox &bbox=wxNonValidBbox, const a2dAffineMatrix &tworld=a2dIDENTITY_MATRIX)
set all given bit flags at once recursive for all objects in given boundingbox
Base class for all types of strokes, understood by a2dDrawer2D classes.
a2dStroke m_titleStroke
stroke for title object
bool GetGeneratePins() const
get the GeneratePins flag
void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
void AddPending(a2dIterC &ic)
search objects ( if nested recursive ) that have the pending flag Set
a2dHandle is used inside editing versions of a certain objects.
mouse event sent from a2dCanvasObject to itself
void ConvertToLines()
Convert complex segments to line segments.
a2dConnectTask
flags for searching a connecting a2dpinClass, for the connecting task at hand.
a2dBoundingBox DoGetUnTransformedBbox(a2dBboxFlags flags=a2dCANOBJ_BBOX_NON) const
In derived object this should be overriden to calculate the boundingbox of the object without its chi...
const a2dStroke * a2dBLACK_STROKE
global a2dStroke stock object for BLACK stroking
a2dSmrtPtr< a2dWidgetButton > m_close
close object for closing window
class to map references to objects stored in XML, in order to make the connection later on...
a2dDrawing * m_root
root group for rendering and accessing the canvas's also contains layer settings
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
a2dCanvasOFlags m_flags
holds flags for objects
double m_maxx
maximum x of rectangle
const a2dAffineMatrix & GetInverseTransform() const
Inverse of GetTransform()
static const a2dCanvasObjectFlagsMask BIN2
#define EVT_CANVASOBJECT_ENTER_EVENT(func)
static event table macro for a2dCanvasObject mouse enter event
a2dPin is used in a2dCanvasObject to add pins to it.
This is a class/type description for a2dPin's.
virtual bool DoStartEdit(wxUint16 editmode, wxEditStyle editstyle)
only used for editable objects and under control of a editing tool.
void Enlarge(const double Marge)
enlarge with the given amount
double m_border
border around children towards the rectangle
void OnCloseWindow(wxCommandEvent &event)
closing behaviour
double m_radius
radius in case of rounded rectangle (negatif inwards positif outwards)
bool IsHit() const
true if this is a hit
virtual bool Update(UpdateMode mode)
Update the state of the object according to its current position etc.
#define EVT_CANVASHANDLE_MOUSE_EVENT(func)
static event table macro for a2dHandle mouse event
void SetDrawerStroke(const a2dStroke &stroke)
Used to set the current stroke.
Defines a font to be set to a2dDrawer2D or stored in a2dCanvsObject etc.
Input and output handler for the XmlSer format.
UpdateMode
Various mode flags for Update.
double m_titleheight
cache to hold the title bar height, claculated from the Title text font and size. ...
virtual void SetPending(bool pending)
set this object pending for update
OVERLAP
Result of a a2dBoundingBox intersection or hittest.
bool m_visiblechilds
child objects are visible or not
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
const a2dFill * a2dWHITE_FILL
global a2dFill stock object for WHITE filling
a2dSmrtPtr< a2dWindowMM > m_canvas
here object are placed.
The base class for all drawable objects in a a2dCanvasDocument.
double GetTransformedHitMargin()
transformed to object its coordinate system
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
wxUint16 m_layer
layer of object, default wxLAYER_DEFAULT
virtual void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
static double m_initialTitleHeight
default Title text height
void ReStoreFixedStyle()
when fixed drawing style is set, it can be overruled.
a2dCanvasObject is the base class for Canvas Objects.
virtual bool DoStartEdit(wxUint16 editmode, wxEditStyle editstyle)
only used for editable objects and under control of a editing tool.
bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dDerivedCanvasObjectStart
id for a2dWalkEvent issued from within a2dWalkerIOHandler
a2dCanvas uses a2dCanvasView for displaying a view on a a2dCanvasDocument.
vertex list of line and arc segments.
void TransformPoint(double x, double y, double &tx, double &ty) const
Transform a point.
virtual a2dVertexList * GetAsVertexList(bool &returnIsPolygon) const
convert to a polygon.
wxString GetName() const
get the name given to the handle.
virtual void EndEdit()
cleanup an editcopy object
return to contain edit bbox, suitable for editing matrix of object
a2dBoundingBox GetTextExtent(const wxString &string, int alignment=wxMINX|wxMINY, double *w=NULL, double *h=NULL, double *descent=NULL, double *externalLeading=NULL) const
Get the dimensions in world coordinates of the string.
virtual void SetName(const wxString &name)
Creates the a2dStringProperty PROPID_Name.
double m_minx
minimum x of rectangle
bool GeneratePins(a2dPinClass *toConnectTo, a2dConnectTask task, double x, double y, double margin=0)
create pins in derived objects.
a2dFont GetFont() const
get font for text
int ReleaseChild(a2dCanvasObject *obj, bool backwards=false, bool all=false, bool now=false, bool undoCommands=false)
remove the given object from the childobjects
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
vector path a2dVectorPath derived from a2dCanvasObject
a2dAffineMatrix m_lworld
used for positioning the object (x,y,ang,scale etc.)
void SetInternal(bool internal)
set when pin is within the border of its parent
void SetDrawerFill(const a2dFill &fill)
Used to set the current fill.
void SetTitle(a2dText *textObj)
set title a2dText object
Io handler to iterate through a a2dDocument.
void SetTitle(a2dText *textObj)
set title a2dText object
wxMouseEvent & GetMouseEvent()
return the original mouse event that was redirected to the a2dHandle
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
a2dText is an abstract base class.
bool GetValid() const
returns true if boundingbox is calculated properly and therefore its valid flag is set...
void Expand(const a2dPoint2D &, const a2dPoint2D &)
expand boundingbox width two points
const a2dBoundingBox & Translate(a2dPoint2D &)
translate with given vector
bool ProcessCanvasObjectEvent(a2dIterC &ic, a2dHitEvent &hitEvent)
Hit objects will receive the event.
double GetMinX() const
get minimum X of the boundingbox
double GetHeight() const
return height
virtual void DrawRoundedRectangle(double x, double y, double width, double height, double radius, bool pixelsize=false)
Draw RoundedRectangle in world coordinates.
a2dCanvasObjectList * m_childobjects
holds child objects
#define forEachIn(listtype, list)
easy iteration for a2dlist
void SetPropertyToObject(a2dObject *obj, const basetype &value, SetFlags setflags=set_none) const
Set the property in obj to value.
void Walker(wxObject *parent, a2dWalkerIOHandler &handler)
This is used to recursively walk through an object tree.
double GetPosX() const
get x position from affine matrix
rectangular shapes derived from a2dCanvasObject
a2dDrawer2D * GetDrawer2D() const
get current a2dDrawer2D
#define wxStaticCast(obj, className)
The wxWindows 2.4.2 wxStaticCast is buggy. It evaluates its argument twice.
bool m_editable
object can be edited
Normal straight line segment in a2dVertexList and a2dVertexArray.
void SetSpecificFlags(bool setOrClear, a2dCanvasObjectFlagsMask which)
set all bit flags in object that or true in mask to true or false
void Render(a2dIterC &ic, OVERLAP clipparent)
Render this object to the active a2dDrawingPart.
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
general event sent from a2dHandle to its parent a2dCanvasObject
void SetRadius(double radius)
set corner radius of rectangle
Restriction engine for editing restrictions like snapping.
bool m_childrenOnSameLayer
a2dSmrtPtr< a2dText > m_title
title a2dText object
bool HasPins(bool realcheck=false)
are there a2dPin derived children
static double m_initialTitleHeight
default Title text height
virtual void DrawLine(double x1, double y1, double x2, double y2)
Draw line in world coordinates.
Input and output handler for the XmlSer format.
a2dPin * AddPin(const wxString name, double x, double y, wxUint32 a2dpinFlags, a2dPinClass *pinClass, bool undo=false)
add a a2dPin as child
void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
a2dHandle * SetHandlePos(wxString name, double x, double y)
set a2dHandle position with the given name
bool m_resizeToChilds
when true, the wxEVT_CANVASOBJECT_RESIZE_EVENT is sent to this object, if the child box did change...
virtual bool DoStartEdit(wxUint16 editmode, wxEditStyle editstyle)
only used for editable objects and under control of a editing tool.
virtual bool DoStartEdit(wxUint16 editmode, wxEditStyle editstyle)
only used for editable objects and under control of a editing tool.
A 2x3 affine matrix class for 2D transformations.
void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
a2dStroke GetDrawerStroke() const
get the current stroke
double GetAttributeValueDouble(const wxString &attrib, double defaultv=0)
Returns the double value of an attribute.
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
double GetMaxX() const
get maximum X of the boundingbox
double m_titleheight
cache to hold the title bar height, claculated from the Title text font and size. ...
a2dPin * HasPinNamed(const wxString pinName, bool NotConnected=false)
are there a2dPin derived children which matches the given pin name?
double GetPosY() const
get y position from affine matrix
double GetWorldStrokeExtend()
void DoWalker(wxObject *parent, a2dWalkerIOHandler &handler)
iterate over this object and its children
bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
const a2dStroke * a2dWHITE_STROKE
global a2dStroke stock object for WHITE stroking
double m_maxy
maximum y of rectangle
while iterating a a2dCanvasDocument, this holds the context.
All updates of these modes force an update (e.g. update non-pending valid bounding boxes) ...
a2dFill m_titleFill
fill for title object
#define EVT_CANVASOBJECT_LEAVE_EVENT(func)
static event table macro for a2dCanvasObject mouse leave event
virtual bool Submit(a2dCommand *command, bool storeIt=true)
void DoAddPending(a2dIterC &ic)
called by addPending
void SetStroke(const wxColour &strokecolor, double width=0, a2dStrokeStyle style=a2dSTROKE_SOLID)
Set a stroke for the object which will be used instead of the layer stroke.
void Init(a2dCanvasObject *parent)
initialization used in construction
used to release object from a a2dCanvasDocument in the current parent
a2dRestrictionEngine * GetRestrictionEngine()
Get restriction engine (grid snapping)
void SetText(const wxString &text)
set the text for the object ' ' in string means new line
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
a2dCanvasCommandProcessor * GetCanvasCommandProcessor()
get a pointer to the command processor
wire classes for connecting objects.
double GetMaxY() const
get maximum Y of the boundingbox
An object of this class will update a a2dIterC with the required information.
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
void SetDraggable(bool draggable)
Sets if this object may be dragged.
void SetPosXY(double x, double y, bool restrict=false)
set position to x,y
double m_miny
minimum of rectangle
bool m_editingCopy
true if the object needs to be rendered in edit mode.
a2dStroke m_titleStroke
stroke for title object
a2dCanvasObject * m_parent
This is intentionally not a smart pointer to remove a reference loop.
a2dSmrtPtr< a2dText > m_title
title a2dText object
a2dFill GetDrawerFill() const
get the current fill
virtual void DoAddPending(a2dIterC &ic)
called by addPending
void SetMax(double maxx, double maxy)
set maximum in x and y
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
double GetWidth() const
return width
void SetMin(double minx, double miny)
set minimum in x and y
virtual bool WalkTask(wxObject *parent, wxObject *object, a2dWalkEvent event)
called from within a2dObject's and derived classes
double GetMinY() const
get minimum Y of the boundingbox
the a2dDrawingPart is a a2dView specially designed for displaying parts of a a2dDrawing. It uses a a2dDrawer2D to actually redraw things from the document, by giving that a2dDrawer2D as drawing context to the document, and telling the document to redraw a certain rectangular area. At that last is what this class is for. It optimizes the areas to be redrawn after object in the document were changed. To do that it combines redraw areas to a minimal set of redrawing areas. All the administration for this and the way things will be redrawn is from this view.
basetype GetPropertyValue(const a2dObject *obj) const
Get the property value in obj.
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dDerivedCanvasObjectEnd
id for a2dWalkEvent issued from within a2dWalkerIOHandler
#define Round(x)
round to integer such that e.g 2.5 < x < 3.5 becomes 3
a2dCanvasObject for a Vector Path
a2dCanvasObjectList * GetAsCanvasVpaths(bool transform=true) const
when implemented the object without its children, is converted to
virtual bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
void SetHeight(double h)
set height of rectangle
int GetAlignment() const
Get the position of the anchor point w.r.t the text.
a2dBoundingBox m_bbox
boundingbox in world coordinates
a2dCanvasObject * Find(const wxString &objectname, const wxString &classname=wxT(""), a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, const a2dPropertyId *propid=NULL, const wxString &valueAsString=wxT(""), wxUint32 id=0) const
return the object which fits the filter.
void Append(a2dCanvasObject *obj)
append a a2dCanvasObject to the childobjects
const a2dAffineMatrix & GetTransform() const
Get the accumulated transform up to and including m_lworld of the current object. ...
virtual void SetLayer(wxUint16 layer)
set layer index where this object is drawn upon.
wxString GetText() const
get the text of the object ' ' in string means new line
double m_contourwidth
if != 0 you get a contour around the rectangle ( donut like ).
double m_rely
(world coordinates) hit point y relative to the canvas object its parent object(s) ...
A pointer class, that automatically calls SmrtPtrOwn/SmrtPtrRelease.
double DeviceToWorldXRel(double x) const
convert x relative from device to world coordinates
CloneOptions
options for cloning
bool Update(a2dCanvasObject::UpdateMode mode)
Update the state of the object according to its current position etc.
a2dBoundingBox & GetBbox()
get boundingbox in world coordinates exclusive stroke width relative to its parent ...
structure to give as parameter to member functions of a2dCanvasObject
virtual bool RestrictPoint(double &x, double &y, wxUint32 sourceRequired=snapToAll, bool ignoreEngine=false)
Restrict a single point of a line or polyline.
a2dSmrtPtr< a2dWidgetButton > m_close
close object
void SetFill(const a2dFill &fill)
Set a fill for the object which will be used instead of the layer fill.
a2dFill m_titleFill
fill for title object
virtual void DoWalker(wxObject *parent, a2dWalkerIOHandler &handler)
iterate over this object and its children
bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
static const a2dCanvasObjectFlagsMask PRERENDERASCHILD
general canvas module declarations and classes
void OverRuleFixedStyle()
id style is FIXED, saves current style and sets style to a2dFILLED