1999-08-09 05:34:04 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The contents of this file are subject to the Netscape Public
|
|
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.mozilla.org/NPL/
|
1999-08-09 05:34:04 +04:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* Software distributed under the License is distributed on an "AS
|
|
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
* implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
1999-08-09 05:34:04 +04:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1999-08-09 05:34:04 +04:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 06:43:54 +03:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1999-08-09 05:34:04 +04:00
|
|
|
*/
|
|
|
|
|
1999-11-23 00:03:04 +03:00
|
|
|
#include "nsIGenericFactory.h"
|
1999-08-09 05:34:04 +04:00
|
|
|
|
|
|
|
#include "nsEditorCID.h"
|
|
|
|
#include "nsEditorShell.h" // for the CID
|
|
|
|
#include "nsEditor.h" // for gInstanceCount
|
1999-12-15 06:46:27 +03:00
|
|
|
#include "nsEditorController.h" //CID
|
2000-02-16 06:14:20 +03:00
|
|
|
#include "nsEditorService.h"
|
1999-08-09 05:34:04 +04:00
|
|
|
|
1999-11-23 00:03:04 +03:00
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
// Define the contructor function for the objects
|
|
|
|
//
|
|
|
|
// NOTE: This creates an instance of objects by using the default constructor
|
|
|
|
//
|
1999-08-09 05:34:04 +04:00
|
|
|
|
1999-11-23 00:03:04 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorShell)
|
1999-12-15 06:46:27 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorController)
|
2000-05-02 01:49:52 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsComposerController)
|
2000-02-16 06:14:20 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorService)
|
1999-08-09 05:34:04 +04:00
|
|
|
|
1999-10-16 23:34:10 +04:00
|
|
|
#ifdef ENABLE_EDITOR_API_LOG
|
1999-11-23 00:03:04 +03:00
|
|
|
#include "nsHTMLEditorLog.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLEditorLog)
|
1999-10-16 23:34:10 +04:00
|
|
|
#else
|
1999-11-23 00:03:04 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLEditor)
|
1999-10-16 23:34:10 +04:00
|
|
|
#endif
|
1999-08-09 05:34:04 +04:00
|
|
|
|
1999-11-23 00:03:04 +03:00
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
// Define a table of CIDs implemented by this module along with other
|
|
|
|
// information like the function to create an instance, progid, and
|
|
|
|
// class name.
|
|
|
|
//
|
|
|
|
static nsModuleComponentInfo components[] = {
|
|
|
|
#ifdef ENABLE_EDITOR_API_LOG
|
|
|
|
{ "HTML Editor", NS_HTMLEDITOR_CID,
|
2000-02-16 06:14:20 +03:00
|
|
|
"component://netscape/editor/htmleditor", nsHTMLEditorLogConstructor, },
|
1999-11-23 00:03:04 +03:00
|
|
|
#else
|
|
|
|
{ "HTML Editor", NS_HTMLEDITOR_CID,
|
|
|
|
"component://netscape/editor/htmleditor", nsHTMLEditorConstructor, },
|
1999-10-16 23:34:10 +04:00
|
|
|
#endif
|
2000-05-02 01:49:52 +04:00
|
|
|
{ "Editor Controller", NS_EDITORCONTROLLER_CID,
|
1999-12-15 06:46:27 +03:00
|
|
|
"component://netscape/editor/editorcontroller", nsEditorControllerConstructor, },
|
2000-05-02 01:49:52 +04:00
|
|
|
{ "Composer Controller", NS_COMPOSERCONTROLLER_CID,
|
|
|
|
"component://netscape/editor/composercontroller", nsComposerControllerConstructor, },
|
1999-11-23 00:03:04 +03:00
|
|
|
{ "Editor Shell Component", NS_EDITORSHELL_CID,
|
|
|
|
"component://netscape/editor/editorshell", nsEditorShellConstructor, },
|
|
|
|
{ "Editor Shell Spell Checker", NS_EDITORSHELL_CID,
|
|
|
|
"component://netscape/editor/editorspellcheck", nsEditorShellConstructor, },
|
2000-02-16 06:14:20 +03:00
|
|
|
{ "Editor Service", NS_EDITORSERVICE_CID,
|
2000-02-26 06:52:06 +03:00
|
|
|
"component://netscape/editor/editorservice", nsEditorServiceConstructor,},
|
|
|
|
{ "Editor Startup Handler", NS_EDITORSERVICE_CID,
|
2000-02-27 23:51:11 +03:00
|
|
|
"component://netscape/commandlinehandler/general-startup-editor",
|
2000-02-26 06:52:06 +03:00
|
|
|
nsEditorServiceConstructor,
|
2000-02-16 06:14:20 +03:00
|
|
|
nsEditorService::RegisterProc,
|
|
|
|
nsEditorService::UnregisterProc, },
|
2000-02-26 06:52:06 +03:00
|
|
|
{ "Edit Startup Handler", NS_EDITORSERVICE_CID,
|
2000-02-27 23:51:11 +03:00
|
|
|
"component://netscape/commandlinehandler/general-startup-edit",
|
2000-02-26 06:52:06 +03:00
|
|
|
nsEditorServiceConstructor, },
|
1999-11-23 00:03:04 +03:00
|
|
|
};
|
1999-10-16 23:34:10 +04:00
|
|
|
|
1999-11-23 00:03:04 +03:00
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
// Implement the NSGetModule() exported function for your module
|
|
|
|
// and the entire implementation of the module object.
|
|
|
|
//
|
|
|
|
NS_IMPL_NSGETMODULE("nsEditorModule", components)
|