logo

Macro Programming

logo
Contents

drawingField Class Reference

head class of the drawing More...

#include <drawingfield.h>

List of all members.


Public Member Functions

void addBoundingBox ()
 add Bounding Box
cellListaddCell ()
 add cell
void addConvexPolygon ()
 add Convex Polygon
void alignBottom ()
 align bottom
void alignCenterX ()
 align to center X
void alignCenterXY ()
 align to center XY
void alignCenterY ()
 align to center Y
void alignLeft ()
 align left
void alignRight ()
 align right
void alignTop ()
 align top
void alignValue (int dis)
 align value
void arc ()
 add arc
void bezier2 ()
 add bezier 2nd order
void bezier3 ()
 add bezier 3rd order
void box ()
 add box
void boxDeselect ()
 box deselect
void boxSelect ()
 box select
void cDeselect ()
 form deselect
void cellref (string s)
 add cellref
void cellrefarray (string s, int x, int y)
 add text
void centerX ()
 center X
void centerXY ()
 center XY
void centerY ()
 center Y
void circle ()
 add circle
void circleBox ()
 add circle in box
void circleFit ()
 fit to circle
void clearPoints ()
 clear points
void closeToPolygon ()
 close to polygon
void copy ()
 copy select
void copyCurrentCell ()
 copy current cell
void cSelect ()
 form select
void cut ()
 cut select
void deleteActuellCell ()
 delete cell
void deleteExceptOneLayer (int layer)
 delete except one layer
void deleteSelect ()
 delete select
void delPoint ()
 delete point
void deselectActiveLayer ()
 deselect active layer
void deselectAll ()
 deselect all
bool existCellname (string s)
 exist cell
void extractActiveLayer ()
 extract active layer
void extractCurrentCell ()
 extract current cell
void fAllDeselect ()
 form deselect
void fAllSelect ()
 form all select
void fDeselect ()
 form deselect
cellfindCell (string s)
 find cell
cellfindTopCell ()
 top cell
void flat ()
 flatten
void flatAll ()
 flatten multilevel
void fSelect ()
 form select
void getView (double *scale, int *x, int *y)
 get view
void group ()
 group selected elements
void importFile (string s)
 import file
void invertSelect ()
 invert select
void mergeSelect ()
 merge select
void mirror ()
 mirror select
void move ()
 move select
void moveX ()
 move x select
void moveY ()
 move y select
void openFile (string s)
 open file
void p (double x, double y)
 add point userunits
void path ()
 add path
void pathDeselect ()
 path deselect
void pathSelect ()
 path select
void pDeselect ()
 form deselect
void pMove (double x, double y)
 add relative point userunits
void point (point p)
 add point
void point (int x, int y)
 add point
void pointMove (point p)
 add point
void pointMove (int x, int y)
 move last point
void pointRel (point p)
 add point
void pointRel (int x, int y)
 add relative point
void polygon ()
 add polygon
void polygonArc ()
 add polygon arc
void polygonDeselect ()
 polygon deselect
void polygonSelect ()
 polygon select
void pRel (double x, double y)
 add relative point userunits
void prepareUndo ()
 prepare undo.
void pSelect ()
 form select
void redo ()
 redo
void relink (const string &cell)
 relink cellref
void resetUndo ()
 reset undo
void rotate (double angle)
 rotate select
void saveFile (string s)
 save file
void scale ()
 scale select
void scaleEins ()
 scale ein
void scaleFull ()
 scale full
void scaleMinus ()
 scale minus
void scalePlus ()
 scale plus
void scaleSelect ()
 scale select
void scrollDown ()
 scroll down
void scrollLeft ()
 scroll left
void scrollRight ()
 scroll right
void scrollUp ()
 scroll up
void sector ()
 add sector
void selectActiveLayer ()
 select active layer
void selectAll ()
 select all
void selectVisible ()
 select visible
void setAutoGrid ()
 auto grid
void setCap (int w)
 set cap
void setCell (const string &cell)
 set cell
void setGrid (int raster)
 set grid
void setView (double scale, int x, int y)
 set view
void setWidth (int w)
 set width
void showGridToggle ()
 toggle grid
void spiral ()
 add spiral
void stripUnneeded ()
 strip unnneded
