X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/debe6624c1e9d4bf3243381153d1e173c849bcd8..e79848acfe012f03286bc8bc4de1a7694ee6c516:/src/generic/splitter.cpp diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index c5daa74ee8..764f9c4b6c 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -45,8 +45,8 @@ END_EVENT_TABLE() wxSplitterWindow::wxSplitterWindow(void) { m_splitMode = wxSPLIT_VERTICAL; - m_windowOne = NULL; - m_windowTwo = NULL; + m_windowOne = (wxWindow *) NULL; + m_windowTwo = (wxWindow *) NULL; m_dragMode = wxSPLIT_DRAG_NONE; m_oldX = 0; m_oldY = 0; @@ -55,15 +55,15 @@ wxSplitterWindow::wxSplitterWindow(void) m_sashSize = 7; m_borderSize = 2; m_sashPosition = 0; - m_sashCursorWE = NULL; - m_sashCursorNS = NULL; - m_sashTrackerPen = NULL; - m_lightShadowPen = NULL; - m_mediumShadowPen = NULL; - m_darkShadowPen = NULL; - m_faceBrush = NULL; - m_facePen = NULL; - m_hilightPen = NULL; + m_sashCursorWE = (wxCursor *) NULL; + m_sashCursorNS = (wxCursor *) NULL; + m_sashTrackerPen = (wxPen *) NULL; + m_lightShadowPen = (wxPen *) NULL; + m_mediumShadowPen = (wxPen *) NULL; + m_darkShadowPen = (wxPen *) NULL; + m_faceBrush = (wxBrush *) NULL; + m_facePen = (wxPen *) NULL; + m_hilightPen = (wxPen *) NULL; m_minimumPaneSize = 0; } @@ -72,8 +72,8 @@ wxSplitterWindow::wxSplitterWindow(wxWindow *parent, wxWindowID id, const wxPoin :wxWindow(parent, id, pos, size, style, name) { m_splitMode = wxSPLIT_VERTICAL; - m_windowOne = NULL; - m_windowTwo = NULL; + m_windowOne = (wxWindow *) NULL; + m_windowTwo = (wxWindow *) NULL; m_dragMode = wxSPLIT_DRAG_NONE; m_oldX = 0; m_oldY = 0; @@ -86,12 +86,12 @@ wxSplitterWindow::wxSplitterWindow(wxWindow *parent, wxWindowID id, const wxPoin m_sashCursorWE = new wxCursor(wxCURSOR_SIZEWE); m_sashCursorNS = new wxCursor(wxCURSOR_SIZENS); m_sashTrackerPen = new wxPen(*wxBLACK, 2, wxSOLID); - m_lightShadowPen = NULL; - m_mediumShadowPen = NULL; - m_darkShadowPen = NULL; - m_faceBrush = NULL; - m_facePen = NULL; - m_hilightPen = NULL; + m_lightShadowPen = (wxPen *) NULL; + m_mediumShadowPen = (wxPen *) NULL; + m_darkShadowPen = (wxPen *) NULL; + m_faceBrush = (wxBrush *) NULL; + m_facePen = (wxPen *) NULL; + m_hilightPen = (wxPen *) NULL; if ( style & wxSP_3D ) { @@ -112,8 +112,6 @@ wxSplitterWindow::wxSplitterWindow(wxWindow *parent, wxWindowID id, const wxPoin // Eventually, we'll respond to colour change messages InitColours(); - SetDoubleClick(TRUE); - // For debugging purposes, to see the background. // SetBackground(wxBLUE_BRUSH); } @@ -173,7 +171,6 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) m_dragMode = wxSPLIT_DRAG_NONE; SetCursor(*wxSTANDARD_CURSOR); - wxSetCursor(*wxSTANDARD_CURSOR); } else if (event.LeftUp() && m_dragMode == wxSPLIT_DRAG_DRAGGING) { @@ -201,7 +198,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) // We remove the first window from the view wxWindow *removedWindow = m_windowOne; m_windowOne = m_windowTwo; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; OnUnsplit(removedWindow); m_sashPosition = 0; @@ -210,7 +207,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) { // We remove the second window from the view wxWindow *removedWindow = m_windowTwo; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; OnUnsplit(removedWindow); m_sashPosition = 0; } @@ -231,7 +228,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) // We remove the first window from the view wxWindow *removedWindow = m_windowOne; m_windowOne = m_windowTwo; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; OnUnsplit(removedWindow); m_sashPosition = 0; @@ -240,7 +237,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) { // We remove the second window from the view wxWindow *removedWindow = m_windowTwo; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; OnUnsplit(removedWindow); m_sashPosition = 0; } @@ -259,19 +256,15 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) if ( m_splitMode == wxSPLIT_VERTICAL ) { SetCursor(*m_sashCursorWE); - // Windows needs the following - wxSetCursor(*m_sashCursorWE); } else { SetCursor(*m_sashCursorNS); - wxSetCursor(*m_sashCursorNS); } } else { SetCursor(*wxSTANDARD_CURSOR); - wxSetCursor(*wxSTANDARD_CURSOR); } } else if ( (event.Dragging() && (m_dragMode == wxSPLIT_DRAG_DRAGGING)) || @@ -280,12 +273,10 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) if ( m_splitMode == wxSPLIT_VERTICAL ) { SetCursor(*m_sashCursorWE); - wxSetCursor(*m_sashCursorWE); } else { SetCursor(*m_sashCursorNS); - wxSetCursor(*m_sashCursorNS); } // Detect that this is really a drag: we've moved more than 1 pixel either way @@ -316,8 +307,6 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) } else { - SetCursor(*wxSTANDARD_CURSOR); - wxSetCursor(*wxSTANDARD_CURSOR); } } @@ -429,8 +418,8 @@ void wxSplitterWindow::DrawSash(wxDC& dc) dc.DrawLine(m_sashPosition+m_sashSize-2, 1, m_sashPosition+m_sashSize-2, h-1); dc.SetPen(*m_darkShadowPen); - dc.DrawLine(m_sashPosition+m_sashSize-1, 2, m_sashPosition+m_sashSize-1, h-2); - } + dc.DrawLine(m_sashPosition+m_sashSize-1, 2, m_sashPosition+m_sashSize-1, h-2); + } else { dc.SetPen(*m_facePen); @@ -584,7 +573,7 @@ void wxSplitterWindow::SizeWindows(void) void wxSplitterWindow::Initialize(wxWindow *window) { m_windowOne = window; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; m_sashPosition = 0; } @@ -638,7 +627,7 @@ bool wxSplitterWindow::Unsplit(wxWindow *toRemove) if ( toRemove == NULL || toRemove == m_windowTwo) { wxWindow *win = m_windowTwo ; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; m_sashPosition = 0; OnUnsplit(win); SizeWindows(); @@ -647,7 +636,7 @@ bool wxSplitterWindow::Unsplit(wxWindow *toRemove) { wxWindow *win = m_windowOne ; m_windowOne = m_windowTwo; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; m_sashPosition = 0; OnUnsplit(win); SizeWindows();