wxMozilla Classes

Here are some basic descriptions of the classes in the wxMozilla package. Please refer to headers for function-level API docs for the moment. (Until we have an automated doc-system in place.)

wxMozillaBrowser

Header <wxMozillaBrowser.h>

This is the browser window itself. XPCOM is started and stopped by this control, and this is the class you use to create a browser instance in your wxWindows application.  It currently supports most common browser functions and could probably already serve as a wxHTML drop-in replacement if the APIs were made to match.

It also supports some basic editing commands. Editing commands are documented here. Use wxMozillaBrowser::MakeEditable to initialize editing, and wxMozillaBrowser::EditCommand function to send edit commands to the browser. See wxMozillaWindow for a simple example. Also, note that on Windows you need to refresh after making the window editable. Full editing support will require access to the Mozilla DOM, which will likely be best achieved by implementing a complete XPCOM/nsCOMPtr interface wrapper.

wxMozillaEvents

Header <wxMozilla.h>

The Mozilla control currently has three events:
 
EVT_MOZILLA_URL_CHANGED (whenever the user navigates to a new page)
EVT_URL_STATUS_CHANGED (load/stop events)
EVT_MOZILLA_RIGHT_CLICK (context menu handler).

We hope to add more mouse and keyboard events in the future.

wxMozillaBrowserChrome

Header <wxMozillaBrowserChrome.h>

This class can be thought of as a translator between the wxMozillaBrowser window and Mozilla itself. Mozilla uses this class to send signals and events to wxMozilla, anything from size and status change events to mouse events. Developers will not interact publicly with this class, as it sends out wxEvents for any necessary event messages that the host application may wish to respond to. (Or at least the ones we've implemented so far! ^_^)

wxMozillaWindow

Header <wxMozillaWindow.h>

This is a convenience class made so that wxMozillaBrowser can support pop-up windows. It is a full-fledged browser window, complete with toolbar, status-bar and menu. Toolbar, status-bar and menu can be toggled on and off, and are automatically toggled with Javascript windows as well. (Popups turn these components on or off as requested.) It also allows for view-source windows. While we don't want to create YAB (yet another browser), we do want wxMozilla to be able to call upon a full-fledged browser window when necessary. 

Of course, if someone wanted to override the Mozilla rendering components with wxWindows objects, you would get a cross-platform, platform native implementation of Mozilla for all major platforms. =)


Hosted by
SourceForge.net Logo