|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--Mozile
Defined in core.js
Field Summary | |
Object |
aboutInterface
Mozile - About Interface - Mozile's about interface box element. |
Object |
acceleratorList
Mozile - Accelerator List - An array containing all of the keyboard shortcuts (accelerators) for Mozile commands. |
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. |
Object |
clipboard
|
Object |
commandList
Mozile - Command List - An array containing all of the commands (but not the command lists) registered with this Mozile object. |
Object |
currentEditor
Mozile - Current Editor - When an editor takes the focus, currentEditor is set to its root element. |
Object |
debugLevel
Mozile - Debug Level - An integer indicating how verbose debugging should be. |
Object |
editorList
Mozile - Editor List - An array containing entries for every editor in the document. |
Object |
extension
Mozile - Extension - This will be set to true by the Mozile Extension if the user has used the Mozile Extension to enhance editing on this page. |
Object |
firstToolbarShow
Mozile - First Toolbar Show - A flag which is "true" if the Mozile toolbar has never been shown (i.e. |
Object |
keyboardShortcuts
Mozile - Keyboard Shortcuts - A Boolean value. |
Object |
keyCounter
Mozile - Key Counter - Counts the number of keypresses which lead to character insertion. |
Object |
lastFocusNode
Mozile - Last Focus Node - Stores the last focused node. |
Object |
lastIP
Mozile - Last IP - Stores information about the last insertion point. |
Object |
linkList
Mozile - Link List - An array containing the id's of all the links which have been loaded using this.loadLink(). |
Object |
maxKeyCount
Mozile - Max Key Count - When keyCounter > maxKeyCount the state of the document is stored. |
Object |
messageInterface
Mozile - Message Interface - Mozile's message interface box element. |
Object |
mode
Mozile - Mode - The mode controls which tools are used to manipulate the document. |
Object |
moduleList
Mozile - Module List - An array containing all the loaded modules and their configuration arrays. |
Object |
namespace
Mozile - Namespace - A proper namespace for the document. |
Object |
operatingSystem
Mozile - Operating System - Mozile checks the UserAgent string for the browser, and tries to determine what operating system the browser is running under. |
Object |
root
Mozile - Root - The root directory for this Mozile installation. |
Object |
saveConfig
Mozile - Save Config - The array of save options which is actually used to save the document. |
Object |
saveInterface
Mozile - Save Interface - Mozile's save interface box element. |
Object |
saveList
Mozile - Save List - An array containing entries for every save method available, the default method, and the user's custom method. |
Object |
scriptList
Mozile - Script List - An array containing the id's of all the scripts which have been loaded using this.loadScript(). |
Object |
sourceInterface
Mozile - Source Interface - Mozile's source interface box element. |
Object |
statusbar
Mozile - Statusbar - Mozile's status bar element. |
Object |
styleList
Mozile - Style List - An array containing the id's of all the style elements which have been added to the document by Mozile. |
Object |
styleSheet
Mozile - Style Sheet - The CSSStyleSheet object which is manipulated to add the XBL bindings which control the Mozile toolbar and the Mozile editors. |
Object |
toolbar
Mozile - Toolbar - Mozile's toolbar element. |
Object |
toolbarPosition
Mozile - Toolbar Position - Determines how the toolbar is positioned using CSS. |
Object |
toolbarUpdateFrequency
Mozile - Toolbar Update - An integer specifying how often the toolbar should update. |
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. |
Object |
version
Mozile - Version - The version of the Mozile Core code. |
Constructor Summary | |
Mozile
(optionsString)
Mozile Object - Creates the Mozile object, which is used for almost all of Mozile's functionality. |
Method Summary | |
Object
|
addStyleSheet()
Mozile - Add Style Sheet - Inserts a style element in the document, and grabs the CSSStyleSheet object associated with the new element. |
Object
|
checkRequirements(versionString, requirements)
Mozile - Check Requirements - Check to see if a given version string meets the requirements specified in a requirement string (like a configuration string). |
Object
|
cleanUp(element)
Mozile - Clean Up - Removes all traces of Mozile in the document. |
Object
|
commandIsRegistered(id)
Mozile - Command Is Registered - Checks to see if a command with the given id has been registered. |
Object
|
content()
Mozile - Content - Returns the string of Mozile's content, depending on the settings in the Mozile.saveConfig array. |
Object
|
createCommand(configString)
Mozile - Create Command - This method creates a Mozile command object from a configuration string. |
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
|
createToolbar()
Mozile - Create Toolbar - Does all the work required to add the Mozile toolbar to the current document. |
Object
|
debug(details, level, message)
Mozile Debug - A basic debugging tool. |
Object
|
deletion(direction)
Mozile - Delete - Deletes the current selection, or everything between the current and the previous insertion points. |
Object
|
doCopy()
Mozile - Do Copy - Copy the current selection to system clipboard. |
Object
|
documentToHTML()
Mozile - Document To HTML - Extract the contents of the document as HTML, first cleaning up any mess that Mozile has made. |
Object
|
documentToXML()
Mozile - Document To XML - Extract the contents of the document as XML, first cleaning up any mess that Mozile has made. |
Object
|
doCut()
Mozile - Do Cut - Cut the current selection to system clipboard. |
Object
|
doPaste()
Mozile - Do Paste - Paste from clipboard, replacing selectin if any. |
Object
|
editorToHTML()
Mozile - Editor To HTML - Extract the contents of the current editor as HTML, first cleaning up any mess that Mozile has made. |
Object
|
editorToXML()
Mozile - Editor To XML - 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. |
Object
|
getDocument()
Mozile - Get Document - Returns the Document object for the current Mozile document. |
Object
|
getSelection()
Mozile - Get Selection - Returns the Selection object for the current Mozile document. |
Object
|
hideAboutInterface()
Mozile - Hide About Interface - Shows the About interface, by setting "collapsed" to true, and setting height and width values to zero. |
Object
|
hideCaret()
Mozile - Hide Caret - Deactivates the editing caret. |
Object
|
hideMessageInterface()
Mozile - Hide Message Interface - Shows the Message interface, by setting "collapsed" to true, and setting height and width values to zero. |
Object
|
hideSaveInterface()
Mozile - Hide Save Interface - Shows the Save interface, by setting "collapsed" to true, and setting height and width values to zero. |
Object
|
hideSourceInterface()
Mozile - Hide Source Interface - Shows the Source interface, by setting "collapsed" to true, and setting height and width values to zero. |
Object
|
hideToolbar()
Mozile - Hide Toolbar - Hides the Mozile toolbar. |
Object
|
initializeToolbar()
Mozile - Initialize Toolbar - Does some basic setup on the toolbar, which can't be done until after all modules have loaded. |
Object
|
insertFragment(fragment)
Mozile - Insert Fragment - Inserts all the children of a document fragment or an element at the current selection index. |
Object
|
insertString(string)
Mozile - Insert String - Inserts a string at the current selection index. |
Object
|
loadLink(href, id)
Mozile - Load Link - Creates an X/HTML link element, at the appropriate place in the document, which loads the CSS file referred to by "src". |
Object
|
loadModule(configString)
Mozile - Load Module - Loads a module into the document. |
Object
|
loadScript(src, id)
Mozile - Load Script - Creates an X/HTML script element, at the appropriate place in the document, which loads the JavaScript file referred to by "src". |
Object
|
makeDocumentEditable(options)
Mozile - Make Document Editable - Makes the entire document editable. |
Object
|
moduleIsLoaded(moduleName, requirements)
Mozile - Module Is Loaded- Checks to see if the given module has been loaded. |
Object
|
moveToolbar()
Mozile - Move Toolbar - Centres the Mozile toolbar and statusbar in the window, by calculating the proper size of the CSS "left" property. |
Object
|
open(url)
Mozile - Open - Opens a new window from the current Mozile document. |
Object
|
parseConfig(configString)
Mozile - Parse Config - Parses a configuration string into a configuration array. |
Object
|
parseOptions(optionString)
Mozile - Parse Options - Parses an option string into an option array. |
Object
|
registerCommand(command)
Mozile - Register Command - Registers a command or command list object, adding it to the this.commandList array. |
Object
|
registerEditor(element)
Mozile - Register Editor - Adds an editor's root node to the this.editorList. |
Object
|
registerModule(moduleName, versionString)
Mozile - Register Module - Registers the version of a module with the moduleList. |
Object
|
restoreSelection(selectionArray)
Mozile - Restore Selection - Restores the selection using the output from this.storeSelection. |
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.saveList: either "default" or "custom". |
Object
|
saveAs()
Mozile - Save As - Opens Mozile's Save As dialog. |
Object
|
saveToDialog()
Mozile Save To Dialog - This is the most basic Mozile save method. |
Object
|
saveToFile()
Mozile - Save To File - Using the configuration details in the Mozile.saveConfig array, save the current document to a file on the local system. |
Object
|
seekIP(direction, startNode, startOffset, firstNode)
Mozile - Seek Insertion Point - Finds the next (or previous) insertion point, starting at a given text node and offset. |
Object
|
seekTextNode(direction, startNode)
Mozile - Seek Text Node - Finds the next (or previous) text node which either has CSS white-space="pre" or contains some non-white-space characters. |
Object
|
setCurrentEditor(element)
Mozile - Set Current Editor - Sets the this.currentEditor to the given element. |
Object
|
showAboutInterface()
Mozile - Show About Interface - Shows the About interface, by setting "collapsed" to false, and setting height and width values. |
Object
|
showCaret()
Mozile - Show Caret - Activates the editing caret. |
Object
|
showMessageInterface()
Mozile - Show Message Interface - Shows the Message interface, by setting "collapsed" to false, and setting height and width values. |
Object
|
showSaveInterface()
Mozile - Show Save Interface - Shows the Save interface, by setting "collapsed" to false, and setting height and width values. |
Object
|
showSourceInterface()
Mozile - Show Source Interface - Shows the Source interface, by setting "collapsed" to false, and setting position values. |
Object
|
showToolbar()
Mozile - Show Toolbar - Shows (unhides) the Mozile toolbar. |
Object
|
splitBlock()
Mozile - Split Block - Splits the current block in two, creating a new block after the old one in the process. |
Object
|
status(details, level, message)
Mozile - Status - Sets the content of the Mozile statusbar and enters a special kind of debugging message. |
Object
|
storeSelection()
Mozile - Store Selection - Store the selection in a recoverable form. |
Object
|
storeState(command)
Mozile - Store State - This is the stub of a command used in the UndoRedo module. |
void
|
testAlert()
|
Object
|
testFunction()
|
Object
|
unloadLink(id)
Mozile - Unload Link - Removes all X/HTML links tags which file referred to by "id". |
Object
|
unloadScript(id)
Mozile - Unload Script - Removes all X/HTML script tags with the given id. |
Object
|
unregisterCommand(id)
Mozile - Unregister Command - Unregisters a command or command list object by removing it from the commandList array. |
Object
|
unregisterModule(moduleName)
Mozile - Unregister Module - Removes the given module from the moduleList. |
Object
|
updateToolbar()
Mozile - Update Toolbar - Updates all of the commands in the commandList so that they will reflect the current selection. |
Field Detail |
Object aboutInterface
Object acceleratorList
Object changesSaved
Object clipboard
Object commandList
Object currentEditor
Object debugLevel
Object editorList
Object extension
Object firstToolbarShow
Object keyboardShortcuts
Object keyCounter
Object lastFocusNode
Object lastIP
Object linkList
Object maxKeyCount
Object messageInterface
Object mode
Object moduleList
Object namespace
Object operatingSystem
Object root
Object saveConfig
Object saveInterface
Object saveList
Object scriptList
Object sourceInterface
Object statusbar
Object styleList
Object styleSheet
Object toolbar
Object toolbarPosition
Object toolbarUpdateFrequency
Object undoCounter
Object undoStack
Object version
Constructor Detail |
Mozile(optionsString)
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.
optionsString
- An option string, formatted like the configuration strings for modules and commands.
Method Detail |
Object addStyleSheet()
Object checkRequirements(versionString, requirements)
versionString
- A string which will be checked against the requirements. The format should be X.Y.Z, with X,Y,Z integers.
requirements
- A string describing the requirements for this module, using the same format as the module configuration string.
Object cleanUp(element)
element
- The root element from which all other elements will be removed.
Object commandIsRegistered(id)
id
- The id of the command.
Object content()
Object createCommand(configString)
configString
- A configuration string, following the above format.
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 createToolbar()
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.
Object deletion(direction)
direction
- A string indicating where to delete. Can be "next" or "previous".
Object doCopy()
Object documentToHTML()
Since editing modes are not yet supported, this method behaves very much the documentToXML method.
Object 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.
Object doCut()
Object doPaste()
Object editorToHTML()
Object editorToXML()
Object executeCommand(id, event)
id
- The id of the node which triggered the command.
event
- The event which triggered this command.
Object getDocument()
Object getSelection()
Object hideAboutInterface()
Object hideCaret()
Object hideMessageInterface()
Object hideSaveInterface()
Object hideSourceInterface()
Object hideToolbar()
Object initializeToolbar()
Object insertFragment(fragment)
fragment
- Either a document fragment, or an element with child nodes to be cloned and inserted.
Object insertString(string)
string
- The string to be inserted.
Object loadLink(href, id)
href
- A relative or absolute path to the file which should be loaded.
id
- A unique id string for this tag. The usual format is "Mozile-ModuleName-FileName.css".
Object loadModule(configString)
configString
- A module configuration string. The most basic case is simply "moduleName" (i.e. "CopyCutPaste"), but other options can be specified. For example: "CopyCutPaste: minVersion=1.0.2, maxVersion=1.1.2, notVersion=1.0.6, notVersion=1.1.0, requireVersion=1.0.7, remoteVersion=1.0.7, forceRemote=false, remotePath='/path/to/module/' "
Object loadScript(src, id)
src
- A relative or absolute path to the file which should be loaded.
id
- A unique id string for this tag. The usual format is "Mozile-ModuleName-FileName.js".
Object makeDocumentEditable(options)
options
- String. A list of options which will be used in this editor. TODO: No options are currently implemented.
Object moduleIsLoaded(moduleName, requirements)
moduleName
- A string naming the module to be checked, i.e. "CopyCutPaste".
requirements
- Optional. A string describing the requirements for this module, using the same format as the module configuration string.
Object moveToolbar()
Object open(url)
url
- String. URL to open.
name
- Optional String. Name of the window to open.
options
- Optional String. Window options to use.
Object parseConfig(configString)
configString
- The configuration string, following the standard format (see "mozile.js" under "Declare Modules", or the Mozile.createCommand() method in this file).
Object parseOptions(optionString)
optionString
- The option string, following the standard format for module or command options (see "mozile.js" under "Declare Modules", or the Mozile.createCommand() method in this file).
Object registerCommand(command)
command
- The command object.
Object registerEditor(element)
element
- The root element of the new editor.
Object registerModule(moduleName, versionString)
moduleName
- A string naming the module to be loaded, i.e. "CopyCutPaste".
versionString
- A string naming the version which has been loaded. Should be formatted as X.Y.Z where X,Y, and Z are integers.
Object restoreSelection(selectionArray)
Object restoreState(index)
index
- . The index from the undoStack to be restored.
Object save()
Object saveAs()
Object saveToDialog()
Object saveToFile()
Object seekIP(direction, startNode, startOffset, firstNode)
direction
- A string indicating the direction of the search. Can be "next" or "previous".
startNode
- The text node to begin the search in.
startOffset
- Integer. The offset within the startNode to begin the search at.
firstNode
- Boolean. True if this is the first node being tested, and false otherwise.
Object seekTextNode(direction, startNode)
direction
- String. Can be "next" or "previous".
startNode
- The text node to begin the search in.
Object setCurrentEditor(element)
element
- The root element of the new currentEditor.
Object showAboutInterface()
Object showCaret()
Object showMessageInterface()
Object showSaveInterface()
Object showSourceInterface()
Object showToolbar()
Object splitBlock()
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.
Object storeSelection()
Object storeState(command)
void testAlert()
Object testFunction()
Object unloadLink(id)
id
- The id of the tag to be removed.
Object unloadScript(id)
id
- The id of the tag to be removed.
Object unregisterCommand(id)
id
- The id of the command.
Object unregisterModule(moduleName)
moduleName
- A string naming the module to be removed, i.e. "CopyCutPaste".
Object updateToolbar()
force
- Optional Boolean, forces update when "true" and toolbarUpdateFrequency > 0.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |