SKILL codes for pop-up menus in Virtuoso layout editor

Discussion in 'Cadence' started by Subhash, Mar 15, 2007.

  1. Subhash

    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.
     
    Subhash, Mar 15, 2007
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.