Class MainWindow (version 0.18)

Description: The main application window and central controller object

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.

Class overview

Index

Method Overview

ref AbstractMenu menuReturn a reference to the abstract menu
message( string message, int time )Display a message in the status bar
resize( int width, int height )Resize the window
[const] double grid_micronGet the global grid in micron
const ref CellView create_layout( int mode )Create a new, empty layout
const ref CellView load_layout( string filename, int mode )Load a new layout
clone_current_viewClone the current view and make it current
save_session( string fn )Save the session to the given file
restore_session( string fn )Restore a session from the given file
enable_edits( bool enable )Enable or disable edits
synchroneous=( bool sync_mode )Put the main window into synchroneous mode
close_allCloses all views
close_current_viewClose the current view
cancelCancel current editing operations
redrawRedraw the current view
exitSchedule an exit for the application
select_view( int index )Select the view with the given index
[const] int current_view_indexReturn the current view's index
ref LayoutView current_viewReturn a reference to the current view's object
[const] unsigned int viewsReturn the number of views
ref LayoutView view( int )Return a reference to a view object by index
ref LoadLayoutOptions reader_optionsAccess to the current reader options
add_current_view_observer( ref ObserverBase observer )Add an observer for the "current view changed" event
remove_current_view_observer( ref ObserverBase observer )Remove an observer for the change of the "current view changed" event
add_new_view_observer( ref ObserverBase observer )Add an observer for a "new view" event
remove_new_view_observer( ref ObserverBase observer )Remove an observer for a "new view" event
cm_undo'cm_undo' action (bound to a menu)
cm_redo'cm_redo' action (bound to a menu)
cm_delete'cm_delete' action (bound to a menu)
cm_show_properties'cm_show_properties' action (bound to a menu)
cm_copy'cm_copy' action (bound to a menu)
cm_paste'cm_paste' action (bound to a menu)
cm_cut'cm_cut' action (bound to a menu)
cm_zoom_fit_sel'cm_zoom_fit_sel' action (bound to a menu)
cm_zoom_fit'cm_zoom_fit' action (bound to a menu)
cm_zoom_in'cm_zoom_in' action (bound to a menu)
cm_zoom_out'cm_zoom_out' action (bound to a menu)
cm_pan_up'cm_pan_up' action (bound to a menu)
cm_pan_down'cm_pan_down' action (bound to a menu)
cm_pan_left'cm_pan_left' action (bound to a menu)
cm_pan_right'cm_pan_right' action (bound to a menu)
cm_save_session'cm_save_session' action (bound to a menu)
cm_restore_session'cm_restore_session' action (bound to a menu)
cm_setup'cm_setup' action (bound to a menu)
cm_save_as'cm_save_as' action (bound to a menu)
cm_save'cm_save' action (bound to a menu)
cm_reload'cm_reload' action (bound to a menu)
cm_close'cm_close' action (bound to a menu)
cm_clone'cm_clone' action (bound to a menu)
cm_layout_props'cm_layout_props' action (bound to a menu)
cm_inc_max_hier'cm_inc_max_hier' action (bound to a menu)
cm_dec_max_hier'cm_dec_max_hier' action (bound to a menu)
cm_max_hier'cm_max_hier' action (bound to a menu)
cm_max_hier_0'cm_max_hier_0' action (bound to a menu)
cm_max_hier_1'cm_max_hier_1' action (bound to a menu)
cm_last_display_state'cm_last_display_state' action (bound to a menu)
cm_next_display_state'cm_next_display_state' action (bound to a menu)
cm_cancel'cm_cancel' action (bound to a menu)
cm_redraw'cm_redraw' action (bound to a menu)
cm_screenshot'cm_screenshot' action (bound to a menu)
cm_save_layer_props'cm_save_layer_props' action (bound to a menu)
cm_load_layer_props'cm_load_layer_props' action (bound to a menu)
cm_save_bookmarks'cm_save_bookmarks' action (bound to a menu)
cm_load_bookmarks'cm_load_bookmarks' action (bound to a menu)
cm_select_cell'cm_select_cell' action (bound to a menu)
cm_select_current_cell'cm_select_current_cell' action (bound to a menu)
cm_exit'cm_exit' action (bound to a menu)
cm_bookmark_view'cm_bookmark_view' action (bound to a menu)
cm_manage_bookmarks'cm_manage_bookmarks' action (bound to a menu)
cm_goto_position'cm_goto_position' action (bound to a menu)
cm_help_about'cm_help_about' action (bound to a menu)
cm_console'cm_console' action (bound to a menu)
cm_open_too'cm_open_too' action (bound to a menu)
cm_open_new_view'cm_open_new_view' action (bound to a menu)
cm_open'cm_open' action (bound to a menu)
cm_reader_options'cm_reader_options' action (bound to a menu)
cm_new_layout'cm_new_layout' action (bound to a menu)
cm_adjust_origin'cm_adjust_origin' action (bound to a menu)
cm_new_cell'cm_new_cell' action (bound to a menu)
cm_new_layer'cm_new_layer' action (bound to a menu)
cm_clear_layer 'cm_clear_layer ' action (bound to a menu)
cm_delete_layer 'cm_delete_layer ' action (bound to a menu)
cm_edit_layer 'cm_edit_layer ' action (bound to a menu)
cm_edit_boolean 'cm_edit_boolean ' action (bound to a menu)
cm_edit_size 'cm_edit_size ' action (bound to a menu)
cm_edit_merge 'cm_edit_merge ' action (bound to a menu)
cm_sel_flip_x 'cm_sel_flip_x ' action (bound to a menu)
cm_sel_flip_y 'cm_sel_flip_y ' action (bound to a menu)
cm_sel_rot_cw 'cm_sel_rot_cw ' action (bound to a menu)
cm_sel_rot_ccw 'cm_sel_rot_ccw ' action (bound to a menu)
cm_sel_free_rot 'cm_sel_free_rot ' action (bound to a menu)
cm_sel_scale 'cm_sel_scale ' action (bound to a menu)
cm_sel_move 'cm_sel_move ' action (bound to a menu)
cm_lv_hide'cm_lv_hide' action (bound to a menu)
cm_lv_show'cm_lv_show' action (bound to a menu)
cm_lv_rename'cm_lv_rename' action (bound to a menu)
cm_lv_select_all'cm_lv_select_all' action (bound to a menu)
cm_lv_delete'cm_lv_delete' action (bound to a menu)
cm_lv_insert'cm_lv_insert' action (bound to a menu)
cm_lv_group'cm_lv_group' action (bound to a menu)
cm_lv_ungroup'cm_lv_ungroup' action (bound to a menu)
cm_lv_source'cm_lv_source' action (bound to a menu)
cm_lv_sort_by_name'cm_lv_sort_by_name' action (bound to a menu)
cm_lv_sort_by_ild'cm_lv_sort_by_ild' action (bound to a menu)
cm_lv_sort_by_idl'cm_lv_sort_by_idl' action (bound to a menu)
cm_lv_sort_by_ldi'cm_lv_sort_by_ldi' action (bound to a menu)
cm_lv_sort_by_dli'cm_lv_sort_by_dli' action (bound to a menu)
cm_lv_regroup_by_index'cm_lv_regroup_by_index' action (bound to a menu)
cm_lv_regroup_by_datatype'cm_lv_regroup_by_datatype' action (bound to a menu)
cm_lv_regroup_by_layer'cm_lv_regroup_by_layer' action (bound to a menu)
cm_lv_regroup_flatten'cm_lv_regroup_flatten' action (bound to a menu)
cm_lv_expand_all'cm_lv_expand_all' action (bound to a menu)
cm_lv_add_missing'cm_lv_add_missing' action (bound to a menu)
cm_lv_remove_unused'cm_lv_remove_unused' action (bound to a menu)
cm_cell_select'cm_cell_select' action (bound to a menu)
cm_cell_delete 'cm_cell_delete ' action (bound to a menu)
cm_cell_rename 'cm_cell_rename ' action (bound to a menu)
cm_open_current_cell 'cm_open_current_cell ' action (bound to a menu)
cm_save_current_cell_as 'cm_save_current_cell_as ' action (bound to a menu)
cm_cell_hide'cm_cell_hide' action (bound to a menu)
cm_cell_show'cm_cell_show' action (bound to a menu)
cm_cell_show_all'cm_cell_show_all' action (bound to a menu)
destroyExplicitly destroy the object
[const] bool destroyedTell, if the object was destroyed

