Panorama:TabGroupsAPI: Difference between revisions
Jump to navigation
Jump to search
Raymondlee (talk | contribs) m (→Example) |
Raymondlee (talk | contribs) |
||
| Line 17: | Line 17: | ||
extData: { | extData: { | ||
"tabgroups": "{\"group1-id\": {\"id\": \"group1-id\", \"title\": \"first title\", \"userSize\": {\"x\": 330, \"y\": 310}, | "tabgroups": "{\"group1-id\": {\"id\": \"group1-id\", \"title\": \"first title\", \"userSize\": {\"x\": 330, \"y\": 310}, | ||
\"bounds\": {\"left\": 35, \"top\": 45, \"width\": 330, \"height\": 310}}, | |||
\"group2-id\": {\"id\": \"group2-id\", \"title\": \"second title\", \"userSize\": {\"x\": 330, \"y\": 310}, | \"group2-id\": {\"id\": \"group2-id\", \"title\": \"second title\", \"userSize\": {\"x\": 330, \"y\": 310}, | ||
\"bounds": {\"left\": 450, \"top\": 45, \"width\": 330, \"height\": 310}}, | |||
" | \"additions\": {\"activeGroup\":\"group2-id\", \"showOnStartup\":true, | ||
\"pageBounds\" :{\"left\":0, \"top\": 0, \"width\": 1000, \"height\": 750}}}" | |||
} | } | ||
}]} | }]} | ||
Revision as of 08:25, 14 November 2011
Schema
Compatibility
Example
{windows: [{
tabs: [
{entries: [{url: "about:mozilla"}]},
{entries: [{url: "http://example.com/#1"}],
extData: {"tabgroups": "{\"group\": \"group1-id\", \"title\": \"first tab title\", \"url\": \"first tab url"}"}},
{entries: [{url: "http://example.com/#2"}],
extData: {"tabgroups": "{\"group\": \"group2-id\", \"title\": \"second tab title\",\"url\": \"second tab url"},
\"active\":\"last active tab in group it belongs\"}"}
],
extData: {
"tabgroups": "{\"group1-id\": {\"id\": \"group1-id\", \"title\": \"first title\", \"userSize\": {\"x\": 330, \"y\": 310},
\"bounds\": {\"left\": 35, \"top\": 45, \"width\": 330, \"height\": 310}},
\"group2-id\": {\"id\": \"group2-id\", \"title\": \"second title\", \"userSize\": {\"x\": 330, \"y\": 310},
\"bounds": {\"left\": 450, \"top\": 45, \"width\": 330, \"height\": 310}},
\"additions\": {\"activeGroup\":\"group2-id\", \"showOnStartup\":true,
\"pageBounds\" :{\"left\":0, \"top\": 0, \"width\": 1000, \"height\": 750}}}"
}
}]}
Applications
Panorama
Vertical Tabs
Tree Style Tabs
API Description
TabGroups
[Methods]
createGroup(DOMWindow aWindow)
getGroups()
getGroupsByWindow(DOMWindow aWindow)
[Events]
tabgroup-added
tabgroup-removed
window-closing
TabGroup
[Properties]
id : string
title : string
tabs : xulTab[]
storage : object
[Methods]
addTab(xulTab aTab)
removeTab(xulTab aTab)
close()
[Events]
rename
tab-added
tab-removed
close