新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论SVG, GML, X3D, VRML, VML, XAML, AVALON, Batik等基于XML的图形技术,以及有关GIS的应用。
    [返回] 中文XML论坛 - 专业的XML技术讨论区XML.ORG.CN讨论区 - 高级XML应用『 SVG/GML/VRML/X3D/XAML 』 → [转帖]Attribute contextMenu 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 2533 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: [转帖]Attribute contextMenu 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     SCYANGYU 帅哥哟,离线,有人找我吗?处女座1971-9-20
      
      
      威望:7
      等级:大四(每天看1小时莱昂氏)
      文章:217
      积分:1281
      门派:XML.ORG.CN
      注册:2005/2/17

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给SCYANGYU发送一个短消息 把SCYANGYU加入好友 查看SCYANGYU的个人资料 搜索SCYANGYU在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看SCYANGYU的博客楼主
    发贴心情 [转帖]Attribute contextMenu

    Attribute contextMenu

    Synopsis:
    readonly dom::Document contextMenu
    XML document that represents SVG Viewer's context menu. Any change to this document will be reflected on the context menu (when it pops up). The document's root element must be a "menu" element. The following elements are allowed in menu:

    header   menu header; most systems ignore header text content of this element will be visible on the menu on the systems that support menu headers  
    item   an item in the menu text content of this element will be visible as item's text; character "&" designates hot key.  
    separator   separator bar  
    menu   submenu; some systems can flatten submenus  

    item element can have following attributes (note that xlink:href attribute must be in XLink namespace, use only setAttributeNS to set it):

    action   system action that this item will cause if activated  
    onactivate   script that gets executed when this item is activated  
    xlink:href   follow the specified URL  
    target   used together with xlink:href  
    checked   can be either "yes" or "now", will cause a checkmark be drawn next to this item  
    display   can be either "inline" or "none"; if "none" this item is ignored  
    enabled   can be either "yes" or "no"; if "no" this item is visible, but cannot be selected  

    Supported system actions are listed here:

    ZoomIn
    ZoomOut
    OriginalView
    Quality
    Pause
    Mute
    Find
    FindAgain
    Copy
    CopySVG
    ViewSVG
    ViewSource
    SaveAs
    SaveOriginalAs
    SaveSnapshotAs
    Help
    About
    It is strongly recommended to have 'About' action in the menu. Menus without 'About' action may get ignored by the viewer.


    --------------------------------------------------------------------------------

    A (nearly-)complete, fairly generic example of this -including activation of the 'checked,' 'display,' and 'enabled' options- can be seen at http://www.svg-whiz.com/images/customcontextmenu.svg.


    --------------------------------------------------------------------------------

    Implementation Note: It is not possible in ASV3 to access the built-in functions of the context menu (such as "CopySVG" or "SaveAs") through script. This is a security feature.


    --------------------------------------------------------------------------------

    Disabling the Context Menu
    To prevent the menu from appearing at all, you can use some variation of the following code:

    <svg onmousedown="evt.preventDefault()" onmouseup="evt.preventDefault()">
       ...
    </svg>
    This can be useful when you want to provide your own context menu, or when you want the right-click to have another action.


       收藏   分享  
    顶(0)
      




    ----------------------------------------------
    http://borland.mblogger.cn/scyangyu/

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2005/2/27 11:14:00
     
     GoogleAdSense处女座1971-9-20
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2025/2/27 18:35:51

    本主题贴数1,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    46.875ms