Fixes to remove compile warnings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier 2004-09-26 18:03:28 +00:00
parent 4ac48ae210
commit 8f3b30d57a
2 changed files with 9 additions and 10 deletions

View File

@ -67,7 +67,7 @@ public:
bool CanGetPageSource();
wxString GetPageSource();
void SetPageSource(wxString& source, const wxString& baseUrl = wxEmptyString);
//we need to resize the webview when the control size changes
void OnSize(wxSizeEvent &event);
protected:
@ -79,7 +79,7 @@ private:
wxWindowID m_windowID;
wxString m_currentURL;
wxString m_pageTitle;
void* m_webView;
objc_object* m_webView;
//It should be WebView, but WebView is Cocoa only, so any class which included
//this header would have to link to Cocoa, so for now use void* instead.
};

View File

@ -200,17 +200,17 @@ bool wxWebKitCtrl::CanGoForward(){
bool wxWebKitCtrl::GoBack(){
if ( !m_webView )
return false;
[m_webView goBack];
return true;
bool result = [(WebView*)m_webView goBack];
return result;
}
bool wxWebKitCtrl::GoForward(){
if ( !m_webView )
return false;
[m_webView goForward];
return true;
bool result = [(WebView*)m_webView goForward];
return result;
}
void wxWebKitCtrl::Reload(){
@ -236,14 +236,13 @@ bool wxWebKitCtrl::CanGetPageSource(){
}
wxString wxWebKitCtrl::GetPageSource(){
if ( !m_webView )
return wxT("");
if (CanGetPageSource()){
WebDataSource* dataSource = [[m_webView mainFrame] dataSource];
return wxStringWithNSString( [[dataSource representation] documentSource] );
}
return wxT("");
}
void wxWebKitCtrl::SetPageSource(wxString& source, const wxString& baseUrl){
@ -263,7 +262,7 @@ void wxWebKitCtrl::OnSize(wxSizeEvent &event){
wxWindow* parent = GetParent();
bool inNotebook = false;
int x = 0;
int y = 18;
int y = 18;
while(parent != NULL)
{
// keep adding the position until we hit the notebook