void swapLayer (int i, int k)
 swap layer
void swapLayerAll (int i, int k)
 swap layer all cells
void swapLayerSelect (int i, int k)
 swap layer select
void text (string s)
 add text
void textDeselect ()
 tetxt deselect
void textSelect ()
 text select
void toBox ()
 convert to box
void toCircle ()
 to circle
void toPolygon ()
 convert to polygon
void undo ()
 undo
void updateFile (string s)
 update file

Public Attributes

int activeLayer
 active layer
cellcurrentCell
 current cell
double databaseunits
 databaseunits
cellListfirstCell
 list of all cell
bool gridauto
 automatic grid
int gridOffsetX
 actuell grid-offset in X
int gridOffsetY
 actuell grid-offset in Y
int gridX
 actuell grid in X
int gridY
 actuell grid in Y
string libname
 libname
double userunits
 userunits

Detailed Description

head class of the drawing

Each layout main windows has exactly one object of the class drawingField. This object can be accessed via the layout class. In the drawingField all drawing relevant information are accessible. The basic setup is stored in databaseunits, userunits and libname. The different cell are accessabe via firstCell. currentCell holds a point to the curretnly displayed cell.

All members of the drawingField class are useable in a simplyfied form without braces, commas and semicolons from the commandline-toolbar. The characters are essential, if used in a macro.


Member Function Documentation

void drawingField::addBoundingBox (  ) 

add Bounding Box

A bounding box is add to the active layer.

cellList* drawingField::addCell (  ) 

add cell

Add a cell to the drawing. A pointer to the new celllist is returned.

void drawingField::addConvexPolygon (  ) 

add Convex Polygon

A convex polygon arround all prio entered point is added to the active layer.

void drawingField::alignBottom (  ) 

align bottom

The bottom edge of the selected elements is aligned to the before entered point.

void drawingField::alignCenterX (  ) 

align to center X

Selected element are aligned to the center in the x-Axis of the two before entered points.

void drawingField::alignCenterXY (  ) 

align to center XY

Selected element are aligned to the center of the two before entered points.

void drawingField::alignCenterY (  ) 

align to center Y

Selected element are aligned to the center in the y-Axis of the two before entered points.

void drawingField::alignLeft (  ) 

align left

The left edge of the selected elements is aligned to the before entered point.

void drawingField::alignRight (  ) 

align right

The right edge of the selected elements is aligned to the before entered point.

void drawingField::alignTop (  ) 

align top

The top edge of the selected elements is aligned to the before entered point.

void drawingField::alignValue ( int  dis  ) 

align value

Selected elements are moved so that the distance of the before entered points is set to d

void drawingField::arc (  ) 

add arc

Add a arc path to the current cell. Three coordinates had to be entered before with the point command.

void drawingField::bezier2 (  ) 

add bezier 2nd order

Add a second order bezier path to the current cell. Three coordinates had to be entered before with the point command.

void drawingField::bezier3 (  ) 

add bezier 3rd order

Add a third order bezier path to the current cell. Four coordinates had to be entered before with the point command.

void drawingField::box (  ) 

add box

Add a box to the current cell. Two coordinates had to be entered before with the point command.

void drawingField::boxDeselect (  ) 

box deselect

All boxes in the current cell are deselected.

void drawingField::boxSelect (  ) 

box select

All visible boxes in the current cell are selected.

void drawingField::cDeselect (  ) 

form deselect

If one coordinate was added before with the point or p command, the nearest cellref is deselected. If two coordinate were added before with the point or p command, all cellrefs in the region p1,p2 are deselected.

void drawingField::cellref ( string  s  ) 

add cellref

Add a cellref to the current cell. One coordinate had to be entered before with the point command. This point is the reference point of the insert cellref.

void drawingField::cellrefarray ( string  s,
int  x,
int  y 
)

add text

Add a text to the current cell. Two coordinates had to be entered before with the point command. The first point is the reference point of the insert cellref. The second point defines the spacings of the array.

void drawingField::centerX (  ) 

center X

Selected element are aligned to the entered point in the x axis.

void drawingField::centerXY (  ) 

center XY

Selected element are aligned to the entered point.

void drawingField::centerY (  ) 

center Y

Selected element are aligned to the entered point in the y axis.

