Today's the day

向软件大牛炫耀我会焊单片机,向硬件大牛炫耀我会写 Rails,向软硬件大牛炫耀我生物,向软硬件生物大牛炫耀我会折腾期货 -_-bbb

firefox扩展开发(三) : 排列窗口控件
firefox扩展开发(五) : 驱动XUL界面

firefox扩展开发(四) : 更多的窗口控件

galeki posted @ 2007年5月22日 06:24 in Firefox扩展开发 with tags XUL 开发 扩展 firefox , 25375 阅读

标签盒子

标签盒子是啥?大家都见过,就是分页标签:

对应的代码:

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
  3. <window
  4.   id="test-window"
  5.   title="测试用的窗口"
  6.   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  7.         <tabbox>
  8.           <tabs>
  9.             <tab label="第一个标签标题"/>
  10.             <tab label="第二个标签标题"/>
  11.           </tabs>
  12.           <tabpanels>
  13.             <tabpanel id="firsttab">
  14.               <label value="第一个标签的内容"/>
  15.             </tabpanel>
  16.             <tabpanel id="secondtab">
  17.               <label value="第二个标签的内容"/>
  18.             </tabpanel>
  19.           </tabpanels>
  20.         </tabbox>
  21. </window>

每个标签盒子中的内容被包含在<tabbox>中,<tabs>下的<tab>包含标签标题,<tabpanels>下的<tabpanel>包含每个标签的内容,按顺序和标签标题<tab>对应。

iframe

<iframe>这个标签在HTML里再熟悉不过了,在XUL中,作用和用法HTML一样,可以用来在窗口中嵌套一个网页,只要设置<iframe>的src属性即可:

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
  3. <window
  4.   id="test-window"
  5.   title="测试用的窗口"
  6.   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  7.         <label value="以下为GemBlog首页…………"/>
  8.         <iframe id="content" src="http://blog.linuxgem.org" flex="1"/>
  9. </window> 

效果:

工具栏

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
  3. <window
  4.   id="test-window"
  5.   title="测试用的窗口"
  6.   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  7.         <toolbox>
  8.           <toolbar>
  9.             <toolbarbutton label="&lt; 后退"/>
  10.             <toolbarbutton label="前进 &gt;"/>
  11.             <textbox id="url"/>
  12.           </toolbar>
  13.         </toolbox>
  14. </window>

<toolbox>包含<toolbar>,<toolbar>包含工具栏中的元素,<toolbarbutton>表示工具栏按钮:

菜单栏

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
  3. <window
  4.   id="test-window"
  5.   title="测试用的窗口"
  6.   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  7.           <menubar>
  8.             <menu label="文件">
  9.               <menupopup>
  10.                 <menuitem label="新建"/>
  11.                 <menuitem label="打开"/>
  12.                 <menuitem label="保存"/>
  13.                 <menuseparator/>
  14.                 <menuitem label="退出"/>
  15.               </menupopup>
  16.             </menu>
  17.             <menu label="编辑">
  18.               <menupopup>
  19.                 <menuitem label="拷贝"/>
  20.                 <menuitem label="粘贴"/>
  21.               </menupopup>
  22.             </menu>
  23.           </menubar>
  24. </window>

<menubar>为一个菜单栏的顶极标签,菜单栏中的每一项为一个<menu>,每一个菜单项下面的子项目,为<menupopup>下的<menuitem>,<menuseparator>为分隔符。

效果:(不知咋的,打开菜单的状态下没法抓图 :( )

 

celebrity birthdays 说:
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

thomasyoung 说:
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

Rose bear 说:
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.

dropshipping 说:
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.

online boutiques 说:
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

GLOBALDENTALTOURISM 说:
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.

octopus referral cod 说:
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.

Excecutive Pool 说:
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.

how to become credit 说:
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

credit card processi 说:
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

merchant services pa 说:
2021年5月28日 05:41

howdy, your websites are really good. I appreciate your work. merchant services partnerships

payment facilitator 说:
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

easy recipes for din 说:
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

poker pulsa 说:
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

vape pen cartridges 说:
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

visit this site 说:
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

สูตรบาคาร่าai ฟรี 说:
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 ฟรี

COOK 说:
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

COOK 说:
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. คาสิโนออนไลน์ ฝาก ถอนไม่มีขั้นต่ํา

Harry 说:
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

MYSEO 说:
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>

<a href="https://sit 说:
2022年10月06日 17:57

koolstuff you have got and you keep update all of us.

COOK 说:
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

click here now 说:
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>

Get More Information 说:
2022年11月07日 22:22

very nice post, I actually love this website, carry on it.

Hyderabad news 说:
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>

Hyderabad update 说:
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>

business ideas 说:
2022年12月19日 16:56

I certainly enjoyed the method that you explore your experience and perception of the area of interest

COOK 说:
2023年1月17日 03:40

Great fit, lovely soft leather, could not ask for better. NYC Jacket

COOK 说:
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

COOK 说:
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

COOK 说:
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

COOK 说:
2023年2月21日 03:41

I love long jackets & this one is very unique Custom Leather Jacket NYC

forum backlink servi 说:
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

COOK 说:
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

COOK 说:
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

COOK 说:
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

COOK 说:
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

Model Bangalore Esco 说:
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.

pc tour gamer pas ch 说:
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>


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter