API reference - Class LayoutView

Notation used in Ruby API documentation

Description: The view object presenting one or more layout objects

The visual part of the view is the tab panel in the main window. The non-visual part are the redraw thread, the layout handles, cell lists, layer view lists etc. This object controls these aspects of the view and controls the appearance of the data.

Public constructors

new LayoutView ptrnewCreates a standalone view

Public methods

void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
CellViewactive_cellviewGets the active cellview (shown in hierarchy browser)
[const]intactive_cellview_indexGets the index of the active cellview (shown in hierarchy browser)
voidactive_setview_index=(int index)Makes the cellview with the given index the active one (shown in hierarchy browser)
unsigned intadd_line_style(string name,
unsigned int data,
unsigned int bits)
Adds a custom line style
unsigned intadd_line_style(string name,
string string)
Adds a custom line style from a string
voidadd_missing_layersAdds new layers to layer list
unsigned intadd_stipple(string name,
unsigned int[] data,
unsigned int bits)
Adds a stipple pattern
unsigned intadd_stipple(string name,
string string)
Adds a stipple pattern given by a string
Annotationannotation(int id)Gets the annotation given by an ID
InstElementascend(int index)Ascends upwards in the hierarchy.
[const]LayerPropertiesIteratorbegin_layersBegin iterator for the layers
[const]LayerPropertiesIteratorbegin_layers(unsigned int index)Begin iterator for the layers
voidbookmark_view(string name)Bookmarks the current view under the given name
[const]DBoxboxReturns the displayed box in micron space
voidcancelCancels all edit operations
CellViewcellview(unsigned int cv_index)Gets the cellview object for a given index
[const]unsigned intcellviewsGets the number of cellviews
voidclear_annotationsClears all annotations on this view
voidclear_configClears the local configuration parameters
voidclear_imagesClear all images on this view
voidclear_layersClears all layers
voidclear_layers(unsigned int index)Clears all layers for the given layer properties list
voidclear_line_stylesRemoves all custom line styles
[const]voidclear_object_selectionClears the selection of geometrical objects (shapes or cell instances)
voidclear_stipplesRemoves all custom line styles
voidclear_transactionsClears all transactions
voidcommitEnds a transaction
voidcommit_configCommits the configuration settings
unsigned intcreate_layout(bool add_cellview)Creates a new, empty layout
unsigned intcreate_layout(string tech,
bool add_cellview)
Create a new, empty layout and associate it with the given technology
unsigned intcreate_layout(string tech,
bool add_cellview,
bool init_layers)
Create a new, empty layout and associate it with the given technology
unsigned intcreate_rdb(string name)Creates a new report database and returns the index of the new database
[const]LayerPropertiesIteratorcurrent_layerGets the current layer view
voidcurrent_layer=(const LayerPropertiesIterator iter)Sets the current layer view
[const]unsigned intcurrent_layer_listGets the index of the currently selected layer properties tab
voidcurrent_layer_list=(unsigned int index)Sets the index of the currently selected layer properties tab
voiddelete_layer(LayerPropertiesIterator iter)Deletes the layer properties node specified by the iterator
voiddelete_layer(unsigned int index,
LayerPropertiesIterator iter)
Deletes the layer properties node specified by the iterator
voiddelete_layer_list(unsigned int index)Deletes the given properties list
voiddelete_layers(LayerPropertiesIterator[] iterators)Deletes the layer properties nodes specified by the iterator
voiddelete_layers(unsigned int index,
LayerPropertiesIterator[] iterators)
Deletes the layer properties nodes specified by the iterator
voiddescend(InstElement[] path,
int index)
Descends further into the hierarchy.
[iter]Annotationeach_annotationIterates over all annotations attached to this view
[const,iter]Annotationeach_annotation_selectedIterate over each selected annotation objects, yielding a Annotation object for each of them
[iter]Imageeach_imageIterate over all images attached to this view
[const,iter]Imageeach_image_selectedIterate over each selected image object, yielding a Image object for each of them
[iter]LayerPropertiesNodeRefeach_layerHierarchically iterates over the layers in the first layer list
[iter]LayerPropertiesNodeRefeach_layer(unsigned int layer_list)Hierarchically iterates over the layers in the given layer list
[const,iter]ObjectInstPatheach_object_selectedIterates over each selected geometrical object, yielding a ObjectInstPath object for each of them
[const,iter]ObjectInstPatheach_object_selected_transientIterates over each geometrical objects in the transient selection, yielding a ObjectInstPath object for each of them
voidenable_edits(bool enable)Enables or disables edits
[const]LayerPropertiesIteratorend_layersEnd iterator for the layers
[const]LayerPropertiesIteratorend_layers(unsigned int index)End iterator for the layers
voiderase_annotation(int id)Erases the annotation given by the id
voiderase_cellview(unsigned int index)Erases the cellview with the given index
voiderase_image(unsigned long id)Erase the given image
voidexpand_layer_propertiesExpands the layer properties for all tabs
voidexpand_layer_properties(unsigned int index)Expands the layer properties for the given tab
[const]stringget_config(string name)Gets the value of a local configuration parameter
string[]get_config_namesGets the configuration parameter names
QImageget_image(unsigned int width,
unsigned int height)
Gets the layout image as a QImage
QImageget_image_with_options(unsigned int width,
unsigned int height,
int linewidth,
int oversampling,
double resolution,
const DBox target,
bool monochrome)
Gets the layout image as a QImage (with options)
stringget_line_style(unsigned int index)Gets the line style string for the style with the given index
QImageget_screenshotGets a screenshot as a QImage
stringget_stipple(unsigned int index)Gets the stipple pattern string for the pattern with the given index
[const]boolhas_annotation_selection?Returns true, if annotations (rulers) are selected in this view
[const]boolhas_image_selection?Returns true, if images are selected in this view
[const]boolhas_object_selection?Returns true, if geometrical objects (shapes or cell instances) are selected in this view
[const]boolhas_transient_object_selection?Returns true, if geometrical objects (shapes or cell instances) are selected in this view in the transient selection
voidhide_cell(unsigned int cell_index,
int cv_index)
Hides the given cell for the given cellview
Imageimage(unsigned long id)Gets the image given by an ID
[const]voidinit_layer_properties(LayerProperties props)Fills the layer properties for a new layer
voidinsert_annotation(Annotation ptr obj)Inserts an annotation object into the given view
voidinsert_image(Image obj)Insert an image object into the given view
const LayerPropertiesNode ptrinsert_layer(const LayerPropertiesIterator iter,
const LayerProperties node)
Inserts the given layer properties node into the list before the given position
const LayerPropertiesNode ptrinsert_layer(unsigned int index,
const LayerPropertiesIterator iter,
const LayerProperties node)
Inserts the given layer properties node into the list before the given position
voidinsert_layer_list(unsigned int index)Inserts a new layer properties list at the given index
[const]boolis_cell_hidden?(unsigned int cell_index,
int cv_index)
Returns true, if the cell is hidden
boolis_transacting?Indicates if a transaction is ongoing
voidload_layer_props(string fn)Loads the layer properties
voidload_layer_props(string fn,
bool add_default)
Loads the layer properties with options
voidload_layer_props(string fn,
int cv_index,
bool add_default)
Loads the layer properties with options
unsigned intload_layout(string filename,
const LoadLayoutOptions options,
string technology,
bool add_cellview)
Loads a (new) file into the layout view with the given technology
unsigned intload_layout(string filename,
const LoadLayoutOptions options,
bool add_cellview)
Loads a (new) file into the layout view
unsigned intload_layout(string filename,
string technology,
bool add_cellview)
Loads a (new) file into the layout view with the given technology
unsigned intload_layout(string filename,
bool add_cellview)
Loads a (new) file into the layout view
voidmax_hierSelects all hierarchy levels available
[const]intmax_hier_levelsReturns the maximum hierarchy level up to which to display geometries
voidmax_hier_levels=(int level)Sets the maximum hierarchy level up to which to display geometries
[const]intmin_hier_levelsReturns the minimum hierarchy level at which to display geometries
voidmin_hier_levels=(int level)Sets the minimum hierarchy level at which to display geometries
[const]unsigned intnum_layer_listsGets the number of layer properties tabs present
[const]unsigned intnum_rdbsGets the number of report databases loaded into this view
[const]ObjectInstPath[]object_selectionReturns a list of selected objects
[const]voidobject_selection=(ObjectInstPath[] sel)Sets the list of selected objects
[signal]voidon_active_cellview_changedAn event indicating that the active cellview has changed
[signal]voidon_annotation_changed(int id)A event indicating that an annotation has been modified
[signal]voidon_annotation_selection_changedA event indicating that the annotation selection has changed
[signal]voidon_annotations_changedA event indicating that annotations have been added or removed
[signal]voidon_cell_visibility_changedAn event indicating that the visibility of one or more cells has changed
[signal]voidon_cellview_changed(int cellview_index)An event indicating that a cellview has changed
[signal]voidon_cellviews_changedAn event indicating that the cellview collection has changed
[signal]voidon_closeA event indicating that the view is about to close
[signal]voidon_current_layer_list_changed(int index)An event indicating the current layer list (the selected tab) has changed
[signal]voidon_file_openAn event indicating that a file was opened
[signal]voidon_hideA event indicating that the view is going to become invisible
[signal]voidon_image_changed(int id)A event indicating that an image has been modified
[signal]voidon_image_selection_changedA event indicating that the image selection has changed
[signal]voidon_images_changedA event indicating that images have been added or removed
[signal]voidon_layer_list_changed(int flags)An event indicating that the layer list has changed
[signal]voidon_layer_list_deleted(int index)An event indicating that a layer list (a tab) has been removed
[signal]voidon_layer_list_inserted(int index)An event indicating that a layer list (a tab) has been inserted
[signal]voidon_rdb_list_changedAn event that is triggered the list of report databases is changed
[signal]voidon_selection_changedAn event that is triggered if the selection is changed
[signal]voidon_showA event indicating that the view is going to become visible
[signal]voidon_transient_selection_changedAn event that is triggered if the transient selection is changed
[signal]voidon_viewport_changedAn event indicating that the viewport (the visible rectangle) has changed
voidpan_center(const DPoint p)Pans to the given point
voidpan_downPans down
voidpan_leftPans to the left
voidpan_rightPans to the right
voidpan_upPans upward
ReportDatabase ptrrdb(int index)Gets the report database with the given index
voidreload_layout(unsigned int cv)Reloads the given cellview
voidremove_line_style(unsigned int index)Removes the line style with the given index
voidremove_rdb(unsigned int index)Removes a report database with the given index
voidremove_stipple(unsigned int index)Removes the stipple pattern with the given index
voidremove_unused_layersRemoves unused layers from layer list
voidrename_cellview(string name,
int index)
Renames the cellview with the given index
voidrename_layer_list(unsigned int index,
string name)
Sets the title of the given layer properties tab
voidreplace_annotation(int id,
const Annotation obj)
Replaces the annotation given by the id with the new one
voidreplace_image(unsigned long id,
Image new_obj)
Replace an image object with the new image
voidreplace_layer_node(const LayerPropertiesIterator iter,
const LayerProperties node)
Replaces the layer node at the position given by "iter" with a new one
voidreplace_layer_node(unsigned int index,
const LayerPropertiesIterator iter,
const LayerProperties node)
Replaces the layer node at the position given by "iter" with a new one
voidreset_titleResets the title to the standard title
voidsave_as(unsigned int index,
string filename,
const SaveLayoutOptions options)
Saves a layout to the given stream file
voidsave_image(string filename,
unsigned int width,
unsigned int height)
Saves the layout as an image to the given file
voidsave_image_with_options(string filename,
unsigned int width,
unsigned int height,
int linewidth,
int oversampling,
double resolution,
const DBox target,
bool monochrome)
Saves the layout as an image to the given file (with options)
voidsave_layer_props(string fn)Saves the layer properties
voidsave_screenshot(string filename)Saves a screenshot to the given file
[const]voidselect_object(const ObjectInstPath obj)Adds the given selection to the list of selected objects
[const]unsigned int[][]selected_cells_paths(int cv_index)Gets the paths of the selected cells
[const]LayerPropertiesIterator[]selected_layersGets the selected layers
voidset_config(string name,
string value)
Sets a local configuration parameter with the given name to the given value
voidset_layer_properties(const LayerPropertiesIterator iter,
const LayerProperties props)
Sets the layer properties of the layer pointed to by the iterator
voidset_layer_properties(unsigned int index,
const LayerPropertiesIterator iter,
const LayerProperties props)
Sets the layer properties of the layer pointed to by the iterator
voidshow_all_cellsMakes all cells shown (cancel effects of hide_cell)
voidshow_all_cells(int cv_index)Makes all cells shown (cancel effects of hide_cell) for the specified cell view
voidshow_cell(unsigned int cell_index,
int cv_index)
Shows the given cell for the given cellview (cancel effect of hide_cell)
voidshow_image(unsigned long id,
bool visible)
Shows or hides the given image
unsigned intshow_layout(Layout ptr layout,
bool add_cellview)
Shows an existing layout in the view
unsigned intshow_layout(Layout ptr layout,
string tech,
bool add_cellview)
Shows an existing layout in the view
unsigned intshow_layout(Layout ptr layout,
string tech,
bool add_cellview,
bool init_layers)
Shows an existing layout in the view
voidshow_rdb(int rdb_index,
int cv_index)
Shows a report database in the marker browser on a certain layout
voidstopStops redraw thread and close any browsers
voidstop_redrawStops the redraw thread
[const]stringtitleReturns the view's title string
voidtitle=(string title)Sets the title of the view
voidtransaction(string description)Begins a transaction
[const]voidunselect_object(const ObjectInstPath obj)Removes the given selection from the list of selected objects
voidupdate_contentUpdates the layout view to the current state
[const]intviewport_heightReturn the viewport height in pixels
[const]DCplxTransviewport_transReturns the transformation that converts micron coordinates to pixels
[const]intviewport_widthReturns the viewport width in pixels
voidzoom_box(const DBox box)Sets the viewport to the given box
voidzoom_fitFits the contents of the current view into the window
voidzoom_fit_selFits the contents of the current selection into the window
voidzoom_inZooms in somewhat
voidzoom_outZooms out somewhat