void drawingField::circle (  ) 

add circle

Add a circular polygon to the current cell. Two coordinates had to be entered before with the point command. The first entered point is the center, the second point mark the radius.

void drawingField::circleBox (  ) 

add circle in box

Add a circular polygon to the current cell. Two coordinates had to be entered before with the point command. The two points mark a bounding square in which the circle is added.

void drawingField::circleFit (  ) 

fit to circle

Add a circular polygon to the current cell. The circle is fitted to the before entered points.

void drawingField::clearPoints (  ) 

clear points

Delete all entered point.

void drawingField::closeToPolygon (  ) 

close to polygon

Closes selected path elements to a polygon.

void drawingField::copy (  ) 

copy select

If one coordinate was added before with the point() or p() command, selected elements are copyed and moved by p1. If two coordinate were added before with the point() or p() command, selected elements are copyed and moved by p2-p1.

void drawingField::copyCurrentCell (  ) 

copy current cell

The current cell is copied. The copied cell is name oldcellname_copy.

void drawingField::cSelect (  ) 

form select

If one coordinate was added before with the point or p command, the nearest cellref is selected. If two coordinate were added before with the point or p command, all cellrefs in the region p1,p2 are selected.

void drawingField::cut (  ) 

cut select

Selected elements between p1 and p2 are seperated. Two coordinates had to be added before with the point() or p() command.

void drawingField::deleteActuellCell (  ) 

delete cell

The current cell is deleted.

void drawingField::deleteExceptOneLayer ( int  layer  ) 

delete except one layer

All element not on the layer "layer" will be delete in any cell of the current drawing. The function can be usefull for prepareing data for mask production.

void drawingField::deleteSelect (  ) 

delete select

Selected elements/points in the currentCell are deleted.

void drawingField::delPoint (  ) 

delete point

Delete the last entered point.

void drawingField::deselectActiveLayer (  ) 

deselect active layer

All elements on the active layer are deselected.

void drawingField::deselectAll (  ) 

deselect all

All elements in the current cell are deselected.

bool drawingField::existCellname ( string  s  ) 

exist cell

Returns:
true if a cell with the name s exist.

void drawingField::extractActiveLayer (  ) 

extract active layer

All element on onther than the active layer will be deleted

void drawingField::extractCurrentCell (  ) 

extract current cell

The current is flatten mulilevel and all other cell are removed

void drawingField::fAllDeselect (  ) 

form deselect

If two coordinate were added before with the point or p command, all element in the region p1,p2 are deselected. All Points of the element must be inside the region.

void drawingField::fAllSelect (  ) 

form all select

If two coordinate were added before with the point or p command, all element in the region p1,p2 are selected. All Points of the element must be inside the region.

void drawingField::fDeselect (  ) 

form deselect

If one coordinate was added before with the point or p command, the nearest element is deselected. If two coordinate were added before with the point or p command, all element in the region p1,p2 are deselected.

cell* drawingField::findCell ( string  s  ) 

find cell

Returns:
pointer to the cell with name s. Null if the name does not exist.

cell* drawingField::findTopCell (  ) 

top cell

Returns:
cell which is not refered by an other cell.

void drawingField::flat (  ) 

flatten

Selected cellrefs and cellrefarrays are flatten.

void drawingField::flatAll (  ) 

flatten multilevel

Selected cellrefs and cellrefarrays are flatten. If the the cellrefs contain more cellrefs, they are flatten as well.

void drawingField::fSelect (  ) 

form select

If one coordinate was added before with the point or p command, the nearest element is selected. If two coordinate were added before with the point or p command, all element in the region p1,p2 are selected.

void drawingField::getView ( double *  scale,
int *  x,
int *  y 
)

get view

The current view is returned: scale and offset p(x,y).

void drawingField::group (  ) 

group selected elements

All selected elements are moved to a new cell. A correlating cellref will be added.

void drawingField::importFile ( string  s  ) 

import file

The file s is added to the current drawing.

void drawingField::invertSelect (  ) 

invert select

The selection in the current cell is inverted.

void drawingField::mergeSelect (  ) 

merge select

Selected elements in the currentCell are merged. The orginal shape is use to buil the path to inner polygons. The function works for a small amount of elements. Use the booleanHandler to merge a large amount of element.

