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/txtstrm.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 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

class  a2dCanvasOFlags
 a2dCanvasObject flags as a structure More...
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 wxCanvasObject More...
class  a2dConnectionGenerator
 when a new wire or other connection object needs to be created, 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  a2dCanvasObject::a2dDoUpdateImmediateData
 A data structure for DoUpdateImmediate. More...
class  a2dCanvasObject::a2dFeedbackId
 provide visual feedback by other objects that might participate in an editing More...
class  a2dCanvasObject::a2dFeedbackIdPinMapping
 feed back information of pins which can connect according to the 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  a2dCanvasObjectFilterHighLighted
 filter for selected a2dCanvasObject's More...
class  a2dCanvasObjectFilterToolObjects
 filter for tool related a2dCanvasObject's More...
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 wxUint64 a2dCanvasObjectFlagsMask
 mask flags for a2dCanvasObject
typedef a2dSmrtPtr
< a2dConnectionGenerator
a2dConnectionGeneratorPtr
typedef bool(* a2dCanvasObjectSorter )(const a2dCanvasObjectPtr &x, const a2dCanvasObjectPtr &y)
typedef unsigned int wxIterCFlagsMask
 mask flags for a2dIterC

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, wxEDITSTYLE_CONNECTED = 0x0004 }
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  a2dConnectTask {
  a2d_ToConnectPinClassWire_ObjectPinClass_In, a2d_ToConnectPinClassWire_ObjectPinClass_Out, a2d_ToConnectPinClassWire_ObjectPinClass_InOut, a2d_ObjectPinClass_ToConnectPinClassWire_In,
  a2d_ObjectPinClass_ToConnectPinClassWire_Out, a2d_ObjectPinClass_ToConnectPinClassWire_InOut, a2d_ToConnectPinClassObject_ObjectPinClass_In, a2d_ToConnectPinClassObject_ObjectPinClass_Out,
  a2d_ToConnectPinClassObject_ObjectPinClass_InOut, a2d_ObjectPinClass_ToConnectPinClassObject_In, a2d_ObjectPinClass_ToConnectPinClassObject_Out, a2d_ObjectPinClass_ToConnectPinClassObject_InOut
}
 flags for searching a connecting a2dpinClass, for the connecting task at hand. More...

Functions

a2dHitOption operator| (a2dHitOption a, a2dHitOption b)
 OR-ing a2dHitOption is allowed.
wxEditStyle operator| (wxEditStyle a, wxEditStyle b)
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

flags for searching a connecting a2dpinClass, for the connecting task at hand.

The format is:

a2d_PinClassWanted_ForPinClassGiven_DirectionFlags

ObjectPinClass is the object to which we want to connect ToConnectPinClass is pinclass from where we want to connect to an object

Enumerator:
a2d_ToConnectPinClassWire_ObjectPinClass_In  find wire/connect pinclass, given Normal Object In pinclass
a2d_ToConnectPinClassWire_ObjectPinClass_Out  find wire/connect pinclass, given Normal Object Out pinclass
a2d_ToConnectPinClassWire_ObjectPinClass_InOut  find wire/connect pinclass, given Normal Object In pinclass
a2d_ObjectPinClass_ToConnectPinClassWire_In  find normal object pinclass, given Connect/wire pinclass In
a2d_ObjectPinClass_ToConnectPinClassWire_Out  find normal object pinclass, given Connect/wire pinclass Out
a2d_ObjectPinClass_ToConnectPinClassWire_InOut  find normal object pinclass, given Connect/wire pinclass In/Out
a2d_ToConnectPinClassObject_ObjectPinClass_In  find pinclass, given Normal Object In pinclass
a2d_ToConnectPinClassObject_ObjectPinClass_Out  find pinclass, given Normal Object Out pinclass
a2d_ToConnectPinClassObject_ObjectPinClass_InOut  find pinclass, given Normal Object In/Out pinclass
a2d_ObjectPinClass_ToConnectPinClassObject_In  find normal object pinclass, given Normal Object In pinclass
a2d_ObjectPinClass_ToConnectPinClassObject_Out  find normal object pinclass, given Normal Object Out pinclass
a2d_ObjectPinClass_ToConnectPinClassObject_InOut  find normal object pinclass, given Normal Object In/Out pinclass

Definition at line 368 of file canobj.h.

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

Definition at line 73 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.

wxEDITSTYLE_CONNECTED  Clone the edit object using clone_reconnectable.

Definition at line 101 of file canobj.h.

canobj.h File Reference -- Tue Aug 31 17:58:38 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation