SKILL codes for pop-up menus in Virtuoso layout editor

S

Subhash

Guest
Hi everyone,
Please find the codes for pop-up menu.
I am still working on these so if I find some interesting things then
I will update you all.

;------------------------------------------------------------------------------------------
; Code for dynamic pop-up menu
;------------------------------------------------------------------------------------------
procedure( trDisplayWindowsPopUp()
hiDisplayMenu(
;;; creating a dynamic popup menu
hiCreateSimpleMenu('trWindowsPopUp "Windows"
foreach( mapcar wid hiGetWindowList() hiGetWindowName(wid) ) ; foreach
foreach( mapcar wid hiGetWindowList()
sprintf( nil "hiRaiseWindow( window( %d ))" wid->windowNum )
) ; foreach
) ; hiCreateSimpleMenu
) ; hiDisplayMenu
) ; procedure
;------------------------------------------------------------------------------------------

;------------------------------------------------------------------------------------------
; Code for 2D (Windows) pop-up menu
;------------------------------------------------------------------------------------------
let( (buttonField labelField)
;; Defining the Button Field
buttonField = hiCreateButton(
?name 'someButton
?buttonText "Layers"
?callback "list(mchange())" ;printf(\"pressed\")"
) ; hiCreateButton

;; Defining the Label Field
labelField = hiCreateLabel(
?name 'myLabel
?labelText "Select Layer"
?justification 'center
) ; hiCreateLabel

;; Defining the 2D menu
hiCreate2DMenu( 'MY2Dmenu
"MY2DmenuName"
list( list( buttonField 100:10 90:30 )
list( labelField 0:0 100:50 )
) ; end list
) ; hiCreate2DMenu
;; Return the menu structure
MY2Dmenu
)
;------------------------------------------------------------------------------------------
Please help me in improving the same.
 

Welcome to EDABoard.com

Sponsor

Back
Top