fix harmless warnings (mostly about unused parameters/variables)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -85,6 +85,12 @@ public:
|
|||||||
void SetScrollPos(int pos);
|
void SetScrollPos(int pos);
|
||||||
int GetScrollPos();
|
int GetScrollPos();
|
||||||
|
|
||||||
|
// don't hide base class virtuals
|
||||||
|
virtual void SetScrollPos( int orient, int pos, bool refresh = true )
|
||||||
|
{ return wxControl::SetScrollPos(orient, pos, refresh); }
|
||||||
|
virtual int GetScrollPos( int orient ) const
|
||||||
|
{ return wxControl::GetScrollPos(orient); }
|
||||||
|
|
||||||
//we need to resize the webview when the control size changes
|
//we need to resize the webview when the control size changes
|
||||||
void OnSize(wxSizeEvent &event);
|
void OnSize(wxSizeEvent &event);
|
||||||
void OnMove(wxMoveEvent &event);
|
void OnMove(wxMoveEvent &event);
|
||||||
|
@@ -328,7 +328,7 @@ void MyDialog::OnAlignButton(wxCommandEvent& WXUNUSED(ev))
|
|||||||
Layout();
|
Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyDialog::OnPaneChanged(wxCollapsiblePaneEvent &event)
|
void MyDialog::OnPaneChanged(wxCollapsiblePaneEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxLogDebug(wxT("The pane has just been %s by the user"),
|
wxLogDebug(wxT("The pane has just been %s by the user"),
|
||||||
event.GetCollapsed() ? wxT("collapsed") : wxT("expanded"));
|
event.GetCollapsed() ? wxT("collapsed") : wxT("expanded"));
|
||||||
|
@@ -1321,7 +1321,7 @@ void MyCanvas::DrawRegionsHelper(wxDC& dc, wxCoord x, bool firstTime)
|
|||||||
dc.DestroyClippingRegion();
|
dc.DestroyClippingRegion();
|
||||||
|
|
||||||
wxRegion region(x + 110, y + 20, 100, 270);
|
wxRegion region(x + 110, y + 20, 100, 270);
|
||||||
#if !defined(__WXMOTIF__) && !defined(__WXMAC__)
|
#if !defined(__WXMOTIF__)
|
||||||
if ( !firstTime )
|
if ( !firstTime )
|
||||||
region.Offset(10, 10);
|
region.Offset(10, 10);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -212,55 +212,69 @@ MyFrame::MyFrame(const wxString& title)
|
|||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnBackButton(wxCommandEvent& myEvent){
|
void MyFrame::OnBackButton(wxCommandEvent& WXUNUSED(myEvent))
|
||||||
|
{
|
||||||
if (mySafari->CanGoBack())
|
if (mySafari->CanGoBack())
|
||||||
mySafari->GoBack();
|
mySafari->GoBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnNextButton(wxCommandEvent& myEvent){
|
void MyFrame::OnNextButton(wxCommandEvent& WXUNUSED(myEvent))
|
||||||
|
{
|
||||||
if (mySafari->CanGoForward())
|
if (mySafari->CanGoForward())
|
||||||
mySafari->GoForward();
|
mySafari->GoForward();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnStopButton(wxCommandEvent& myEvent){
|
void MyFrame::OnStopButton(wxCommandEvent& WXUNUSED(myEvent))
|
||||||
|
{
|
||||||
mySafari->Stop();
|
mySafari->Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnReloadButton(wxCommandEvent& myEvent){
|
void MyFrame::OnReloadButton(wxCommandEvent& WXUNUSED(myEvent))
|
||||||
|
{
|
||||||
mySafari->Reload();
|
mySafari->Reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnURLEnter(wxCommandEvent& myEvent){
|
void MyFrame::OnURLEnter(wxCommandEvent& WXUNUSED(myEvent))
|
||||||
|
{
|
||||||
mySafari->LoadURL(urlText->GetValue());
|
mySafari->LoadURL(urlText->GetValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnStateChanged(wxWebKitStateChangedEvent& myEvent){
|
void MyFrame::OnStateChanged(wxWebKitStateChangedEvent& myEvent)
|
||||||
if (GetStatusBar() != NULL){
|
{
|
||||||
if (myEvent.GetState() == wxWEBKIT_STATE_NEGOTIATING){
|
if (GetStatusBar() != NULL)
|
||||||
|
{
|
||||||
|
if (myEvent.GetState() == wxWEBKIT_STATE_NEGOTIATING)
|
||||||
|
{
|
||||||
GetStatusBar()->SetStatusText(_("Contacting ") + myEvent.GetURL());
|
GetStatusBar()->SetStatusText(_("Contacting ") + myEvent.GetURL());
|
||||||
urlText->SetValue(myEvent.GetURL());
|
urlText->SetValue(myEvent.GetURL());
|
||||||
}
|
}
|
||||||
else if (myEvent.GetState() == wxWEBKIT_STATE_TRANSFERRING){
|
else if (myEvent.GetState() == wxWEBKIT_STATE_TRANSFERRING)
|
||||||
|
{
|
||||||
GetStatusBar()->SetStatusText(_("Loading ") + myEvent.GetURL());
|
GetStatusBar()->SetStatusText(_("Loading ") + myEvent.GetURL());
|
||||||
}
|
}
|
||||||
else if (myEvent.GetState() == wxWEBKIT_STATE_STOP){
|
else if (myEvent.GetState() == wxWEBKIT_STATE_STOP)
|
||||||
|
{
|
||||||
GetStatusBar()->SetStatusText(_("Load complete."));
|
GetStatusBar()->SetStatusText(_("Load complete."));
|
||||||
SetTitle(mySafari->GetTitle());
|
SetTitle(mySafari->GetTitle());
|
||||||
}
|
}
|
||||||
else if (myEvent.GetState() == wxWEBKIT_STATE_FAILED){
|
else if (myEvent.GetState() == wxWEBKIT_STATE_FAILED)
|
||||||
|
{
|
||||||
GetStatusBar()->SetStatusText(_("Failed to load ") + myEvent.GetURL());
|
GetStatusBar()->SetStatusText(_("Failed to load ") + myEvent.GetURL());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnViewSource(wxCommandEvent& myEvent){
|
void MyFrame::OnViewSource(wxCommandEvent& WXUNUSED(myEvent))
|
||||||
|
{
|
||||||
if (mySafari->CanGetPageSource())
|
if (mySafari->CanGetPageSource())
|
||||||
wxMessageBox(mySafari->GetPageSource());
|
wxMessageBox(mySafari->GetPageSource());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnSetSource(wxCommandEvent& myEvent){
|
void MyFrame::OnSetSource(wxCommandEvent& WXUNUSED(myEvent))
|
||||||
if (mySafari){
|
{
|
||||||
|
if (mySafari)
|
||||||
|
{
|
||||||
wxString myText = wxT("<HTML><HEAD></HEAD><BODY><P>Hello world!</P></BODY></HTML>");
|
wxString myText = wxT("<HTML><HEAD></HEAD><BODY><P>Hello world!</P></BODY></HTML>");
|
||||||
mySafari->SetPageSource(myText);
|
mySafari->SetPageSource(myText);
|
||||||
}
|
}
|
||||||
|
@@ -1929,7 +1929,7 @@ void wxMyPropertyGridPage::OnPropertySelect( wxPropertyGridEvent& WXUNUSED(event
|
|||||||
void wxMyPropertyGridPage::OnPropertyChange( wxPropertyGridEvent& event )
|
void wxMyPropertyGridPage::OnPropertyChange( wxPropertyGridEvent& event )
|
||||||
{
|
{
|
||||||
wxPGProperty* p = event.GetProperty();
|
wxPGProperty* p = event.GetProperty();
|
||||||
wxLogDebug(wxT("wxMyPropertyGridPage::OnPropertyChange('%s', to value '%s')"),
|
wxLogVerbose(wxT("wxMyPropertyGridPage::OnPropertyChange('%s', to value '%s')"),
|
||||||
p->GetName().c_str(),
|
p->GetName().c_str(),
|
||||||
p->GetDisplayedString().c_str());
|
p->GetDisplayedString().c_str());
|
||||||
}
|
}
|
||||||
@@ -1937,7 +1937,7 @@ void wxMyPropertyGridPage::OnPropertyChange( wxPropertyGridEvent& event )
|
|||||||
void wxMyPropertyGridPage::OnPropertyChanging( wxPropertyGridEvent& event )
|
void wxMyPropertyGridPage::OnPropertyChanging( wxPropertyGridEvent& event )
|
||||||
{
|
{
|
||||||
wxPGProperty* p = event.GetProperty();
|
wxPGProperty* p = event.GetProperty();
|
||||||
wxLogDebug(wxT("wxMyPropertyGridPage::OnPropertyChanging('%s', to value '%s')"),
|
wxLogVerbose(wxT("wxMyPropertyGridPage::OnPropertyChanging('%s', to value '%s')"),
|
||||||
p->GetName().c_str(),
|
p->GetName().c_str(),
|
||||||
event.GetValue().GetString().c_str());
|
event.GetValue().GetString().c_str());
|
||||||
}
|
}
|
||||||
@@ -2433,7 +2433,7 @@ void FormMain::OnDelPropRClick( wxCommandEvent& WXUNUSED(event) )
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
void FormMain::OnContextMenu( wxContextMenuEvent& event )
|
void FormMain::OnContextMenu( wxContextMenuEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxLogDebug(wxT("FormMain::OnContextMenu(%i,%i)"),
|
wxLogDebug(wxT("FormMain::OnContextMenu(%i,%i)"),
|
||||||
event.GetPosition().x,event.GetPosition().y);
|
event.GetPosition().x,event.GetPosition().y);
|
||||||
|
@@ -13,14 +13,14 @@
|
|||||||
#include "wx/propgrid/propgrid.h"
|
#include "wx/propgrid/propgrid.h"
|
||||||
#include "wx/propgrid/advprops.h"
|
#include "wx/propgrid/advprops.h"
|
||||||
|
|
||||||
class MyFrame : public wxFrame
|
class MyFrame : public wxFrame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MyFrame(wxWindow* parent);
|
MyFrame(wxWindow* parent);
|
||||||
|
|
||||||
void OnAction(wxCommandEvent& event);
|
void OnAction(wxCommandEvent& event);
|
||||||
void OnPropertyGridChange(wxPropertyGridEvent& event);
|
void OnPropertyGridChange(wxPropertyGridEvent& event);
|
||||||
void OnPropertyGridChanging(wxPropertyGridEvent& event);
|
void OnPropertyGridChanging(wxPropertyGridEvent& event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxPropertyGrid* m_pg;
|
wxPropertyGrid* m_pg;
|
||||||
@@ -36,11 +36,11 @@ END_EVENT_TABLE()
|
|||||||
MyFrame::MyFrame(wxWindow* parent)
|
MyFrame::MyFrame(wxWindow* parent)
|
||||||
: wxFrame(parent, wxID_ANY, wxT("PropertyGrid Test"))
|
: wxFrame(parent, wxID_ANY, wxT("PropertyGrid Test"))
|
||||||
{
|
{
|
||||||
wxMenu *Menu = new wxMenu;
|
wxMenu *Menu = new wxMenu;
|
||||||
Menu->Append(wxID_HIGHEST+1, wxT("Action"));
|
Menu->Append(wxID_HIGHEST+1, wxT("Action"));
|
||||||
wxMenuBar *MenuBar = new wxMenuBar();
|
wxMenuBar *MenuBar = new wxMenuBar();
|
||||||
MenuBar->Append(Menu, wxT("Action"));
|
MenuBar->Append(Menu, wxT("Action"));
|
||||||
SetMenuBar(MenuBar);
|
SetMenuBar(MenuBar);
|
||||||
|
|
||||||
wxPropertyGrid *pg = new wxPropertyGrid(this,-1,wxDefaultPosition,wxSize(400,400),
|
wxPropertyGrid *pg = new wxPropertyGrid(this,-1,wxDefaultPosition,wxSize(400,400),
|
||||||
wxPG_SPLITTER_AUTO_CENTER |
|
wxPG_SPLITTER_AUTO_CENTER |
|
||||||
@@ -59,20 +59,20 @@ void MyFrame::OnPropertyGridChange(wxPropertyGridEvent &event)
|
|||||||
wxPGProperty* p = event.GetProperty();
|
wxPGProperty* p = event.GetProperty();
|
||||||
|
|
||||||
if ( p )
|
if ( p )
|
||||||
wxLogDebug("OnPropertyGridChange(%s, value=%s)",
|
wxLogVerbose("OnPropertyGridChange(%s, value=%s)",
|
||||||
p->GetName().c_str(), p->GetValueAsString().c_str());
|
p->GetName().c_str(), p->GetValueAsString().c_str());
|
||||||
else
|
else
|
||||||
wxLogDebug("OnPropertyGridChange(NULL)");
|
wxLogVerbose("OnPropertyGridChange(NULL)");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnPropertyGridChanging(wxPropertyGridEvent &event)
|
void MyFrame::OnPropertyGridChanging(wxPropertyGridEvent &event)
|
||||||
{
|
{
|
||||||
wxPGProperty* p = event.GetProperty();
|
wxPGProperty* p = event.GetProperty();
|
||||||
|
|
||||||
wxLogDebug("OnPropertyGridChanging(%s)", p->GetName().c_str());
|
wxLogVerbose("OnPropertyGridChanging(%s)", p->GetName().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnAction(wxCommandEvent &)
|
void MyFrame::OnAction(wxCommandEvent &)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -942,12 +942,12 @@ wxBitmap BitmapComboBoxWidgetsPage::CreateBitmap(const wxColour& colour)
|
|||||||
return bmp;
|
return bmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitmapComboBoxWidgetsPage::OnDropDown(wxCommandEvent& event)
|
void BitmapComboBoxWidgetsPage::OnDropDown(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxLogMessage(_T("Combobox dropped down"));
|
wxLogMessage(_T("Combobox dropped down"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitmapComboBoxWidgetsPage::OnCloseUp(wxCommandEvent& event)
|
void BitmapComboBoxWidgetsPage::OnCloseUp(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxLogMessage(_T("Combobox closed up"));
|
wxLogMessage(_T("Combobox closed up"));
|
||||||
}
|
}
|
||||||
|
@@ -165,7 +165,7 @@ void wxArgumentType::SetDefaultValue(const wxString& defval, const wxString& def
|
|||||||
// Note: we adjust the aesthetic form of the m_strDefaultValue string for the "modify mode"
|
// Note: we adjust the aesthetic form of the m_strDefaultValue string for the "modify mode"
|
||||||
// of ifacecheck: we may need to write it out in an interface header
|
// of ifacecheck: we may need to write it out in an interface header
|
||||||
|
|
||||||
wxString *p wxDUMMY_INITIALIZE(NULL);
|
wxString *p = NULL;
|
||||||
for (int i=0; i<2; i++) // to avoid copying&pasting the code!
|
for (int i=0; i<2; i++) // to avoid copying&pasting the code!
|
||||||
{
|
{
|
||||||
if (i == 0) p = &m_strDefaultValue;
|
if (i == 0) p = &m_strDefaultValue;
|
||||||
|
@@ -61,7 +61,7 @@ void AutoCaptureMechanism::Delay(int seconds)
|
|||||||
|
|
||||||
// Wait for 3 seconds
|
// Wait for 3 seconds
|
||||||
clock_t start = clock();
|
clock_t start = clock();
|
||||||
while (clock() - start < CLOCKS_PER_SEC * seconds)
|
while ( (long)clock() - start < CLOCKS_PER_SEC * seconds)
|
||||||
wxYieldIfNeeded();
|
wxYieldIfNeeded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user