firefox扩展开发(四) : 更多的窗口控件
标签盒子
标签盒子是啥?大家都见过,就是分页标签:
对应的代码:
-
<?xml version="1.0"?>
-
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-
<window
-
id="test-window"
-
title="测试用的窗口"
-
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
<tabbox>
-
<tabs>
-
<tab label="第一个标签标题"/>
-
<tab label="第二个标签标题"/>
-
</tabs>
-
<tabpanels>
-
<tabpanel id="firsttab">
-
<label value="第一个标签的内容"/>
-
</tabpanel>
-
<tabpanel id="secondtab">
-
<label value="第二个标签的内容"/>
-
</tabpanel>
-
</tabpanels>
-
</tabbox>
-
</window>
每个标签盒子中的内容被包含在<tabbox>中,<tabs>下的<tab>包含标签标题,<tabpanels>下的<tabpanel>包含每个标签的内容,按顺序和标签标题<tab>对应。
iframe
<iframe>这个标签在HTML里再熟悉不过了,在XUL中,作用和用法HTML一样,可以用来在窗口中嵌套一个网页,只要设置<iframe>的src属性即可:
-
<?xml version="1.0"?>
-
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-
<window
-
id="test-window"
-
title="测试用的窗口"
-
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
<label value="以下为GemBlog首页…………"/>
-
<iframe id="content" src="http://blog.linuxgem.org" flex="1"/>
-
</window>
效果:
工具栏
-
<?xml version="1.0"?>
-
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-
<window
-
id="test-window"
-
title="测试用的窗口"
-
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
<toolbox>
-
<toolbar>
-
<toolbarbutton label="< 后退"/>
-
<toolbarbutton label="前进 >"/>
-
<textbox id="url"/>
-
</toolbar>
-
</toolbox>
-
</window>
<toolbox>包含<toolbar>,<toolbar>包含工具栏中的元素,<toolbarbutton>表示工具栏按钮:
菜单栏
-
<?xml version="1.0"?>
-
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-
<window
-
id="test-window"
-
title="测试用的窗口"
-
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
<menubar>
-
<menu label="文件">
-
<menupopup>
-
<menuitem label="新建"/>
-
<menuitem label="打开"/>
-
<menuitem label="保存"/>
-
<menuseparator/>
-
<menuitem label="退出"/>
-
</menupopup>
-
</menu>
-
<menu label="编辑">
-
<menupopup>
-
<menuitem label="拷贝"/>
-
<menuitem label="粘贴"/>
-
</menupopup>
-
</menu>
-
</menubar>
-
</window>
<menubar>为一个菜单栏的顶极标签,菜单栏中的每一项为一个<menu>,每一个菜单项下面的子项目,为<menupopup>下的<menuitem>,<menuseparator>为分隔符。
效果:(不知咋的,打开菜单的状态下没法抓图 :( )
2020年8月03日 17:49
Wishing Robert Downey Jr. happy birthday on April 4 or other celebrities you like with information from the celebrity birthdays
2020年11月03日 17:35
Get Assignment Help Scotland Online, Essay Writing Services, Dissertation Help, Thesis Help in Scotland at Affordable Prices.Our writers providing great posses skills in writing assignments. For More Services: Assignment Help Wales | Geography Dissertation Help | Essay Help USA
2021年4月02日 18:36
I get blessings and joy, and incredible pleasure when I really could help a warm individual lost for phrases with the key language of the rose.
2021年4月10日 13:26
The product being offered - usually dropshipping performs just with top quality products. In the event that you try to sell a poor product, then your customers will request an alternative or return so you will be in major reduction, considering that the delivery cost for the opposite logistics is going to be compensated by you.
2021年4月10日 19:19
i really like this article please keep it up. precio pintar piso zaragoza
2021年4月15日 02:48
Thank you again for all the knowledge you distribute,Good post. I was very interested in the article, it's quite inspiring I should admit. I like visiting you site since I always come across interesting articles like this one.Great Job, I greatly appreciate that.Do Keep sharing! Regards, online boutiques
2021年4月18日 23:44
Ensure you perform position gambling games at pragmatic play position brokers to get bonuses and the numerous advantages that you will get every time you perform on line slots & online casino gaming, because we're sure to offer pleasure in playing.
2021年4月28日 16:23
Here is some data concerning the natural content of the seafood: a 3 whiff helping of octopus contains 150 calories. This seafood also includes a good source of protein.
2021年5月01日 18:14
There is a practical advantage of mixing a bobbleheadwater and swimming share together. When assembled, both nielsthomas1 and share can reveal gear like selection system and heater.
2021年5月03日 04:45
Thanks for this great post, i find it very interesting and very well thought out and put together. I look forward to reading your work in the future. how to become credit card merchant processor
2021年5月17日 20:30
Wow! Such an amazing and helpful post this is. I really really love it. It's so good and so awesome. I am just amazed. I hope that you continue to do your work like this in the future also credit card processing sales jobs
2021年5月28日 05:41
howdy, your websites are really good. I appreciate your work. merchant services partnerships
2021年5月28日 05:48
I’ve been surfing online more than 5 hours today, yet I never found any interesting article like yours without a doubt. It’s pretty worth enough for me. Thanks... payment facilitator vs payment processor
2021年5月29日 20:17
Very interesting blog. Alot of blogs I see these days don't really provide anything that I'm interested in, but I'm most definately interested in this one. Just thought that I would post and let you know. easy recipes for dinner
2021年6月02日 05:14
I’ve been surfing online more than 5 hours today, yet I never found any interesting article like yours without a doubt. It’s pretty worth enough for me. Thanks... poker pulsa
2021年6月04日 04:20
I am thankful to you for sharing this plethora of useful information. I found this resource utmost beneficial for me. Thanks a lot for hard work. vape pen cartridges wholesale
2021年6月08日 19:58
Hello, I have browsed most of your posts. This post is probably where I got the most useful information for my research. Thanks for posting, maybe we can see more on this. Are you aware of any other websites on this subject. visit this site
2022年4月24日 12:38
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.. สูตรบาคาร่าai ฟรี
2022年5月29日 02:48
Hello There. I found your blog using msn. This is an extremely well written article. I will be sure to bookmark it and return to read more of your useful information. Thanks for the post. I’ll certainly comeback. situs judi bola
2022年6月02日 02:31
I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much. rent car to https://www.carngo.com/
2022年6月05日 04:18
It was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. คาสิโนออนไลน์ ฝาก ถอนไม่มีขั้นต่ํา
2022年7月30日 17:52
Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. spbo indonesia
2022年10月06日 17:56
koolstuff you have got and you keep update all of us. <a href="https://sites.google.com/account-email.com/hotmail/login">https://sites.google.com/account-email.com/hotmail/login</a>
2022年10月06日 17:57
koolstuff you have got and you keep update all of us.
2022年11月02日 04:49
Please let me know if you’re looking for a article writer for your site. You have some really great posts and I feel I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some material for your blog in exchange for a link back to mine. Please send me an email if interested. Thank you! Sell My Phone For The Best Price UK
2022年11月07日 12:33
Beautiful article. Thanks so much. Keep up with good work.<a href='https://csgocaseopeningnearme.mystrikingly.com/'>click here now</a>
2022年11月07日 22:22
very nice post, I actually love this website, carry on it.
2022年11月22日 16:32
"Hyderabad information will provide the valuable and in demand daily news. We offer free Business listing for Hyderabad"
<a href="http://hyderabadinformation.com/">Hyderabad news</a>
2022年11月22日 17:18
"Hyderabad information will provide the valuable and in demand daily news. We offer free Business listing for Hyderabad"
<a href="http://hyderabadinformation.com/">hyderabadupdate</a>
2022年12月19日 16:56
I certainly enjoyed the method that you explore your experience and perception of the area of interest
2023年1月17日 03:40
Great fit, lovely soft leather, could not ask for better. NYC Jacket
2023年1月17日 19:52
Absolutely stunning jacket. The quality is incredible for the price range. I really appreciate that the company is deciding to put the customer’s needs first with going out if their way to may you feel special and important. You are treated like you in a higher end market. 100% recommend and will be purchasing from them again. NYC Jacket
2023年1月18日 19:40
Thank you for some other informative blog. Where else could I get that type of information written in such an ideal means? I have a mission that I’m just now working on, and I have been at the look out for such information. read more here
2023年1月28日 16:15
Your article has piqued a lot of positive interest. I can see why since you have done such a good job of making it interesting. red bost
2023年2月21日 03:41
I love long jackets & this one is very unique Custom Leather Jacket NYC
2023年2月21日 16:13
Thanks, I have been searching for info about this subject matter for ages and yours is the best I have found so far. forum backlink service
2023年2月27日 04:01
Thanks for your post. I’ve been thinking about writing a very comparable post over the last couple of weeks, I’ll probably keep it short and sweet and link to this instead if thats cool. Thanks. Trb cards
2023年3月04日 16:30
Absolutely stunning jacket. The quality is incredible for the price range. I really appreciate that the company is deciding to put the customer’s needs first with going out if their way to may you feel special and important. You are treated like you in a higher end market. 100% recommend and will be purchasing from them again. Custom Leather Jackets NYC
2023年3月11日 03:44
Thanks for every other informative site. The place else may just I get that kind of information written in such an ideal means? I have a venture that I’m just now operating on, and I have been on the look out for such information. Trb System
2023年3月14日 04:32
I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. trb checks
2023年4月26日 15:00
This article is good, I read such an article last time, which was Bangalore escorts, which I liked very much, you can also see this once.
2024年6月12日 22:21
Découvrez notre tour PC gamer pas cher et complet pour un setup gaming ultime à provonto. Performances optimales à prix imbattable. pc gamer complet sont ici
<a href="https://provonto.fr">pc tour gamer pas cher</a>