git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27629
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#pragma interface "webkit.h"
#endif
#pragma interface "webkit.h"
#endif
#if !defined(__WXMAC__) && !defined(__WXCOCOA__)
#error "wxWebKitCtrl not implemented for this platform"
#endif
#if !defined(__WXMAC__) && !defined(__WXCOCOA__)
#error "wxWebKitCtrl not implemented for this platform"
#endif
(wxWebKitStateChangedEventFunction) & func, \
(wxObject *) NULL ),
(wxWebKitStateChangedEventFunction) & func, \
(wxObject *) NULL ),
+#endif // wxUSE_WEBKIT
+
// smaller library.
#define wxUSE_HTML 1
// smaller library.
#define wxUSE_HTML 1
+// wxWebKit is a wrapper for Apple's WebKit framework, use it if you want to embed
+// the Safari browser control
+// 0 by default because of Jaguar compatibility problems
+#define wxUSE_WEBKIT 0
+
// OpenGL canvas
#define wxUSE_GLCANVAS 0
// OpenGL canvas
#define wxUSE_GLCANVAS 0
#pragma implementation "webkit.h"
#endif
#pragma implementation "webkit.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/html/webkit.h"
#include "wx/notebook.h"
#include "wx/html/webkit.h"
#include "wx/notebook.h"
-//#include "wx/html/wklisten.h"
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
m_webView = (WebView*) HIWebViewGetWebView( (HIViewRef) m_macControl );
MacPostControlCreate(pos, size);
m_webView = (WebView*) HIWebViewGetWebView( (HIViewRef) m_macControl );
MacPostControlCreate(pos, size);
HIViewSetVisible( (HIViewRef) m_macControl, true );
HIViewSetVisible( (HIViewRef) m_macControl, true );
+ [m_webView setHidden:false];
#endif
// Register event listener interfaces
#endif
// Register event listener interfaces
}
void wxWebKitCtrl::OnSize(wxSizeEvent &event){
}
void wxWebKitCtrl::OnSize(wxSizeEvent &event){
+ // This is a nasty hack because WebKit does not seem to recognize a Tabs control as its parent.
+ // Therefore, coordinates must be relative to the left-hand side of the screen, rather than
+ // relative to the Tabs control.
wxWindow* parent = GetParent();
bool inNotebook = false;
int x = 0;
int y = 18;
while(parent != NULL)
{
wxWindow* parent = GetParent();
bool inNotebook = false;
int x = 0;
int y = 18;
while(parent != NULL)
{
- x += parent->GetPosition().x;
- y += parent->GetPosition().y;
+ // keep adding the position until we hit the notebook
+ if (!inNotebook){
+ x += parent->GetPosition().x;
+ y += parent->GetPosition().y;
+ }
+
+ if ( parent->GetClassInfo()->GetClassName() == wxT("wxSplitterWindow") ){
+ x += 3;
+ }
+
if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) ){
inNotebook = true;
if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) ){
inNotebook = true;
}
parent = parent->GetParent();
}
}
parent = parent->GetParent();
}
+
+#endif //wxUSE_WEBKIT
\ No newline at end of file