void drawingField::mirror (  ) 

mirror select

Selected elements are mirror between p1 and p2. Two coordinates had to be added before with the point() or p() command.

void drawingField::move (  ) 

move select

If one coordinate was added before with the point() or p() command, selected elements are moved by p1. If two coordinate were added before with the point() or p() command, selected elements are moved by p2-p1.

void drawingField::moveX (  ) 

move x select

Selected elements are moved in x axis by p2-p1. Two coordinates had to be added before with the point() or p() command.

void drawingField::moveY (  ) 

move y select

Selected elements are moved in y axis by p2-p1. Two coordinates had to be added before with the point() or p() command.

void drawingField::openFile ( string  s  ) 

open file

A file with the name s is opened.

void drawingField::p ( double  x,
double  y 
)

add point userunits

Set the Command Mode and add the point p(x,y) in user units.

void drawingField::path (  ) 

add path

Add a path to the current cell. Two coordinates had to be entered before with the point command.

void drawingField::pathDeselect (  ) 

path deselect

All path elements in the current cell are deselected.

void drawingField::pathSelect (  ) 

path select

All visible path elements in the current cell are selected.

void drawingField::pDeselect (  ) 

form deselect

If one coordinate was added before with the point or p command, the nearest point is deselected. If two coordinate were added before with the point or p command, all points in the region p1,p2 are deselected.

void drawingField::pMove ( double  x,
double  y 
)

add relative point userunits

The last entered point is moved by point p(x,y) in user units.

void drawingField::point ( point  p  ) 

add point

Set the Command Mode and add the point p.

void drawingField::point ( int  x,
int  y 
)

add point

Set the Command Mode and add the point p(x,y) in drawing units.

void drawingField::pointMove ( point  p  ) 

add point

The last entered point is moved by point p(x,y).

void drawingField::pointMove ( int  x,
int  y 
)

move last point

The last entered point is moved by point p(x,y).

void drawingField::pointRel ( point  p  ) 

add point

Set the Command Mode and add the point p relative to the last point entered. The first entered point is set absolute.

void drawingField::pointRel ( int  x,
int  y 
)

add relative point

Set the Command Mode and add the point p(x,y) in drawing units relative to the last point entered. The first entered point is set absolute.

void drawingField::polygon (  ) 

add polygon

Add a polygon to the current cell. Two coordinates had to be entered before with the point command.

void drawingField::polygonArc (  ) 

add polygon arc

Add a arc polygon to the current cell. Three coordinates had to be entered before with the point command.

void drawingField::polygonDeselect (  ) 

polygon deselect

All polygons in the current cell are deselected.

void drawingField::polygonSelect (  ) 

polygon select

All visible polygons in the current cell are selected.

void drawingField::pRel ( double  x,
double  y 
)

add relative point userunits

Set the Command Mode and add the point p(x,y) in user units relative to the last point entered. The first entered point is set absolute.

void drawingField::prepareUndo (  ) 

prepare undo.

Save the cell for the next undo.

void drawingField::pSelect (  ) 

form select

If one coordinate was added before with the point or p command, the nearest point is selected. If two coordinate were added before with the point or p command, all points in the region p1,p2 are selected.

void drawingField::redo (  ) 

redo

Revoke the last undo.

void drawingField::relink ( const string cell  ) 

relink cellref

Selected cellreferences of the current cell are relinked to the cell with the name cell. There are not tests for circular or self references.

Parameters:
cell cellname to be linked

void drawingField::resetUndo (  ) 

reset undo

Reset the last undo.

void drawingField::rotate ( double  angle  ) 

rotate select

Selected elements are rotate by angle at a point prior added bwith the point() or p() command.

Parameters:
angle rotating angle in deg.

void drawingField::saveFile ( string  s  ) 

save file

The drawing is saved to s.

void drawingField::scale (  ) 

scale select

Three coordinates had to be added before with the point() or p() command.

void drawingField::scaleEins (  ) 

scale ein

The current view is scaled to 1 drawingunit to 1 pixel

void drawingField::scaleFull (  ) 

scale full

The display scale is adjusted to the size of the drawing.

void drawingField::scaleMinus (  ) 

scale minus

The scale is decreased,

void drawingField::scalePlus (  ) 

