KLayout 0.29.8 (2024-10-28 63dd591e5) [master]

API reference - Class MainWindow

Notation used in Ruby API documentation

Module: lay

Description: The main application window and central controller object

Class hierarchy: MainWindow » QMainWindow » QWidget » QObject

This object first is the main window but also the main controller. The main controller is the port by which access can be gained to all the data objects, view and other aspects of the program.

Public methods

[const]MainWindow ptr_const_castReturns a non-const reference to self.
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.
voidcall_menu(string symbol)Calls the menu item with the provided symbol.
voidcancelCancels current editing operations
voidclear_configClears the configuration parameters
voidclone_current_viewClones the current view and make it current
voidclose_allCloses all views
voidclose_current_viewCloses the current view
voidcommit_configCommits the configuration settings
CellViewcreate_layout(int mode)Creates a new, empty layout
CellViewcreate_layout(string tech,
int mode)
Creates a new, empty layout with the given technology
intcreate_viewCreates a new, empty view
LayoutView ptrcurrent_viewReturns a reference to the current view's object
[const]intcurrent_view_indexReturns the current view's index
voidcurrent_view_index=(int index)Selects the view with the given index
[const]Dispatcher ptrdispatcherGets the dispatcher interface (the plugin root configuration space)
voidexitSchedules an exit for the application
variantget_config(string name)Gets the value of a local configuration parameter
string[]get_config_namesGets the configuration parameter names
map<string,string>get_default_key_bindingsGets the default key bindings
map<string,bool>get_default_menu_items_hiddenGets the flags indicating whether menu items are hidden by default
map<string,string>get_key_bindingsGets the current key bindings
map<string,bool>get_menu_items_hiddenGets the flags indicating whether menu items are hidden
[const]doublegrid_micronGets the global grid in micron
[const]intindex_of(const LayoutView ptr view)Gets the index of the given view
stringinitial_technologyGets the technology used for creating or loading layouts (unless explicitly specified)
voidinitial_technology=(string tech)Sets the technology used for creating or loading layouts (unless explicitly specified)
CellViewload_layout(string filename,
int mode = 1)
Loads a new layout
CellViewload_layout(string filename,
string tech,
int mode = 1)
Loads a new layout and associate it with the given technology
CellViewload_layout(string filename,
const LoadLayoutOptions options,
int mode = 1)
Loads a new layout with the given options
CellViewload_layout(string filename,
const LoadLayoutOptions options,
string tech,
int mode = 1)
Loads a new layout with the given options and associate it with the given technology
ManagermanagerGets the Manager object of this window
AbstractMenu ptrmenuReturns a reference to the abstract menu
voidmessage(string message,
int time = infinite)
Displays a message in the status bar
[signal]voidon_current_view_changedAn event indicating that the current view has changed
[signal]voidon_session_about_to_be_restoredAn event indicating that a session is about to be restored
[signal]voidon_session_restoredAn event indicating that a session was restored
[signal]voidon_view_closed(int index)An event indicating that a view was closed
[signal]voidon_view_created(int index)An event indicating that a new view was created
boolread_config(string file_name)Reads the configuration from a file
voidredrawRedraws the current view
voidresize(int width,
int height)
Resizes the window
voidrestore_session(string fn)Restores a session from the given file
voidsave_session(string fn)Saves the session to the given file
voidset_config(string name,
string value)
Set a local configuration parameter with the given name to the given value
voidset_key_bindings(map<string,string> bindings)Sets key bindings.
voidset_menu_items_hidden(map<string,bool> flags)sets the flags indicating whether menu items are hidden
voidshow_macro_editor(string cat = ,
bool add = false)
Shows the macro editor
[const]boolsynchronousGets a value indicating whether synchronous mode is activated
voidsynchronous=(bool sync_mode)Puts the main window into synchronous mode
[const]stringtitleGets the window title
voidtitle=(string title)Sets the window title
LayoutView ptrview(int n)Returns a reference to a view object by index
[const]unsigned intviewsReturns the number of views
boolwrite_config(string file_name)Writes configuration to a file

Public static methods and constants

MainWindow ptrinstanceGets application's main window instance
string[]menu_symbolsGets all available menu symbols (see call_menu).

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

voidcm_adjust_originUse of this method is deprecated
voidcm_bookmark_viewUse of this method is deprecated
voidcm_cancelUse of this method is deprecated
voidcm_cell_copyUse of this method is deprecated
voidcm_cell_cutUse of this method is deprecated
voidcm_cell_deleteUse of this method is deprecated
voidcm_cell_flattenUse of this method is deprecated
voidcm_cell_hideUse of this method is deprecated
voidcm_cell_pasteUse of this method is deprecated
voidcm_cell_renameUse of this method is deprecated
voidcm_cell_selectUse of this method is deprecated
voidcm_cell_showUse of this method is deprecated
voidcm_clear_layerUse of this method is deprecated
voidcm_cloneUse of this method is deprecated
voidcm_closeUse of this method is deprecated
voidcm_close_allUse of this method is deprecated
voidcm_copyUse of this method is deprecated
voidcm_copy_layerUse of this method is deprecated
voidcm_cutUse of this method is deprecated
voidcm_dec_max_hierUse of this method is deprecated
voidcm_deleteUse of this method is deprecated
voidcm_delete_layerUse of this method is deprecated
voidcm_edit_layerUse of this method is deprecated
voidcm_exitUse of this method is deprecated
voidcm_goto_positionUse of this method is deprecated
voidcm_help_aboutUse of this method is deprecated
voidcm_inc_max_hierUse of this method is deprecated
voidcm_last_display_stateUse of this method is deprecated
voidcm_layout_propsUse of this method is deprecated
voidcm_load_bookmarksUse of this method is deprecated
voidcm_load_layer_propsUse of this method is deprecated
voidcm_lv_add_missingUse of this method is deprecated
voidcm_lv_deleteUse of this method is deprecated
voidcm_lv_expand_allUse of this method is deprecated
voidcm_lv_groupUse of this method is deprecated
voidcm_lv_hideUse of this method is deprecated
voidcm_lv_hide_allUse of this method is deprecated
voidcm_lv_insertUse of this method is deprecated
voidcm_lv_new_tabUse of this method is deprecated
voidcm_lv_regroup_by_datatypeUse of this method is deprecated
voidcm_lv_regroup_by_indexUse of this method is deprecated
voidcm_lv_regroup_by_layerUse of this method is deprecated
voidcm_lv_regroup_flattenUse of this method is deprecated
voidcm_lv_remove_tabUse of this method is deprecated
voidcm_lv_remove_unusedUse of this method is deprecated
voidcm_lv_renameUse of this method is deprecated
voidcm_lv_rename_tabUse of this method is deprecated
voidcm_lv_select_allUse of this method is deprecated
voidcm_lv_showUse of this method is deprecated
voidcm_lv_show_allUse of this method is deprecated
voidcm_lv_show_onlyUse of this method is deprecated
voidcm_lv_sort_by_dliUse of this method is deprecated
voidcm_lv_sort_by_idlUse of this method is deprecated
voidcm_lv_sort_by_ildUse of this method is deprecated
voidcm_lv_sort_by_ldiUse of this method is deprecated
voidcm_lv_sort_by_nameUse of this method is deprecated
voidcm_lv_sourceUse of this method is deprecated
voidcm_lv_ungroupUse of this method is deprecated
voidcm_macro_editorUse of this method is deprecated
voidcm_manage_bookmarksUse of this method is deprecated
voidcm_max_hierUse of this method is deprecated
voidcm_max_hier_0Use of this method is deprecated
voidcm_max_hier_1Use of this method is deprecated
voidcm_new_cellUse of this method is deprecated
voidcm_new_layerUse of this method is deprecated
voidcm_new_layoutUse of this method is deprecated
voidcm_new_panelUse of this method is deprecated
voidcm_next_display_stateUse of this method is deprecated
voidcm_openUse of this method is deprecated
voidcm_open_current_cellUse of this method is deprecated
voidcm_open_new_viewUse of this method is deprecated
voidcm_open_tooUse of this method is deprecated
voidcm_packagesUse of this method is deprecated
voidcm_pan_downUse of this method is deprecated
voidcm_pan_leftUse of this method is deprecated
voidcm_pan_rightUse of this method is deprecated
voidcm_pan_upUse of this method is deprecated
voidcm_pasteUse of this method is deprecated
voidcm_prev_display_stateUse of this method is deprecated
voidcm_printUse of this method is deprecated
voidcm_pull_inUse of this method is deprecated
voidcm_reader_optionsUse of this method is deprecated
voidcm_redoUse of this method is deprecated
voidcm_redo_listUse of this method is deprecated
voidcm_redrawUse of this method is deprecated
voidcm_reloadUse of this method is deprecated
voidcm_reset_window_stateUse of this method is deprecated
voidcm_restore_sessionUse of this method is deprecated
voidcm_saveUse of this method is deprecated
voidcm_save_allUse of this method is deprecated
voidcm_save_asUse of this method is deprecated
voidcm_save_bookmarksUse of this method is deprecated
voidcm_save_current_cell_asUse of this method is deprecated
voidcm_save_layer_propsUse of this method is deprecated
voidcm_save_sessionUse of this method is deprecated
voidcm_screenshotUse of this method is deprecated
voidcm_screenshot_to_clipboardUse of this method is deprecated
voidcm_sel_flip_xUse of this method is deprecated
voidcm_sel_flip_yUse of this method is deprecated
voidcm_sel_free_rotUse of this method is deprecated
voidcm_sel_moveUse of this method is deprecated
voidcm_sel_move_toUse of this method is deprecated
voidcm_sel_rot_ccwUse of this method is deprecated
voidcm_sel_rot_cwUse of this method is deprecated
voidcm_sel_scaleUse of this method is deprecated
voidcm_select_allUse of this method is deprecated
voidcm_select_cellUse of this method is deprecated
voidcm_select_current_cellUse of this method is deprecated
voidcm_setupUse of this method is deprecated
voidcm_show_propertiesUse of this method is deprecated
voidcm_technologiesUse of this method is deprecated
voidcm_undoUse of this method is deprecated
voidcm_undo_listUse of this method is deprecated
voidcm_unselect_allUse of this method is deprecated
voidcm_view_logUse of this method is deprecated
voidcm_zoom_fitUse of this method is deprecated
voidcm_zoom_fit_selUse of this method is deprecated
voidcm_zoom_inUse of this method is deprecated
voidcm_zoom_outUse of this method is deprecated
voidenable_edits(bool enable)Use of this method is deprecated
voidselect_view(int index)Use of this method is deprecated. Use current_view_index= instead
voidsynchronous(bool sync_mode)Use of this method is deprecated. Use synchronous= instead

