wxArt2D
|
Public Member Functions | |
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 |
int a2dCanvasObjectList::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
mask | object must have this mask. |
check | if true, moved objects will have check flag set |
Definition at line 494 of file objlist.cpp.
int a2dCanvasObjectList::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
mask | object must have this mask. |
check | if true, moved objects will have check flag set |
Definition at line 461 of file objlist.cpp.
a2dCanvasObjectList * 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
mask | object must have this mask. |
options | way to clone |
objectsIndex | list with indexes of cloned objects |
bbox | only find objects within this box. |
Definition at line 195 of file objlist.cpp.
a2dCanvasObjectList * a2dCanvasObjectList::CloneChecked | ( | a2dObject::CloneOptions | options = a2dObject::clone_deep , |
a2dlist< long > * | objectsIndex = NULL |
||
) | const |
clone to new list only objects with check flag set
options | way to clone |
objectsIndex | list with indexes of cloned objects |
Definition at line 238 of file objlist.cpp.
int a2dCanvasObjectList::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.
total | list of object found (may already contain elements found in earlier call) |
type | If type is empty it collects all objects else only object with this class name. |
mask | object must have this mask. |
id | if a property id is given, the object must have a property with this id |
bbox | only find objects within this box. |
Definition at line 663 of file objlist.cpp.
int a2dCanvasObjectList::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
x | copy object at distance x |
y | copy object at distance y |
mask | object must have this mask. |
target | if not -1, objects will be copied to this layer |
check | if true, copied objects will have check flag set |
Definition at line 406 of file objlist.cpp.
a2dCanvasObject * a2dCanvasObjectList::Find | ( | a2dCanvasObject * | obj | ) | const |
return the object if it is part of the list
obj | object to search for |
Definition at line 553 of file objlist.cpp.
a2dCanvasObject * a2dCanvasObjectList::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.
objectname | object with this name to search for |
classname | If classname is empty it collects all objects else only object with this class name. |
mask | object must have this mask. |
propid | if a property id is given, the object must have a property with this id |
valueAsString | StringValueRepresentation of the property that is required (if not empty). |
id | GetUniqueSerializationId() should be this unless 0 |
Definition at line 567 of file objlist.cpp.
int a2dCanvasObjectList::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
x | move object distance x |
y | move object distance y |
mask | object must have this mask. |
target | if not -1, objects will be copied to this layer |
check | if true, moved objects will have check flag set |
Definition at line 438 of file objlist.cpp.
a2dCanvasObjectList & a2dCanvasObjectList::operator= | ( | const a2dCanvasObjectList & | other | ) |
this only copies pointer stored in the list.
if you want the object itself copied also, use Clone
Definition at line 157 of file objlist.cpp.
int a2dCanvasObjectList::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
mask | object must have this mask. |
classname | if set, this classname is required |
id | is object contains this property, it will be released. If NULL, this parameter is ignored. |
name | if set, this name is required for the objects |
now | if true remove all references to object right now, else only set its delete flag for delete in update cycle. empty string means ignore. |
Definition at line 306 of file objlist.cpp.
int a2dCanvasObjectList::Release | ( | a2dCanvasObject * | object, |
bool | backwards = false , |
||
bool | all = true , |
||
bool | now = true , |
||
const a2dPropertyId * | id = NULL |
||
) |
release a specific object
object | object to release |
backwards | start at the end |
all | if true remove all references to object |
now | if true remove all references to object right now, else only set its delete flag for delete in update cycle. |
id | is object contains this property, it will be released. If NULL, this parameter is ignored. |
Definition at line 339 of file objlist.cpp.
void a2dCanvasObjectList::SetTransform | ( | const a2dAffineMatrix & | tworld, |
const wxString & | type = wxT( "" ) , |
||
a2dCanvasObjectFlagsMask | mask = a2dCanvasOFlags::ALL , |
||
const a2dPropertyId * | id = NULL |
||
) |
Transform objects fitting the given filter.
tworld | transform matrix to be set as the new transform for the objects |
type | If type is empty it collects all objects else only object with this class name. |
mask | object must have this mask. |
id | if a property id is given, the object must have a property with this id |
Definition at line 644 of file objlist.cpp.
bool a2dCanvasObjectList::SwitchObjectNamed | ( | const wxString & | objectname, |
a2dCanvasObject * | newobject | ||
) |
If object with the given name is found, it is switched to newobject.
The old object will be released. The new object will be owned.
Definition at line 588 of file objlist.cpp.
int a2dCanvasObjectList::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.
total | list of object found (may already contain elements found in earlier call) |
type | If type is empty it collects all objects else only object with this class name. |
mask | object must have this mask. |
id | the object needs to have this property set if not NULL |
Definition at line 724 of file objlist.cpp.
int a2dCanvasObjectList::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.
total | list of object found (may already contain elements found in earlier call) |
type | If type is empty it collects all objects else only object with this class name. |
mask | object must have this mask. |
id | the object needs to have this property set if not NULL |
Definition at line 693 of file objlist.cpp.
void a2dCanvasObjectList::Transform | ( | const a2dAffineMatrix & | tworld, |
const wxString & | type = wxT( "" ) , |
||
a2dCanvasObjectFlagsMask | mask = a2dCanvasOFlags::ALL , |
||
const a2dPropertyId * | id = NULL |
||
) |
Transform objects fitting the given filter.
tworld | transform matrix to transform the objects |
type | If type is empty it collects all objects else only object with this class name. |
mask | object must have this mask. |
id | if a property id is given, the object must have a property with this id |
Definition at line 625 of file objlist.cpp.