gecko-dev/embedding/tests/mfcembed
dougt%netscape.com 0d2808c511 Create a new xpcom obsolete library (and component library).
Moved nsFileSpec and related classes into this obsolete library.
  Moved nsRegistry and related libreg functionality into the obsolete library.

Updated many callers using the obsolete nsFile spec to use nsIFile and Necko to do file IO.

Combined the following DLLs (source -> dest)
  uriloader -> docshell
  shistory -> docshell
  jsurl -> jsdom
  gkview -> gklayout

Moved nsAdapterEnumerator out of xpcom/ds and into mailnews, since they're the only consumer

Modifed the xpt_link tool so that you can specify a �only include� cid list that can mask CID�s that you are not interested in.

Added build options:
Prevent the building of xpinstall (--disable-xpinstall)
Prevent the building js component loader (--disable-jsloader)
A build option to only build a single profile (--enable-single-profile)
A build flag to only built the required xpfe components (--disable-xpfe-components).

Removal or hiding of unused functions and classes including nsEscape*, nsDequeIterator, nsRecyclingAllocatorImpl, nsDiscriminatedUnion, nsOpaqueKey, nsCRT::strlen, NS_NewCommandLineService

Bug 194240, r/sr = darin, alec.
2003-03-15 01:04:32 +00:00
..
components Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
res new editor funcionality in embedding only. mfc test embed only 2002-02-18 09:57:08 +00:00
.cvsignore Landing the rest of the win32 gmake changes: 2001-12-18 09:14:29 +00:00
BrowserFrameGlue.cpp Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
BrowserFrm.cpp Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
BrowserFrm.h Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
BrowserImpl.cpp Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
BrowserImpl.h Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
BrowserImplCtxMenuLstnr.cpp Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
BrowserImplPrompt.cpp Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
BrowserImplWebPrgrsLstnr.cpp Sample code changed to use MIT licence. b=82339 2002-06-19 14:38:39 +00:00
BrowserToolTip.cpp Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
BrowserToolTip.h Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
BrowserView.cpp Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
BrowserView.h Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
CCustomPromptDialog.cpp Implementing a better setup dialog 2002-06-27 12:01:30 +00:00
CCustomPromptDialog.h Implementing a better setup dialog 2002-06-27 12:01:30 +00:00
CFormatOptionTab.cpp Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
CFormatOptionTab.h Implementing a better setup dialog 2002-06-27 12:01:30 +00:00
CMarginHeaderFooter.cpp Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
CMarginHeaderFooter.h Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
CPageSetupPropSheet.cpp Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
CPageSetupPropSheet.h Implementing a better setup dialog 2002-06-27 12:01:30 +00:00
Dialogs.cpp Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
Dialogs.h Fix for #193479 - Implement InsertLink functionality in MfcEmbed editor 2003-02-28 01:01:31 +00:00
EditorFrm.cpp Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
EditorFrm.h Fix for #193479 - Implement InsertLink functionality in MfcEmbed editor 2003-02-28 01:01:31 +00:00
IBrowserFrameGlue.h Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
Makefile.in Create a new xpcom obsolete library (and component library). 2003-03-15 01:04:32 +00:00
MfcEmbed.cpp Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
MfcEmbed.h Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
MfcEmbed.rc Fix for #193479 - Implement InsertLink functionality in MfcEmbed editor 2003-02-28 01:01:31 +00:00
MostRecentUrls.cpp Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
MostRecentUrls.h Sample code changed to use MIT licence. b=82339 2002-06-19 14:38:39 +00:00
Preferences.cpp Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
Preferences.h Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
ProfileMgr.cpp Sample code changed to use MIT licence. b=82339 2002-06-19 14:48:07 +00:00
ProfileMgr.h Sample code changed to use MIT licence. b=82339 2002-06-19 14:48:07 +00:00
ProfilesDlg.cpp Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
ProfilesDlg.h Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
README.TXT Updated to use nsIEmbeddingSiteWindow sr=blizzard@mozilla.org b=68581 2001-03-13 12:48:33 +00:00
StdAfx.cpp Sample code changed to use MIT licence. b=82339 2002-06-19 14:38:39 +00:00
StdAfx.h Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
mfcembed.dsp Make mfcembed build in unicode when BUILD_UNICODE_MFCEMBED is defined. b=154426 r=yokoyama@netscape.com sr=blizzard@mozilla.org 2003-03-06 23:15:55 +00:00
mfcembed.dsw
mfcembed.htm NOT BUILT. Fix some typos in a QA document. b=130498 2002-03-25 13:50:39 +00:00
resource.h Fix for #193479 - Implement InsertLink functionality in MfcEmbed editor 2003-02-28 01:01:31 +00:00
winEmbedFileLocProvider.cpp Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00
winEmbedFileLocProvider.h Add CBrowserTooltip class and support for tooltips. Detab files. b=144880 r=chak@netscape.com sr=alecf@netscape.com 2003-01-17 00:40:45 +00:00