add_current_view_observer( ref ObserverBase observer )

Description: Add an observer for the "current view changed" event

If the current view changes, this observer is triggered. The integer slot of the observer will receive the number of the view active before. The current view's reference is already updated when this event is issued.

add_new_view_observer( ref ObserverBase observer )

Description: Add an observer for a "new view" event

If a new view is created, this observer will receive a signal. The integer slot of this observer will receive the index of the newly created view.

cancel

Description: Cancel current editing operations

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

clone_current_view

Description: Clone the current view and make it current

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

Description: Close the current view

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

cm_adjust_origin

Description: 'cm_adjust_origin' action (bound to a menu)

This method has been added in version 0.18.

cm_bookmark_view

Description: 'cm_bookmark_view' action (bound to a menu)

cm_cancel

Description: 'cm_cancel' action (bound to a menu)

cm_cell_delete

Description: 'cm_cell_delete ' action (bound to a menu)

This method has been added in version 0.18.

cm_cell_hide

Description: 'cm_cell_hide' action (bound to a menu)

cm_cell_rename

Description: 'cm_cell_rename ' action (bound to a menu)

This method has been added in version 0.18.

cm_cell_select

Description: 'cm_cell_select' action (bound to a menu)

cm_cell_show

Description: 'cm_cell_show' action (bound to a menu)

