ICSE 2001 Logo   Rigi Logo
 
rcl_close
Back to RCL Command Index

No arguments accepted.

Description:

This procedure closes the active window provided that the active window is not the base window (General 1). The base window may not be closed.

When a Rigi drawing window is closed, any selected nodes and/or arcs are deselected; any child dialog windows like the node filter window, are closed; and the base window is set to being the active window. Note that as the window is closed, the data that describes the view in the window is destroyed.

Return Value:

None.

Exceptions:

None.

Example:

# Procedure to close a window given a specific window id.

proc close_win_id {{winid 0}} {

	# Get the active window
	set activewin [rcl_win_get_id]
	if {$winid == 0} {
		# The default window is always the active window.
		set winid $activewin
	}
	# If the window being closed is the active window,
	# then reselect the base window when all's done.
	if {$winid == $activewin} {
		set activewin 1
	}
	# Select and close the specified window
	rcl_win_select $winid
	rcl_close

	# Reselect the previously active window
	rcl_win_select $activewin
}

Back to RCL Command Index

.