README.TXT

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * 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/
 *
 * 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.
 *
 * The Original Code is mozilla.org code.
 *
 * The Initial Developer of the Original Code is Netscape
 * Communications Corporation.  Portions created by Netscape are
 * Copyright (C) 1998 Netscape Communications Corporation. All
 * Rights Reserved.
 *
 * Contributor(s): 
 *   Chak Nanga <chak@netscape.com> 
 */

This sample shows how to embed Mozilla from within 
an MFC Windows application

Mainly demonstrates the use of the following interfaces:

	nsIWebBrowserChrome
	nsIEmbeddingSiteWindow
	nsIWebProgressListener
	nsIContextMenuListener
	nsIPrompt
	nsIWebBrowserFind
	
General Overview:
-----------------

1. The MfcEmbedApp creates BrowserFrames

2. BrowserFrame creates the toolbar, statusbar, URLbar 
   BrowserView etc.
   BrowserFrames implement the IBrowserFrameGlue interface
   using which new BrowserFrames can be created, statusbar
   updated etc. 

3. BrowserView creates the embeddable browser instance and
   manages user interaction such as URL navigation etc.
   BrowserView connects the BrowserImpl with the BrowserFrame
   via the IBrowserFrameGlue interface

4. BrowserImpl implements the set of required/optional Gecko
   embedding interfaces
   

Start by first looking at MfcEmbed.cpp

Files:

StdAfx.h	 
	- Includes the required Mozilla header files

MfcEmbed.cpp 
	- CWinApp derived class
	- Creates the browser's main frame window etc
	  using the CreateNewBrowserFrame() and loads
	  the HomePage
	- Makes the required NS_InitEmbedding() and the
	  NS_TermEmbedding() calls in the app's InitInstance()
	  and ExitInstance() functions
	- Keeps track of the list of new BrowserFrames created
	  which it cleans up properly in ExitInstance()

BrowserFrm.cpp 
	- This is the browser's Frame window i.e. the one with the
	  "chrome" - with the toolbar, urlbar etc.
	- Creates the toolbar, URLbar, statusbar, progressbar 
	  also the browser's view window. 

BrowserFrameGlue.cpp
	- Implements the IBrowserFrameGlue interface. This interface
	  contains platform specific implementations of functions to
	  update the statusbar, creating new browser frames etc. Embedded
	  browser's callbacks use this interface when needed

BrowserView.cpp 
	- Creates the embedded browser object and handles most aspects
	of the embedded browser interactions - like URL navigation,
	clipboard interactions etc
	- Also has code to keep the menu/toolbar/statusbar UI items up 
	to date
	- It's the view which conntects the BrowserFrame to the BrowserImpl
	  (see below) by passing it the pointer to IBrowserFrameGlue

BrowserImpl*.cpp 
	- Implements the required and/or optional embedded browser 
	interfaces
	(BrowserImpl.cpp implements the set of interfaces which 
	are required by Gecko of all embedding apps. The other
	interfaces implemented in the BrowserImpl*.cpp files are 
	optional)

	- Calls on the statusbar/progressbar update functions exposed
	via the IBrowserFrameGlue in response to the nsIProgressListener
	interface callbacks

Dialogs.cpp
	- Contains dialog box code for displaying Prompts, getting
	passwords, getting username/passwords etc
	- Contains the CFindDialog class - used for searching text
	in a web page

winEmbedFileLocProvider.cpp, ProfilesDlg.cpp, ProfileMgr.cpp
	- Profile management related code (by Conrad Carlen)

MfcEmbed.htm
	- This is a simple test harness for excercising some of the
	implemented interfaces . For ex, the nsIWebBrowserChrome.
	- Open the file in mfcemed by typing the following in it's
	location bar. For ex: 

			file:///c:/tmp/mfcembed.htm
	- Read/Click on the links on that page more info
	- This test page is just a start and will add more test
	case to it over time

 
makefile.win
	- We define "_AFXDLL" and for the compiler and specify
	"-SUBSYSTEM:windows" for the linker using LCFLAGS and 
	LLFLAGS, respectively
	- We also define "USE_SINGLE_SIGN_ON" to enable the
	single sign-on support

mfcembed.dsp and mfcembed.dsw
	- These VisualStudio workspace/project files can be used
	to open/build this sample inside of the VC++ IDE