From 8b5d5223d164a3b7fbacc5e69808cadd25163b1b Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Fri, 11 Feb 2005 10:42:05 +0000 Subject: [PATCH] Various cleanings. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/event.h | 2 +- include/wx/mediactrl.h | 14 +++++++------- src/msw/dcclient.cpp | 2 +- src/msw/font.cpp | 8 ++++---- src/msw/joystick.cpp | 2 +- src/msw/mediactrl.cpp | 4 ++-- src/msw/notebook.cpp | 4 ++-- src/msw/printdlg.cpp | 6 +++--- src/msw/treectrl.cpp | 2 +- src/msw/window.cpp | 6 +++--- src/univ/combobox.cpp | 2 +- src/univ/menu.cpp | 2 +- src/univ/notebook.cpp | 2 +- src/univ/radiobox.cpp | 2 +- src/univ/themes/gtk.cpp | 8 ++++---- src/univ/themes/win32.cpp | 2 +- src/univ/winuniv.cpp | 4 ++-- 17 files changed, 36 insertions(+), 36 deletions(-) diff --git a/include/wx/event.h b/include/wx/event.h index 6399b743d2..81d0cecc08 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -1523,7 +1523,7 @@ public: int joystick = wxJOYSTICK1, int change = 0) : wxEvent(0, type), - m_pos(0, 0), + m_pos(), m_zPosition(0), m_buttonChange(change), m_buttonState(state), diff --git a/include/wx/mediactrl.h b/include/wx/mediactrl.h index 1e6ece736c..78e62fc1ed 100644 --- a/include/wx/mediactrl.h +++ b/include/wx/mediactrl.h @@ -113,11 +113,11 @@ public: { } wxMediaCtrl(wxWindow* parent, wxWindowID winid, - const wxString& fileName = wxT(""), + const wxString& fileName = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& szBackend = wxT(""), + const wxString& szBackend = wxEmptyString, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxT("mediaCtrl")) : m_imp(NULL), m_bLoaded(false), m_bLoop(false) @@ -129,7 +129,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& szBackend = wxT(""), + const wxString& szBackend = wxEmptyString, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxT("mediaCtrl")) : m_imp(NULL), m_bLoop(false) @@ -139,11 +139,11 @@ public: ~wxMediaCtrl(); bool Create(wxWindow* parent, wxWindowID winid, - const wxString& fileName = wxT(""), + const wxString& fileName = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& szBackend = wxT(""), + const wxString& szBackend = wxEmptyString, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxT("mediaCtrl")); @@ -152,7 +152,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& szBackend = wxT(""), + const wxString& szBackend = wxEmptyString, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxT("mediaCtrl")); //DirectShow only @@ -252,7 +252,7 @@ public: int WXUNUSED(w), int WXUNUSED(h)) { } virtual wxSize GetVideoSize() const - { return wxSize(0,0); } + { return wxSize(); } virtual double GetPlaybackRate() { return 0.0; } diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index 0f8ac84876..f3ffe0ebd3 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -169,7 +169,7 @@ void wxClientDC::InitDC() } // clip the DC to avoid overwriting the non client area - SetClippingRegion(wxPoint(0, 0), m_canvas->GetClientSize()); + SetClippingRegion(wxPoint(), m_canvas->GetClientSize()); #endif // __WXUNIVERSAL__ || __WXWINCE__ } diff --git a/src/msw/font.cpp b/src/msw/font.cpp index b18902071f..6c47dc906f 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -108,8 +108,8 @@ public: // constructors wxFontRefData() { - Init(-1, wxSize(0, 0), FALSE, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_NORMAL, FALSE, wxEmptyString, + Init(-1, wxSize(), false, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, + wxFONTWEIGHT_NORMAL, false, wxEmptyString, wxFONTENCODING_DEFAULT); } @@ -223,7 +223,7 @@ public: else { m_pointSize = pointSize; - m_sizeUsingPixels = FALSE; + m_sizeUsingPixels = false; } } @@ -236,7 +236,7 @@ public: else { m_pixelSize = pixelSize; - m_sizeUsingPixels = TRUE; + m_sizeUsingPixels = true; } } diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index 5ffab12251..46a7666794 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -87,7 +87,7 @@ wxPoint wxJoystick::GetPosition() const if (res == JOYERR_NOERROR ) return wxPoint(joyInfo.wXpos, joyInfo.wYpos); else - return wxPoint(0, 0); + return wxPoint(); } int wxJoystick::GetZPosition() const diff --git a/src/msw/mediactrl.cpp b/src/msw/mediactrl.cpp index f0fbf91a47..526ca577e9 100644 --- a/src/msw/mediactrl.cpp +++ b/src/msw/mediactrl.cpp @@ -1176,7 +1176,7 @@ wxSize wxMCIMediaBackend::GetVideoSize() const return wxSize(whereParms.rc.right, whereParms.rc.bottom); } - return wxSize(0,0); + return wxSize(); } //--------------------------------------------------------------------------- @@ -1619,7 +1619,7 @@ bool wxQTMediaBackend::SetPosition(wxLongLong where) // wxQTMediaBackend::GetPosition // // 1) Calls GetMovieTime to get the position we are in in the movie -// in milliseconds (we called +// in milliseconds (we called //--------------------------------------------------------------------------- wxLongLong wxQTMediaBackend::GetPosition() { diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index a7eea97169..db34763fd5 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -480,7 +480,7 @@ wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const wxSize sizeTotal = sizePage; // We need to make getting tab size part of the wxWidgets API. - wxSize tabSize(0, 0); + wxSize tabSize; if (GetPageCount() > 0) { RECT rect; @@ -627,7 +627,7 @@ bool wxNotebook::InsertPage(size_t nPage, } // and the text - if ( !strText.IsEmpty() ) + if ( !strText.empty() ) { tcItem.mask |= TCIF_TEXT; tcItem.pszText = (wxChar *)strText.c_str(); // const_cast diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index 56e9af2adb..3b01b5b5b1 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -215,7 +215,7 @@ bool wxWindowsPrintNativeData::TransferTo( wxPrintData &data ) // Shouldn't really get here wxFAIL_MSG(wxT("Couldn't find paper size in paper database.")); data.SetPaperId( wxPAPER_NONE ); - data.SetPaperSize( wxSize(0,0) ); + data.SetPaperSize( wxSize() ); } } else @@ -223,7 +223,7 @@ bool wxWindowsPrintNativeData::TransferTo( wxPrintData &data ) // Shouldn't really get here wxFAIL_MSG(wxT("Paper database wasn't initialized in wxPrintData::ConvertFromNative.")); data.SetPaperId( wxPAPER_NONE ); - data.SetPaperSize( wxSize(0,0) ); + data.SetPaperSize( wxSize() ); } } else if ((devMode->dmFields & DM_PAPERWIDTH) && (devMode->dmFields & DM_PAPERLENGTH)) @@ -237,7 +237,7 @@ bool wxWindowsPrintNativeData::TransferTo( wxPrintData &data ) // Shouldn't really get here wxFAIL_MSG(wxT("Couldn't find paper size from DEVMODE.")); data.SetPaperId( wxPAPER_NONE ); - data.SetPaperSize( wxSize(0,0) ); + data.SetPaperSize( wxSize() ); } //// Duplex diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 53d205ed73..a916177248 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -2903,7 +2903,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) wxASSERT_MSG( !m_dragImage, _T("starting to drag once again?") ); m_dragImage = new wxDragImage(*this, event.m_item); - m_dragImage->BeginDrag(wxPoint(0, 0), this); + m_dragImage->BeginDrag(wxPoint(), this); m_dragImage->Show(); } break; diff --git a/src/msw/window.cpp b/src/msw/window.cpp index dc99d7cf4d..7d7bdf9bdd 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -306,9 +306,9 @@ wxBEGIN_PROPERTIES_TABLE(wxWindow) wxPROPERTY( Shown , bool , Show , IsShown , wxxVariant((bool)true) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) #if 0 // possible property candidates (not in xrc) or not valid in all subclasses - wxPROPERTY( Title,wxString, SetTitle, GetTitle, wxT("") ) + wxPROPERTY( Title,wxString, SetTitle, GetTitle, wxEmptyString ) wxPROPERTY( Font , wxFont , SetFont , GetWindowFont , ) - wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxT("") ) + wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString ) // MaxHeight, Width , MinHeight , Width // TODO switch label to control and title to toplevels @@ -2781,7 +2781,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), #ifdef __WXWINCE__ - wxPoint(0, 0) + wxPoint() #else wxPoint(info->MousePos.x, info->MousePos.y) #endif diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 1a544c825e..a5fefdfa0e 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -328,7 +328,7 @@ void wxComboControl::DoMoveWindow(int x, int y, int width, int height) wxSize sizeBtn = m_btn->GetBestSize(); wxCoord wText = width - sizeBtn.x; - wxPoint p = GetParent() ? GetParent()->GetClientAreaOrigin() : wxPoint(0,0); + wxPoint p = GetParent() ? GetParent()->GetClientAreaOrigin() : wxPoint(); m_text->SetSize(x - p.x, y - p.y, wText, height); m_btn->SetSize(x - p.x + wText, y - p.y, sizeBtn.x, height); } diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index 9b682f1b25..6fe24d28e9 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -2515,7 +2515,7 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y) // wxLogDebug( "Name of invoking window %s", menu->GetInvokingWindow()->GetName().c_str() ); - menu->Popup(ClientToScreen(wxPoint(x, y)), wxSize(0, 0)); + menu->Popup(ClientToScreen(wxPoint(x, y)), wxSize()); // this is not very useful if the menu was popped up because of the mouse // click but I think it is nice to do when it appears because of a key diff --git a/src/univ/notebook.cpp b/src/univ/notebook.cpp index f480c05b56..2b9e19f9ff 100644 --- a/src/univ/notebook.cpp +++ b/src/univ/notebook.cpp @@ -1253,7 +1253,7 @@ void wxNotebook::ScrollLastTo(int page) wxSize wxNotebook::DoGetBestClientSize() const { // calculate the max page size - wxSize size(0, 0); + wxSize size; size_t count = GetPageCount(); if ( count ) diff --git a/src/univ/radiobox.cpp b/src/univ/radiobox.cpp index 6637727315..9fadd8eb26 100644 --- a/src/univ/radiobox.cpp +++ b/src/univ/radiobox.cpp @@ -445,7 +445,7 @@ void wxRadioBox::DoMoveWindow(int x0, int y0, int width, int height) wxSize sizeBtn = GetMaxButtonSize(); wxPoint ptOrigin = GetBoxAreaOrigin(); - wxPoint clientOrigin = GetParent() ? GetParent()->GetClientAreaOrigin() : wxPoint(0,0); + wxPoint clientOrigin = GetParent() ? GetParent()->GetClientAreaOrigin() : wxPoint(); x0 += ptOrigin.x + BOX_BORDER_X - clientOrigin.x; y0 += ptOrigin.y + BOX_BORDER_Y - clientOrigin.y; diff --git a/src/univ/themes/gtk.cpp b/src/univ/themes/gtk.cpp index ecfebabec1..02019feee6 100644 --- a/src/univ/themes/gtk.cpp +++ b/src/univ/themes/gtk.cpp @@ -449,7 +449,7 @@ protected: const wxString& label, int flags, int indexAccel, - const wxString& accel = _T(""), + const wxString& accel = wxEmptyString, const wxBitmap& bitmap = wxNullBitmap, const wxGTKMenuGeometryInfo *geometryInfo = NULL); @@ -1334,7 +1334,7 @@ void wxGTKRenderer::DrawCheckItem(wxDC& dc, rectBitmap.width = GetCheckBitmapSize().x; // never draw the focus rect around the check indicators here - DrawCheckButton(dc, _T(""), bitmap, rectBitmap, flags & ~wxCONTROL_FOCUSED); + DrawCheckButton(dc, wxEmptyString, bitmap, rectBitmap, flags & ~wxCONTROL_FOCUSED); wxRect rectLabel = rect; wxCoord shift = rectBitmap.width + 2*GetCheckItemMargin(); @@ -2326,7 +2326,7 @@ wxMenuGeometryInfo *wxGTKRenderer::GetMenuGeometry(wxWindow *win, wxSize wxGTKRenderer::GetStatusBarBorders(wxCoord * WXUNUSED(borderBetweenFields)) const { - return wxSize(0, 0); + return wxSize(); } void wxGTKRenderer::DrawStatusField(wxDC& WXUNUSED(dc), @@ -2913,7 +2913,7 @@ wxGTKRenderer::GetFrameTotalSize(const wxSize& clientSize, wxSize wxGTKRenderer::GetFrameMinSize(int WXUNUSED(flags)) const { - return wxSize(0,0); + return wxSize(); } wxSize wxGTKRenderer::GetFrameIconSize() const diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index f3ff3b79e5..0984602d12 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -3932,7 +3932,7 @@ wxSize wxWin32Renderer::GetFrameTotalSize(const wxSize& clientSize, wxSize wxWin32Renderer::GetFrameMinSize(int flags) const { - wxSize s(0, 0); + wxSize s; if ( (flags & wxTOPLEVEL_BORDER) && !(flags & wxTOPLEVEL_MAXIMIZED) ) { diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 6d57da70e0..4e38559a5d 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -1112,12 +1112,12 @@ wxRect wxWindow::ScrollNoRefresh(int dx, int dy, const wxRect *rectTotal) wxMemoryDC dcMem; dcMem.SelectObject(bmp); - dcMem.Blit(wxPoint(0, 0), size, &dc, ptSource + dcMem.Blit(wxPoint(), size, &dc, ptSource #if defined(__WXGTK__) && !defined(wxHAS_WORKING_GTK_DC_BLIT) + GetClientAreaOrigin() #endif // broken wxGTK wxDC::Blit ); - dc.Blit(ptDest, size, &dcMem, wxPoint(0, 0)); + dc.Blit(ptDest, size, &dcMem, wxPoint()); wxLogTrace(_T("scroll"), _T("Blit: (%d, %d) of size %dx%d -> (%d, %d)"), -- 2.45.2