scale plus

The scale is increased,

void drawingField::scaleSelect (  ) 

scale select

The display scale is adjusted to the size of all selected elements.

void drawingField::sector (  ) 

add sector

Add a sector polygon to the current cell. Three coordinates had to be entered before with the point command.

void drawingField::selectActiveLayer (  ) 

select active layer

All elements on the active layer are selected.

void drawingField::selectAll (  ) 

select all

All elements in the current cell are selected.

void drawingField::selectVisible (  ) 

select visible

All visible elements in the current cell are deselected.

void drawingField::setAutoGrid (  ) 

auto grid

Activate the autogrid.

void drawingField::setCap ( int  w  ) 

set cap

In selected path elements the caps is set to w. (0 for no cap, 1 for round caps, 2 for square caps)

void drawingField::setCell ( const string cell  ) 

set cell

Set the Cell with the name cell to the currentCell. currentCell is set to the new set cell.

Parameters:
cell cellname of the cell to be displayed.

void drawingField::setGrid ( int  raster  ) 

set grid

The grid in x and y axis (gridX, gridY) is set to raster. The gridoffset (gridOffsetX, gridOffsetY) is reseted.

Parameters:
raster grid in databaseunits

void drawingField::setView ( double  scale,
int  x,
int  y 
)

set view

The current view is set to the scale and offset p(x,y).

void drawingField::setWidth ( int  w  ) 

set width

The width of selected path and text elements is set to w.

Parameters:
w width in databaseunits.

void drawingField::showGridToggle (  ) 

toggle grid

Show/hide the visiblity of the grid.

void drawingField::spiral (  ) 

add spiral

Add a spiral path to the current cell. Three coordinates had to be entered before with the point command.

void drawingField::stripUnneeded (  ) 

strip unnneded

All cell not needed in the current cell are delteed

void drawingField::swapLayer ( int  i,
int  k 
)

swap layer

This function swap the layers i and k in the current cell.

void drawingField::swapLayerAll ( int  i,
int  k 
)

swap layer all cells

This function swap the layers i and k in all cells of the current drawing.

void drawingField::swapLayerSelect ( int  i,
int  k 
)

swap layer select

This function swap the layers i and k of the selected elements in the current cell.

void drawingField::text ( string  s  ) 

add text

Add a text to the current cell. One coordinate had to be entered before with the point command.

void drawingField::textDeselect (  ) 

tetxt deselect

All text elements in the current cell are deselected.

void drawingField::textSelect (  ) 

text select

All visible text elements in the current cell are selected.

void drawingField::toBox (  ) 

convert to box

Selected polygons are converted to a boxelement if possible.

void drawingField::toCircle (  ) 

to circle

Converts selected element polygon and box element to a circle. The circle is fitted in all existing points of the element.

void drawingField::toPolygon (  ) 

convert to polygon

Selected path, box and text elements are converted to a polygons if possible.

void drawingField::undo (  ) 

undo

Undo the last modification. Multiply use is not possible.

void drawingField::updateFile ( string  s  ) 

update file

Cell with the same cellname with cell in the file s are replaced by the cell of this file.


Member Data Documentation

int drawingField::activeLayer

active layer

This is the default layer, on which most of the operation take place.

cell* drawingField::currentCell

current cell

This is a pointer on the cell displayed.

double drawingField::databaseunits

databaseunits

All coordinates are integer. This value is the factor of these integers to the real value.

cellList* drawingField::firstCell

list of all cell

This is a list of all cells in the drawing.

bool drawingField::gridauto

automatic grid

If this member is true, the grid is automaticly change after changing the scale.

int drawingField::gridOffsetX

actuell grid-offset in X

This member holds the actuell grid-offset in X in drawinguntis

int drawingField::gridOffsetY

actuell grid-offset in Y

This member holds the actuell grid-offset in Y in drawinguntis

int drawingField::gridX

actuell grid in X

This member holds the actuell X-grid in drawinguntis

int drawingField::gridY

actuell grid in Y

This member holds the actuell X-grid in drawinguntis

string drawingField::libname

libname

Name of this libary as used in GDS-file.

double drawingField::userunits

userunits

All values in the main widget are displayed in this unit.


Contents
SourceForge.net Logo