Product Documentation
Virtuoso Visualization and Analysis XL SKILL Reference
Product Version IC23.1, November 2023

awvInitWindowFunctionAdd

awvInitWindowFunctionAdd(
u_function
)
=> t / nil

Description

Adds a function to the list of initialization functions that are called when a new Waveform window is opened.

The list of functions is empty by default. For example, you can use this function to add menus to every new Waveform window that is opened.

Arguments

u_function

Function to add to the list.

Callback parameter list: w_windowID

Value Returned

t

Function is added to the list.

nil

Function cannot be added to the list because of an error.

Examples

The following example adds a procedure myCreateMenu, which creates a new banner menu Test in the Results Browser. The Test menu has two options, Item1 and Item2.

myCreateMenu
=> t
windowId=awvGetHiWindow(awvGetCurrentWindow())
procedure(
 myCreateMenu(windowId)
 win=awvGetHiWindow(windowId)
 let((item1 item2)
  item1=hiCreateMenuItem(
   ?name 'item1
   ?itemText "Item1"
   ?callback "println(\"Item 1 Selected\")"
  )
  item2=hiCreateMenuItem( 
   ?name 'item2
   ?itemText "Item2"
   ?callback "println(\"Item 2 Selected\")"
  )
  hiCreatePulldownMenu( 'myMenu "Test" list(item1 item2))
  hiInsertBannerMenu(win myMenu hiGetNumMenus(win))
  )
 )
 awvInitWindowFunctionAdd('myCreateMenu)
=> myCreateMenu
=> t

The following message is printed in CIW when you click Item1 from the Test menu.

println("Item 1 Selected")
"Item 1 Selected"

The following message is printed in CIW when you click Item2 from the Test menu.

println("Item 2 Selected")
"Item 2 Selected"

Return to top
 ⠀
X