SimpleCxxLib
packageclass GCompound : public GObject
GCompound
keeps
track of its own position, and all items within it are drawn
relative to that location.
Constructor | |
Creates a GCompound object with no internal components. | |
Methods | |
add(gobj, x, y) | Adds a new graphical object to the GCompound . |
Returns a pointer to the graphical object at the specified index, numbering from back to front in the the z dimension. | |
Returns the number of graphical objects stored in the GCompound . | |
Removes the specified object from the GCompound . | |
Removes all graphical objects from the GCompound . |
GCompound();
GCompound
object with no internal components.
Usage:
GCompound *comp = new GCompound();
void add(GObject *gobj); void add(GObject *gobj, double x, double y);
GCompound
. The second
form moves the object to the point (x
, y
) first.
Usage:
comp->add(gobj); comp->add(gobj, x, y);
void remove(GObject *gobj);
GCompound
.
Usage:
comp->remove(gobj);
void removeAll();
GCompound
.
Usage:
comp->removeAll();
int getElementCount();
GCompound
.
Usage:
int n = comp->getElementCount();
GObject *getElement(int index);
Usage:
GObject *gobj = comp->getElement(index);