Detailed description

_const_cast

Signature: [const] MainWindow ptr _const_cast

Description: Returns a non-const reference to self.

Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects.

This method has been introduced in version 0.29.6.

_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.

call_menu

Signature: void call_menu (string symbol)

Description: Calls the menu item with the provided symbol.

To obtain all symbols, use menu_symbols.

This method has been introduced in version 0.27 and replaces the previous cm_... methods. Instead of calling a specific cm_... method, use LayoutView#call_menu with 'cm_...' as the symbol.

cancel

Signature: void cancel

Description: Cancels current editing operations

This method call cancels all current editing operations and restores normal mouse mode.

clear_config

Signature: void clear_config

Description: Clears the configuration parameters

This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().clear_config()'. See Dispatcher#clear_config for details.

This method has been introduced in version 0.27.

clone_current_view

Signature: void clone_current_view

Description: Clones the current view and make it current

close_all

Signature: void close_all

Description: Closes all views

This method unconditionally closes all views. No dialog will be opened if unsaved edits exist.

This method was added in version 0.18.

close_current_view

Signature: void close_current_view

Description: Closes the current view

This method does not open a dialog to ask which cell view to close if multiple cells are opened in the view, but rather closes all cells.

cm_adjust_origin

Signature: void cm_adjust_origin

Description: 'cm_adjust_origin' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_adjust_origin')" instead.

cm_bookmark_view

Signature: void cm_bookmark_view

Description: 'cm_bookmark_view' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_bookmark_view')" instead.

cm_cancel

Signature: void cm_cancel

Description: 'cm_cancel' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_cancel')" instead.

cm_cell_copy

Signature: void cm_cell_copy

Description: 'cm_cell_copy' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_cell_copy')" instead.

cm_cell_cut

Signature: void cm_cell_cut

Description: 'cm_cell_cut' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_cell_cut')" instead.

cm_cell_delete

Signature: void cm_cell_delete

Description: 'cm_cell_delete' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_cell_delete')" instead.

cm_cell_flatten

Signature: void cm_cell_flatten

Description: 'cm_cell_flatten' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_cell_flatten')" instead.

cm_cell_hide

Signature: void cm_cell_hide

Description: 'cm_cell_hide' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_cell_hide')" instead.

cm_cell_paste

Signature: void cm_cell_paste

Description: 'cm_cell_paste' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_cell_paste')" instead.

cm_cell_rename

Signature: void cm_cell_rename

Description: 'cm_cell_rename' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_cell_rename')" instead.

cm_cell_select

Signature: void cm_cell_select

Description: 'cm_cell_select' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_cell_select')" instead.

cm_cell_show

Signature: void cm_cell_show

Description: 'cm_cell_show' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_cell_show')" instead.

cm_clear_layer

Signature: void cm_clear_layer

Description: 'cm_clear_layer' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_clear_layer')" instead.

cm_clone

Signature: void cm_clone

Description: 'cm_clone' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_clone')" instead.

cm_close

Signature: void cm_close

Description: 'cm_close' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_close')" instead.

cm_close_all

Signature: void cm_close_all

Description: 'cm_close_all' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_close_all')" instead.

cm_copy

Signature: void cm_copy

Description: 'cm_copy' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_copy')" instead.

cm_copy_layer

Signature: void cm_copy_layer

Description: 'cm_copy_layer' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_copy_layer')" instead.

cm_cut

Signature: void cm_cut

Description: 'cm_cut' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_cut')" instead.

cm_dec_max_hier

Signature: void cm_dec_max_hier

Description: 'cm_dec_max_hier' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_dec_max_hier')" instead.

cm_delete

Signature: void cm_delete

Description: 'cm_delete' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_delete')" instead.

cm_delete_layer

Signature: void cm_delete_layer

Description: 'cm_delete_layer' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_delete_layer')" instead.

cm_edit_layer

Signature: void cm_edit_layer

Description: 'cm_edit_layer' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_edit_layer')" instead.

cm_exit

Signature: void cm_exit

Description: 'cm_exit' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_exit')" instead.

cm_goto_position

Signature: void cm_goto_position

Description: 'cm_goto_position' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_goto_position')" instead.

cm_help_about

Signature: void cm_help_about

Description: 'cm_help_about' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_help_about')" instead.

cm_inc_max_hier

Signature: void cm_inc_max_hier

Description: 'cm_inc_max_hier' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_inc_max_hier')" instead.

cm_last_display_state

Signature: void cm_last_display_state

Description: 'cm_prev_display_state|#cm_last_display_state' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_prev_display_state|#cm_last_display_state')" instead.

cm_layout_props

Signature: void cm_layout_props

Description: 'cm_layout_props' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_layout_props')" instead.

cm_load_bookmarks

Signature: void cm_load_bookmarks

Description: 'cm_load_bookmarks' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_load_bookmarks')" instead.

cm_load_layer_props

Signature: void cm_load_layer_props

Description: 'cm_load_layer_props' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_load_layer_props')" instead.

cm_lv_add_missing

Signature: void cm_lv_add_missing

Description: 'cm_lv_add_missing' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_add_missing')" instead.

cm_lv_delete

Signature: void cm_lv_delete

Description: 'cm_lv_delete' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_delete')" instead.

cm_lv_expand_all

