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

hiCreateWindow

hiCreateWindow(
g_boxSpec 
t_widgetType 
t_appType 
[ t_help ]
[ g_scrollbars ]
[ g_form ] 
[ l_iconPosition ]
) 
=> w_windowId / nil 

Description

Creates, but does not display, a window of one of the following types: session, graphics, text, hypertext, html, encap, or form. This window becomes the current window.

If you do not want this window to ever 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 is reset to the last current window or to another open window. If another window cannot be found, the current window is reset to nil.

Setting the neverCurrentWindow property might 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

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

If g_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.

t_widgetType

One of the following strings: session, graphics, text, hypertext, html, encap, form, or none (plot windows) that represent the type of window widget to be created.

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

t_appType

String representing the window application type or name. This string is also used as the window’s bindkey prefix.

t_help

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:

hiOpenWindow( ?appType "MyApp" ?help "MyAppHelp")
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.

g_scrollbars

Either t or nil to specify the use of scroll bars. This field is valid only for windows with widgetType equal to 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.

g_form

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

l_iconPosition

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

The g_boxSpec argument can also contain the icon position. If both methods are used, this icon position overrides the position passed in g_boxSpec unless l_iconPosition is nil.

Value Returned

w_windowId

The window ID of the created window, in the following format:

window:# (all windows except session windows)

swindow:# (session windows)

where # is the window number.

nil

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

Examples

hiCreateWindow( ’default "graphics" "MyApp" )
=> window:4

Related Topics

Window Functions

hiCreateAppForm

hiIsWindowSpecifier


Return to top
 ⠀
X