X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c7f8ebf848d9337376b3a00367c22dfffc9e380b..a685dd314cc5daeb1492a4a57f475df91d6cd126:/contrib/src/deprecated/tbarsmpl.cpp diff --git a/contrib/src/deprecated/tbarsmpl.cpp b/contrib/src/deprecated/tbarsmpl.cpp index b6040a8f25..d87379de75 100644 --- a/contrib/src/deprecated/tbarsmpl.cpp +++ b/contrib/src/deprecated/tbarsmpl.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "tbarsmpl.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -145,7 +141,7 @@ void wxToolBarSimple::Init() m_currentTool = -1; m_xPos = - m_yPos = -1; + m_yPos = wxDefaultCoord; m_toolPacking = 1; m_toolSeparation = 5; @@ -194,11 +190,11 @@ bool wxToolBarSimple::DoInsertTool(size_t WXUNUSED(pos), _T("generic wxToolBarSimple doesn't support controls") ); tool->m_x = m_xPos; - if ( tool->m_x == -1 ) + if ( tool->m_x == wxDefaultCoord ) tool->m_x = m_xMargin; tool->m_y = m_yPos; - if ( tool->m_y == -1 ) + if ( tool->m_y == wxDefaultCoord ) tool->m_y = m_yMargin; tool->SetSize(GetToolSize()); @@ -851,7 +847,7 @@ int wxToolBarSimple::CalcScrollInc(wxScrollEvent& event) else nScrollInc = pos - m_yScrollPosition; } - + if (orient == wxHORIZONTAL) { int w, h; @@ -968,15 +964,15 @@ void wxToolBarSimple::Scroll (int x_pos, int y_pos) { int old_x, old_y; ViewStart (&old_x, &old_y); - if (((x_pos == -1) || (x_pos == old_x)) && ((y_pos == -1) || (y_pos == old_y))) + if (((x_pos == wxDefaultCoord) || (x_pos == old_x)) && ((y_pos == wxDefaultCoord) || (y_pos == old_y))) return; - if (x_pos > -1) + if (x_pos != wxDefaultCoord) { m_xScrollPosition = x_pos; SetScrollPos (wxHORIZONTAL, x_pos, true); } - if (y_pos > -1) + if (y_pos != wxDefaultCoord) { m_yScrollPosition = y_pos; SetScrollPos (wxVERTICAL, y_pos, true);