Public static methods and constants

LayoutView ptrcurrentReturns the current view

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]unsigned int[]get_current_cell_path(int cv_index)Use of this method is deprecated
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead
voidsave_as(unsigned int index,
string filename,
bool gzip,
const SaveLayoutOptions options)
Use of this method is deprecated
voidselect_cell(unsigned int cell_index,
int cv_index)
Use of this method is deprecated
voidselect_cell_path(unsigned int[] cell_index,
int cv_index)
Use of this method is deprecated
voidset_active_cellview_index(int index)Use of this method is deprecated. Use active_setview_index= instead
voidset_current_cell_path(int cv_index,
unsigned int[] arg2)
Use of this method is deprecated
voidset_current_layer_list(unsigned int index)Use of this method is deprecated. Use current_layer_list= instead
voidset_title(string title)Use of this method is deprecated. Use title= instead

Detailed description

_create

Signature: void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

_destroy

Signature: void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

_destroyed?

Signature: [const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

_is_const_object?

Signature: [const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

_manage

Signature: void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

_unmanage

Signature: void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

active_cellview

Signature: CellView active_cellview

Description: Gets the active cellview (shown in hierarchy browser)

This is a convenience method which is equivalent to cellview(active_cellview_index()).

This method has been introduced in version 0.19. Starting from version 0.25, the returned object can be manipulated which will have an immediate effect on the display.

active_cellview_index

Signature: [const] int active_cellview_index

Description: Gets the index of the active cellview (shown in hierarchy browser)

active_setview_index=

Signature: void active_setview_index= (int index)

Description: Makes the cellview with the given index the active one (shown in hierarchy browser)

See active_cellview_index.

This method has been renamed from set_active_cellview_index to active_cellview_index= in version 0.25. The original name is still available, but is deprecated.

Python specific notes:
The object exposes a writable attribute 'active_setview_index'. This is the setter.

add_line_style

Signature: unsigned int add_line_style (string name,unsigned int data,unsigned int bits)

Description: Adds a custom line style

name:The name under which this pattern will appear in the style editor
data:A bit set with the new line style pattern (bit 0 is the leftmost pixel)
bits:The number of bits to be used
Returns:The index of the newly created style, which can be used as the line style index of LayerProperties.

This method has been introduced in version 0.25.

Signature: unsigned int add_line_style (string name,string string)

Description: Adds a custom line style from a string

name:The name under which this pattern will appear in the style editor
string:A string describing the bits of the pattern ('.' for missing pixel, '*' for a set pixel)
Returns:The index of the newly created style, which can be used as the line style index of LayerProperties.

This method has been introduced in version 0.25.

add_missing_layers

Signature: void add_missing_layers

Description: Adds new layers to layer list

This method was introduced in version 0.19.

add_stipple

Signature: unsigned int add_stipple (string name,unsigned int[] data,unsigned int bits)

Description: Adds a stipple pattern

name:The name under which this pattern will appear in the stipple editor
data:See above
bits:See above
Returns:The index of the newly created stipple pattern, which can be used as the dither pattern index of LayerProperties.

'data' is an array of unsigned integers describing the bits that make up the stipple pattern. If the array has less than 32 entries, the pattern will be repeated vertically. The number of bits used can be less than 32 bit which can be specified by the 'bits' parameter. Logically, the pattern will be put at the end of the list.

Signature: unsigned int add_stipple (string name,string string)

Description: Adds a stipple pattern given by a string

name:The name under which this pattern will appear in the stipple editor
string:See above
Returns:The index of the newly created stipple pattern, which can be used as the dither pattern index of LayerProperties.

'string' is a string describing the pattern. It consists of one or more lines composed of '.' or '*' characters and separated by newline characters. A '.' is for a missing pixel and '*' for a set pixel. The length of each line must be the same. Blanks before or after each line are ignored.

This method has been introduced in version 0.25.

annotation

Signature: Annotation annotation (int id)

Description: Gets the annotation given by an ID

Returns a reference to the annotation given by the respective ID or an invalid annotation if the ID is not valid. Use Annotation#is_valid? to determine whether the returned annotation is valid or not.

The returned annotation is a 'live' object and changing it will update the view.

This method has been introduced in version 0.25.

ascend

Signature: InstElement ascend (int index)

Description: Ascends upwards in the hierarchy.

Removes one element from the specific path of the cellview with the given index. Returns the element removed.

begin_layers

Signature: [const] LayerPropertiesIterator begin_layers

Description: Begin iterator for the layers

This iterator delivers the layers of this view, either in a recursive or non-recursive fashion, depending which iterator increment methods are used. The iterator delivered by end_layers is the past-the-end iterator. It can be compared agains a current iterator to check, if there are no further elements.

Starting from version 0.25, an alternative solution is provided with 'each_layer' which is based on the LayerPropertiesNodeRef class.

Signature: [const] LayerPropertiesIterator begin_layers (unsigned int index)

Description: Begin iterator for the layers

This iterator delivers the layers of this view, either in a recursive or non-recursive fashion, depending which iterator increment methods are used. The iterator delivered by end_layers is the past-the-end iterator. It can be compared agains a current iterator to check, if there are no further elements. This version addresses a specific list in a multi-tab layer properties arrangement with the "index" parameter. This method has been introduced in version 0.21.

bookmark_view

Signature: void bookmark_view (string name)

Description: Bookmarks the current view under the given name

name:The name under which to bookmark the current state

box

Signature: [const] DBox box

Description: Returns the displayed box in micron space

cancel

Signature: void cancel

Description: Cancels all edit operations

This method will stop all pending edit operations (i.e. drag and drop) and cancel the current selection. Calling this method is useful to ensure there are no potential interactions with the script's functionality.

cellview

Signature: CellView cellview (unsigned int cv_index)

Description: Gets the cellview object for a given index

cv_index:The cellview index for which to get the object for

Starting with version 0.25, this method returns a CellView object that can be manipulated to directly reflect any changes in the display.

cellviews

Signature: [const] unsigned int cellviews

Description: Gets the number of cellviews

clear_annotations

Signature: void clear_annotations

Description: Clears all annotations on this view

clear_config

Signature: void clear_config

Description: Clears the local configuration parameters

See set_config for a description of the local configuration parameters.

clear_images

Signature: void clear_images

Description: Clear all images on this view

clear_layers

Signature: void clear_layers

Description: Clears all layers

Signature: void clear_layers (unsigned int index)

Description: Clears all layers for the given layer properties list

This version addresses a specific list in a multi-tab layer properties arrangement with the "index" parameter. This method has been introduced in version 0.21.

clear_line_styles

Signature: void clear_line_styles

Description: Removes all custom line styles

All line styles except the fixed ones are removed. If any of the custom styles is still used by the layers displayed, the results will be undefined. This method has been introduced in version 0.25.

clear_object_selection

Signature: [const] void clear_object_selection

Description: Clears the selection of geometrical objects (shapes or cell instances)

The selection of other objects (such as annotations and images) will not be affected.

This method has been introduced in version 0.24

clear_stipples

Signature: void clear_stipples

Description: Removes all custom line styles

All stipple pattern except the fixed ones are removed. If any of the custom stipple pattern is still used by the layers displayed, the results will be undefined.

clear_transactions

Signature: void clear_transactions

Description: Clears all transactions

Discard all actions in the undo buffer. After clearing that buffer, no undo is available. It is important to clear the buffer when making database modifications outside transactions, i.e after that modifications have been done. If failing to do so, 'undo' operations are likely to produce invalid results. This method was introduced in version 0.16.

commit

Signature: void commit

Description: Ends a transaction

See transaction for a detailed description of transactions. This method was introduced in version 0.16.

commit_config

Signature: void commit_config

Description: Commits the configuration settings

Some configuration options are queued for performance reasons and become active only after 'commit_config' has been called. After a sequence of set_config calls, this method should be called to activate the settings made by these calls.

This method has been introduced in version 0.25.

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

create_layout

Signature: unsigned int create_layout (bool add_cellview)

Description: Creates a new, empty layout

Returns:The index of the cellview created.

The add_cellview parameter controls whether to create a new cellview (true) or clear all cellviews before (false).

This version will associate the new layout with the default technology.

Signature: unsigned int create_layout (string tech,bool add_cellview)

Description: Create a new, empty layout and associate it with the given technology

Returns:The index of the cellview created.

The add_cellview parameter controls whether to create a new cellview (true) or clear all cellviews before (false).

This variant has been introduced in version 0.22.

Signature: unsigned int create_layout (string tech,bool add_cellview,bool init_layers)

Description: Create a new, empty layout and associate it with the given technology

Returns:The index of the cellview created.

The add_cellview parameter controls whether to create a new cellview (true) or clear all cellviews before (false). This variant also allows to control whether the layer properties are initialized (init_layers = true) or not (init_layers = false).

This variant has been introduced in version 0.22.

create_rdb

Signature: unsigned int create_rdb (string name)

Description: Creates a new report database and returns the index of the new database

name:The name of the new report database
Returns:The index of the new database

This method returns an index of the new report database. Use rdb to get the actual object. If a report database with the given name already exists, a unique name will be created. The name will be replaced by the file name when a file is loaded into the report database.

current

Signature: [static] LayoutView ptr current

Description: Returns the current view

The current view is the one that is shown in the current tab. Returns nil if no layout is loaded.

This method has been introduced in version 0.23.

current_layer

Signature: [const] LayerPropertiesIterator current_layer

Description: Gets the current layer view

Returns the LayerPropertiesIterator pointing to the current layer view (the one that has the focus). If no layer view is active currently, a null iterator is returned.

Python specific notes:
The object exposes a readable attribute 'current_layer'. This is the getter.

current_layer=

Signature: void current_layer= (const LayerPropertiesIterator iter)

Description: Sets the current layer view

Specifies an LayerPropertiesIterator pointing to the new current layer view.

This method has been introduced in version 0.23.

Python specific notes:
The object exposes a writable attribute 'current_layer'. This is the setter.

current_layer_list

Signature: [const] unsigned int current_layer_list

Description: Gets the index of the currently selected layer properties tab

This method has been introduced in version 0.21.

Python specific notes:
The object exposes a readable attribute 'current_layer_list'. This is the getter.

current_layer_list=

Signature: void current_layer_list= (unsigned int index)

Description: Sets the index of the currently selected layer properties tab

This method has been introduced in version 0.21.

Python specific notes:
The object exposes a writable attribute 'current_layer_list'. This is the setter.

delete_layer

Signature: void delete_layer (LayerPropertiesIterator iter)

Description: Deletes the layer properties node specified by the iterator

This method deletes the object that the iterator points to and invalidates the iterator since the object that the iterator points to is no longer valid.

Signature: void delete_layer (unsigned int index,LayerPropertiesIterator iter)

Description: Deletes the layer properties node specified by the iterator

This method deletes the object that the iterator points to and invalidates the iterator since the object that the iterator points to is no longer valid. This version addresses a specific list in a multi-tab layer properties arrangement with the "index" parameter. This method has been introduced in version 0.21.

delete_layer_list

Signature: void delete_layer_list (unsigned int index)

Description: Deletes the given properties list

At least one layer properties list must remain. This method may change the current properties list. This method has been introduced in version 0.21.

delete_layers

Signature: void delete_layers (LayerPropertiesIterator[] iterators)

Description: Deletes the layer properties nodes specified by the iterator

This method deletes the nodes specifies by the iterators. This method is the most convenient way to delete multiple entries.

This method has been added in version 0.22.

Signature: void delete_layers (unsigned int index,LayerPropertiesIterator[] iterators)

Description: Deletes the layer properties nodes specified by the iterator

This method deletes the nodes specifies by the iterators. This method is the most convenient way to delete multiple entries. This version addresses a specific list in a multi-tab layer properties arrangement with the "index" parameter. This method has been introduced in version 0.22.

descend

Signature: void descend (InstElement[] path,int index)

Description: Descends further into the hierarchy.

Adds the given path (given as an array of InstElement objects) to the specific path of the cellview with the given index. In effect, the cell addressed by the terminal of the new path components can be shown in the context of the upper cells, if the minimum hierarchy level is set to a negative value. The path is assumed to originate from the current cell and contain specific instances sorted from top to bottom.

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

destroyed?

Signature: [const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

each_annotation

Signature: [iter] Annotation each_annotation

Description: Iterates over all annotations attached to this view

each_annotation_selected

Signature: [const,iter] Annotation each_annotation_selected

Description: Iterate over each selected annotation objects, yielding a Annotation object for each of them

This method was introduced in version 0.19.

each_image

Signature: [iter] Image each_image

Description: Iterate over all images attached to this view

With version 0.25, the objects returned by the iterator are references and can be manipulated to change their appearance.

each_image_selected

Signature: [const,iter] Image each_image_selected

Description: Iterate over each selected image object, yielding a Image object for each of them

This method was introduced in version 0.19.

each_layer

Signature: [iter] LayerPropertiesNodeRef each_layer

Description: Hierarchically iterates over the layers in the first layer list

This iterator will recursively deliver the layers in the first layer list of the view. The objects presented by the iterator are LayerPropertiesNodeRef objects. They can be manipulated to apply changes to the layer settings or even the hierarchy of layers:

RBA::LayoutView::current.each_layer do |lref|
  # lref is a RBA::LayerPropertiesNodeRef object
  lref.visible = false
end

This method was introduced in version 0.25.

Signature: [iter] LayerPropertiesNodeRef each_layer (unsigned int layer_list)

Description: Hierarchically iterates over the layers in the given layer list

This version of this method allows specification of the layer list to be iterated over. The layer list is specified by it's index which is a value between 0 and num_layer_lists-1.For details see the parameter-less version of this method.

This method was introduced in version 0.25.

each_object_selected

Signature: [const,iter] ObjectInstPath each_object_selected

Description: Iterates over each selected geometrical object, yielding a ObjectInstPath object for each of them

This iterator will deliver const objects - they cannot be modified. In order to modify the selection, create a copy of the ObjectInstPath objects, modify them and install the new selection using select_object or object_selection=.

Another way of obtaining the selection is object_selection, which returns an array of ObjectInstPath objects.

each_object_selected_transient

Signature: [const,iter] ObjectInstPath each_object_selected_transient

Description: Iterates over each geometrical objects in the transient selection, yielding a ObjectInstPath object for each of them

This method was introduced in version 0.18.

enable_edits

Signature: void enable_edits (bool enable)

Description: Enables or disables edits

enable:Enable edits if set to true

This method allows putting the view into read-only mode by disabling all edit functions. For doing so, this method has to be called with a 'false' argument. Calling it with a 'true' parameter enables all edits again. This method must not be confused with the edit/viewer mode. The LayoutView's enable_edits method is intended to temporarily disable all menu entries and functions which could allow the user to alter the database. In 0.25, this method has been moved from MainWindow to LayoutView.

end_layers

Signature: [const] LayerPropertiesIterator end_layers

Description: End iterator for the layers

See begin_layers for a description about this iterator

Signature: [const] LayerPropertiesIterator end_layers (unsigned int index)

Description: End iterator for the layers

See begin_layers for a description about this iterator This version addresses a specific list in a multi-tab layer properties arrangement with the "index" parameter. This method has been introduced in version 0.21.

erase_annotation

Signature: void erase_annotation (int id)

Description: Erases the annotation given by the id

Deletes an existing annotation given by the id parameter. The id of an annotation can be obtained through Annotation#id.

This method has been introduced in version 0.24. Starting with version 0.25, the annotation's Annotation#delete method can also be used to delete an annotation.

erase_cellview

Signature: void erase_cellview (unsigned int index)

Description: Erases the cellview with the given index

This closes the given cellview and unloads the layout associated with it, unless referred to by another cellview.

erase_image

Signature: void erase_image (unsigned long id)

Description: Erase the given image

id:The id of the object to erase

Erases the image with the given Id. The Id can be obtained with if "id" method of the image object.

This method has been introduced in version 0.20.

With version 0.25, Image#delete can be used to achieve the same results.

expand_layer_properties

Signature: void expand_layer_properties

Description: Expands the layer properties for all tabs

This method will expand all wildcard specifications in the layer properties by iterating over the specified objects (i.e. layers, cellviews) and by replacing default colors and stipples by the ones specified with the palettes.

This method was introduced in version 0.21.

Signature: void expand_layer_properties (unsigned int index)

Description: Expands the layer properties for the given tab

This method will expand all wildcard specifications in the layer properties by iterating over the specified objects (i.e. layers, cellviews) and by replacing default colors and stipples by the ones specified with the palettes.

This method was introduced in version 0.21.

get_config

Signature: [const] string get_config (string name)

Description: Gets the value of a local configuration parameter

name:The name of the configuration parameter whose value shall be obtained (a string)
Returns:The value of the parameter

See set_config for a description of the local configuration parameters.

get_config_names

Signature: string[] get_config_names

Description: Gets the configuration parameter names

Returns:A list of configuration parameter names

This method returns the names of all known configuration parameters. These names can be used to get and set configuration parameter values.

This method was introduced in version 0.25.

get_current_cell_path

Signature: [const] unsigned int[] get_current_cell_path (int cv_index)

Description: Gets the cell path of the current cell

cv_index:The cellview index for which to get the current path from (usally this will be the active cellview index)

Use of this method is deprecated

get_image

Signature: QImage get_image (unsigned int width,unsigned int height)

Description: Gets the layout image as a QImage

width:The width of the image to render in pixel.
height:The height of the image to render in pixel.

The image contains the current scene (layout, annotations etc.). The image is drawn synchroneously with the given width and height. Drawing may take some time.

get_image_with_options

Signature: QImage get_image_with_options (unsigned int width,unsigned int height,int linewidth,int oversampling,double resolution,const DBox target,bool monochrome)

Description: Gets the layout image as a QImage (with options)

width:The width of the image to render in pixel.
height:The height of the image to render in pixel.
linewidth:The width of a line in pixels (usually 1) or 0 for default.
oversampling:The oversampling factor (1..3) or 0 for default.
resolution:The resolution (pixel size compared to a screen pixel size, i.e 1/oversampling) or 0 for default.
target_box:The box to draw or an empty box for default.
monochrome:If true, monochrome images will be produced.

The image contains the current scene (layout, annotations etc.). The image is written as a PNG file to the given file. The image is drawn synchroneously with the given width and height. Drawing may take some time. Monochrome images don't have background or annotation objects currently.

This method has been introduced in 0.23.10.

get_line_style

Signature: string get_line_style (unsigned int index)

Description: Gets the line style string for the style with the given index

This method will return the line style string for the style with the given index. The format of the string is the same than the string accepted by add_line_style. An empty string corresponds to 'solid line'.

This method has been introduced in version 0.25.

get_screenshot

Signature: QImage get_screenshot

Description: Gets a screenshot as a QImage

Getting the image requires the drawing to be complete. Ideally, synchroneous mode is switched on for the application to guarantee this condition. The image will have the size of the viewport showing the current layout.

get_stipple

Signature: string get_stipple (unsigned int index)

Description: Gets the stipple pattern string for the pattern with the given index

This method will return the stipple pattern string for the pattern with the given index. The format of the string is the same than the string accepted by add_stipple.

This method has been introduced in version 0.25.

has_annotation_selection?

Signature: [const] bool has_annotation_selection?

Description: Returns true, if annotations (rulers) are selected in this view

This method was introduced in version 0.19.

has_image_selection?

Signature: [const] bool has_image_selection?

Description: Returns true, if images are selected in this view

This method was introduced in version 0.19.

has_object_selection?

Signature: [const] bool has_object_selection?

Description: Returns true, if geometrical objects (shapes or cell instances) are selected in this view

has_transient_object_selection?

Signature: [const] bool has_transient_object_selection?

Description: Returns true, if geometrical objects (shapes or cell instances) are selected in this view in the transient selection

The transient selection represents the objects selected when the mouse hovers over the layout windows. This selection is not used for operations but rather to indicate which object would be selected if the mouse is clicked.

This method was introduced in version 0.18.

hide_cell

Signature: void hide_cell (unsigned int cell_index,int cv_index)

Description: Hides the given cell for the given cellview

image

Signature: Image image (unsigned long id)

Description: Gets the image given by an ID

Returns a reference to the image given by the respective ID or an invalid image if the ID is not valid. Use Image#is_valid? to determine whether the returned image is valid or not.

The returned image is a 'live' object and changing it will update the view.

This method has been introduced in version 0.25.

init_layer_properties

Signature: [const] void init_layer_properties (LayerProperties props)

Description: Fills the layer properties for a new layer

props:The layer properties object to initialize.

This method initializes a layer properties object's color and stipples according to the defaults for the given layer source specification. The layer's source must be set already on the layer properties object.

This method was introduced in version 0.19.

insert_annotation

Signature: void insert_annotation (Annotation ptr obj)

Description: Inserts an annotation object into the given view

Inserts a new annotation into the view. Existing annotation will remain. Use clear_annotations to delete them before inserting new ones. Use replace_annotation to replace an existing one with a new one. Starting with version 0.25 this method modifies self's ID to reflect the ID of the ruler created. After an annotation is inserted into the view, it can be modified and the changes of properties will become reflected immediately in the view.

insert_image

Signature: void insert_image (Image obj)

Description: Insert an image object into the given view

Insert the image object given by obj into the view.

With version 0.25, this method will attach the image object to the view and the image object will become a 'live' object - i.e. changes to the object will change the appearance of the image on the screen.

insert_layer

Signature: const LayerPropertiesNode ptr insert_layer (const LayerPropertiesIterator iter,const LayerProperties node)

Description: Inserts the given layer properties node into the list before the given position

This method inserts the new properties node before the position given by "iter" and returns a const reference to the element created. The iterator that specified the position will remain valid after the node was inserted and will point to the newly created node. It can be used to add futher nodes. To add children to the node inserted, use iter.last_child as insertion point for the next insert operations.

Since version 0.22, this method accepts LayerProperties and LayerPropertiesNode objects. A LayerPropertiesNode object can contain a hierarchy of further nodes.

Signature: const LayerPropertiesNode ptr insert_layer (unsigned int index,const LayerPropertiesIterator iter,const LayerProperties node)

Description: Inserts the given layer properties node into the list before the given position

This version addresses a specific list in a multi-tab layer properties arrangement with the "index" parameter. This method inserts the new properties node before the position given by "iter" and returns a const reference to the element created. The iterator that specified the position will remain valid after the node was inserted and will point to the newly created node. It can be used to add futher nodes. This method has been introduced in version 0.21. Since version 0.22, this method accepts LayerProperties and LayerPropertiesNode objects. A LayerPropertiesNode object can contain a hierarchy of further nodes.

insert_layer_list

Signature: void insert_layer_list (unsigned int index)

Description: Inserts a new layer properties list at the given index

This method inserts a new tab at the given position. The current layer properties list will be changed to the new list. This method has been introduced in version 0.21.

is_cell_hidden?

Signature: [const] bool is_cell_hidden? (unsigned int cell_index,int cv_index)

Description: Returns true, if the cell is hidden

Returns:True, if the cell with "cell_index" is hidden for the cellview "cv_index"

is_const_object?

Signature: [const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

is_transacting?

Signature: bool is_transacting?

Description: Indicates if a transaction is ongoing

See transaction for a detailed description of transactions. This method was introduced in version 0.16.

load_layer_props

Signature: void load_layer_props (string fn)

Description: Loads the layer properties

fn:The file name of the .lyp file to load

Load the layer properties from the file given in "fn"

Signature: void load_layer_props (string fn,bool add_default)

Description: Loads the layer properties with options

fn:The file name of the .lyp file to load
add_default:If true, default layers will be added for each other layer in the layout

Load the layer properties from the file given in "fn". This version allows to specify whether defaults should be used for all other layers by setting "add_default" to true.

This variant has been added on version 0.21.

Signature: void load_layer_props (string fn,int cv_index,bool add_default)

Description: Loads the layer properties with options

fn:The file name of the .lyp file to load
cv_index:See description text
add_default:If true, default layers will be added for each other layer in the layout

Load the layer properties from the file given in "fn". This version allows to specify whether defaults should be used for all other layers by setting "add_default" to true. It can be used to load the layer properties for a specific cellview by setting "cv_index" to the index for which the layer properties file should be applied. All present definitions for this layout will be removed before the properties file is loaded. "cv_index" can be set to -1. In that case, the layer properties file is applied to each of the layouts individually.

Note that this version will override all cellview index definitions in the layer properties file.

This variant has been added on version 0.21.

load_layout

Signature: unsigned int load_layout (string filename,const LoadLayoutOptions options,string technology,bool add_cellview)

Description: Loads a (new) file into the layout view with the given technology

Returns:The index of the cellview loaded.

Loads the file given by the "filename" parameter and associates it with the given technology. The options specify various options for reading the file. The add_cellview param controls whether to create a new cellview (true) or clear all cellviews before (false).

This version has been introduced in version 0.22.

Signature: unsigned int load_layout (string filename,const LoadLayoutOptions options,bool add_cellview)

Description: Loads a (new) file into the layout view

Returns:The index of the cellview loaded.

Loads the file given by the "filename" parameter. The options specify various options for reading the file. The add_cellview param controls whether to create a new cellview (true) or clear all cellviews before (false).

This method has been introduced in version 0.18.

Signature: unsigned int load_layout (string filename,string technology,bool add_cellview)

Description: Loads a (new) file into the layout view with the given technology

Returns:The index of the cellview loaded.

Loads the file given by the "filename" parameter and associates it with the given technology. The add_cellview param controls whether to create a new cellview (true) or clear all cellviews before (false).

This version has been introduced in version 0.22.

Signature: unsigned int load_layout (string filename,bool add_cellview)

Description: Loads a (new) file into the layout view

Returns:The index of the cellview loaded.

Loads the file given by the "filename" parameter. The add_cellview param controls whether to create a new cellview (true) or clear all cellviews before (false).

max_hier

Signature: void max_hier

Description: Selects all hierarchy levels available

Show the layout in full depth down to the deepest level of hierarchy. This method may cause a redraw.

max_hier_levels

Signature: [const] int max_hier_levels

Description: Returns the maximum hierarchy level up to which to display geometries

Returns:The maximum level up to which to display geometries

Python specific notes:
The object exposes a readable attribute 'max_hier_levels'. This is the getter.

max_hier_levels=

Signature: void max_hier_levels= (int level)

Description: Sets the maximum hierarchy level up to which to display geometries

level:The maximum level below which to display something

This methods allows to set the maximum hierarchy below which to display geometries.This method may cause a redraw if required.

Python specific notes:
The object exposes a writable attribute 'max_hier_levels'. This is the setter.

min_hier_levels

Signature: [const] int min_hier_levels

Description: Returns the minimum hierarchy level at which to display geometries

Returns:The minimum level at which to display geometries

Python specific notes:
The object exposes a readable attribute 'min_hier_levels'. This is the getter.

min_hier_levels=

Signature: void min_hier_levels= (int level)

Description: Sets the minimum hierarchy level at which to display geometries

level:The minimum level above which to display something

This methods allows to set the minimum hierarchy level above which to display geometries.This method may cause a redraw if required.

Python specific notes:
The object exposes a writable attribute 'min_hier_levels'. This is the setter.

new

Signature: [static] new LayoutView ptr new

Description: Creates a standalone view

This constructor is for special purposes only. To create a view in the context of a main window, use MainWindow#create_view and related methods.

This constructor has been introduced in version 0.25.

Python specific notes:
This method is the default initializer of the object

num_layer_lists

Signature: [const] unsigned int num_layer_lists

Description: Gets the number of layer properties tabs present

This method has been introduced in version 0.23.

num_rdbs

Signature: [const] unsigned int num_rdbs

Description: Gets the number of report databases loaded into this view

Returns:The number of ReportDatabase objects present in this view

object_selection

Signature: [const] ObjectInstPath[] object_selection

Description: Returns a list of selected objects

This method will deliver an array of ObjectInstPath objects listing the selected geometrical objects. Other selected objects such as annotations and images will not be contained in that list.

The list returned is an array of copies of ObjectInstPath objects. They can be modified, but they will become a new selection only after re-introducing them into the view through object_selection= or select_object.

Another way of obtaining the selected objects is each_object_selected.

This method has been introduced in version 0.24.

Python specific notes:
The object exposes a readable attribute 'object_selection'. This is the getter.

object_selection=

Signature: [const] void object_selection= (ObjectInstPath[] sel)

Description: Sets the list of selected objects

This method will set the selection of geometrical objects such as shapes and instances. It is the setter which complements the object_selection method.

Another way of setting the selection is through clear_object_selection and select_object.

This method has been introduced in version 0.24.

Python specific notes:
The object exposes a writable attribute 'object_selection'. This is the setter.

on_active_cellview_changed

Signature: [signal] void on_active_cellview_changed

Description: An event indicating that the active cellview has changed

If the active cellview is changed by selecting a new one from the drop-down list, this event is triggered. When this event is triggered, the cellview has already been changed. Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods (add_active_cellview_changed/remove_active_cellview_changed) have been removed in 0.25.

Python specific notes:
The object exposes a readable attribute 'on_active_cellview_changed'. This is the getter. The object exposes a readable attribute 'on_active_cellview_changed'. This is the getter. The object exposes a writable attribute 'on_active_cellview_changed'. This is the setter.

on_annotation_changed

Signature: [signal] void on_annotation_changed (int id)

Description: A event indicating that an annotation has been modified

The argument of the event is the ID of the annotation that was changed. This event has been added in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_annotation_changed'. This is the getter. The object exposes a writable attribute 'on_annotation_changed'. This is the setter. This method is available as method 'on_annotation_changed_' in Python

on_annotation_selection_changed

Signature: [signal] void on_annotation_selection_changed

Description: A event indicating that the annotation selection has changed

This event has been added in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_annotation_selection_changed'. This is the getter. The object exposes a readable attribute 'on_annotation_selection_changed'. This is the getter. The object exposes a writable attribute 'on_annotation_selection_changed'. This is the setter.

on_annotations_changed

Signature: [signal] void on_annotations_changed

Description: A event indicating that annotations have been added or removed

This event has been added in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_annotations_changed'. This is the getter. The object exposes a readable attribute 'on_annotations_changed'. This is the getter. The object exposes a writable attribute 'on_annotations_changed'. This is the setter.

on_cell_visibility_changed

Signature: [signal] void on_cell_visibility_changed

Description: An event indicating that the visibility of one or more cells has changed

This event is triggered after the visibility of one or more cells has changed.

Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods (add_cell_visibility_observer/remove_cell_visibility_observer) have been removed in 0.25.

Python specific notes:
The object exposes a readable attribute 'on_cell_visibility_changed'. This is the getter. The object exposes a readable attribute 'on_cell_visibility_changed'. This is the getter. The object exposes a writable attribute 'on_cell_visibility_changed'. This is the setter.

on_cellview_changed

Signature: [signal] void on_cellview_changed (int cellview_index)

Description: An event indicating that a cellview has changed

If a cellview is modified, this event is triggered. When this event is triggered, the cellview have already been changed. The integer parameter of this event will indicate the cellview that has changed.

Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods (add_cellview_observer/remove_cellview_observer) have been removed in 0.25.

Python specific notes:
The object exposes a readable attribute 'on_cellview_changed'. This is the getter. The object exposes a writable attribute 'on_cellview_changed'. This is the setter. This method is available as method 'on_cellview_changed_' in Python

on_cellviews_changed

Signature: [signal] void on_cellviews_changed

Description: An event indicating that the cellview collection has changed

If new cellviews are added or cellviews are removed, this event is triggered. When this event is triggered, the cellviews have already been changed. Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods (add_cellview_list_observer/remove_cellview_list_observer) have been removed in 0.25.

Python specific notes:
The object exposes a readable attribute 'on_cellviews_changed'. This is the getter. The object exposes a readable attribute 'on_cellviews_changed'. This is the getter. The object exposes a writable attribute 'on_cellviews_changed'. This is the setter.

on_close

Signature: [signal] void on_close

Description: A event indicating that the view is about to close

This event is triggered when the view is going to be closed entirely.

It has been added in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_close'. This is the getter. The object exposes a readable attribute 'on_close'. This is the getter. The object exposes a writable attribute 'on_close'. This is the setter.

on_current_layer_list_changed

Signature: [signal] void on_current_layer_list_changed (int index)

Description: An event indicating the current layer list (the selected tab) has changed

index:The index of the new current layer list

This event is triggered after the current layer list was changed - i.e. a new tab was selected.

This event was introduced in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_current_layer_list_changed'. This is the getter. The object exposes a writable attribute 'on_current_layer_list_changed'. This is the setter. This method is available as method 'on_current_layer_list_changed_' in Python

on_file_open

Signature: [signal] void on_file_open

Description: An event indicating that a file was opened

If a file is loaded, this event is triggered. When this event is triggered, the file was already loaded and the new file is the new active cellview. Despite it's name, this event is also triggered if a layout object is loaded into the view.

Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods (add_file_open_observer/remove_file_open_observer) have been removed in 0.25.

Python specific notes:
The object exposes a readable attribute 'on_file_open'. This is the getter. The object exposes a readable attribute 'on_file_open'. This is the getter. The object exposes a writable attribute 'on_file_open'. This is the setter.

on_hide

Signature: [signal] void on_hide

Description: A event indicating that the view is going to become invisible

It has been added in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_hide'. This is the getter. The object exposes a readable attribute 'on_hide'. This is the getter. The object exposes a writable attribute 'on_hide'. This is the setter.

on_image_changed

Signature: [signal] void on_image_changed (int id)

Description: A event indicating that an image has been modified

The argument of the event is the ID of the image that was changed. This event has been added in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_image_changed'. This is the getter. The object exposes a writable attribute 'on_image_changed'. This is the setter. This method is available as method 'on_image_changed_' in Python

on_image_selection_changed

Signature: [signal] void on_image_selection_changed

Description: A event indicating that the image selection has changed

This event has been added in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_image_selection_changed'. This is the getter. The object exposes a readable attribute 'on_image_selection_changed'. This is the getter. The object exposes a writable attribute 'on_image_selection_changed'. This is the setter.

on_images_changed

Signature: [signal] void on_images_changed

Description: A event indicating that images have been added or removed

This event has been added in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_images_changed'. This is the getter. The object exposes a readable attribute 'on_images_changed'. This is the getter. The object exposes a writable attribute 'on_images_changed'. This is the setter.

on_layer_list_changed

Signature: [signal] void on_layer_list_changed (int flags)

Description: An event indicating that the layer list has changed

This event is triggered after the layer list has changed it's configuration. The integer argument gives a hint about the nature of the changed: Bit 0 is set, if the properties (visibility, color etc.) of one or more layers have changed. Bit 1 is set if the hierarchy has changed. Bit 2 is set, if layer names have changed. Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods (add_layer_list_observer/remove_layer_list_observer) have been removed in 0.25.

Python specific notes:
The object exposes a readable attribute 'on_layer_list_changed'. This is the getter. The object exposes a writable attribute 'on_layer_list_changed'. This is the setter. This method is available as method 'on_layer_list_changed_' in Python

on_layer_list_deleted

Signature: [signal] void on_layer_list_deleted (int index)

Description: An event indicating that a layer list (a tab) has been removed

index:The index of the layer list that was removed

This event is triggered after the layer list has been removed - i.e. a tab was deleted.

This event was introduced in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_layer_list_deleted'. This is the getter. The object exposes a writable attribute 'on_layer_list_deleted'. This is the setter. This method is available as method 'on_layer_list_deleted_' in Python

on_layer_list_inserted

Signature: [signal] void on_layer_list_inserted (int index)

Description: An event indicating that a layer list (a tab) has been inserted

index:The index of the layer list that was inserted

This event is triggered after the layer list has been inserted - i.e. a new tab was created.

This event was introduced in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_layer_list_inserted'. This is the getter. The object exposes a writable attribute 'on_layer_list_inserted'. This is the setter. This method is available as method 'on_layer_list_inserted_' in Python

on_rdb_list_changed

Signature: [signal] void on_rdb_list_changed

Description: An event that is triggered the list of report databases is changed

If a report database is added or removed, this event is triggered.

This event was translated from the Observer pattern to an event in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_rdb_list_changed'. This is the getter. The object exposes a readable attribute 'on_rdb_list_changed'. This is the getter. The object exposes a writable attribute 'on_rdb_list_changed'. This is the setter.

on_selection_changed

Signature: [signal] void on_selection_changed

Description: An event that is triggered if the selection is changed

If the selection changed, this event is triggered.

This event was translated from the Observer pattern to an event in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_selection_changed'. This is the getter. The object exposes a readable attribute 'on_selection_changed'. This is the getter. The object exposes a writable attribute 'on_selection_changed'. This is the setter.

on_show

Signature: [signal] void on_show

Description: A event indicating that the view is going to become visible

It has been added in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_show'. This is the getter. The object exposes a readable attribute 'on_show'. This is the getter. The object exposes a writable attribute 'on_show'. This is the setter.

on_transient_selection_changed

Signature: [signal] void on_transient_selection_changed

Description: An event that is triggered if the transient selection is changed

If the transient selection is changed, this event is triggered. The transient selection is the highlighted selection when the mouse hovers over some object(s). This event was translated from the Observer pattern to an event in version 0.25.

Python specific notes:
The object exposes a readable attribute 'on_transient_selection_changed'. This is the getter. The object exposes a readable attribute 'on_transient_selection_changed'. This is the getter. The object exposes a writable attribute 'on_transient_selection_changed'. This is the setter.

on_viewport_changed

Signature: [signal] void on_viewport_changed

Description: An event indicating that the viewport (the visible rectangle) has changed

This event is triggered after a new display rectangle was chosen - for example, because the user zoomed into the layout.

Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods (add_viewport_changed_observer/remove_viewport_changed_observer) have been removed in 0.25.

Python specific notes:
The object exposes a readable attribute 'on_viewport_changed'. This is the getter. The object exposes a readable attribute 'on_viewport_changed'. This is the getter. The object exposes a writable attribute 'on_viewport_changed'. This is the setter.

pan_center

Signature: void pan_center (const DPoint p)

Description: Pans to the given point

The window is positioned such that "p" becomes the new center

pan_down

Signature: void pan_down

Description: Pans down

pan_left

Signature: void pan_left

Description: Pans to the left

pan_right

Signature: void pan_right

Description: Pans to the right

pan_up

Signature: void pan_up

Description: Pans upward

rdb

Signature: ReportDatabase ptr rdb (int index)

Description: Gets the report database with the given index

Returns:The ReportDatabase object or nil if the index is not valid

reload_layout

Signature: void reload_layout (unsigned int cv)

Description: Reloads the given cellview

cv:The index of the cellview to reload

remove_line_style

Signature: void remove_line_style (unsigned int index)

Description: Removes the line style with the given index

The line styles with an index less than the first custom style. If a style is removed that is still used, the results are undefined.

This method has been introduced in version 0.25.

remove_rdb

Signature: void remove_rdb (unsigned int index)

Description: Removes a report database with the given index

The:index of the report database to remove from this view

remove_stipple

Signature: void remove_stipple (unsigned int index)

Description: Removes the stipple pattern with the given index

The pattern with an index less than the first custom pattern cannot be removed. If a stipple pattern is removed that is still used, the results are undefined.

remove_unused_layers

Signature: void remove_unused_layers

Description: Removes unused layers from layer list

This method was introduced in version 0.19.

rename_cellview

Signature: void rename_cellview (string name,int index)

Description: Renames the cellview with the given index

If the name is not unique, a unique name will be constructed from the name given. The name may be different from the filename but is associated with the layout object. If a layout is shared between multiple cellviews (which may happen due to a clone of the layout view for example), all cellviews are renamed.

rename_layer_list

Signature: void rename_layer_list (unsigned int index,string name)

Description: Sets the title of the given layer properties tab

This method has been introduced in version 0.21.

replace_annotation

Signature: void replace_annotation (int id,const Annotation obj)

Description: Replaces the annotation given by the id with the new one

Replaces an existing annotation given by the id parameter with the new one. The id of an annotation can be obtained through Annotation#id.

This method has been introduced in version 0.24.

replace_image

Signature: void replace_image (unsigned long id,Image new_obj)

Description: Replace an image object with the new image

id:The id of the object to replace
new_obj:The new object to replace the old one

Replaces the image with the given Id with the new object. The Id can be obtained with if "id" method of the image object.

This method has been introduced in version 0.20.

replace_layer_node

Signature: void replace_layer_node (const LayerPropertiesIterator iter,const LayerProperties node)

Description: Replaces the layer node at the position given by "iter" with a new one

Since version 0.22, this method accepts LayerProperties and LayerPropertiesNode objects. A LayerPropertiesNode object can contain a hierarchy of further nodes.

Signature: void replace_layer_node (unsigned int index,const LayerPropertiesIterator iter,const LayerProperties node)

Description: Replaces the layer node at the position given by "iter" with a new one

This version addresses a specific list in a multi-tab layer properties arrangement with the "index" parameter. This method has been introduced in version 0.21. Since version 0.22, this method accepts LayerProperties and LayerPropertiesNode objects. A LayerPropertiesNode object can contain a hierarchy of further nodes.

reset_title

Signature: void reset_title

Description: Resets the title to the standard title

See set_title and title for a description about how titles are handled.

save_as

Signature: void save_as (unsigned int index,string filename,bool gzip,const SaveLayoutOptions options)

Description: Saves a layout to the given stream file

index:The cellview index of the layout to save.
filename:The file to write.
gzip:Ignored.
options:Writer options.

Use of this method is deprecated

Signature: void save_as (unsigned int index,string filename,const SaveLayoutOptions options)

Description: Saves a layout to the given stream file

index:The cellview index of the layout to save.
filename:The file to write.
options:Writer options.

The layout with the given index is written to the stream file with the given options. 'options' is a SaveLayoutOptions object that specifies which format to write and further options such as scaling factor etc. Calling this method is equivalent to calling 'write' on the respective layout object.

If the file name ends with a suffix ".gz" or ".gzip", the file is compressed with the zlib algorithm.

save_image

Signature: void save_image (string filename,unsigned int width,unsigned int height)

Description: Saves the layout as an image to the given file

filename:The file to which to write the screenshot to.
width:The width of the image to render in pixel.
height:The height of the image to render in pixel.

The image contains the current scene (layout, annotations etc.). The image is written as a PNG file to the given file. The image is drawn synchroneously with the given width and height. Drawing may take some time.

save_image_with_options

Signature: void save_image_with_options (string filename,unsigned int width,unsigned int height,int linewidth,int oversampling,double resolution,const DBox target,bool monochrome)

Description: Saves the layout as an image to the given file (with options)

filename:The file to which to write the screenshot to.
width:The width of the image to render in pixel.
height:The height of the image to render in pixel.
linewidth:The width of a line in pixels (usually 1) or 0 for default.
oversampling:The oversampling factor (1..3) or 0 for default.
resolution:The resolution (pixel size compared to a screen pixel, i.e 1/oversampling) or 0 for default.
target_box:The box to draw or an empty box for default.
monochrome:If true, monochrome images will be produced.

The image contains the current scene (layout, annotations etc.). The image is written as a PNG file to the given file. The image is drawn synchroneously with the given width and height. Drawing may take some time. Monochrome images don't have background or annotation objects currently.

This method has been introduced in 0.23.10.

save_layer_props

Signature: void save_layer_props (string fn)

Description: Saves the layer properties

Save the layer properties to the file given in "fn"

save_screenshot

Signature: void save_screenshot (string filename)

Description: Saves a screenshot to the given file

filename:The file to which to write the screenshot to.

The screenshot is written as a PNG file to the given file. This requires the drawing to be complete. Ideally, synchroneous mode is switched on for the application to guarantee this condition. The image will have the size of the viewport showing the current layout.

select_cell

Signature: void select_cell (unsigned int cell_index,int cv_index)

Description: Selects a cell by index for a certain cell view

Use of this method is deprecated

select_cell_path

Signature: void select_cell_path (unsigned int[] cell_index,int cv_index)

Description: Selects a cell by cell index for a certain cell view

Use of this method is deprecated

select_object

Signature: [const] void select_object (const ObjectInstPath obj)

Description: Adds the given selection to the list of selected objects

The selection provided by the ObjectInstPath descriptor is added to the list of selected objects. To clear the previous selection, use clear_object_selection.

The selection of other objects (such as annotations and images) will not be affected.

Another way of selecting objects is object_selection=.

This method has been introduced in version 0.24

selected_cells_paths

Signature: [const] unsigned int[][] selected_cells_paths (int cv_index)

Description: Gets the paths of the selected cells

Gets a list of cell paths to the cells selected in the cellview given by cv_index. The "selected cells" are the ones selected in the cell list or cell tree. This is not the "current cell" which is the one that is shown in the layout window.

The cell paths are arrays of cell indexes where the last element is the actual cell selected.

This method has be introduced in version 0.25.

selected_layers

Signature: [const] LayerPropertiesIterator[] selected_layers

Description: Gets the selected layers

Returns an array of LayerPropertiesIterator objects pointing to the currently selected layers. If no layer view is selected currently, an empty array is returned.

set_active_cellview_index

Signature: void set_active_cellview_index (int index)

Description: Makes the cellview with the given index the active one (shown in hierarchy browser)

Use of this method is deprecated. Use active_setview_index= instead

Python specific notes:
The object exposes a writable attribute 'active_setview_index'. This is the setter.

set_config

Signature: void set_config (string name,string value)

Description: Sets a local configuration parameter with the given name to the given value

name:The name of the configuration parameter to set
value:The value to which to set the configuration parameter

This method sets a local configuration parameter with the given name to the given value. Values can only be strings. Numerical values have to be converted into strings first. Local configuration parameters override global configurations for this specific view. This allows for example to override global settings of background colors. Any local settings are not written to the configuration file.

set_current_cell_path

Signature: void set_current_cell_path (int cv_index,unsigned int[] arg2)

Description: Sets the path to the current cell

cv_index:The cellview index for which to set the current path for (usally this will be the active cellview index)
path:The path to the current cell

Use of this method is deprecated

set_current_layer_list

Signature: void set_current_layer_list (unsigned int index)

Description: Sets the index of the currently selected layer properties tab

Use of this method is deprecated. Use current_layer_list= instead

Python specific notes:
The object exposes a writable attribute 'current_layer_list'. This is the setter.

set_layer_properties

Signature: void set_layer_properties (const LayerPropertiesIterator iter,const LayerProperties props)

Description: Sets the layer properties of the layer pointed to by the iterator

This method replaces the layer properties of the element pointed to by "iter" by the properties given by "props". It will not change the hierarchy but just the properties of the given node.

Signature: void set_layer_properties (unsigned int index,const LayerPropertiesIterator iter,const LayerProperties props)

Description: Sets the layer properties of the layer pointed to by the iterator

This method replaces the layer properties of the element pointed to by "iter" by the properties given by "props" in the tab given by "index". It will not change the hierarchy but just the properties of the given node.This version addresses a specific list in a multi-tab layer properties arrangement with the "index" parameter. This method has been introduced in version 0.21.

set_title

Signature: void set_title (string title)

Description: Sets the title of the view

title:The title string to use

Use of this method is deprecated. Use title= instead

Python specific notes:
The object exposes a writable attribute 'title'. This is the setter.

show_all_cells

Signature: void show_all_cells

Description: Makes all cells shown (cancel effects of hide_cell)

Signature: void show_all_cells (int cv_index)

Description: Makes all cells shown (cancel effects of hide_cell) for the specified cell view

Unlike show_all_cells, this method will only clear the hidden flag on the cell view selected by cv_index.

This variant has been added in version 0.25.

show_cell

Signature: void show_cell (unsigned int cell_index,int cv_index)

Description: Shows the given cell for the given cellview (cancel effect of hide_cell)

show_image

Signature: void show_image (unsigned long id,bool visible)

Description: Shows or hides the given image

id:The id of the object to show or hide
visible:True, if the image should be shown

Sets the visibility of the image with the given Id. The Id can be obtained with if "id" method of the image object.

This method has been introduced in version 0.20.

With version 0.25, Image#visible= can be used to achieve the same results.

show_layout

Signature: unsigned int show_layout (Layout ptr layout,bool add_cellview)

Description: Shows an existing layout in the view

Returns:The index of the cellview created.

Shows the given layout in the view. If add_cellview is true, the new layout is added to the list of cellviews in the view.

Note: once a layout is passed to the view with show_layout, it is owned by the view and must not be destroyed with the 'destroy' method.

This method has been introduced in version 0.22.

Signature: unsigned int show_layout (Layout ptr layout,string tech,bool add_cellview)

Description: Shows an existing layout in the view

Returns:The index of the cellview created.

Shows the given layout in the view. If add_cellview is true, the new layout is added to the list of cellviews in the view. The technology to use for that layout can be specified as well with the 'tech' parameter. Depending on the definition of the technology, layer properties may be loaded for example. The technology string can be empty for the default technology.

Note: once a layout is passed to the view with show_layout, it is owned by the view and must not be destroyed with the 'destroy' method.

This method has been introduced in version 0.22.

Signature: unsigned int show_layout (Layout ptr layout,string tech,bool add_cellview,bool init_layers)

Description: Shows an existing layout in the view

Returns:The index of the cellview created.

Shows the given layout in the view. If add_cellview is true, the new layout is added to the list of cellviews in the view. The technology to use for that layout can be specified as well with the 'tech' parameter. Depending on the definition of the technology, layer properties may be loaded for example. The technology string can be empty for the default technology. This variant also allows to control whether the layer properties are initialized (init_layers = true) or not (init_layers = false).

Note: once a layout is passed to the view with show_layout, it is owned by the view and must not be destroyed with the 'destroy' method.

This method has been introduced in version 0.22.

show_rdb

Signature: void show_rdb (int rdb_index,int cv_index)

Description: Shows a report database in the marker browser on a certain layout

The marker browser is opened showing the report database with the index given by "rdb_index". It will be attached (i.e. navigate to) the layout with the given cellview index in "cv_index".

stop

Signature: void stop

Description: Stops redraw thread and close any browsers

This method usually does not need to be called explicitly. The redraw thread is stopped automatically.

stop_redraw

Signature: void stop_redraw

Description: Stops the redraw thread

It is very important to stop the redraw thread before applying changes to the layout or the cell views and the LayoutView configuration. This is usually done automatically. For rare cases, where this is not the case, this method is provided.

title

Signature: [const] string title

Description: Returns the view's title string

Returns:The title string

The title string is either a string composed of the file names loaded (in some "readable" manner) or a customized title string set by set_title.

Python specific notes:
The object exposes a readable attribute 'title'. This is the getter.

title=

Signature: void title= (string title)

Description: Sets the title of the view

title:The title string to use

Override the standard title of the view indicating the file names loaded by the specified title string. The title string can be reset with reset_title to the standard title again.

Python specific notes:
The object exposes a writable attribute 'title'. This is the setter.

transaction

Signature: void transaction (string description)

Description: Begins a transaction

description:A text that appears in the 'undo' description

A transaction brackets a sequence of database modifications that appear as a single undo action. Only modifications that are wrapped inside a transaction..commit call pair can be undone. Each transaction must be terminated with a commit method call, even if some error occured. It is advisable therefore to catch errors and issue a commit call in this case.

This method was introduced in version 0.16.

unselect_object

Signature: [const] void unselect_object (const ObjectInstPath obj)

Description: Removes the given selection from the list of selected objects

The selection provided by the ObjectInstPath descriptor is removed from the list of selected objects. If the given object was not part of the selection, nothing will be changed. The selection of other objects (such as annotations and images) will not be affected.

This method has been introduced in version 0.24

update_content

Signature: void update_content

Description: Updates the layout view to the current state

This method triggers an update of the hierarchy tree and layer view tree. Usually, this method does not need to be called. The widgets are updated automatically in most cases.

Currently, this method should be called however, after the layer view tree has been changed by the insert_layer, replace_layer_node or delete_layer methods.

viewport_height

Signature: [const] int viewport_height

Description: Return the viewport height in pixels

This method was introduced in version 0.18.

viewport_trans

Signature: [const] DCplxTrans viewport_trans

Description: Returns the transformation that converts micron coordinates to pixels

Hint: the transformation returned will convert any point in micron coordinate space into a pixel coordinate. Contrary to usual convention, the y pixel coordinate is given in a mathematically oriented space - which means the bottom coordinate is 0. This method was introduced in version 0.18.

viewport_width

Signature: [const] int viewport_width

Description: Returns the viewport width in pixels

This method was introduced in version 0.18.

zoom_box

Signature: void zoom_box (const DBox box)

Description: Sets the viewport to the given box

box:The box to which to set the view in micron coordinates

zoom_fit

Signature: void zoom_fit

Description: Fits the contents of the current view into the window

zoom_fit_sel

Signature: void zoom_fit_sel

Description: Fits the contents of the current selection into the window

This method has been introduced in version 0.25.

zoom_in

Signature: void zoom_in

Description: Zooms in somewhat

zoom_out

Signature: void zoom_out

Description: Zooms out somewhat