Fix all the unused variable warnings in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton
2011-08-01 13:09:10 +00:00
parent 888b6835d8
commit 8bccab8f06

View File

@@ -41,8 +41,11 @@
#error "wxStyledTextControl is needed by this sample" #error "wxStyledTextControl is needed by this sample"
#endif #endif
#if defined(__WXMSW__) || defined(__WXOSX__)
#include "stop.xpm" #include "stop.xpm"
#include "refresh.xpm" #include "refresh.xpm"
#endif
#include "wxlogo.xpm" #include "wxlogo.xpm"
class WebApp : public wxApp class WebApp : public wxApp
@@ -306,7 +309,7 @@ WebFrame::WebFrame() : wxFrame(NULL, wxID_ANY, "wxWebView Sample")
wxCommandEventHandler(WebFrame::OnMode), NULL, this ); wxCommandEventHandler(WebFrame::OnMode), NULL, this );
} }
void WebFrame::OnAnimationTimer(wxTimerEvent& evt) void WebFrame::OnAnimationTimer(wxTimerEvent& WXUNUSED(evt))
{ {
m_animation_angle += 15; m_animation_angle += 15;
if (m_animation_angle > 360) m_animation_angle -= 360; if (m_animation_angle > 360) m_animation_angle -= 360;
@@ -374,7 +377,7 @@ void WebFrame::UpdateState()
/** /**
* Callback invoked when user entered an URL and pressed enter * Callback invoked when user entered an URL and pressed enter
*/ */
void WebFrame::OnUrl(wxCommandEvent& evt) void WebFrame::OnUrl(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->LoadUrl( m_url->GetValue() ); m_browser->LoadUrl( m_url->GetValue() );
UpdateState(); UpdateState();
@@ -383,7 +386,7 @@ void WebFrame::OnUrl(wxCommandEvent& evt)
/** /**
* Callback invoked when user pressed the "back" button * Callback invoked when user pressed the "back" button
*/ */
void WebFrame::OnBack(wxCommandEvent& evt) void WebFrame::OnBack(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->GoBack(); m_browser->GoBack();
UpdateState(); UpdateState();
@@ -392,7 +395,7 @@ void WebFrame::OnBack(wxCommandEvent& evt)
/** /**
* Callback invoked when user pressed the "forward" button * Callback invoked when user pressed the "forward" button
*/ */
void WebFrame::OnForward(wxCommandEvent& evt) void WebFrame::OnForward(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->GoForward(); m_browser->GoForward();
UpdateState(); UpdateState();
@@ -401,7 +404,7 @@ void WebFrame::OnForward(wxCommandEvent& evt)
/** /**
* Callback invoked when user pressed the "stop" button * Callback invoked when user pressed the "stop" button
*/ */
void WebFrame::OnStop(wxCommandEvent& evt) void WebFrame::OnStop(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->Stop(); m_browser->Stop();
UpdateState(); UpdateState();
@@ -410,50 +413,50 @@ void WebFrame::OnStop(wxCommandEvent& evt)
/** /**
* Callback invoked when user pressed the "reload" button * Callback invoked when user pressed the "reload" button
*/ */
void WebFrame::OnReload(wxCommandEvent& evt) void WebFrame::OnReload(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->Reload(); m_browser->Reload();
UpdateState(); UpdateState();
} }
void WebFrame::OnClearHistory(wxCommandEvent& evt) void WebFrame::OnClearHistory(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->ClearHistory(); m_browser->ClearHistory();
UpdateState(); UpdateState();
} }
void WebFrame::OnEnableHistory(wxCommandEvent& evt) void WebFrame::OnEnableHistory(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->EnableHistory(m_tools_enable_history->IsChecked()); m_browser->EnableHistory(m_tools_enable_history->IsChecked());
UpdateState(); UpdateState();
} }
void WebFrame::OnCut(wxCommandEvent& evt) void WebFrame::OnCut(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->Cut(); m_browser->Cut();
} }
void WebFrame::OnCopy(wxCommandEvent& evt) void WebFrame::OnCopy(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->Copy(); m_browser->Copy();
} }
void WebFrame::OnPaste(wxCommandEvent& evt) void WebFrame::OnPaste(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->Paste(); m_browser->Paste();
} }
void WebFrame::OnUndo(wxCommandEvent& evt) void WebFrame::OnUndo(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->Undo(); m_browser->Undo();
} }
void WebFrame::OnRedo(wxCommandEvent& evt) void WebFrame::OnRedo(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->Redo(); m_browser->Redo();
} }
void WebFrame::OnMode(wxCommandEvent& evt) void WebFrame::OnMode(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->SetEditable(m_edit_mode->IsChecked()); m_browser->SetEditable(m_edit_mode->IsChecked());
} }
@@ -494,7 +497,9 @@ void WebFrame::OnDocumentLoaded(wxWebNavigationEvent& evt)
{ {
//Only notify if the document is the main frame, not a subframe //Only notify if the document is the main frame, not a subframe
if(evt.GetURL() == m_browser->GetCurrentURL()) if(evt.GetURL() == m_browser->GetCurrentURL())
{
wxLogMessage("%s", "Document loaded; url='" + evt.GetURL() + "'"); wxLogMessage("%s", "Document loaded; url='" + evt.GetURL() + "'");
}
UpdateState(); UpdateState();
} }
@@ -522,7 +527,7 @@ void WebFrame::OnTitleChanged(wxWebNavigationEvent& evt)
/** /**
* Invoked when user selects the "View Source" menu item * Invoked when user selects the "View Source" menu item
*/ */
void WebFrame::OnViewSourceRequest(wxCommandEvent& evt) void WebFrame::OnViewSourceRequest(wxCommandEvent& WXUNUSED(evt))
{ {
SourceViewDialog dlg(this, m_browser->GetPageSource()); SourceViewDialog dlg(this, m_browser->GetPageSource());
dlg.ShowModal(); dlg.ShowModal();
@@ -531,7 +536,7 @@ void WebFrame::OnViewSourceRequest(wxCommandEvent& evt)
/** /**
* Invoked when user selects the "Menu" item * Invoked when user selects the "Menu" item
*/ */
void WebFrame::OnToolsClicked(wxCommandEvent& evt) void WebFrame::OnToolsClicked(wxCommandEvent& WXUNUSED(evt))
{ {
if(m_browser->GetCurrentURL() == "") if(m_browser->GetCurrentURL() == "")
return; return;
@@ -604,7 +609,7 @@ void WebFrame::OnSetZoom(wxCommandEvent& evt)
} }
} }
void WebFrame::OnZoomLayout(wxCommandEvent& evt) void WebFrame::OnZoomLayout(wxCommandEvent& WXUNUSED(evt))
{ {
if(m_tools_layout->IsChecked()) if(m_tools_layout->IsChecked())
m_browser->SetZoomType(wxWEB_VIEW_ZOOM_TYPE_LAYOUT); m_browser->SetZoomType(wxWEB_VIEW_ZOOM_TYPE_LAYOUT);
@@ -665,7 +670,7 @@ void WebFrame::OnError(wxWebNavigationEvent& evt)
/** /**
* Invoked when user selects "Print" from the menu * Invoked when user selects "Print" from the menu
*/ */
void WebFrame::OnPrint(wxCommandEvent& evt) void WebFrame::OnPrint(wxCommandEvent& WXUNUSED(evt))
{ {
m_browser->Print(); m_browser->Print();
} }