|
|
(14 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
| '''Work in progress''' See also [http://forums.mozillazine.org/viewtopic.php?t=263028].
| | Information from this page and [http://forums.mozillazine.org/viewtopic.php?t=263028 this thread] has been migrated to [http://developer-test.mozilla.org/en/docs/Preferences_System Devmo]. |
|
| |
|
| This is about new bindings introduced in Toolkit used in Firefox/Thunderbird 1.1. The new binding allow you write preferences UI faster, using less JavaScript code.
| | [[Category:Redirects]] |
| | |
| | |
| Todo:
| |
| * list attributes too
| |
| * more detailed descriptions
| |
| * mark readonly properties as such
| |
| * sort alphabetically
| |
| * check correctness
| |
| | |
| * platform specific issues:
| |
| ** instant apply
| |
| ** animation
| |
| * possible use of dynamic overlays for panes
| |
| | |
| == <prefwindow> ==
| |
| extends chrome://global/content/bindings/dialog.xml#dialog
| |
| | |
| === Properties ===
| |
| ; <code>preferencePanes</code> : A <code>NodeList</code> of <code><prefpane></code> elements.
| |
| ; <code>type</code> : Gets and sets the value of the <code>type</code> attribute.
| |
| ; <code>lastSelected</code> : Used to get the value of the <code>lastSelected</code> attribute.
| |
| ; <code>instantApply</code> : Indicates whether the window is in "instant apply" mode.
| |
| ; <code>currentPane</code> : Currently selected <code><prefpane></code> element. Use <code>showPane()</code> method to select another pane.
| |
| | |
| === Methods ===
| |
| ; <code>showPane(aPaneElement)</code> : Selects given pane.
| |
| ; <code>animate(aOldPane, aNewPane)</code> : ? is this a public method ?
| |
| ; <code>addPane(aPaneElement)</code> : Adds a specified prefpane to the window.
| |
| ; <code>openSubDialog(aURL, aFeatures, aParams)</code> : Opens a modal sub-dialog.
| |
| ; <code>openWindow(aWindowType, aURL, aFeatures, aParams)</code> :
| |
| | |
| | |
| == <prefpane> ==
| |
| === Properties ===
| |
| ; <code>src</code> : Gets and sets the value of the <code>src</code> attribute.
| |
| ; <code>selected</code> : Gets and sets the value of the <code>selected</code> attribute.
| |
| ; <code>image</code> : Gets and sets the value of the <code>image</code> attribute.
| |
| ; <code>label</code> : Gets and sets the value of the <code>label</code> attribute.
| |
| ; <code>preferenceElements</code> : A <code>NodeList</code> of child elements with <code>preference</code> attribute.
| |
| ; <code>preferences</code> : A <code>NodeList</code> of all child <code><preference></code> elements.
| |
| ; <code>loaded</code> : Indicates whether the pane is fully loaded.
| |
| ; <code>contentHeight</code> :
| |
| | |
| === Methods ===
| |
| ; <code>writePreferences(aFlushToDisk)</code> :
| |
| ; <code>preferenceForElement(aElement)</code> :
| |
| ; <code>getPreferenceElement(aStartElement)</code> :
| |
| ; <code>userChangedValue(aElement)</code> :
| |
| | |
| | |
| == <preferences> ==
| |
| | |
| === Methods ===
| |
| ; <code>fireChangedEvent(aPreference)</code> :
| |
| | |
| === Fields ===
| |
| ; <code>service</code> : The preferences service (<code>nsIPrefService</code>).
| |
| ; <code>rootBranch</code> : The root prefs branch (<code>nsIPrefBranch</code>).
| |
| ; <code>defaultBranch</code> : The root branch with default values (<code>nsIPrefBranch</code>).
| |
| ; <code>rootBranchInternal</code> : The root prefs branch (<code>nsIPrefBranch2</code>).
| |
| | |
| | |
| == <preference> ==
| |
| === Properties ===
| |
| ; <code>instantApply</code> :
| |
| ; <code>preferences</code> :
| |
| ; <code>name</code> :
| |
| ; <code>type</code> :
| |
| ; <code>inverted</code> :
| |
| ; <code>readonly</code> :
| |
| ; <code>value</code> :
| |
| ; <code>locked</code> :
| |
| ; <code>disabled</code> :
| |
| ; <code>tabIndex</code> :
| |
| ; <code>hasUserValue</code> :
| |
| ; <code>defaultValue</code> :
| |
| ; <code>valueFromPreferences</code> :
| |
| | |
| === Methods ===
| |
| ; <code>reset()</code> :
| |
| ; <code>setElementValue(aElement)</code> :
| |
| ; <code>getElementValue(aElement)</code> :
| |
| ; <code>isElementEditable(aElement)</code> :
| |
| ; <code>updateElements()</code> :
| |