【Skill】创建Virtuoso菜单

procedure(TEST(custom_menu)

win = getCurrentWindow()

cut_line = hiCreateSeparatorMenuItem(?name `cut_line)

item1 = hiCreateMenuItem(

  ?name 'item1

  ?itemText "Test item"

  ?callback "test_item1()"

);end item1 创建子菜单

item2 = hiCreateMenuItem(

  ?name 'item2

  ?itemText "Test item2"

  ?callback "test_item2()"

);end item2

menu_pd = hiCreatePulldownMenu(

  'menu_pd

  "MENU PULL"

  list(

  item2

  );end list

);end pd menu 创建子窗口

 

item3 = hiCreateSliderMenuItem(

  ?name 'item3

  ?itemText "SUB_MENU"

  ?subMenu menu_pd

);end item3

 

main_menu = hiCreatePulldownMenu(

  'main_menu

  "TEST MENU"

  list(

  item1

  cut_line

  item3

);end list

);end main

hiInsertBannerMenu(win main_menu hiGetNumMenus(win))

);end pro 窗口创建完成

 

deRegUserTriggers("maskLayout" nil nil 'TEST)

deRegUserTriggers("schematic" nil nil 'TEST)

deRegUserTriggers("maskLayoutXL" nil nil 'TEST) ;增加trigger条件

 

posted @ 2024-07-08 14:15  Vincent_Wood  阅读(228)  评论(0编辑  收藏  举报