Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiOpenWindow

hiOpenWindow(
[ ?bBox l_boxSpec ] 
[ ?type t_widgetType ] 
[ ?appType t_applicationType ] 
[ ?menus l_menus ] 
[ ?labels l_labels ] 
[ ?help t_helpString ] 
[ ?scroll g_scrollbars ]
[ ?form g_form ]
[ ?closeProc s_closeProc ]
[ ?iconPosition l_iconPosition ]
[ ?session g_sessionWindow ]
[ ?tabTitle g_tabTitle ]
[ ?tabIcon g_tabIcon ]
[ ?tabTip g_tabTip ]
) 
=> w_windowId / nil 

Description

Creates and displays a window. This function displays the new window in a session window if the session window argument is specified or if the new window is a graphics window.

If the session window already contains windows, a new tab is created for the new window and it is raised to the top.

The new window becomes the current window. If you do not want this window ever to become the current window, you can set the window property neverCurrentWindow to t:

window->neverCurrentWindow = t

When this property is set on a current window, the current window gets reset to the last current window or to another open window. If another window cannot be found, the current window resets to nil.

Setting the neverCurrentWindow property can affect previously saved replay files that contain this window, and these log files might not replay correctly.

If you set the neverCurrentWindow property to t and you use .tgf help files, you need to specify the correct application ID for help to work correctly. See the note in the description of the t_help argument for details.

This function is not available in Concept SKILL. For more information, see Design Entry HDL–SKILL Routines.

Arguments

?bBox l_boxSpec

Lower left and upper right corners of the window in screen coordinates (assuming 0:0 as the lower left corner of the screen):

list(x1:y1 x2:y2 [iconCoordinate|nil])

where x1 is the lower left x coordinate, y1 is the lower left y coordinate, x2 is the upper right x coordinate and y2 is the upper right y coordinate. See the l_iconPosition argument for information about the optional, third element of the list.

The symbols ’default and ’interactive are also valid values for this argument.

If l_boxSpec is nil, either you are prompted with a rubberbanding box to enter a window size, or a default size is used, depending upon the value of the global variable hivWinStyle.

You can use the hiIsWindowSpecifier function to check if your l_boxSpec value is valid.

?type t_widgetType

  

One of the following strings: graphics, text, hypertext, html, encap, form, or none (plot windows) representing the type of window widget to be created. If widgetType is not specified, the default is graphics. A graphics window is always enclosed in a session window, regardless of whether you specify the ?session argument.

For information about how to create hypertext, see Hypertext Viewfile Window.

?appType t_applicationType

  

String representing the window application type or name. This string is also used as the window’s bindkey prefix. If not specified, t_applicationType defaults to "".

?menus l_menus

List of menus to appear in the window banner. Each menu should be either the return value of hiCreatePulldownMenu or the menu symbol representing that value. These menus are placed from left to right on the window banner in the order listed. Each menu can be placed only once on a window banner.

?labels l_labels

List of strings to appear in the label banner. These labels are placed from left to right on the label banner in the order listed. A maximum of 4 labels can be placed on each window.

?help t_helpString

  

Help string for the window, which is used to reference a .tgf help file. If you do not specify this argument or specify "" (an empty string), the help argument is set to the appName (which is the value of the t_appType argument).

The help string for a window can also be set at any time using the hiSetWindowsAtts functions and can be retrieved with the hiGetHelp function.

Cadence applications may modify their window help strings at any time.

When a user clicks Help in a window, the help string is used for the help symbol that is looked for in the .tgf file. The appName is used to determine the .tgf file to search.

The help string can also be used to modify the appName by assigning an hiHelpAppName property to the symbol representation of the string.

For example, putprop ( concat( help_string ) app_name_string ’hiHelpAppName )

set the appID used for Help to app_name_string whenever help_string is used as the help string for any window.

For more information about the online help mechanism, see Online Help Mechanism

For windows that cannot become the current window (because the neverCurrentWindow property is set to t), to specify the correct application ID for accessing help, specify a help name string for the t_help argument of hiCreateWindow() or hiOpenWindow() and then attach the hiHelpAppName property to the symbol of the same name as the help string. For example: putprop( ’MyAppHelp "MyApp" ’hiHelpAppName)

For windows help to work correctly, either the t_help or t_appType argument or both must be set when you create the window.

?scroll g_scrollbars

  

Either t or nil to specify the use of scroll bars. This field is valid only for windows with a widgetType of graphics. If set to t, scroll bars appear on the right and bottom of the window. If not specified, the property useScrollbars from the CIW is used. This value can be set from the User Preferences form.

?form g_form

SKILL representation of a form returned by hiCreateAppForm or hiCreateForm. This argument is valid only for windows with a widgetType of form. When the window containing the form is closed, the form is not destroyed. It can be redisplayed in another window.

?closeProc S_closeProc

  

String or symbol for the name of the procedure to be performed when the specified window is closed. This closing procedure is strictly for clean up and must not call hiCloseWindow, any enter functions, or any blocking functions that display forms or dialog boxes. Because this clean-up procedure is called no matter how you close the window (from a window manager or through Cadence software), you might need to delete existing calls to clean-up functions from the user interface.

A close procedure is called before any SKILL close procedures. If the C procedure returns nil, none of the SKILL close procedures are called and the window remains open.

?iconPosition l_iconPosition

  

Icon location (in X Window System screen coordinates) for the window. This causes the window to be iconified initially. If l_iconPosition is nil or not specified, the window is not iconified initially.

In addition to the ?iconPosition keyword argument, the l_boxSpec argument can also contain the icon position. If both methods are used, ?iconPosition overrides the position passed in l_boxSpec unless l_iconPosition is nil.

?session g_sessionWindow

  

The session window in which you want to display the new window.

?tabTitle g_tabTitle

  

The tab title for the new window. If the session window already contains windows, a tab is created for the new window.

After the window is created, you can use the hiSetTabWindowTitle function to change the tab title.

?tabIcon g_tabIcon

  

The icon to be displayed on the tab for the new window.

After the window is created, you can use the hiSetTabWindowIcon function to change the tab icon.

?tabTip g_tabTip

The tooltip that is displayed whenever the cursor hovers over the tab.

After the window is created, you can use the hiSetTabWindowTip function to change the tab tooltip.

Values Returned

w_windowId

The window ID of the created window.

nil

The window is not created. An error message is also issued.

Examples

hiOpenWindow( ?bBox list ( 0:0 300:300 )
?type "graphics"
?menus list ( hiOpenMenu ’hiDMMenu )
?labels ’( "label 1" "label 2" )
?scroll t
)
=> window:2
hiOpenWindow( ?bBox ’interactive
?type “form”
?appType “formdow”     
?form hiCreateForm( ’myform “My Form” “”
list ( hiCreateStringField( ?name ’s ?prompt “Enter name:” ) )
“” )
)
=> window:3

Related Topics

Window Functions

hiUndockWindow

hiSetTabWindowTitle

hiSetTabWindowIcon

hiSetTabWindowTip

hiIsWindowSpecifier

hiIsWindowSpecifier


Return to top
 ⠀
X