gecko-dev/embedding/tests/mfcembed
rods%netscape.com 55cdb88790 Adds a new arg to the PP call. The new arg is not being used, it is
for future and is needed for the API freeze.
Bug 144716 r=dcone sr=attinasi
2002-05-16 13:51:54 +00:00
..
components fixes bug 129279 "nsIFile unicode/utf8/ascii task" 2002-04-27 05:33:09 +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 fixes bug 124042 "support internationalized URIs" r=dougt, sr=alecf, a=asa 2002-03-06 07:48:55 +00:00
BrowserFrm.cpp Fix for #123570 - Rearrange the editor embedding code in MfcEmbed 2002-02-06 05:13:44 +00:00
BrowserFrm.h Fix for #123570 - Rearrange the editor embedding code in MfcEmbed 2002-02-06 05:13:44 +00:00
BrowserImpl.cpp Fix for #123570 - Rearrange the editor embedding code in MfcEmbed 2002-02-06 05:13:44 +00:00
BrowserImpl.h Fix for #123570 - Rearrange the editor embedding code in MfcEmbed 2002-02-06 05:13:44 +00:00
BrowserImplCtxMenuLstnr.cpp License changes, take 2. Bug 98089. mozilla/embedding/. 2001-09-25 22:58:40 +00:00
BrowserImplPrompt.cpp License changes, take 2. Bug 98089. mozilla/embedding/. 2001-09-25 22:58:40 +00:00
BrowserImplWebPrgrsLstnr.cpp License changes, take 2. Bug 98089. mozilla/embedding/. 2001-09-25 22:58:40 +00:00
BrowserView.cpp Adds a new arg to the PP call. The new arg is not being used, it is 2002-05-16 13:51:54 +00:00
BrowserView.h The problem is thwe getting of the PS in the CreateBrowser method used to work. 2002-05-13 22:33:24 +00:00
Dialogs.cpp License changes, take 2. Bug 98089. mozilla/embedding/. 2001-09-25 22:58:40 +00:00
Dialogs.h License changes, take 2. Bug 98089. mozilla/embedding/. 2001-09-25 22:58:40 +00:00
EditorFrm.cpp new editor funcionality in embedding only. mfc test embed only 2002-02-18 09:57:08 +00:00
EditorFrm.h new editor funcionality in embedding only. mfc test embed only 2002-02-18 09:57:08 +00:00
IBrowserFrameGlue.h License changes, take 2. Bug 98089. mozilla/embedding/. 2001-09-25 22:58:40 +00:00
Makefile.in Add 'make install' target to build. It's "MRE-friendly". (See http://www.mozilla.org/projects/embedding/MRE.html for details.) 2002-04-25 02:52:44 +00:00
makefile.win Fix bug 127069 2002-04-02 22:20:57 +00:00
MfcEmbed.cpp Fixes mozilla/strings requiring unfrozen nsCRT class. patch by scc, r=dougt, sr=jag, b=136756 2002-05-15 18:55:21 +00:00
mfcembed.dsp Fix for #123981 - Add missing editor functionality to MfcEmbed 2002-02-13 01:49:48 +00:00
mfcembed.dsw
MfcEmbed.h Fix for #123570 - Rearrange the editor embedding code in MfcEmbed 2002-02-06 05:13:44 +00:00
mfcembed.htm NOT BUILT. Fix some typos in a QA document. b=130498 2002-03-25 13:50:39 +00:00
MfcEmbed.rc new editor funcionality in embedding only. mfc test embed only 2002-02-18 09:57:08 +00:00
MostRecentUrls.cpp fixes bug 142870 "nsIFile should use UCS-2 instead of UTF-8" 2002-05-07 23:07:19 +00:00
MostRecentUrls.h License changes, take 2. Bug 98089. mozilla/embedding/. 2001-09-25 22:58:40 +00:00
Preferences.cpp License changes, take 2. Bug 98089. mozilla/embedding/. 2001-09-25 22:58:40 +00:00
Preferences.h License changes, take 2. Bug 98089. mozilla/embedding/. 2001-09-25 22:58:40 +00:00
PrintProgressDialog.cpp 1) Removes the arg of nsIDOMWindow in the nsIWebBrowserPrint calls 2002-02-01 14:52:11 +00:00
PrintProgressDialog.h 1) Removes the arg of nsIDOMWindow in the nsIWebBrowserPrint calls 2002-02-01 14:52:11 +00:00
PrintSetupDialog.cpp This patch does the following: 2002-05-14 12:05:00 +00:00
PrintSetupDialog.h Switch public interfaces from nsIPrintOptions to nsIPrintSettings 2002-01-01 12:58:53 +00:00
ProfileMgr.cpp Bug 86734: Remove NS_WITH_SERVICE. r=dbaron, rs=scc, a=asa 2001-07-25 07:54:28 +00:00
ProfileMgr.h
ProfilesDlg.cpp Fixes mozilla/strings requiring unfrozen nsCRT class. patch by scc, r=dougt, sr=jag, b=136756 2002-05-15 18:55:21 +00:00
ProfilesDlg.h Fix for #123054 - Rearrange profile dlgs in MfcEmbed 2002-02-05 02:57:54 +00:00
README.TXT Updated to use nsIEmbeddingSiteWindow sr=blizzard@mozilla.org b=68581 2001-03-13 12:48:33 +00:00
resource.h new editor funcionality in embedding only. mfc test embed only 2002-02-18 09:57:08 +00:00
StdAfx.cpp License changes, take 2. Bug 98089. mozilla/embedding/. 2001-09-25 22:58:40 +00:00
StdAfx.h This patch does the following: 2002-05-14 12:05:00 +00:00
winEmbedFileLocProvider.cpp Fixes mozilla/strings requiring unfrozen nsCRT class. patch by scc, r=dougt, sr=jag, b=136756 2002-05-15 18:55:21 +00:00
winEmbedFileLocProvider.h Oops. 2001-09-20 00:02:59 +00:00

/* -*- 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