Signature: void cm_lv_expand_all

Description: 'cm_lv_expand_all' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_expand_all')" instead.

cm_lv_group

Signature: void cm_lv_group

Description: 'cm_lv_group' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_group')" instead.

cm_lv_hide

Signature: void cm_lv_hide

Description: 'cm_lv_hide' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_hide')" instead.

cm_lv_hide_all

Signature: void cm_lv_hide_all

Description: 'cm_lv_hide_all' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_hide_all')" instead.

cm_lv_insert

Signature: void cm_lv_insert

Description: 'cm_lv_insert' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_insert')" instead.

cm_lv_new_tab

Signature: void cm_lv_new_tab

Description: 'cm_lv_new_tab' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_new_tab')" instead.

cm_lv_regroup_by_datatype

Signature: void cm_lv_regroup_by_datatype

Description: 'cm_lv_regroup_by_datatype' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_regroup_by_datatype')" instead.

cm_lv_regroup_by_index

Signature: void cm_lv_regroup_by_index

Description: 'cm_lv_regroup_by_index' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_regroup_by_index')" instead.

cm_lv_regroup_by_layer

Signature: void cm_lv_regroup_by_layer

Description: 'cm_lv_regroup_by_layer' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_regroup_by_layer')" instead.

cm_lv_regroup_flatten

Signature: void cm_lv_regroup_flatten

Description: 'cm_lv_regroup_flatten' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_regroup_flatten')" instead.

cm_lv_remove_tab

Signature: void cm_lv_remove_tab

Description: 'cm_lv_remove_tab' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_remove_tab')" instead.

cm_lv_remove_unused

Signature: void cm_lv_remove_unused

Description: 'cm_lv_remove_unused' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_remove_unused')" instead.

cm_lv_rename

Signature: void cm_lv_rename

Description: 'cm_lv_rename' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_rename')" instead.

cm_lv_rename_tab

Signature: void cm_lv_rename_tab

Description: 'cm_lv_rename_tab' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_rename_tab')" instead.

cm_lv_select_all

Signature: void cm_lv_select_all

Description: 'cm_lv_select_all' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_select_all')" instead.

cm_lv_show

Signature: void cm_lv_show

Description: 'cm_lv_show' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_show')" instead.

cm_lv_show_all

Signature: void cm_lv_show_all

Description: 'cm_lv_show_all' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_show_all')" instead.

cm_lv_show_only

Signature: void cm_lv_show_only

Description: 'cm_lv_show_only' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_show_only')" instead.

cm_lv_sort_by_dli

Signature: void cm_lv_sort_by_dli

Description: 'cm_lv_sort_by_dli' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_sort_by_dli')" instead.

cm_lv_sort_by_idl

Signature: void cm_lv_sort_by_idl

Description: 'cm_lv_sort_by_idl' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_sort_by_idl')" instead.

cm_lv_sort_by_ild

Signature: void cm_lv_sort_by_ild

Description: 'cm_lv_sort_by_ild' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_sort_by_ild')" instead.

cm_lv_sort_by_ldi

Signature: void cm_lv_sort_by_ldi

Description: 'cm_lv_sort_by_ldi' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_sort_by_ldi')" instead.

cm_lv_sort_by_name

Signature: void cm_lv_sort_by_name

Description: 'cm_lv_sort_by_name' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_sort_by_name')" instead.

cm_lv_source

Signature: void cm_lv_source

Description: 'cm_lv_source' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_source')" instead.

cm_lv_ungroup

Signature: void cm_lv_ungroup

Description: 'cm_lv_ungroup' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_lv_ungroup')" instead.

cm_macro_editor

Signature: void cm_macro_editor

Description: 'cm_macro_editor' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_macro_editor')" instead.

cm_manage_bookmarks

Signature: void cm_manage_bookmarks

Description: 'cm_manage_bookmarks' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_manage_bookmarks')" instead.

cm_max_hier

Signature: void cm_max_hier

Description: 'cm_max_hier' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_max_hier')" instead.

cm_max_hier_0

Signature: void cm_max_hier_0

Description: 'cm_max_hier_0' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_max_hier_0')" instead.

cm_max_hier_1

Signature: void cm_max_hier_1

Description: 'cm_max_hier_1' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_max_hier_1')" instead.

cm_new_cell

Signature: void cm_new_cell

Description: 'cm_new_cell' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_new_cell')" instead.

cm_new_layer

Signature: void cm_new_layer

Description: 'cm_new_layer' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_new_layer')" instead.

cm_new_layout

Signature: void cm_new_layout

Description: 'cm_new_layout' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_new_layout')" instead.

cm_new_panel

Signature: void cm_new_panel

Description: 'cm_new_panel' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_new_panel')" instead.

cm_next_display_state

Signature: void cm_next_display_state

Description: 'cm_next_display_state' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_next_display_state')" instead.

cm_open

Signature: void cm_open

Description: 'cm_open' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_open')" instead.

cm_open_current_cell

Signature: void cm_open_current_cell

Description: 'cm_open_current_cell' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_open_current_cell')" instead.

cm_open_new_view

Signature: void cm_open_new_view

Description: 'cm_open_new_view' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_open_new_view')" instead.

cm_open_too

Signature: void cm_open_too

Description: 'cm_open_too' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_open_too')" instead.

cm_packages

Signature: void cm_packages

Description: 'cm_packages' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_packages')" instead.

