|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--MozileComponent | +--MozileMediator
Defined in core.js
Field Summary | |
Object |
changesSaved
Mozile - Changes Saved - This is true after any of the output methods (documentToXML, etc.) have been called, and false after any other command. |
Integer |
keyCounter
Mozile - Key Counter - Counts the number of keypresses which lead to character insertion. |
Object |
undoCounter
Mozile - Undo Counter - An integer which tracks the current position in the undoStack. |
Object |
undoStack
Mozile - Undo Stack - An array which contains stored states for the document. |
Constructor Summary | |
MozileMediator
(<String> configString)
Mozile Mediator - Coordinates the behaviour of the other objects. |
Method Summary | |
Element
|
_cleanDOM(<Element> element)
Removes all traces of Mozile in the document. |
Void
|
_cleanInterfaces()
Removes any interfaces which may have been injected into the document by the Mozile Extension. |
MozileCommand
|
addAccelerator(<String> accel, <MozileCommand> command)
Adds an accelerator string and a command to the accelerator list. |
MozileCommand
|
addCommand(<MozileCommand> command)
Adds a command to the commands list. |
Element
|
addEditor(<Element> editor)
Adds an element to the editors list. |
MozileModule
|
addModule(<MozileModule> module)
Adds a module to the modules list. |
MozileResource
|
addResource(<MozileResource> resource)
Adds a resource to the resources list. |
MozileModule
|
addSaveModule(<MozileModule> module)
Adds a module to the modules list. |
Void
|
clearRequest()
Clears the shared data attributes relevat to client requests. |
Void
|
clientRequest(<String> requestCode, evalOnChange)
If Mozile is enhanced, sends a request to the MozileExtension. |
Object
|
content()
Mozile - Content - Returns the string of Mozile's content, depending on the current save options. |
Object
|
createEditor(id, options)
Mozile - Create Editor - Creates a Mozile editor in the document using its id. |
Object
|
createEditors(selector, options)
Mozile - Create Editors - Creates multiple Mozile editors in the document, using a CSS selector. |
Object
|
debug(details, level, message)
Mozile Debug - A basic debugging tool. |
String
|
documentToHTML()
Extract the contents of the document as HTML, first cleaning up any mess that Mozile has made. |
String
|
documentToXML()
Mozile - Document To XML - Extract the contents of the document as XML, first cleaning up any mess that Mozile has made. |
String
|
editorToHTML()
Extract the contents of the current editor as HTML, first cleaning up any mess that Mozile has made. |
String
|
editorToXML()
Extract the contents of the current editor as XML, first cleaning up any mess that Mozile has made. |
Object
|
executeCommand(id, event)
Mozile - Execute Command - Calls the command() method of the command object corresponding to the given id. |
MozileInterface
|
getAboutInterface()
Gets Mozile's "About" interface box element. |
MozileCommand
|
getAccelerator(<String> accel)
Gets a command from the list by its accelerator string. |
Object
|
getAccelerators()
An array containing all of the keyboard shortcuts (accelerators) for Mozile commands. |
String
|
getBrowserName()
Gets the name of the browser. |
String
|
getBrowserVersion()
Gets the version number for the browser. |
MozileCommand
|
getCommand(<String> id)
Gets a command from the list by its id. |
MozileCommandList
|
getCommandList()
Returns the root command list for the Mozile toolbar. |
Object
|
getCommands()
An associative array containing all of the commands (but not the command lists) registered with this Mozile object. |
Element
|
getCurrentEditor()
Get the element of the editor which last had the focus. |
Integer
|
getDebugLevel()
An integer indicating how verbose debugging should be. |
Array
|
getEditors()
An array containing entries for every editor in the document. |
MozileInterface
|
getEditSourceInterface()
Gets Mozile's "Edit Source" interface. |
String
|
getGeckoVersion()
Gets the Gecko version for the browser. |
MozileInterface
|
getMessageInterface()
Gets Mozile's "Message" interface box element. |
String
|
getMode()
The mode controls which tools are used to manipulate the document. |
MozileModule
|
getModule(<String> name)
Gets a module from the list by its name. |
Object
|
getModules()
An associative array containing all the loaded module objects, indexed by their names. |
String
|
getMozillaVersion()
Gets the version of Mozilla on which the browser is based. |
String
|
getOperatingSystem()
Mozile checks the UserAgent string for the browser, and tries to determine what operating system the browser is running under. |
MozileResource
|
getResource(<String> id)
Gets a resource from the list by its id. |
Object
|
getResources()
An associative array containing all the MozileResource objects for scripts, links, and styles. |
String
|
getRoot()
The root directory for this Mozile installation. |
MozileInterface
|
getSaveInterface()
Gets Mozile's "Save As" interface box element. |
MozileModule
|
getSaveModule(<String> name)
Gets a module from the list by its name. |
Object
|
getSaveModules()
An associative array containing entries for every save method available, the default method, and the user's custom method. |
Object
|
getSaveOption(<String> mode, <String> key, defaultValue)
Gets a save option. |
String
|
getSharedData(<String> attribute, defaultValue)
Get an attribute from the core.js script tag. |
MozileInterface
|
getSourceInterface()
Gets Mozile's "Source" interface box element. |
Void
|
getStatusbar()
Creates a new MozileToolbar interface for the statusbar. |
CSSStyleSheet
|
getStyleSheet()
Gets the CSSStyleSheet object which is manipulated to add the XBL bindings which control the Mozile toolbar and the Mozile editors. |
Element
|
getToolbar()
Creates a new MozileToolbar interface for the toolbar. |
String
|
getVersion()
|
Boolean
|
hideCaret()
Disables the editing caret unless the "caretAlwaysOn" preference is set. |
Void
|
hideToolbars()
Hides the Mozile toolbar and statusbar. |
Boolean
|
isEditable()
"true" if editing has been started, "false" otherwise. |
Boolean
|
isEditor(element)
Returns true if the given element is in the editors array. |
Boolean
|
isEnhanced(<String> name)
Returns true if the Mozile Extension is enhancing this object, and false otherwise. |
Boolean
|
isExtension()
Returns true if this object is running in the Mozile Extension, and false otherwise. |
Void
|
load()
Loads "interface.js" which is the second stage of Mozile loading. |
Void
|
loaded()
A "post-load" function which calls methods after load is complete. |
Object
|
makeDocumentEditable(options)
Mozile - Make Document Editable - Makes the entire document editable. |
Void
|
repositionToolbars()
Moves the toolbar and status bar. |
Object
|
restoreState(index)
Mozile - Restore State - Replaces the contents of all editors in the document with their states as recoreded at a given index of the undoStack. |
Object
|
save()
Mozile - Save - This function sets the Mozile.saveConfig property and calls the appropriate save function from Mozile Save List: either "default" or "custom". |
Object
|
saveAs()
Mozile - Save As - Opens Mozile's Save As dialog. |
Element
|
setCurrentEditor(<Element> element)
Sets the current editor. |
MozileModule
|
setCustomSaveModule(<MozileModule> module)
Sets the custom save module. |
MozileModule
|
setDefaultSaveModule(<MozileModule> module)
Sets the default save module. |
Object
|
setSaveOption(<String> mode, <String> key, value)
Sets a module from the list by its name. |
String
|
setSharedData(<String> attribute, <String> value)
Set an attribute from the core.js script tag. |
Boolean
|
showCaret()
Activates the editing caret. |
Void
|
showToolbars()
Shows (unhides) the Mozile toolbar. |
Void
|
startEditing()
Enables editing in the document. |
Object
|
status(details, level, message)
Mozile - Status - Sets the content of the Mozile statusbar and enters a special kind of debugging message. |
Void
|
stopEditing()
Disables editing in the document. |
Object
|
storeState(command)
Mozile - Store State - This is the stub of a command used in the UndoRedo module. |
void
|
testAlert()
|
Object
|
testFunction()
Mozile - Test Function - This function is only used for testing. |
Void
|
updateToolbars(<Boolean> forceUpdate)
Updates all of the commands in the commandList so that they will reflect the current selection. |
Void
|
useDefaultSaveOptions()
Sets the default save module. |
Void
|
watchSharedData()
Checks for changes to the attributes. |
Methods inherited from class MozileComponent |
toString, getName, getConfigString, getOptions, getOption, setOption, _cleanOption
|
Field Detail |
Object changesSaved
Integer keyCounter
Object undoCounter
Object undoStack
Constructor Detail |
MozileMediator(<String> configString)
Configuration String format (some options may conflict): "root='path/to/mozile', mode=XHTML, namespace='http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd', keyboardShortcuts=true, toolbarPosition=fixed, toolbarUpdateFrequency=2, warnBeforeUnload=true, debugLevel=0". See the notes for "Mozile.parseConfig" for proper configuration string format.
configString
- A properly formatted configuration string.
Method Detail |
Element _cleanDOM(<Element> element)
element
- The root element from which all other elements will be removed.
Void _cleanInterfaces()
MozileCommand addAccelerator(<String> accel, <MozileCommand> command)
accel
- The accelerator string.
command
-
MozileCommand addCommand(<MozileCommand> command)
command
-
Element addEditor(<Element> editor)
editor
-
MozileModule addModule(<MozileModule> module)
module
-
MozileResource addResource(<MozileResource> resource)
resource
-
MozileModule addSaveModule(<MozileModule> module)
module
-
Void clearRequest()
Void clientRequest(<String> requestCode, evalOnChange)
requestCode
- Only a few request types are handled: "getClipboard", "setClipboard".
Object content()
Object createEditor(id, options)
id
- String. The id of the element to be made an editor.
options
- String. A list of options which will be used in this editor. TODO: No options are currently implemented.
Object createEditors(selector, options)
selector
- String. The id of the element to be made an editor.
options
- String. A list of options which will be used in this editor. TODO: No options are currently implemented.
Object debug(details, level, message)
details
- An array of information. The first two fields are "File", and "Function" (usually a function name). Fancier debugging functions might use more fields.
level
- An integer describing the importance of the debugging message. 4="critical", 3="very important", 2="important", 1="normal", 0="not important".
message
- A string containing the debugging message.
String documentToHTML()
Since editing modes are not yet supported, this method behaves very much the documentToXML method.
String documentToXML()
Because Mozile's mode support is not finished, this method isn't exactly as it should be. It lowercases all element names to make them look more like XML.
String editorToHTML()
String editorToXML()
Object executeCommand(id, event)
id
- The id of the node which triggered the command.
event
- The event which triggered this command.
MozileInterface getAboutInterface()
MozileCommand getAccelerator(<String> accel)
accel
-
Object getAccelerators()
String getBrowserName()
String getBrowserVersion()
MozileCommand getCommand(<String> id)
id
-
MozileCommandList getCommandList()
Object getCommands()
Element getCurrentEditor()
Integer getDebugLevel()
Array getEditors()
MozileInterface getEditSourceInterface()
String getGeckoVersion()
MozileInterface getMessageInterface()
String getMode()
MozileModule getModule(<String> name)
name
-
Object getModules()
String getMozillaVersion()
String getOperatingSystem()
MozileResource getResource(<String> id)
id
-
Object getResources()
TODO: What should be done about core.js and interface.js?
String getRoot()
MozileInterface getSaveInterface()
MozileModule getSaveModule(<String> name)
name
-
Object getSaveModules()
Object getSaveOption(<String> mode, <String> key, defaultValue)
mode
- Can be "default" or "custom" or "current". "Current searches "custom" first and "default" second, and then assigns any values to "custom".
key
-
defaultValue
- If there is no matching key for the given mode, the defaultValue will be assigned to that key.
String getSharedData(<String> attribute, defaultValue)
attribute
- The attribute name.
MozileInterface getSourceInterface()
Void getStatusbar()
CSSStyleSheet getStyleSheet()
Element getToolbar()
String getVersion()
Boolean hideCaret()
Void hideToolbars()
Boolean isEditable()
Boolean isEditor(element)
Boolean isEnhanced(<String> name)
name
- Optional. The name of the enhancement to be checked.
Boolean isExtension()
Void load()
Void loaded()
Object makeDocumentEditable(options)
options
- String. A list of options which will be used in this editor. TODO: No options are currently implemented.
Void repositionToolbars()
Object restoreState(index)
index
- . The index from the undoStack to be restored.
Object save()
Object saveAs()
Element setCurrentEditor(<Element> element)
element
- The root element of the current editor.
MozileModule setCustomSaveModule(<MozileModule> module)
module
-
MozileModule setDefaultSaveModule(<MozileModule> module)
module
-
Object setSaveOption(<String> mode, <String> key, value)
mode
- Can be "default" or "custom" or "current".
key
-
value
- The value to be assigned.
String setSharedData(<String> attribute, <String> value)
attribute
-
value
-
Boolean showCaret()
Void showToolbars()
Void startEditing()
Object status(details, level, message)
details
- An array of information. The first two fields are "File", and "Function" (the a function name). Fancier debugging functions might use more fields.
level
- An integer describing the importance of the debugging message. 4="critical", 3="very important", 2="important", 1="normal", 0="not important".
message
- A string containing the debugging message.
value
- Optional An integer between 0 and 100 indicating the value of the progressmeter. If no value is provided or the value is "false", the progressmeter is not shown.
more
- Optional A string which is placed in the "oncommand" attribute of the "mozileMoreButton". If no string is provided, the button is not shown.
Void stopEditing()
Object storeState(command)
void testAlert()
Object testFunction()
Void updateToolbars(<Boolean> forceUpdate)
forceUpdate
- . Optional.
Void useDefaultSaveOptions()
module
-
Void watchSharedData()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |