wxArt2D
|
corridor as a direct event path to a a2dCanvasObject More...
#include <objlist.h>
Public Member Functions | |
a2dCorridor (const a2dIterC &context) | |
a2dCorridor (const a2dDrawingPart &drawingPart) | |
initiate corridor from the current corridor path in a document. More... | |
void | Push (a2dCanvasObject *object) |
push object onto existing corridor | |
const a2dAffineMatrix & | GetTransform () const |
Get the accumulated transform up to and including m_lworld of the current object. More... | |
const a2dAffineMatrix & | GetInverseTransform () const |
Inverse of GetTransform() | |
a2dCanvasObject * | GetCaptured () const |
are events redirected to a captured corridor? if so return the captured object in it, else NULL | |
![]() | |
a2dCanvasObjectList & | operator= (const a2dCanvasObjectList &other) |
this only copies pointer stored in the list. More... | |
a2dCanvasObjectList * | Clone (a2dObject::CloneOptions options) const |
Clone everything ( Clones objects also) in a new created list. | |
a2dCanvasObjectList * | Clone (a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, a2dObject::CloneOptions options=a2dObject::clone_deep, a2dlist< long > *objectsIndex=NULL, const a2dBoundingBox &bbox=wxNonValidBbox) const |
clone to new list only objects with certain mask More... | |
a2dCanvasObjectList * | CloneChecked (a2dObject::CloneOptions options=a2dObject::clone_deep, a2dlist< long > *objectsIndex=NULL) const |
clone to new list only objects with check flag set More... | |
void | SortXY () |
sort in X and is same also Y | |
void | SortXRevY () |
sort in X and is same also in reverse Y | |
void | SortYX () |
sort in Y and is same also X | |
void | SortYRevX () |
sort in Y and is same also in reverse X | |
void | MakeUnique () |
all with reference count > 1 are cloned. | |
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 | |
bool | ChangeLayer (wxUint16 layer, a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL) |
move only in this group objects with the given mask to the layer given | |
a2dBoundingBox | GetBBox (a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL) |
int | BringToTop (a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, bool check=false) |
move only in this group objects with the given mask to the back of the list drawn last More... | |
int | BringToBack (a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, bool check=false) |
move only in this group objects with the given mask to the front of the list drawn first More... | |
int | Release (a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, const wxString &classname=wxT(""), const a2dPropertyId *id=NULL, const wxString &name=wxT(""), bool now=true) |
release only objects with the given mask and classname and has property named propertyname and object name More... | |
int | Release (a2dCanvasObject *object, bool backwards=false, bool all=true, bool now=true, const a2dPropertyId *id=NULL) |
release a specific object More... | |
int | Copy (double x, double y, a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, long target=-1, bool check=false) |
copy only in this group object with the same mask More... | |
int | Move (double x, double y, a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, long target=-1, bool check=false) |
move only in this group object with the same mask More... | |
a2dCanvasObject * | Find (a2dCanvasObject *obj) const |
return the object if it is part of the list More... | |
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. More... | |
bool | SwitchObjectNamed (const wxString &objectname, a2dCanvasObject *newobject) |
If object with the given name is found, it is switched to newobject. More... | |
void | Transform (const a2dAffineMatrix &tworld, const wxString &type=wxT(""), a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, const a2dPropertyId *id=NULL) |
Transform objects fitting the given filter. More... | |
void | SetTransform (const a2dAffineMatrix &tworld, const wxString &type=wxT(""), a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, const a2dPropertyId *id=NULL) |
Transform objects fitting the given filter. More... | |
int | TakeOverTo (a2dCanvasObjectList *total, const wxString &type=wxT(""), a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, const a2dPropertyId *id=NULL) |
Move objects fitting the given filter to the total list. More... | |
int | TakeOverFrom (a2dCanvasObjectList *total, const wxString &type=wxT(""), a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, const a2dPropertyId *id=NULL) |
Move objects fitting the given filter from the total list to this list. More... | |
int | CollectObjects (a2dCanvasObjectList *total, const wxString &type=wxT(""), a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, const a2dPropertyId *id=NULL, const a2dBoundingBox &bbox=wxNonValidBbox) |
Copy objects fitting the given filter to the total list. More... | |
bool | SetDrawerStyle (const a2dFill &brush, const a2dStroke &stroke, a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL) |
set only in this list fill and stroke of objects with the given mask | |
void | AssertUnique () |
Check if all objects are only once in the list. | |
void | Insert (size_t before, a2dCanvasObject *obj, bool ignoreReleased) |
insert at index, taking into account released objects if needed. | |
![]() | |
itSmart | Find (a2dCanvasObject *object) |
Find a specific object. | |
const_itSmart | Find (a2dCanvasObject *object) const |
Find a specific object. | |
int | IndexOf (a2dCanvasObject *object) const |
Find the index of a specific object. | |
bool | ReleaseObject (a2dCanvasObject *object) |
release a certain object from the list | |
![]() | |
a2dlist () | |
Default constructor. | |
a2dlist (const a2dlist &other) | |
Copy constructor. | |
~a2dlist () | |
Destructor. | |
a2dlist< a2dSmrtPtr < a2dCanvasObject > >::const_iterator | item (size_t index) const |
a2dlist< a2dSmrtPtr < a2dCanvasObject > >::iterator | item (size_t index) |
a2dlist< a2dSmrtPtr < a2dCanvasObject > >::reverse_iterator | rerase (typename std::list< a2dSmrtPtr< a2dCanvasObject >, std::allocator< a2dSmrtPtr< a2dCanvasObject > > >::reverse_iterator iterr) |
std::list< a2dSmrtPtr < a2dCanvasObject > , std::allocator< a2dSmrtPtr < a2dCanvasObject > > >::iterator | GetPreviousAround (typename std::list< a2dSmrtPtr< a2dCanvasObject >, std::allocator< a2dSmrtPtr< a2dCanvasObject > > >::iterator iter) |
get the previous node ( –end() if no previous ) | |
std::list< a2dSmrtPtr < a2dCanvasObject > , std::allocator< a2dSmrtPtr < a2dCanvasObject > > >::iterator | GetNextAround (typename std::list< a2dSmrtPtr< a2dCanvasObject >, std::allocator< a2dSmrtPtr< a2dCanvasObject > > >::iterator iter) |
get the next node ( begin() if no next ) | |
Additional Inherited Members | |
![]() | |
typedef a2dlist< a2dSmrtPtr < a2dCanvasObject > >::iterator | itSmart |
typedef a2dlist< a2dSmrtPtr < a2dCanvasObject > >::const_iterator | const_itSmart |
corridor as a direct event path to a a2dCanvasObject
This class is used to store the state of a corridor path set inside a a2dCanvasDocument. All a2dCanvasObject's on the path do have the a2dCanvasOFlags::IsOnCorridorPath flag set. A corridor path is normally initiated from inside a a2dCanvasDocument, somewhere in one of its nested a2dCanvasObject's. This is done via a2dIterC::SetCorridorPath(), this function also stores the matrixes that the iterative context did calculate sofar. This object can therefore be initiated with a a2dIterC.
The a2dCorridor is used in drawings and editing tools to restore a corridor to a specific object in a document, e.g when pushing and popping a tool from the toolstack. See a2dBaseTool::GetCorridor()
When one tries to construct a corridor based on a2dCanvasView, the matrixes are calculated based on the matrix of the objects in the list.
a2dCorridor::a2dCorridor | ( | const a2dDrawingPart & | drawingPart | ) |
initiate corridor from the current corridor path in a document.
The a2dCanvasObject in the document with the m_flags.m_isOnCorridorPath set, are searched starting from the view its ShowObject(), and pushed into the corridor list.
The matrix (and its inverse) at the end of the corridor is calculated from the multiplied a2dCanvasObject matrixes in the corridor.
Definition at line 790 of file objlist.cpp.
|
inline |
Get the accumulated transform up to and including m_lworld of the current object.
This converts from relative local coordinates of the current object to world coordinates. This matrix transforms all drawing primitives used to draw a a2dCanvasObject from relative world coordinates to absolute world coordinates.