cm_pan_down

Signature: void cm_pan_down

Description: 'cm_pan_down' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_pan_down')" instead.

cm_pan_left

Signature: void cm_pan_left

Description: 'cm_pan_left' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_pan_left')" instead.

cm_pan_right

Signature: void cm_pan_right

Description: 'cm_pan_right' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_pan_right')" instead.

cm_pan_up

Signature: void cm_pan_up

Description: 'cm_pan_up' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_pan_up')" instead.

cm_paste

Signature: void cm_paste

Description: 'cm_paste' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_paste')" instead.

cm_prev_display_state

Signature: void cm_prev_display_state

Description: 'cm_prev_display_state|#cm_last_display_state' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_prev_display_state|#cm_last_display_state')" instead.

cm_print

Signature: void cm_print

Description: 'cm_print' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_print')" instead.

cm_pull_in

Signature: void cm_pull_in

Description: 'cm_pull_in' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_pull_in')" instead.

cm_reader_options

Signature: void cm_reader_options

Description: 'cm_reader_options' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_reader_options')" instead.

cm_redo

Signature: void cm_redo

Description: 'cm_redo' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_redo')" instead.

cm_redo_list

Signature: void cm_redo_list

Description: 'cm_redo_list' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_redo_list')" instead.

cm_redraw

Signature: void cm_redraw

Description: 'cm_redraw' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_redraw')" instead.

cm_reload

Signature: void cm_reload

Description: 'cm_reload' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_reload')" instead.

cm_reset_window_state

Signature: void cm_reset_window_state

Description: 'cm_reset_window_state' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_reset_window_state')" instead.

cm_restore_session

Signature: void cm_restore_session

Description: 'cm_restore_session' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_restore_session')" instead.

cm_save

Signature: void cm_save

Description: 'cm_save' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_save')" instead.

cm_save_all

Signature: void cm_save_all

Description: 'cm_save_all' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_save_all')" instead.

cm_save_as

Signature: void cm_save_as

Description: 'cm_save_as' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_save_as')" instead.

cm_save_bookmarks

Signature: void cm_save_bookmarks

Description: 'cm_save_bookmarks' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_save_bookmarks')" instead.

cm_save_current_cell_as

Signature: void cm_save_current_cell_as

Description: 'cm_save_current_cell_as' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_save_current_cell_as')" instead.

cm_save_layer_props

Signature: void cm_save_layer_props

Description: 'cm_save_layer_props' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_save_layer_props')" instead.

cm_save_session

Signature: void cm_save_session

Description: 'cm_save_session' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_save_session')" instead.

cm_screenshot

Signature: void cm_screenshot

Description: 'cm_screenshot' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_screenshot')" instead.

cm_screenshot_to_clipboard

Signature: void cm_screenshot_to_clipboard

Description: 'cm_screenshot_to_clipboard' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_screenshot_to_clipboard')" instead.

cm_sel_flip_x

Signature: void cm_sel_flip_x

Description: 'cm_sel_flip_x' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_sel_flip_x')" instead.

cm_sel_flip_y

Signature: void cm_sel_flip_y

Description: 'cm_sel_flip_y' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_sel_flip_y')" instead.

cm_sel_free_rot

Signature: void cm_sel_free_rot

Description: 'cm_sel_free_rot' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_sel_free_rot')" instead.

cm_sel_move

Signature: void cm_sel_move

Description: 'cm_sel_move' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_sel_move')" instead.

cm_sel_move_to

Signature: void cm_sel_move_to

Description: 'cm_sel_move_to' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_sel_move_to')" instead.

cm_sel_rot_ccw

Signature: void cm_sel_rot_ccw

Description: 'cm_sel_rot_ccw' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_sel_rot_ccw')" instead.

cm_sel_rot_cw

Signature: void cm_sel_rot_cw

Description: 'cm_sel_rot_cw' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_sel_rot_cw')" instead.

cm_sel_scale

Signature: void cm_sel_scale

Description: 'cm_sel_scale' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_sel_scale')" instead.

cm_select_all

Signature: void cm_select_all

Description: 'cm_select_all' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_select_all')" instead.

cm_select_cell

Signature: void cm_select_cell

Description: 'cm_select_cell' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_select_cell')" instead.

cm_select_current_cell

Signature: void cm_select_current_cell

Description: 'cm_select_current_cell' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_select_current_cell')" instead.

cm_setup

Signature: void cm_setup

Description: 'cm_setup' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_setup')" instead.

cm_show_properties

Signature: void cm_show_properties

Description: 'cm_show_properties' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_show_properties')" instead.

cm_technologies

Signature: void cm_technologies

Description: 'cm_technologies' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_technologies')" instead.

cm_undo

Signature: void cm_undo

Description: 'cm_undo' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_undo')" instead.

cm_undo_list

Signature: void cm_undo_list

Description: 'cm_undo_list' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_undo_list')" instead.

cm_unselect_all

Signature: void cm_unselect_all

Description: 'cm_unselect_all' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_unselect_all')" instead.

cm_view_log

Signature: void cm_view_log

Description: 'cm_view_log' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_view_log')" instead.

cm_zoom_fit

Signature: void cm_zoom_fit

Description: 'cm_zoom_fit' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_zoom_fit')" instead.

cm_zoom_fit_sel

Signature: void cm_zoom_fit_sel

Description: 'cm_zoom_fit_sel' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_zoom_fit_sel')" instead.