cm_cell_show_all

Description: 'cm_cell_show_all' action (bound to a menu)

cm_clear_layer

Description: 'cm_clear_layer ' action (bound to a menu)

This method has been added in version 0.18.

cm_clone

Description: 'cm_clone' action (bound to a menu)

cm_close

Description: 'cm_close' action (bound to a menu)

cm_console

Description: 'cm_console' action (bound to a menu)

This method has been added in version 0.18.

cm_copy

Description: 'cm_copy' action (bound to a menu)

cm_cut

Description: 'cm_cut' action (bound to a menu)

cm_dec_max_hier

Description: 'cm_dec_max_hier' action (bound to a menu)

cm_delete

Description: 'cm_delete' action (bound to a menu)

cm_delete_layer

Description: 'cm_delete_layer ' action (bound to a menu)

This method has been added in version 0.18.

cm_edit_boolean

Description: 'cm_edit_boolean ' action (bound to a menu)

This method has been added in version 0.18.

cm_edit_layer

Description: 'cm_edit_layer ' action (bound to a menu)

This method has been added in version 0.18.

cm_edit_merge

Description: 'cm_edit_merge ' action (bound to a menu)

This method has been added in version 0.18.

cm_edit_size

Description: 'cm_edit_size ' action (bound to a menu)

This method has been added in version 0.18.

cm_exit

Description: 'cm_exit' action (bound to a menu)

cm_goto_position

Description: 'cm_goto_position' action (bound to a menu)

cm_help_about

Description: 'cm_help_about' action (bound to a menu)

cm_inc_max_hier

Description: 'cm_inc_max_hier' action (bound to a menu)

cm_last_display_state

Description: 'cm_last_display_state' action (bound to a menu)

cm_layout_props

Description: 'cm_layout_props' action (bound to a menu)

cm_load_bookmarks

Description: 'cm_load_bookmarks' action (bound to a menu)

cm_load_layer_props

Description: 'cm_load_layer_props' action (bound to a menu)

cm_lv_add_missing

Description: 'cm_lv_add_missing' action (bound to a menu)

cm_lv_delete

Description: 'cm_lv_delete' action (bound to a menu)

cm_lv_expand_all

Description: 'cm_lv_expand_all' action (bound to a menu)

cm_lv_group

Description: 'cm_lv_group' action (bound to a menu)

cm_lv_hide

Description: 'cm_lv_hide' action (bound to a menu)

cm_lv_insert

