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;
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;
}
: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;
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 )
{
// Eventually, we'll respond to colour change messages
InitColours();
- SetDoubleClick(TRUE);
-
// For debugging purposes, to see the background.
// SetBackground(wxBLUE_BRUSH);
}
m_dragMode = wxSPLIT_DRAG_NONE;
SetCursor(*wxSTANDARD_CURSOR);
- wxSetCursor(*wxSTANDARD_CURSOR);
}
else if (event.LeftUp() && m_dragMode == wxSPLIT_DRAG_DRAGGING)
{
// 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;
{
// We remove the second window from the view
wxWindow *removedWindow = m_windowTwo;
- m_windowTwo = NULL;
+ m_windowTwo = (wxWindow *) NULL;
OnUnsplit(removedWindow);
m_sashPosition = 0;
}
// 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;
{
// We remove the second window from the view
wxWindow *removedWindow = m_windowTwo;
- m_windowTwo = NULL;
+ m_windowTwo = (wxWindow *) NULL;
OnUnsplit(removedWindow);
m_sashPosition = 0;
}
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)) ||
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
}
else
{
- SetCursor(*wxSTANDARD_CURSOR);
- wxSetCursor(*wxSTANDARD_CURSOR);
}
}
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);
void wxSplitterWindow::Initialize(wxWindow *window)
{
m_windowOne = window;
- m_windowTwo = NULL;
+ m_windowTwo = (wxWindow *) NULL;
m_sashPosition = 0;
}
if ( toRemove == NULL || toRemove == m_windowTwo)
{
wxWindow *win = m_windowTwo ;
- m_windowTwo = NULL;
+ m_windowTwo = (wxWindow *) NULL;
m_sashPosition = 0;
OnUnsplit(win);
SizeWindows();
{
wxWindow *win = m_windowOne ;
m_windowOne = m_windowTwo;
- m_windowTwo = NULL;
+ m_windowTwo = (wxWindow *) NULL;
m_sashPosition = 0;
OnUnsplit(win);
SizeWindows();