cm_zoom_in

Signature: void cm_zoom_in

Description: 'cm_zoom_in' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_zoom_in')" instead.

cm_zoom_out

Signature: void cm_zoom_out

Description: 'cm_zoom_out' action.

Use of this method is deprecated

This method is deprecated in version 0.27. Use "call_menu('cm_zoom_out')" instead.

commit_config

Signature: void commit_config

Description: Commits the configuration settings

This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().commit_config(...)'. See Dispatcher#commit_config for details.

This method has been introduced in version 0.27.

create_layout

(1) Signature: CellView create_layout (int mode)

Description: Creates a new, empty layout

mode:An integer value of 0, 1 or 2 that determines how the layout is created
Returns:The cellview of the layout that was created

Create the layout in the current view, replacing the current layouts (mode 0), in a new view (mode 1) or adding it to the current view (mode 2). In mode 1, the new view is made the current one.

This version uses the initial technology and associates it with the new layout.

Starting with version 0.25, this method returns a cellview object that can be modified to configure the cellview.

(2) Signature: CellView create_layout (string tech, int mode)

Description: Creates a new, empty layout with the given technology

mode:An integer value of 0, 1 or 2 that determines how the layout is created
tech:The name of the technology to use for that layout.
Returns:The cellview of the layout that was created

Create the layout in the current view, replacing the current layouts (mode 0), in a new view (mode 1) or adding it to the current view (mode 2). In mode 1, the new view is made the current one.

If the technology name is not a valid technology name, the default technology will be used.

This version was introduced in version 0.22. Starting with version 0.25, this method returns a cellview object that can be modified to configure the cellview.

create_view

Signature: int create_view

Description: Creates a new, empty view

Returns:The index of the view that was created

Creates an empty view that can be filled with layouts using the load_layout and create_layout methods on the view object. Use the view method to obtain the view object from the view index. This method has been added in version 0.22.

current_view

Signature: LayoutView ptr current_view

Description: Returns a reference to the current view's object

Returns:A reference to a LayoutView object representing the current view.

current_view_index

Signature: [const] int current_view_index

Description: Returns the current view's index

Returns:The index of the current view

This method will return the index of the current view.

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

current_view_index=

Signature: void current_view_index= (int index)

Description: Selects the view with the given index

index:The index of the view to select (0 is the first)

This method will make the view with the given index the current (front) view.

This method was renamed from select_view to current_view_index= in version 0.25. The old name is still available, but deprecated.

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

dispatcher

Signature: [const] Dispatcher ptr dispatcher

Description: Gets the dispatcher interface (the plugin root configuration space)

This method has been introduced in version 0.27.

enable_edits

Signature: void enable_edits (bool enable)

Description: Enables or disables editing

enable:Enable edits if set to true

Use of this method is deprecated

Starting from version 0.25, this method enables/disables edits on the current view only. Use LayoutView#enable_edits instead.

exit

Signature: void exit

Description: Schedules an exit for the application

This method does not immediately exit the application but sends an exit request to the application which will cause a clean shutdown of the GUI.

get_config

Signature: variant get_config (string name)

Description: Gets the value of a local configuration parameter

This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().get_config(...)'. See Dispatcher#get_config for details.

This method has been introduced in version 0.27.

get_config_names

Signature: string[] get_config_names

Description: Gets the configuration parameter names

This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().get_config_names(...)'. See Dispatcher#get_config_names for details.

This method has been introduced in version 0.27.

get_default_key_bindings

Signature: map<string,string> get_default_key_bindings

Description: Gets the default key bindings

This method returns a hash with the default key binding vs. menu item path. You can use this hash with set_key_bindings to reset all key bindings to the default ones.

This method has been introduced in version 0.27.

get_default_menu_items_hidden

Signature: map<string,bool> get_default_menu_items_hidden

Description: Gets the flags indicating whether menu items are hidden by default

You can use this hash with set_menu_items_hidden to restore the visibility of all menu items.

This method has been introduced in version 0.27.

get_key_bindings

Signature: map<string,string> get_key_bindings

Description: Gets the current key bindings

This method returns a hash with the key binding vs. menu item path.

This method has been introduced in version 0.27.

get_menu_items_hidden

Signature: map<string,bool> get_menu_items_hidden

Description: Gets the flags indicating whether menu items are hidden

This method returns a hash with the hidden flag vs. menu item path. You can use this hash with set_menu_items_hidden.

This method has been introduced in version 0.27.

grid_micron

Signature: [const] double grid_micron

Description: Gets the global grid in micron

Returns:The global grid in micron

The global grid is used at various places, i.e. for ruler snapping, for grid display etc.

index_of

Signature: [const] int index_of (const LayoutView ptr view)

Description: Gets the index of the given view

Returns:The index of the view that was given

If the given view is not a view object within the main window, a negative value will be returned.

This method has been added in version 0.25.

initial_technology

Signature: string initial_technology

Description: Gets the technology used for creating or loading layouts (unless explicitly specified)

Returns:The current initial technology

This method was added in version 0.22.

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

initial_technology=

Signature: void initial_technology= (string tech)

Description: Sets the technology used for creating or loading layouts (unless explicitly specified)

tech:The new initial technology

Setting the technology will have an effect on the next load_layout or create_layout operation which does not explicitly specify the technology but might not be reflected correctly in the reader options dialog and changes will be reset when the application is restarted.

