pjs/embedding/tests/mfcembed
waterson%netscape.com 0877b1a573 Land STATIC_BUILD_20010612_BRANCH, which supports building mozilla with components statically linked into the executable, as well as 'meta modules' that combine components into uber-DLLs. 2001-06-20 20:21:49 +00:00
..
components Implement ConfirmCheck so PSM doesn't abort form submits. b=84024 r=waterson@netscape.com sr=blizzard@mozilla.org a=tor@acm.org 2001-06-05 21:02:48 +00:00
res
BrowserFrameGlue.cpp implement nsIPrompt override component. bug 75745 r=blizzard,chak 2001-04-21 02:46:29 +00:00
BrowserFrm.cpp Fixes for the following bugs: 2001-04-01 17:49:51 +00:00
BrowserFrm.h Fix for #76730 - mfcembed/BrowserFrm.h contains compile time errors 2001-04-27 21:22:53 +00:00
BrowserImpl.cpp fix for 70224 (need nsIWebBrowserChromeFocus for embedding). r=danm, sr=hyatt, a=asa 2001-04-25 02:04:56 +00:00
BrowserImpl.h fix for 70224 (need nsIWebBrowserChromeFocus for embedding). r=danm, sr=hyatt, a=asa 2001-04-25 02:04:56 +00:00
BrowserImplCtxMenuLstnr.cpp
BrowserImplPrompt.cpp Bug 78745 - nsIPromptService::ConfirmEx needs to be more flexible. r=valeski, sr=sfraser 2001-05-06 15:03:55 +00:00
BrowserImplWebPrgrsLstnr.cpp Fix related to bug 82236. Fix all embeddign usages of onLocationChange with the 2001-05-29 22:48:39 +00:00
BrowserView.cpp hooking up windowwatcher active window. bug 44809,76011 r=chak,hyatt,saari 2001-04-16 20:34:33 +00:00
BrowserView.h Fix for bug#66334 - Viewsource needs to be a protocol handler 2001-04-16 20:19:00 +00:00
Dialogs.cpp implement nsIPrompt override component. bug 75745 r=blizzard,chak 2001-04-21 02:46:29 +00:00
Dialogs.h implement nsIPrompt override component. bug 75745 r=blizzard,chak 2001-04-21 02:46:29 +00:00
IBrowserFrameGlue.h implement nsIPrompt override component. bug 75745 r=blizzard,chak 2001-04-21 02:46:29 +00:00
MfcEmbed.cpp Prefs API refactoring. Bug #46863. r=valeski, sr=alecf. 2001-04-26 18:41:11 +00:00
MfcEmbed.h implement nsIPrompt override component. bug 75745 r=blizzard,chak 2001-04-21 02:46:29 +00:00
MfcEmbed.rc implement nsIPrompt override component. bug 75745 r=blizzard,chak 2001-04-21 02:46:29 +00:00
MostRecentUrls.cpp Fix for Bug#71628 - MfcEmbed needs to persist the url list 2001-03-11 19:03:40 +00:00
MostRecentUrls.h Fix for Bug#71628 - MfcEmbed needs to persist the url list 2001-03-11 19:03:40 +00:00
Preferences.cpp Fixes for the following bugs: 2001-04-01 17:49:51 +00:00
Preferences.h Fixes for the following bugs: 2001-04-01 17:49:51 +00:00
PrintProgressDialog.cpp This now enables print listeners, print progress and the cancelling of printing 2001-03-27 12:04:30 +00:00
PrintProgressDialog.h This now enables print listeners, print progress and the cancelling of printing 2001-03-27 12:04:30 +00:00
ProfileMgr.cpp Change implicit conversion from 2001-03-08 09:45:01 +00:00
ProfileMgr.h
ProfilesDlg.cpp
ProfilesDlg.h
README.TXT Updated to use nsIEmbeddingSiteWindow sr=blizzard@mozilla.org b=68581 2001-03-13 12:48:33 +00:00
StdAfx.cpp
StdAfx.h Fix related to bug 82236. Fix all embeddign usages of onLocationChange with the 2001-05-29 22:48:39 +00:00
makefile.win Land STATIC_BUILD_20010612_BRANCH, which supports building mozilla with components statically linked into the executable, as well as 'meta modules' that combine components into uber-DLLs. 2001-06-20 20:21:49 +00:00
mfcembed.dsp Fixes for the following bugs: 2001-04-01 17:49:51 +00:00
mfcembed.dsw
mfcembed.htm
resource.h Fixes for the following bugs: 2001-04-01 17:49:51 +00:00
winEmbedFileLocProvider.cpp Sample code - not part of the process. Bug 71387 - remove unneeded code to determine locale of profile defaults. r=tao 2001-04-03 14:29:01 +00:00
winEmbedFileLocProvider.h

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