Description: 'cm_lv_insert' action (bound to a menu)

cm_lv_regroup_by_datatype

Description: 'cm_lv_regroup_by_datatype' action (bound to a menu)

cm_lv_regroup_by_index

Description: 'cm_lv_regroup_by_index' action (bound to a menu)

cm_lv_regroup_by_layer

Description: 'cm_lv_regroup_by_layer' action (bound to a menu)

cm_lv_regroup_flatten

Description: 'cm_lv_regroup_flatten' action (bound to a menu)

cm_lv_remove_unused

Description: 'cm_lv_remove_unused' action (bound to a menu)

cm_lv_rename

Description: 'cm_lv_rename' action (bound to a menu)

cm_lv_select_all

Description: 'cm_lv_select_all' action (bound to a menu)

cm_lv_show

Description: 'cm_lv_show' action (bound to a menu)

cm_lv_sort_by_dli

Description: 'cm_lv_sort_by_dli' action (bound to a menu)

cm_lv_sort_by_idl

Description: 'cm_lv_sort_by_idl' action (bound to a menu)

cm_lv_sort_by_ild

Description: 'cm_lv_sort_by_ild' action (bound to a menu)

cm_lv_sort_by_ldi

Description: 'cm_lv_sort_by_ldi' action (bound to a menu)

cm_lv_sort_by_name

Description: 'cm_lv_sort_by_name' action (bound to a menu)

cm_lv_source

Description: 'cm_lv_source' action (bound to a menu)

cm_lv_ungroup

Description: 'cm_lv_ungroup' action (bound to a menu)

cm_manage_bookmarks

Description: 'cm_manage_bookmarks' action (bound to a menu)

cm_max_hier

Description: 'cm_max_hier' action (bound to a menu)

cm_max_hier_0

Description: 'cm_max_hier_0' action (bound to a menu)

cm_max_hier_1

Description: 'cm_max_hier_1' action (bound to a menu)

cm_new_cell

Description: 'cm_new_cell' action (bound to a menu)

This method has been added in version 0.18.

cm_new_layer

Description: 'cm_new_layer' action (bound to a menu)

This method has been added in version 0.18.

cm_new_layout

Description: 'cm_new_layout' action (bound to a menu)

This method has been added in version 0.18.

cm_next_display_state

Description: 'cm_next_display_state' action (bound to a menu)

cm_open

Description: 'cm_open' action (bound to a menu)

cm_open_current_cell

Description: 'cm_open_current_cell ' action (bound to a menu)

This method has been added in version 0.18.

cm_open_new_view

Description: 'cm_open_new_view' action (bound to a menu)

cm_open_too

Description: 'cm_open_too' action (bound to a menu)

cm_pan_down

Description: 'cm_pan_down' action (bound to a menu)

cm_pan_left

Description: 'cm_pan_left' action (bound to a menu)

cm_pan_right

Description: 'cm_pan_right' action (bound to a menu)

cm_pan_up

Description: 'cm_pan_up' action (bound to a menu)

cm_paste

Description: 'cm_paste' action (bound to a menu)

cm_reader_options

Description: 'cm_reader_options' action (bound to a menu)

This method has been added in version 0.18.

cm_redo

Description: 'cm_redo' action (bound to a menu)

cm_redraw

Description: 'cm_redraw' action (bound to a menu)

cm_reload

Description: 'cm_reload' action (bound to a menu)

cm_restore_session

Description: 'cm_restore_session' action (bound to a menu)

This method has been added in version 0.18.

cm_save

Description: 'cm_save' action (bound to a menu)

This method has been added in version 0.18.

cm_save_as

Description: 'cm_save_as' action (bound to a menu)

This method has been added in version 0.18.

cm_save_bookmarks

Description: 'cm_save_bookmarks' action (bound to a menu)

cm_save_current_cell_as

Description: 'cm_save_current_cell_as ' action (bound to a menu)

This method has been added in version 0.18.

cm_save_layer_props

Description: 'cm_save_layer_props' action (bound to a menu)

cm_save_session

Description: 'cm_save_session' action (bound to a menu)

