在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 6500|回复: 10

[求助] 有大神熟悉virtuoso的任务栏编辑吗?例如hiInsertBannerMenu吗?

[复制链接]
发表于 2016-12-12 16:23:52 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
用hiInsertBannerMenu可以在任务栏上增加一个自己定义的item,
但是需要指定具体的window,且每次只能指定一个layout window,
我希望启动virtuoso的时候自动在layout界面的任务栏上加上这个item(类似Calibre这个item,打开任何一个layout界面直接就有了),
要用什么方法呢?
 楼主| 发表于 2016-12-13 09:05:43 | 显示全部楼层
有大神吗?
发表于 2017-1-20 16:34:03 | 显示全部楼层
是在layout菜单上增加一个自定义的menu吗
发表于 2017-1-20 18:17:49 | 显示全部楼层
下面是我用来在schematic中添加自定义menu的脚本。
你可以参考下。具体函数就请查阅cadence文档吧。

你把编辑好的脚本放到文件里面,每次cadence启动的时候都自动加载就好了

希望能帮助你

procedure(schRegMenu(args)
let(
(
    mIPrintInstName   
    subMenuList
);local variable

    mIPrintInstName = hiCreateMenuItem(
        ?name 'mIPrintInstName
        ?itemText "&Print Instance Name"
        ?callback "yourOwnMenuCBFunction()"
    );hiCreateMenuItem


    subMenuList = cons(mIPrintInstName subMenuList)
   
    ;mAmadeus is set to be global variable on purpose.
    mAmadeus = hiCreatePulldownMenu(
        'mAmadeus ;;; menu handle
        "&Amadeus" ;;; menu title
        subMenuList        
    ) ; hiCreatePulldownMenu
   
    list(mAmadeus)
   
);let
);proc

unless(member('mAmadeus deGetAppInfo("schematic")->userMenuTrigList)
    deRegUserTriggers("schematic" nil 'schRegMenu)
);unless  
unless(member('mAmadeus deGetAppInfo("schematicXL")->userMenuTrigList)
    deRegUserTriggers("schematicXL" nil 'schRegMenu)
);unless  
unless(member('mAmadeus deGetAppInfo("analogArtist-schematic")->userMenuTrigList)
    deRegUserTriggers("analogArtist-schematic" nil 'schRegMenu)
);unless  
unless(member('mAmadeus deGetAppInfo("adexl-schematic")->userMenuTrigList)
    deRegUserTriggers("adexl-schematic" nil 'schRegMenu)
);unless
发表于 2018-7-18 23:05:00 | 显示全部楼层
回复 4# fatcat1205


   请问为什么主函数有一个args变量?procedure(schRegMenu(args),函数内部好像也没用上
   还有就是为什么最后要返回一个list呢?list(mAmadeus)

   另外是不是缺少了hiInsertBannerMenu()这一步?
发表于 2018-7-20 19:38:02 | 显示全部楼层
回复 5# z20102760


args的确没有用到,只是放在那作为一个place holder。应该是我找参考例子的时候保留的。不影响这个函数的使用。添加menu是通过“deRegUserTriggers”,下面是他的说明文档。你说的方法我没有试过。

deRegUserTriggers

deRegUserTriggers(
t_viewType
[ s_appTrigger [ s_menuTrigger [ s_postInstallTrigger ] ] ]
)
=> t / nil
Description

Registers user application, user menu, and user post install triggers.

A user application trigger is called immediately following the application trigger. (Only root view types can have application triggers, therefore, only root view types can have user application triggers.) A user menu trigger is called before the menu trigger. A user post install trigger is called immediately following the post install trigger.

User triggers are optional and can be defaulted to nil; however, there is no point in registering user triggers if all are nil. This condition, therefore, is flagged as an error. User triggers are described in detail in the next section.

Multiple user triggers can be registered for any given view type. If a user trigger is already registered when deRegUserTriggers is called, a warning message displays. To remove a user trigger associated with a view type, see deUnRegUserTriggers.

Arguments

t_viewType

View type or view subtype to which s_appTrigger, s_menuTrigger, and s_postInstallTrigger will be attached. An application can attach user triggers to any number of view types, but must call deRegUserTriggers once for each one.

s_appTrigger

Symbol for a SKILL function to be called after the application trigger is called. The primary function of this routine is to allow the user to manage any runtime context that might need to be added to customize an existing application. For more information about the user application trigger, see userAppTrigger.

s_menuTrigger

Symbol for a SKILL function to be called before the menu trigger is called. The primary function of this routine is to allow the user to supply any menus that might need to be added to customize an existing application. For more information about the user menu trigger, see userMenuTrigger.

s_postInstallTrigger



Symbol for a SKILL function to be called after the post-install trigger is called. The primary function of this routine is to allow the user to do any processing that might be required after the application has been fully installed and displayed in the window. For more information about the user post install trigger, see userPostInstallTrigger.

Value Returned

t

Registration was successful.

nil

Registration failed.

Example

deRegUserTriggers("schematic" 'myAppTrigger 'myMenuTrigger 'myPostTrigger)



deRegUserTriggers("schematic" nil 'userMenuTrigger)



deRegUserTriggers("schematic" nil nil 'myPostTrigger)
发表于 2018-7-20 22:49:42 | 显示全部楼层
回复 6# fatcat1205


   Hi fatcat,   hiInsertBannerMenu( )可以指定menu创建的position,   请问使用deRegUserTriggers("schematic" nil 'userMenuTrigger)创建的menu的默认position在哪里呢?
发表于 2018-7-23 14:42:21 | 显示全部楼层
回复 7# z20102760
deRegUserTriggers这个函数里面的说明里面没有指定位置的设置。你可以去查查Cadence的相关文档,看看有没有别的什么函数可以控制menu的位置
发表于 2018-11-12 19:24:10 | 显示全部楼层
本帖最后由 野生救世主 于 2018-11-12 19:35 编辑

回复 4# fatcat1205


可以用!
发表于 2021-8-18 22:19:36 | 显示全部楼层
thanks very much.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

×

小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-12-19 05:49 , Processed in 0.020755 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表