This method was added in version 0.22.

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

instance

Signature: [static] MainWindow ptr instance

Description: Gets application's main window instance

This method has been added in version 0.24.

load_layout

(1) Signature: CellView load_layout (string filename, int mode = 1)

Description: Loads a new layout

filename:The name of the file to load
mode:An integer value of 0, 1 or 2 that determines how the file is loaded
Returns:The cellview into which the layout was loaded

Loads the given file into the current view, replacing the current layouts (mode 0), into a new view (mode 1) or adding the layout to the current view (mode 2). In mode 1, the new view is made the current one.

This version will use the initial technology and the default reader options. Others versions are provided which allow specification of technology and reader options explicitly.

Starting with version 0.25, this method returns a cellview object that can be modified to configure the cellview. The 'mode' argument has been made optional in version 0.28.

(2) Signature: CellView load_layout (string filename, string tech, int mode = 1)

Description: Loads a new layout and associate it with the given technology

filename:The name of the file to load
tech:The name of the technology to use for that layout.
mode:An integer value of 0, 1 or 2 that determines how the file is loaded
Returns:The cellview into which the layout was loaded

Loads the given file into the current view, replacing the current layouts (mode 0), into a new view (mode 1) or adding the layout to the current view (mode 2). In mode 1, the new view is made the current one.

If the technology name is not a valid technology name, the default technology will be used. The 'mode' argument has been made optional in version 0.28.

This version was introduced in version 0.22. Starting with version 0.25, this method returns a cellview object that can be modified to configure the cellview.

(3) Signature: CellView load_layout (string filename, const LoadLayoutOptions options, int mode = 1)

Description: Loads a new layout with the given options

filename:The name of the file to load
options:The reader options to use.
mode:An integer value of 0, 1 or 2 that determines how the file is loaded
Returns:The cellview into which the layout was loaded

Loads the given file into the current view, replacing the current layouts (mode 0), into a new view (mode 1) or adding the layout to the current view (mode 2). In mode 1, the new view is made the current one.

This version was introduced in version 0.22. Starting with version 0.25, this method returns a cellview object that can be modified to configure the cellview. The 'mode' argument has been made optional in version 0.28.

(4) Signature: CellView load_layout (string filename, const LoadLayoutOptions options, string tech, int mode = 1)

Description: Loads a new layout with the given options and associate it with the given technology

filename:The name of the file to load
options:The reader options to use.
tech:The name of the technology to use for that layout.
mode:An integer value of 0, 1 or 2 that determines how the file is loaded
Returns:The cellview into which the layout was loaded

Loads the given file into the current view, replacing the current layouts (mode 0), into a new view (mode 1) or adding the layout to the current view (mode 2). In mode 1, the new view is made the current one.

If the technology name is not a valid technology name, the default technology will be used.

This version was introduced in version 0.22. Starting with version 0.25, this method returns a cellview object that can be modified to configure the cellview. The 'mode' argument has been made optional in version 0.28.

manager

Signature: Manager manager

Description: Gets the Manager object of this window

The manager object is responsible to managing the undo/redo stack. Usually this object is not required. It's more convenient and safer to use the related methods provided by LayoutView (LayoutView#transaction, LayoutView#commit) and MainWindow (such as MainWindow#cm_undo and MainWindow#cm_redo).

This method has been added in version 0.24.

menu

Signature: AbstractMenu ptr menu

Description: Returns a reference to the abstract menu

Returns:A reference to an AbstractMenu object representing the menu system

menu_symbols

Signature: [static] string[] menu_symbols

Description: Gets all available menu symbols (see call_menu).

NOTE: currently this method delivers a superset of all available symbols. Depending on the context, no all symbols may trigger actual functionality.

This method has been introduced in version 0.27.

message

Signature: void message (string message, int time = infinite)

Description: Displays a message in the status bar

message:The message to display
time:The time how long to display the message in ms. A negative value means 'infinitely'.

This given message is shown in the status bar for the given time.

This method has been added in version 0.18. The 'time' parameter was made optional in version 0.28.10.

on_current_view_changed

Signature: [signal] void on_current_view_changed

Description: An event indicating that the current view has changed

This event is triggered after the current view has changed. This happens, if the user switches the layout tab.

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

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

on_session_about_to_be_restored

Signature: [signal] void on_session_about_to_be_restored

Description: An event indicating that a session is about to be restored

This event has been added in version 0.28.8.

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

on_session_restored

Signature: [signal] void on_session_restored

Description: An event indicating that a session was restored

This event has been added in version 0.28.8.

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

on_view_closed

Signature: [signal] void on_view_closed (int index)

Description: An event indicating that a view was closed

index:The index of the view that was closed

This event is triggered after a view was closed. For example, because the tab was closed.

This event has been added in version 0.25.

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

on_view_created

Signature: [signal] void on_view_created (int index)

Description: An event indicating that a new view was created

index:The index of the view that was created

This event is triggered after a new view was created. For example, if a layout is loaded into a new panel.

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

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

read_config

Signature: bool read_config (string file_name)

Description: Reads the configuration from a file

This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().read_config(...)'. See Dispatcher#read_config for details.

This method has been introduced in version 0.27.

redraw

Signature: void redraw

Description: Redraws the current view

Issues a redraw request to the current view. This usually happens automatically, so this method does not need to be called in most relevant cases.

resize

Signature: void resize (int width, int height)

Description: Resizes the window

width:The new width of the window
height:The new width of the window

This method resizes the window to the given target size including decoration such as menu bar and control panels

restore_session

Signature: void restore_session (string fn)

Description: Restores a session from the given file

fn:The path to the session file

The session stored in the given session file is restored. All existing views are closed and all layout edits are discarded without notification.

This method was added in version 0.18.

save_session

Signature: void save_session (string fn)

Description: Saves the session to the given file

fn:The path to the session file

The session is saved to the given session file. Any existing layout edits are not automatically saved together with the session. The session just holds display settings and annotation objects. If layout edits exist, they have to be saved explicitly in a separate step.

This method was added in version 0.18.

select_view

Signature: void select_view (int index)

Description: Selects the view with the given index

index:The index of the view to select (0 is the first)

Use of this method is deprecated. Use current_view_index= instead

This method will make the view with the given index the current (front) view.

This method was renamed from select_view to current_view_index= in version 0.25. The old name is still available, but deprecated.

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

set_config

Signature: void set_config (string name, string value)

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

This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().set_config(...)'. See Dispatcher#set_config for details.

This method has been introduced in version 0.27.

set_key_bindings

Signature: void set_key_bindings (map<string,string> bindings)

Description: Sets key bindings.

Sets the given key bindings. Pass a hash listing the key bindings per menu item paths. Key strings follow the usual notation, e.g. 'Ctrl+A', 'Shift+X' or just 'F2'. Use an empty value to remove a key binding from a menu entry.

get_key_bindings will give you the current key bindings, get_default_key_bindings will give you the default ones.

Examples:

# reset all key bindings to default:
mw = RBA::MainWindow.instance()
mw.set_key_bindings(mw.get_default_key_bindings())

# disable key binding for 'copy':
RBA::MainWindow.instance.set_key_bindings({ "edit_menu.copy" => "" })

# configure 'copy' to use Shift+K and 'cut' to use Ctrl+K:
RBA::MainWindow.instance.set_key_bindings({ "edit_menu.copy" => "Shift+K", "edit_menu.cut" => "Ctrl+K" })

This method has been introduced in version 0.27.

set_menu_items_hidden

Signature: void set_menu_items_hidden (map<string,bool> flags)

Description: sets the flags indicating whether menu items are hidden

This method allows hiding certain menu items. It takes a hash with hidden flags vs. menu item paths. Examples:

# show all menu items:
mw = RBA::MainWindow.instance()
mw.set_menu_items_hidden(mw.get_default_menu_items_hidden())

# hide the 'copy' entry from the 'Edit' menu:
RBA::MainWindow.instance().set_menu_items_hidden({ "edit_menu.copy" => true })

This method has been introduced in version 0.27.

show_macro_editor

Signature: void show_macro_editor (string cat = , bool add = false)

Description: Shows the macro editor

If 'cat' is given, this category will be selected in the category tab. If 'add' is true, the 'new macro' dialog will be opened.

This method has been introduced in version 0.26.

synchronous

(1) Signature: void synchronous (bool sync_mode)

Description: Puts the main window into synchronous mode

sync_mode:'true' if the application should behave synchronously

Use of this method is deprecated. Use synchronous= instead

In synchronous mode, an application is allowed to block on redraw. While redrawing, no user interactions are possible. Although this is not desirable for smooth operation, it can be beneficial for test or automation purposes, i.e. if a screenshot needs to be produced once the application has finished drawing.

Python specific notes:
The object exposes a writable attribute 'synchronous'. This is the setter.
This method is available as 'synchronous_' in Python to distiguish it from the property with the same name.

(2) Signature: [const] bool synchronous

Description: Gets a value indicating whether synchronous mode is activated

See synchronous= for details about this attribute

This property getter was introduced in version 0.29.

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

synchronous=

Signature: void synchronous= (bool sync_mode)

Description: Puts the main window into synchronous mode

sync_mode:'true' if the application should behave synchronously

In synchronous mode, an application is allowed to block on redraw. While redrawing, no user interactions are possible. Although this is not desirable for smooth operation, it can be beneficial for test or automation purposes, i.e. if a screenshot needs to be produced once the application has finished drawing.

Python specific notes:
The object exposes a writable attribute 'synchronous'. This is the setter.
This method is available as 'synchronous_' in Python to distiguish it from the property with the same name.

title

Signature: [const] string title

Description: Gets the window title

See title= for a description of this property. This property was introduced in version 0.29.

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

title=

Signature: void title= (string title)

Description: Sets the window title

If the window title is not empty, it will be used for the application window's title. Otherwise the default title is used. The title string is subject to expression interpolation. So it is possible to implement the default scheme of adding the current view using the following code:

add_view_info = "$(var view=LayoutView.current; view ? ' - ' + (view.is_dirty ? '[+] ' : '') + view.title : '')"
RBA::MainWindow.instance.title = "Custom Title" + add_view_info

This property was introduced in version 0.29.

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

view

Signature: LayoutView ptr view (int n)

Description: Returns a reference to a view object by index

Returns:The view object's reference for the view with the given index.

views

Signature: [const] unsigned int views

Description: Returns the number of views

Returns:The number of views available so far.

write_config

Signature: bool write_config (string file_name)

Description: Writes configuration to a file

This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().write_config(...)'. See Dispatcher#write_config for details.

This method has been introduced in version 0.27.