wxArt2D
Classes | Typedefs | Enumerations | Functions | Variables
canobj.h File Reference

The base class for all drawable objects in a a2dCanvasDocument. More...

#include "wx/wx.h"
#include "wx/image.h"
#include "wx/general/genmod.h"
#include "wx/geometry.h"
#include "wx/artbase/afmatrix.h"
#include "wx/artbase/bbox.h"
#include "wx/canvas/candefs.h"
#include "wx/canvas/styleprop.h"
#include "wx/canvas/xmlpars.h"
#include "wx/canvas/restrict.h"
#include "wx/canvas/hittest.h"
#include "wx/canvas/connectgen.h"
#include "wx/canvas/route.h"
#include <bitset>
#include "wx/canvas/canpin.h"
Include dependency graph for canobj.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  a2dCanvasOHitFlags
 a2dCanvasObject hit flags as a structure More...
 
class  a2dExtendedResultItem
 This is one hit result from a2dExtendedResult. More...
 
class  a2dExtendedResult
 An object of this class represents the context of a query like a hit test. More...
 
class  a2dHitEvent
 structure to give as parameter to member functions of a2dCanvasObject More...
 
class  a2dCanvasObject
 a2dCanvasObject is the base class for Canvas Objects. More...
 
struct  a2dCanvasObject::RenderChild
 used to tell which child object to render and to detect the need for it. More...
 
class  a2dCanvasObjectFilter
 class use by a2dIterC to filter objects for rendering. More...
 
class  a2dCanvasObjectFilterLayerMask
 filter on this layer and mask. More...
 
class  a2dCanvasObjectFilterLayerMaskNoToolNoEdit
 objects with m_editingcopy or m_toolobject are skipped. More...
 
class  a2dCanvasObjectFilterOnlyNoMaskBlind
 object not fitting the mask are drawn blind. More...
 
class  a2dCanvasObjectFilterPropertyNoMaskBlind
 objects not fitting the property are not drawn, inclusif its children. More...
 
class  a2dCanvasObjectFilterSelected
 filter for selected a2dCanvasObject's More...
 
class  a2dCanvasObjectFilterSelected2
 filter for selected a2dCanvasObject's More...
 
class  a2dCanvasObjectFilterHighLighted
 filter for selected a2dCanvasObject's More...
 
class  a2dCanvasObjectFilterToolObjects
 filter for tool related a2dCanvasObject's More...
 
class  a2dIterPP
 
class  a2dIterCU
 An object of this class will update a a2dIterC with the required information. More...
 
class  a2dIterC
 while iterating a a2dCanvasDocument, this holds the context. More...
 

Typedefs

typedef a2dSmrtPtr
< a2dCanvasObject
a2dCanvasObjectPtr
 
typedef a2dPropertyIdTyped
< a2dCanvasObjectPtr, class
a2dCanvasObjectPtrProperty
a2dPropertyIdCanvasObject
 
typedef a2dPropertyIdProp
< class a2dStyleProperty
a2dPropertyIdCanvasStyle
 
typedef a2dPropertyIdProp
< class a2dShadowStyleProperty
a2dPropertyIdCanvasShadowStyle
 
typedef a2dPropertyIdTyped
< a2dBoundingBox,
a2dBoudingBoxProperty
a2dPropertyIdBoundingBox
 
typedef wxUint8 a2dTag
 
typedef vector< a2dTag > a2dTagVec
 
typedef a2dPropertyIdTyped
< a2dTagVec, class
a2dTagVecProperty
a2dPropertyIdTagVec
 
typedef bool(* a2dCanvasObjectSorter )(const a2dCanvasObjectPtr &x, const a2dCanvasObjectPtr &y)
 
typedef unsigned int a2dCanViewUpdateFlagsMask
 

Enumerations

enum  a2dHitOption {
  a2dCANOBJHITOPTION_NONE = 0x0000, a2dCANOBJHITOPTION_LAYERS = 0x0001, a2dCANOBJHITOPTION_NOROOT = 0x0002, a2dCANOBJHITOPTION_NOTSELECTED = 0x0004,
  a2dCANOBJHITOPTION_ALL = 0x0008
}
 Enum for hit test options. More...
 
enum  wxEditStyle { wxEDITSTYLE_NONE = 0x0000, wxEDITSTYLE_COPY = 0x0001, wxEDITSTYLE_NOHANDLES = 0x0002 }
 
enum  a2dCanvasObjectHitFlags {
  a2dCANOBJ_EVENT_NON = 0x0001, a2dCANOBJ_EVENT_FILL = 0x0002, a2dCANOBJ_EVENT_STROKE = 0x0004, a2dCANOBJ_EVENT_FILL_NON_TRANSPARENT = 0x0008,
  a2dCANOBJ_EVENT_STROKE_NON_TRANSPARENT = 0x0010, a2dCANOBJ_EVENT_VISIBLE = 0x0020, a2dCANOBJ_EVENT_ALL = 0x0040
}
 event mask flags for a2dCanvasObject hit More...
 
