mozdev.org

Mozile (xhtml editing in your browser)    

resources:
MozileMediator

Class MozileMediator

Object
   |
   +--MozileComponent
         |
         +--MozileMediator

class MozileMediator
extends MozileComponent

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

changesSaved

Object changesSaved

keyCounter

Integer keyCounter

undoCounter

Object undoCounter

undoStack

Object undoStack

Constructor Detail

MozileMediator

MozileMediator(<String> configString)

Method Detail

_cleanDOM

Element _cleanDOM(<Element> element)

_cleanInterfaces

Void _cleanInterfaces()

addAccelerator

MozileCommand addAccelerator(<String> accel, <MozileCommand> command)

addCommand

MozileCommand addCommand(<MozileCommand> command)

addEditor

Element addEditor(<Element> editor)

addModule

MozileModule addModule(<MozileModule> module)

addResource

MozileResource addResource(<MozileResource> resource)

addSaveModule

MozileModule addSaveModule(<MozileModule> module)

clearRequest

Void clearRequest()

clientRequest

Void clientRequest(<String> requestCode, evalOnChange)

content

Object content()

createEditor

Object createEditor(id, options)

createEditors

Object createEditors(selector, options)

debug

Object debug(details, level, message)

documentToHTML

String documentToHTML()

documentToXML

String documentToXML()

editorToHTML

String editorToHTML()

editorToXML

String editorToXML()

executeCommand

Object executeCommand(id, event)

getAboutInterface

MozileInterface getAboutInterface()

getAccelerator

MozileCommand getAccelerator(<String> accel)

getAccelerators

Object getAccelerators()

getBrowserName

String getBrowserName()

getBrowserVersion

String getBrowserVersion()

getCommand

MozileCommand getCommand(<String> id)

getCommandList

MozileCommandList getCommandList()

getCommands

Object getCommands()

getCurrentEditor

Element getCurrentEditor()

getDebugLevel

Integer getDebugLevel()

getEditors

Array getEditors()

getEditSourceInterface

MozileInterface getEditSourceInterface()

getGeckoVersion

String getGeckoVersion()

getMessageInterface

MozileInterface getMessageInterface()

getMode

String getMode()

getModule

MozileModule getModule(<String> name)

getModules

Object getModules()

getMozillaVersion

String getMozillaVersion()

getOperatingSystem

String getOperatingSystem()

getResource

MozileResource getResource(<String> id)

getResources

Object getResources()

getRoot

String getRoot()

getSaveInterface

MozileInterface getSaveInterface()

getSaveModule

MozileModule getSaveModule(<String> name)

getSaveModules

Object getSaveModules()

getSaveOption

Object getSaveOption(<String> mode, <String> key, defaultValue)

getSharedData

String getSharedData(<String> attribute, defaultValue)

getSourceInterface

MozileInterface getSourceInterface()

getStatusbar

Void getStatusbar()

getStyleSheet

CSSStyleSheet getStyleSheet()

getToolbar

Element getToolbar()

getVersion

String getVersion()

hideCaret

Boolean hideCaret()

hideToolbars

Void hideToolbars()

isEditable

Boolean isEditable()

isEditor

Boolean isEditor(element)

isEnhanced

Boolean isEnhanced(<String> name)

isExtension

Boolean isExtension()

load

Void load()

loaded

Void loaded()

makeDocumentEditable

Object makeDocumentEditable(options)

repositionToolbars

Void repositionToolbars()

restoreState

Object restoreState(index)

save

Object save()

saveAs

Object saveAs()

setCurrentEditor

Element setCurrentEditor(<Element> element)

setCustomSaveModule

MozileModule setCustomSaveModule(<MozileModule> module)

setDefaultSaveModule

MozileModule setDefaultSaveModule(<MozileModule> module)

setSaveOption

Object setSaveOption(<String> mode, <String> key, value)

setSharedData

String setSharedData(<String> attribute, <String> value)

showCaret

Boolean showCaret()

showToolbars

Void showToolbars()

startEditing

Void startEditing()

status

Object status(details, level, message)

stopEditing

Void stopEditing()

storeState

Object storeState(command)

testAlert

void testAlert()

testFunction

Object testFunction()

updateToolbars

Void updateToolbars(<Boolean> forceUpdate)

useDefaultSaveOptions

Void useDefaultSaveOptions()

watchSharedData

Void watchSharedData()


Documentation generated by JSDoc on Wed Nov 1 15:11:15 2006

The mozile project can be contacted through the mailing list or the member list.
Copyright © 2000-2019. All rights reserved. Terms of Use & Privacy Policy.