Glade Reference


group

A group is an object derived from a dbObj that groups together other dbObj (including other groups). This allows groups of objects to be manipulated together, e.g. move, copy, rotate operations can be carried out as if the group is an instance.

Groups can be transparent; a transparent group can have its individual members edited, whereas a non-transparent group can only have its shape manipulated (which is a rectangle on the group layer, with size equal to the bounding box of all the members).

 

Creating groups

Groups are normally created using the cellView dbCreategroup() function.

 

db_Type group::objType()

Get the type of the object as group.

 

const char * group::objName()

Get the print name of the object, as "group".

 

group::setName(const char *name)

Sets the name of the group

 

const char * s = grp.name()

Gets the group's name.

 

const Rect group::bBox()

Gets the group's bounding box.

 

int32_t group::left()

Gets the left edge / minimum X coord of the group bBox

 

int32_t group::bottom()

Gets the bottom edge / minimum Y coord of the group bBox

 

int32_t group::right()

Gets the right edge / maximum X coord of the group bBox

 

int32_t group::top()

Gets the top edge / maximum Y coord of the group bBox

 

group::orient(orient_t o)

Sets the orientation of the group.

 

orient_t group::orient()

Gets the orientation of the group.

 

group::origin(const Point &p)

Sets the origin (lower left coordinate) of the group.

 

Point & group::origin()

Gets the origin of the group.

 

group::addObject(dbObj *obj)

Adds an object obj to the group. If the object is already a member of the group, it will not be added. The group's bounding box is adjusted accordingly.

 

grp.deleteObj(dbObj *obj)

Removes an object obj from the group. The group's bounding box is adjusted accordingly.

 

int32_t group::size()

Returns the size (number of objects in the group).

 

std::vector<dbObj *> &group::members()

Returns a list of the group's members.

 

group::clear()

Removes all members of the group. The group is NOT deleted.

 

bool group::member(dbObj *obj)

Returns true if obj is a member of the group.

 

bool group::ptInPoly(const Point &p)

Returns true if the point p is inside the group's bounding box.

 

group::Move(cellView *cv, Point delta, bool opt=true)

Moves the group (of the cellView cv) and all its members by delta. If opt is true, the spatial trees are reoptimised. If many groups are to be moved, it is faster to set opt to false and make a single call to cv.optimise() after.

 

dbObj * group::Copy(cellView *cv, Point delta)

Copies the group and all its members, displacing it by delta in the cellView cv.

 

group::transform(transform &trans)

Transforms the group and all its members by trans.

 

int16_t group::layer()

Returns the group's layer id, TECH_FIGGROUP_LAYER.

 

 

Contents|Index

Copyright © Peardrop Design 2024.