enum  a2dCanViewUpdateFlags {
  a2dCANVIEW_UPDATE_NON = 0x0000, a2dCANVIEW_UPDATE_OLDNEW = 0x0001, a2dCANVIEW_UPDATE_PENDING = 0x0002, a2dCANVIEW_UPDATE_ALL = 0x0004,
  a2dCANVIEW_UPDATE_AREAS = 0x0008, a2dCANVIEW_UPDATE_AREAS_NOBLIT = 0x0010, a2dCANVIEW_UPDATE_BLIT = 0x0020, a2dCANVIEW_UPDATE_VIEWDEPENDENT = 0x0040,
  a2dCANVIEW_UPDATE_VIEWDEPENDENT_RIGHTNOW = 0x0080, a2dCANVIEW_UPDATE_PENDING_PREUPDATE = 0x0100, a2dCANVIEW_UPDATE_PENDING_POSTUPDATE = 0x0200, a2dCANVIEW_UPDATE_PENDING_PREVIEWUPDATE = 0x0800,
  a2dCANVIEW_UPDATE_SYNC_DRAWERS = a2dCANVIEW_UPDATE_OLDNEW | a2dCANVIEW_UPDATE_AREAS | a2dCANVIEW_UPDATE_BLIT
}
 mask flags for a2dDrawingPart::OnUpdate More...
 

Functions

a2dHitOption operator| (a2dHitOption a, a2dHitOption b)
 OR-ing a2dHitOption is allowed.
 
wxEditStyle operator| (wxEditStyle a, wxEditStyle b)
 
bool SetPointIfCloser (const a2dPoint2D &pointToSnapTo, const a2dPoint2D &pointToSnap, a2dPoint2D &bestPointSofar, double thresHoldWorld)
 
bool operator< (const a2dCanvasObjectPtr &a, const a2dCanvasObjectPtr &b)
 

Variables

a2dCanvasObjectSorter s_a2dCanvasObjectSorter
 

Detailed Description

The base class for all drawable objects in a a2dCanvasDocument.

Next to a2dCanvasObject, there are classes for filtering object ( a2dCanvasObjectFilter ) when iterating recursively through a document hierarchy. The class a2dIterC is used for holding the iteration context, which on its turn holds the drawing context when needed.

Author
Klaas Holwerda & Robert Roebling

Copyright: 2000-2004 (c) Robert Roebling

Licence: wxWidgets Licence

RCS-ID:

Id:
canobj.h,v 1.85 2009/07/10 19:23:13 titato Exp

Definition in file canobj.h.

Enumeration Type Documentation

Enum for hit test options.

Enumerator
a2dCANOBJHITOPTION_NONE 

no special options

a2dCANOBJHITOPTION_LAYERS 

if set, respect layer order, hit testing is done per layer from the top.

a2dCANOBJHITOPTION_NOROOT 

if set, don't hit test the root object or object for which IsHitWorld is called

This option hit tests the child objects as seen from the parent object.

a2dCANOBJHITOPTION_NOTSELECTED 

object hit should not have select flag set

a2dCANOBJHITOPTION_ALL 

if set, don't stop at the first hit, but test child/sibling objects anyway

For accurate hitting of close parallel lines. If object earlier on layer, is within tolerance, it would be hit, even if other lines are more close to the cursor, or cursor is on top of a later.

Definition at line 76 of file canobj.h.

Enumerator
wxEDITSTYLE_NONE 

no special flags set

wxEDITSTYLE_COPY 

edit a copy of the original object

There are two reasons, why you might want to edit a copy:

- In layered drawings, one might want to see the effect of the layering
  during editing (e.g. that the edited object ist partially obscured),
  while at the same time the outline of the object and the editing handles
  should be rendered on top. This behaviour is best implemented by having
  two objects, an editing object with handles on top and the usual object.

- in wxEDIT_COPY mode the editing information is transfered from the editing
  object to the original object using the command processor. This way the command
  processor is not only used for undo and redo but for all editing. This results
  in a more robust architecture (especially concerning undo/redo).

If this style is not set, the original object is edited directly. Commands
are still generated for undo/redo but the original object is not changed
by these commands, so undo/redo is less robust.
wxEDITSTYLE_NOHANDLES 

editing is completely controlled by tools. No handles are added

If a master tool is used, handle editing is not realy appropriate, because the editing tool is not active and handles are not visible before the user clicks somewhere. Also master tools need fine control over editing and use tools that perform a very specific task. This can be done without handles.

Definition at line 109 of file canobj.h.

Function Documentation

bool SetPointIfCloser ( const a2dPoint2D pointToSnapTo,
const a2dPoint2D pointToSnap,
a2dPoint2D bestPointSofar,
double  thresHoldWorld 
)

if pointToSnap is closer to pointToSnapTo than bestPointSofar, make bestPointSofar that point. But only if it is within thresHoldWorld distance.

Definition at line 4189 of file canobj.cpp.

canobj.h File Reference -- Sun Oct 12 2014 17:04:26 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation