OSDN Git Service

import source-tree based svn r84.
[bluegriffon/BlueGriffon.git] / doc / sidebarcontent.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\r
2     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
3 \r
4 <html xmlns="http://www.w3.org/1999/xhtml">\r
5 <head>\r
6    <meta http-equiv="content-type"\r
7          content="text/html; charset=us-ascii" />\r
8 \r
9    <title>Developing a sidebar for Composer</title>\r
10    <link rel="stylesheet"\r
11          href="doc.css"\r
12          type="text/css" />\r
13 </head>\r
14 \r
15 <body>\r
16    <div class="header">\r
17       Composer: developers\r
18    </div>\r
19 \r
20    <div id="navBar">\r
21       <a href="index.html">Index</a> &gt; <a href=\r
22       "sidebarcontent.html">Developing a sidebar for Composer</a>\r
23    </div>\r
24 \r
25    <h1>Developing a sidebar for Composer</h1>\r
26 \r
27    <p>To offer new sidebar content to Composer users, you have to\r
28    distribute your application as an installable extension to\r
29    Composer, a *.xpi file.</p>\r
30 \r
31    <p>The application id for Composer is\r
32    <code>{8fa6f1b4-7ed3-4895-bac6-01f1cc206ab3}</code> .</p>\r
33 \r
34    <ol class="readonly"\r
35        id="mozToc">\r
36       <!--mozToc h2 1 h3 2-->\r
37 \r
38       <li><a href="#mozTocId287073">How to register a new\r
39       sidebar</a></li>\r
40 \r
41       <li><a href="#mozTocId290755">Make your sidebar observe\r
42       editor events</a></li>\r
43    </ol>\r
44 \r
45    <h2><a class="mozTocH2"\r
46       name="mozTocId287073"\r
47       id="mozTocId287073"></a>How to register a new sidebar</h2>\r
48 \r
49    <p>Your extension should add elements to\r
50    chrome://bluegriffon/content/xul/bluegriffon.xul through a XUL overlay\r
51    :</p>\r
52 \r
53    <ul>\r
54       <li>append a new <code>sidebaritem</code> element to\r
55       <code>&lt;sidebaritems id="sidebaritems"&gt;</code></li>\r
56 \r
57       <li>that element must have an ID, unique in the ID name space\r
58       of bluegriffon.xul</li>\r
59 \r
60       <li>that element must have a <code>name</code> attribute,\r
61       representing your sidebar content ; that sidebar should be a\r
62       NAME ; it is recommended that the ID and that attribute have\r
63       the same value</li>\r
64 \r
65       <li>that element must have a <code>src</code> attribute,\r
66       containing the URL of the document to be shown in your\r
67       sidebar content; this is typically going to be a chrome URL\r
68       in your XPI</li>\r
69 \r
70       <li>that element can have a&nbsp;<code>title</code>\r
71       containing a (possibly localized) string representing the\r
72       sidebar item. That string will be used in the sidebar to list\r
73       the available sidebar items or title the visible sidebar\r
74       items. If absent, the value of the <code>name</code>\r
75       attribute is used.</li>\r
76    </ul>\r
77 \r
78    <h2><a class="mozTocH2"\r
79       name="mozTocId290755"\r
80       id="mozTocId290755"></a>Make your sidebar observe editor\r
81       events</h2>\r
82 \r
83    <p>TBD</p>\r
84    <hr style="width: 100%; height: 2px;" />\r
85 \r
86    <h4>History</h4>\r
87 \r
88    <div class="section history">\r
89       <dl>\r
90          <dt>Last Update:</dt>\r
91 \r
92          <dd>2007-oct-29, 10:18am CEST</dd>\r
93 \r
94          <dt>2007-oct-29, 10:18am CEST</dt>\r
95 \r
96          <dd>initial revision (dglazman)</dd>\r
97       </dl>\r
98    </div>\r
99 </body>\r
100 </html>\r