18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/* 28e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com> 38e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 48e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * All rights reserved. 58e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 68e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Redistribution and use in source and binary forms, with or without 78e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * modification, are permitted provided that the following conditions 88e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * are met: 98e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 1. Redistributions of source code must retain the above copyright 108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * notice, this list of conditions and the following disclaimer. 118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 2. Redistributions in binary form must reproduce the above copyright 128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * notice, this list of conditions and the following disclaimer in the 138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * documentation and/or other materials provided with the distribution. 148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project */ 278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#ifndef WXWEBFRAME_H 298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#define WXWEBFRAME_H 308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "wx/wxprec.h" 328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#ifndef WX_PRECOMP 338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project #include "wx/wx.h" 348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 36d0825bca7fe65beaee391d30da42e937db621564Steve Block#include "WebKitDefines.h" 37d0825bca7fe65beaee391d30da42e937db621564Steve Block 38635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Projectclass WebFramePrivate; 398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectclass WebViewFrameData; 408e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectclass wxWebView; 418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 428e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectnamespace WebCore { 438e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class ChromeClientWx; 448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class FrameLoaderClientWx; 45635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project class EditorClientWx; 468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class Frame; 478e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 49635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Projectclass WXDLLIMPEXP_WEBKIT wxWebViewDOMElementInfo 50635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project{ 51635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Projectpublic: 52635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project wxWebViewDOMElementInfo(); 53635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 54635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project ~wxWebViewDOMElementInfo() { } 55635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 56635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project wxString GetTagName() const { return m_tagName; } 57635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void SetTagName(const wxString& name) { m_tagName = name; } 58635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 59635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project bool IsSelected() const { return m_isSelected; } 60635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void SetSelected(bool sel) { m_isSelected = sel; } 61635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 62635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project wxString GetText() const { return m_text; } 63635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void SetText(const wxString& text) { m_text = text; } 64635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 65635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project wxString GetImageSrc() const { return m_imageSrc; } 66635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void SetImageSrc(const wxString& src) { m_imageSrc = src; } 67635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 68635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project wxString GetLink() const { return m_link; } 69635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void SetLink(const wxString& link) { m_link = link; } 70635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 71635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Projectprivate: 72635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void* m_domElement; 73635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project bool m_isSelected; 74635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project wxString m_tagName; 75635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project wxString m_text; 76635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project wxString m_imageSrc; 77635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project wxString m_link; 78635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project}; 79635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 80d0825bca7fe65beaee391d30da42e937db621564Steve Block// based on enums in WebCore/dom/Document.h 81d0825bca7fe65beaee391d30da42e937db621564Steve Blockenum wxWebKitParseMode { Compat, AlmostStrict, Strict, NoDocument }; 82d0825bca7fe65beaee391d30da42e937db621564Steve Block 838e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectclass WXDLLIMPEXP_WEBKIT wxWebFrame 848e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 858e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // ChromeClientWx needs to get the Page* stored by the wxWebView 868e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // for the createWindow function. 878e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project friend class WebCore::ChromeClientWx; 888e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project friend class WebCore::FrameLoaderClientWx; 89635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project friend class WebCore::EditorClientWx; 908e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project friend class wxWebView; 918e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 920bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochpublic: 938e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project wxWebFrame(wxWebView* container, wxWebFrame* parent = NULL, WebViewFrameData* data = NULL); 948e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 958e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ~wxWebFrame(); 968e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 978e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void LoadURL(const wxString& url); 988e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool GoBack(); 998e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool GoForward(); 1008e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void Stop(); 1018e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void Reload(); 1028e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1038e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool CanGoBack(); 1048e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool CanGoForward(); 1058e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1068e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool CanCut(); 1078e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool CanCopy(); 1088e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool CanPaste(); 1098e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void Cut(); 1118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void Copy(); 1128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void Paste(); 1138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 114635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project bool CanUndo(); 115635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project bool CanRedo(); 116635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 117635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void Undo(); 118635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void Redo(); 119635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 1208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project wxString GetPageSource(); 1218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void SetPageSource(const wxString& source, const wxString& baseUrl = wxEmptyString); 1228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project wxString GetInnerText(); 1248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project wxString GetAsMarkup(); 1258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project wxString GetExternalRepresentation(); 1268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project wxString RunScript(const wxString& javascript); 1288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 129635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project bool FindString(const wxString& string, bool forward = true, 130635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project bool caseSensitive = false, bool wrapSelection = true, 131635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project bool startInSelection = true); 132635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 1338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool CanIncreaseTextSize() const; 1348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void IncreaseTextSize(); 1358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool CanDecreaseTextSize() const; 1368e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void DecreaseTextSize(); 1370bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void ResetTextSize(); 1388e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void MakeEditable(bool enable); 1398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool IsEditable() const { return m_isEditable; } 1408e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project WebCore::Frame* GetFrame(); 142635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 143635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project wxWebViewDOMElementInfo HitTest(const wxPoint& post) const; 1448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 145231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block bool ShouldClose() const; 146231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block 147d0825bca7fe65beaee391d30da42e937db621564Steve Block wxWebKitParseMode GetParseMode() const; 148d0825bca7fe65beaee391d30da42e937db621564Steve Block 1498e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectprivate: 1508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project float m_textMagnifier; 1518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool m_isEditable; 1528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool m_isInitialized; 1538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool m_beingDestroyed; 154635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project WebFramePrivate* m_impl; 1558e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project}; 1578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif // ifndef WXWEBFRAME_H 159