This method has been added in version 0.18.

cm_screenshot

Description: 'cm_screenshot' action (bound to a menu)

cm_sel_flip_x

Description: 'cm_sel_flip_x ' action (bound to a menu)

This method has been added in version 0.18.

cm_sel_flip_y

Description: 'cm_sel_flip_y ' action (bound to a menu)

This method has been added in version 0.18.

cm_sel_free_rot

Description: 'cm_sel_free_rot ' action (bound to a menu)

This method has been added in version 0.18.

cm_sel_move

Description: 'cm_sel_move ' action (bound to a menu)

This method has been added in version 0.18.

cm_sel_rot_ccw

Description: 'cm_sel_rot_ccw ' action (bound to a menu)

This method has been added in version 0.18.

cm_sel_rot_cw

Description: 'cm_sel_rot_cw ' action (bound to a menu)

This method has been added in version 0.18.

cm_sel_scale

Description: 'cm_sel_scale ' action (bound to a menu)

This method has been added in version 0.18.

cm_select_cell

Description: 'cm_select_cell' action (bound to a menu)

cm_select_current_cell

Description: 'cm_select_current_cell' action (bound to a menu)

cm_setup

Description: 'cm_setup' action (bound to a menu)

cm_show_properties

Description: 'cm_show_properties' action (bound to a menu)

cm_undo

Description: 'cm_undo' action (bound to a menu)

cm_zoom_fit

Description: 'cm_zoom_fit' action (bound to a menu)

cm_zoom_fit_sel

Description: 'cm_zoom_fit_sel' action (bound to a menu)

This method has been added in version 0.18.

cm_zoom_in

Description: 'cm_zoom_in' action (bound to a menu)

cm_zoom_out

Description: 'cm_zoom_out' action (bound to a menu)

const ref CellView create_layout( int mode )

Description: Create a new, empty layout

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.

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

ref LayoutView current_view

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

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

[const] int current_view_index

Description: Return the current view's index

This method will return the index of the current view.

returns:The index of the current view

destroy

Description: Explicitly destroy the object

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

[const] bool destroyed

Description: Tell, if the object was 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.

enable_edits( bool enable )

Description: Enable or disable edits

This method allows to put the application into read-only mode by disabling all edit functions. For doing so, this method has be called with a 'false' argument. Calling it with a 'true' parameter enables all edits again.

enable:Enable edits if set to true

exit

Description: Schedule 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.

[const] double grid_micron

Description: Get the global grid in micron

The global grid is used at various places, i.e. for ruler snapping, for grid display etc. With this method it can be set to the desired value.

returns:The global grid in micron

const ref CellView load_layout( string filename, int mode )

Description: Load a new layout

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.

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

ref AbstractMenu menu

Description: Return a reference to the abstract menu

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

message( string message, int time )

Description: Display a message in the status bar

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

This method has been added in version 0.18.

message:The message to display
time:The time how long to display the message in ms

ref LoadLayoutOptions reader_options

Description: Access to the current reader options

Modifying the current reader options will have an effect on the next load_layout operation 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.18.

returns:A reference to the current reader object

redraw

Description: Redraw 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.

remove_current_view_observer( ref ObserverBase observer )

Description: Remove an observer for the change of the "current view changed" event

remove_new_view_observer( ref ObserverBase observer )

Description: Remove an observer for a "new view" event

resize( int width, int height )

Description: Resize the window

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

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

restore_session( string fn )

Description: Restore a session from the given 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.

fn:The path to the session file

save_session( string fn )

Description: Save the session to the given 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 must be saved, this has to be done explicitly in a separate step.

This method was added in version 0.18.

fn:The path to the session file

select_view( int index )

Description: Select the view with the given index

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

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

synchroneous=( bool sync_mode )

Description: Put the main window into synchroneous mode

In synchroneous mode, an application is allowed to block on redraw. While redrawing, no user interactions are possible. Although this is not desireable 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.

sync_mode:'true' if the application should behave synchroneously

ref LayoutView view( int )

Description: Return a reference to a view object by index

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

[const] unsigned int views

Description: Return the number of views

returns:The number of views available so far.