Follow-on fix for bug 457825. Use sheet principal for agent and user sheets. r=dbaron...
[wine-gecko.git] / embedding / tests / wxEmbed / GeckoFrame.h
blob52a801c02b7781d1d5e84c23570a8ba6e8e15c32
1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: Mozilla-sample-code 1.0
4 * Copyright (c) 2002 Netscape Communications Corporation and
5 * other contributors
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this Mozilla sample software and associated documentation files
9 * (the "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish,
11 * distribute, sublicense, and/or sell copies of the Software, and to permit
12 * persons to whom the Software is furnished to do so, subject to the
13 * following conditions:
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
26 * Contributor(s):
27 * Adam Lock <adamlock@netscape.com>
29 * ***** END LICENSE BLOCK ***** */
31 #ifndef GECKOFRAME_H
32 #define GECKOFRAME_H
34 #include "nsIWebBrowser.h"
36 #include "GeckoWindow.h"
37 #include "GeckoContainer.h"
39 class GeckoFrame :
40 public wxFrame,
41 public GeckoContainerUI
43 protected:
44 GeckoWindow *mGeckoWnd;
45 nsCOMPtr<nsIWebBrowser> mWebBrowser;
46 public:
47 GeckoFrame();
49 DECLARE_EVENT_TABLE()
50 void OnActivate(wxActivateEvent &event);
51 void OnEditCut(wxCommandEvent &event);
52 void OnUpdateEditCut(wxUpdateUIEvent &event);
53 void OnEditCopy(wxCommandEvent &event);
54 void OnUpdateEditCopy(wxUpdateUIEvent &event);
55 void OnEditPaste(wxCommandEvent &event);
56 void OnUpdateEditPaste(wxUpdateUIEvent &event);
57 void OnEditSelectAll(wxCommandEvent &event);
59 // This method searches for a "gecko" wxWindow and sets it up with the frame
60 // as the container UI. The results are stored in the mGeckoWnd and mWebBrowser
61 // member variables.
62 bool SetupDefaultGeckoWindow();
63 // This method sets up the specified window with the specified container UI
64 // and returns the nsIWebBrowser interface to it.
65 bool SetupGeckoWindow(GeckoWindow *aGeckoWindow, GeckoContainerUI *aUI, nsIWebBrowser **aWebBrowser) const;
67 // GeckoContainerUI overrides
68 void SetFocus();
71 #endif