]> git.saurik.com Git - wxWidgets.git/blob - src/generic/splitter.cpp
c52c7e75862de163505530cc8be3e05cf0740572
[wxWidgets.git] / src / generic / splitter.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: splitter.cpp
3 // Purpose: wxSplitterWindow implementation
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "splitter.h"
14 #endif
15
16 // For compilers that support precompilation, includes "wx.h".
17 #include "wx/wxprec.h"
18
19 #ifdef __BORLANDC__
20 #pragma hdrstop
21 #endif
22
23 #ifndef WX_PRECOMP
24 #include "wx/wx.h"
25 #endif
26
27 #include <math.h>
28 #include <stdlib.h>
29
30 #include "wx/string.h"
31 #include "wx/splitter.h"
32 #include "wx/dcscreen.h"
33
34 #if !USE_SHARED_LIBRARY
35 IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindow, wxWindow)
36
37 BEGIN_EVENT_TABLE(wxSplitterWindow, wxWindow)
38 EVT_PAINT(wxSplitterWindow::OnPaint)
39 EVT_SIZE(wxSplitterWindow::OnSize)
40 EVT_MOUSE_EVENTS(wxSplitterWindow::OnMouseEvent)
41 END_EVENT_TABLE()
42 #endif
43
44 wxSplitterWindow::wxSplitterWindow()
45 {
46 m_splitMode = wxSPLIT_VERTICAL;
47 m_windowOne = (wxWindow *) NULL;
48 m_windowTwo = (wxWindow *) NULL;
49 m_dragMode = wxSPLIT_DRAG_NONE;
50 m_oldX = 0;
51 m_oldY = 0;
52 m_firstX = 0;
53 m_firstY = 0;
54 m_sashSize = 7;
55 m_borderSize = 2;
56 m_sashPosition = 0;
57 m_sashCursorWE = (wxCursor *) NULL;
58 m_sashCursorNS = (wxCursor *) NULL;
59 m_sashTrackerPen = (wxPen *) NULL;
60 m_lightShadowPen = (wxPen *) NULL;
61 m_mediumShadowPen = (wxPen *) NULL;
62 m_darkShadowPen = (wxPen *) NULL;
63 m_faceBrush = (wxBrush *) NULL;
64 m_facePen = (wxPen *) NULL;
65 m_hilightPen = (wxPen *) NULL;
66 m_minimumPaneSize = 0;
67 }
68
69 wxSplitterWindow::wxSplitterWindow(wxWindow *parent, wxWindowID id,
70 const wxPoint& pos,
71 const wxSize& size,
72 long style,
73 const wxString& name)
74 : wxWindow(parent, id, pos, size, style, name)
75 {
76 m_splitMode = wxSPLIT_VERTICAL;
77 m_windowOne = (wxWindow *) NULL;
78 m_windowTwo = (wxWindow *) NULL;
79 m_dragMode = wxSPLIT_DRAG_NONE;
80 m_oldX = 0;
81 m_oldY = 0;
82 m_firstX = 0;
83 m_firstY = 0;
84 m_sashSize = 7;
85 m_borderSize = 2;
86 m_sashPosition = 0;
87 m_minimumPaneSize = 0;
88 m_sashCursorWE = new wxCursor(wxCURSOR_SIZEWE);
89 m_sashCursorNS = new wxCursor(wxCURSOR_SIZENS);
90 m_sashTrackerPen = new wxPen(*wxBLACK, 2, wxSOLID);
91 m_lightShadowPen = (wxPen *) NULL;
92 m_mediumShadowPen = (wxPen *) NULL;
93 m_darkShadowPen = (wxPen *) NULL;
94 m_faceBrush = (wxBrush *) NULL;
95 m_facePen = (wxPen *) NULL;
96 m_hilightPen = (wxPen *) NULL;
97
98 if ( style & wxSP_3D )
99 {
100 m_borderSize = 2;
101 m_sashSize = 7;
102 }
103 else if ( style & wxSP_BORDER )
104 {
105 m_borderSize = 1;
106 m_sashSize = 3;
107 }
108 else
109 {
110 m_borderSize = 0;
111 m_sashSize = 3;
112 }
113
114 // Eventually, we'll respond to colour change messages
115 InitColours();
116
117 // For debugging purposes, to see the background.
118 // SetBackground(wxBLUE_BRUSH);
119 }
120
121 wxSplitterWindow::~wxSplitterWindow()
122 {
123 delete m_sashCursorWE;
124 delete m_sashCursorNS;
125 delete m_sashTrackerPen;
126 delete m_lightShadowPen;
127 delete m_darkShadowPen;
128 delete m_mediumShadowPen;
129 delete m_hilightPen;
130 delete m_facePen;
131 delete m_faceBrush;
132 }
133
134 void wxSplitterWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
135 {
136 wxPaintDC dc(this);
137
138 if ( m_borderSize > 0 )
139 DrawBorders(dc);
140 DrawSash(dc);
141 }
142
143 void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
144 {
145 long x, y;
146 event.Position(&x, &y);
147
148 // reset the cursor
149 #ifdef __WXMOTIF__
150 SetCursor(* wxSTANDARD_CURSOR);
151 #endif
152 #ifdef __WXMSW__
153 SetCursor(wxCursor());
154 #endif
155
156 if (event.LeftDown())
157 {
158 if ( SashHitTest(x, y) )
159 {
160 CaptureMouse();
161
162 m_dragMode = wxSPLIT_DRAG_DRAGGING;
163
164 DrawSashTracker(x, y);
165 m_oldX = x;
166 m_oldY = y;
167 return;
168 }
169 }
170 else if (event.LeftUp() && m_dragMode == wxSPLIT_DRAG_DRAGGING)
171 {
172 // We can stop dragging now and see what we've got.
173 m_dragMode = wxSPLIT_DRAG_NONE;
174 ReleaseMouse();
175
176 #ifdef __WXGTK__
177 SetCursor(* wxSTANDARD_CURSOR);
178 #endif
179 // Erase old tracker
180 DrawSashTracker(m_oldX, m_oldY);
181
182 int w, h;
183 GetClientSize(&w, &h);
184 if ( m_splitMode == wxSPLIT_VERTICAL )
185 {
186 if ( !OnSashPositionChange(x) )
187 return;
188
189 if ( x <= 4 )
190 {
191 // We remove the first window from the view
192 wxWindow *removedWindow = m_windowOne;
193 m_windowOne = m_windowTwo;
194 m_windowTwo = (wxWindow *) NULL;
195
196 OnUnsplit(removedWindow);
197 m_sashPosition = 0;
198 }
199 else if ( x >= (w - 4) )
200 {
201 // We remove the second window from the view
202 wxWindow *removedWindow = m_windowTwo;
203 m_windowTwo = (wxWindow *) NULL;
204 OnUnsplit(removedWindow);
205 m_sashPosition = 0;
206 }
207 else
208 {
209 m_sashPosition = x;
210 }
211 }
212 else // m_splitMode == wxSPLIT_VERTICAL
213 {
214 if ( !OnSashPositionChange(y) )
215 return;
216
217 if ( y <= 4 )
218 {
219 // We remove the first window from the view
220 wxWindow *removedWindow = m_windowOne;
221 m_windowOne = m_windowTwo;
222 m_windowTwo = (wxWindow *) NULL;
223
224 OnUnsplit(removedWindow);
225 m_sashPosition = 0;
226 }
227 else if ( y >= (h - 4) )
228 {
229 // We remove the second window from the view
230 wxWindow *removedWindow = m_windowTwo;
231 m_windowTwo = (wxWindow *) NULL;
232 OnUnsplit(removedWindow);
233 m_sashPosition = 0;
234 }
235 else
236 {
237 m_sashPosition = y;
238 }
239 } // m_splitMode == wxSPLIT_VERTICAL
240 SizeWindows();
241 } // left up && dragging
242 else if (event.Moving() && !event.Dragging())
243 {
244 // Just change the cursor if required
245 if ( SashHitTest(x, y) )
246 {
247 if ( m_splitMode == wxSPLIT_VERTICAL )
248 {
249 SetCursor(*m_sashCursorWE);
250 }
251 else
252 {
253 SetCursor(*m_sashCursorNS);
254 }
255 }
256 }
257 else if (event.Dragging() && (m_dragMode == wxSPLIT_DRAG_DRAGGING))
258 {
259 // Erase old tracker
260 DrawSashTracker(m_oldX, m_oldY);
261
262 // Draw new one
263 DrawSashTracker(x, y);
264
265 m_oldX = x;
266 m_oldY = y;
267 }
268 else if ( event.LeftDClick() )
269 {
270 OnDoubleClickSash(x, y);
271 }
272 }
273
274 void wxSplitterWindow::OnSize(wxSizeEvent& WXUNUSED(event))
275 {
276 int cw, ch;
277 GetClientSize( &cw, &ch );
278 if ( m_windowTwo )
279 {
280 if ( m_splitMode == wxSPLIT_VERTICAL )
281 {
282 if ( m_sashPosition >= (cw - 5) )
283 m_sashPosition = wxMax(10, cw - 40);
284 }
285 if ( m_splitMode == wxSPLIT_HORIZONTAL )
286 {
287 if ( m_sashPosition >= (ch - 5) )
288 m_sashPosition = wxMax(10, ch - 40);
289 }
290 }
291 SizeWindows();
292 }
293
294 bool wxSplitterWindow::SashHitTest(int x, int y, int tolerance)
295 {
296 if ( m_windowTwo == NULL || m_sashPosition == 0)
297 return FALSE; // No sash
298
299 if ( m_splitMode == wxSPLIT_VERTICAL )
300 {
301 if ( (x >= m_sashPosition - tolerance) && (x <= m_sashPosition + m_sashSize + tolerance) )
302 return TRUE;
303 else
304 return FALSE;
305 }
306 else
307 {
308 if ( (y >= (m_sashPosition- tolerance)) && (y <= (m_sashPosition + m_sashSize + tolerance)) )
309 return TRUE;
310 else
311 return FALSE;
312 }
313
314 return FALSE;
315 }
316
317 // Draw 3D effect borders
318 void wxSplitterWindow::DrawBorders(wxDC& dc)
319 {
320 int w, h;
321 GetClientSize(&w, &h);
322
323 if ( GetWindowStyleFlag() & wxSP_3D )
324 {
325 dc.SetPen(*m_mediumShadowPen);
326 dc.DrawLine(0, 0, w-1, 0);
327 dc.DrawLine(0, 0, 0, h - 1);
328
329 dc.SetPen(*m_darkShadowPen);
330 dc.DrawLine(1, 1, w-2, 1);
331 dc.DrawLine(1, 1, 1, h-2);
332
333 dc.SetPen(*m_hilightPen);
334 dc.DrawLine(0, h-1, w-1, h-1);
335 dc.DrawLine(w-1, 0, w-1, h); // Surely the maximum y pos. should be h - 1.
336 /// Anyway, h is required for MSW.
337
338 dc.SetPen(*m_lightShadowPen);
339 dc.DrawLine(w-2, 1, w-2, h-2); // Right hand side
340 dc.DrawLine(1, h-2, w-1, h-2); // Bottom
341 }
342 else if ( GetWindowStyleFlag() & wxSP_BORDER )
343 {
344 dc.SetBrush(*wxTRANSPARENT_BRUSH);
345 dc.SetPen(*wxBLACK_PEN);
346 dc.DrawRectangle(0, 0, w-1, h-1);
347 }
348
349 dc.SetPen(wxNullPen);
350 dc.SetBrush(wxNullBrush);
351 }
352
353 // Draw the sash
354 void wxSplitterWindow::DrawSash(wxDC& dc)
355 {
356 if ( m_sashPosition == 0 || !m_windowTwo)
357 return;
358
359 int w, h;
360 GetClientSize(&w, &h);
361
362 if ( GetWindowStyleFlag() & wxSP_3D )
363 {
364 if ( m_splitMode == wxSPLIT_VERTICAL )
365 {
366 dc.SetPen(*m_facePen);
367 dc.SetBrush(*m_faceBrush);
368 dc.DrawRectangle(m_sashPosition + 2, 0, m_sashSize - 4, h);
369
370 dc.SetBrush(*wxTRANSPARENT_BRUSH);
371
372 dc.SetPen(*m_lightShadowPen);
373 dc.DrawLine(m_sashPosition, 1, m_sashPosition, h-2);
374
375 dc.SetPen(*m_hilightPen);
376 dc.DrawLine(m_sashPosition+1, 0, m_sashPosition+1, h);
377
378 dc.SetPen(*m_mediumShadowPen);
379 dc.DrawLine(m_sashPosition+m_sashSize-2, 1, m_sashPosition+m_sashSize-2, h-1);
380
381 dc.SetPen(*m_darkShadowPen);
382 dc.DrawLine(m_sashPosition+m_sashSize-1, 2, m_sashPosition+m_sashSize-1, h-2);
383 }
384 else
385 {
386 dc.SetPen(*m_facePen);
387 dc.SetBrush(*m_faceBrush);
388 dc.DrawRectangle(0, m_sashPosition + 2, w, m_sashSize - 4);
389
390 dc.SetBrush(*wxTRANSPARENT_BRUSH);
391
392 dc.SetPen(*m_lightShadowPen);
393 dc.DrawLine(1, m_sashPosition, w-2, m_sashPosition);
394
395 dc.SetPen(*m_hilightPen);
396 dc.DrawLine(0, m_sashPosition+1, w, m_sashPosition+1);
397
398 dc.SetPen(*m_mediumShadowPen);
399 dc.DrawLine(1, m_sashPosition+m_sashSize-2, w-1, m_sashPosition+m_sashSize-2);
400
401 dc.SetPen(*m_darkShadowPen);
402 dc.DrawLine(2, m_sashPosition+m_sashSize-1, w-2, m_sashPosition+m_sashSize-1);
403 }
404 }
405 else
406 {
407 if ( m_splitMode == wxSPLIT_VERTICAL )
408 {
409 dc.SetPen(*wxBLACK_PEN);
410 dc.SetBrush(*wxBLACK_BRUSH);
411 int h1 = h-1;
412 if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER )
413 h1 += 1; // Not sure why this is necessary...
414 dc.DrawRectangle(m_sashPosition, 0, m_sashSize, h1);
415 }
416 else
417 {
418 dc.SetPen(*wxBLACK_PEN);
419 dc.SetBrush(*wxBLACK_BRUSH);
420 int w1 = w-1;
421 if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER )
422 w1 ++;
423
424 dc.DrawRectangle(0, m_sashPosition, w1, m_sashSize);
425 }
426
427 }
428
429 dc.SetPen(wxNullPen);
430 dc.SetBrush(wxNullBrush);
431 }
432
433 // Draw the sash tracker (for whilst moving the sash)
434 void wxSplitterWindow::DrawSashTracker(int x, int y)
435 {
436 int w, h;
437 GetClientSize(&w, &h);
438
439 wxScreenDC screenDC;
440 int x1, y1;
441 int x2, y2;
442
443 if ( m_splitMode == wxSPLIT_VERTICAL )
444 {
445 x1 = x; y1 = 2;
446 x2 = x; y2 = h-2;
447
448 if ( x1 > w )
449 {
450 x1 = w; x2 = w;
451 }
452 else if ( x1 < 0 )
453 {
454 x1 = 0; x2 = 0;
455 }
456 }
457 else
458 {
459 x1 = 2; y1 = y;
460 x2 = w-2; y2 = y;
461
462 if ( y1 > h )
463 {
464 y1 = h;
465 y2 = h;
466 }
467 else if ( y1 < 0 )
468 {
469 y1 = 0;
470 y2 = 0;
471 }
472 }
473
474 ClientToScreen(&x1, &y1);
475 ClientToScreen(&x2, &y2);
476
477 screenDC.SetLogicalFunction(wxXOR);
478 screenDC.SetPen(*m_sashTrackerPen);
479 screenDC.SetBrush(*wxTRANSPARENT_BRUSH);
480
481 screenDC.DrawLine(x1, y1, x2, y2);
482
483 screenDC.SetLogicalFunction(wxCOPY);
484
485 screenDC.SetPen(wxNullPen);
486 screenDC.SetBrush(wxNullBrush);
487 }
488
489 // Position and size subwindows.
490 // Note that the border size applies to each subwindow, not
491 // including the edges next to the sash.
492 void wxSplitterWindow::SizeWindows()
493 {
494 int w, h;
495 GetClientSize(&w, &h);
496
497 if ( m_windowOne && !m_windowTwo )
498 {
499 m_windowOne->SetSize(m_borderSize, m_borderSize, w - 2*m_borderSize, h - 2*m_borderSize);
500 }
501 else if ( m_windowOne && m_windowTwo )
502 {
503 if (m_splitMode == wxSPLIT_VERTICAL)
504 {
505 int x1 = m_borderSize;
506 int y1 = m_borderSize;
507 int w1 = m_sashPosition - m_borderSize;
508 int h1 = h - 2*m_borderSize;
509
510 int x2 = m_sashPosition + m_sashSize;
511 int y2 = m_borderSize;
512 int w2 = w - 2*m_borderSize - m_sashSize - w1;
513 int h2 = h - 2*m_borderSize;
514
515 m_windowOne->SetSize(x1, y1, w1, h1);
516 m_windowTwo->SetSize(x2, y2, w2, h2);
517 }
518 else
519 {
520 m_windowOne->SetSize(m_borderSize, m_borderSize,
521 w - 2*m_borderSize, m_sashPosition - m_borderSize);
522 m_windowTwo->SetSize(m_borderSize, m_sashPosition + m_sashSize,
523 w - 2*m_borderSize, h - 2*m_borderSize - m_sashSize - (m_sashPosition - m_borderSize));
524 }
525 }
526 wxClientDC dc(this);
527 DrawBorders(dc);
528 DrawSash(dc);
529 }
530
531 // Set pane for unsplit window
532 void wxSplitterWindow::Initialize(wxWindow *window)
533 {
534 m_windowOne = window;
535 m_windowTwo = (wxWindow *) NULL;
536 m_sashPosition = 0;
537 }
538
539 // Associates the given window with window 2, drawing the appropriate sash
540 // and changing the split mode.
541 // Does nothing and returns FALSE if the window is already split.
542 bool wxSplitterWindow::SplitVertically(wxWindow *window1, wxWindow *window2, int sashPosition)
543 {
544 if ( IsSplit() )
545 return FALSE;
546
547 int w, h;
548 GetClientSize(&w, &h);
549
550 m_splitMode = wxSPLIT_VERTICAL;
551 m_windowOne = window1;
552 m_windowTwo = window2;
553 if ( sashPosition > 0 )
554 m_sashPosition = sashPosition;
555 else if ( sashPosition < 0 )
556 m_sashPosition = w - sashPosition;
557 else // default
558 m_sashPosition = w/2;
559
560 SizeWindows();
561
562 return TRUE;
563 }
564
565 bool wxSplitterWindow::SplitHorizontally(wxWindow *window1, wxWindow *window2, int sashPosition)
566 {
567 if ( IsSplit() )
568 return FALSE;
569
570 int w, h;
571 GetClientSize(&w, &h);
572
573 m_splitMode = wxSPLIT_HORIZONTAL;
574 m_windowOne = window1;
575 m_windowTwo = window2;
576 if ( sashPosition > 0 )
577 m_sashPosition = sashPosition;
578 else if ( sashPosition < 0 )
579 m_sashPosition = h - sashPosition;
580 else // default
581 m_sashPosition = h/2;
582
583 SizeWindows();
584
585 return TRUE;
586 }
587
588
589 // Remove the specified (or second) window from the view
590 // Doesn't actually delete the window.
591 bool wxSplitterWindow::Unsplit(wxWindow *toRemove)
592 {
593 if ( ! IsSplit() )
594 return FALSE;
595
596 wxWindow *win = NULL;
597 if ( toRemove == NULL || toRemove == m_windowTwo)
598 {
599 win = m_windowTwo ;
600 m_windowTwo = (wxWindow *) NULL;
601 }
602 else if ( toRemove == m_windowOne )
603 {
604 win = m_windowOne ;
605 m_windowOne = m_windowTwo;
606 m_windowTwo = (wxWindow *) NULL;
607 }
608 else
609 {
610 wxFAIL_MSG(_T("splitter: attempt to remove a non-existent window"));
611
612 return FALSE;
613 }
614
615 OnUnsplit(win);
616 m_sashPosition = 0;
617 SizeWindows();
618
619 return TRUE;
620 }
621
622 // Replace a window with another one
623 bool wxSplitterWindow::ReplaceWindow(wxWindow *winOld, wxWindow *winNew)
624 {
625 wxCHECK_MSG( winOld, FALSE, _T("use one of Split() functions instead") );
626 wxCHECK_MSG( winNew, FALSE, _T("use Unsplit() functions instead") );
627
628 if ( winOld == m_windowTwo )
629 {
630 m_windowTwo = winNew;
631 }
632 else if ( winOld == m_windowOne )
633 {
634 m_windowOne = winNew;
635 }
636 else
637 {
638 wxFAIL_MSG(_T("splitter: attempt to replace a non-existent window"));
639
640 return FALSE;
641 }
642
643 SizeWindows();
644
645 return TRUE;
646 }
647
648 void wxSplitterWindow::SetSashPosition(int position, bool redraw)
649 {
650 m_sashPosition = position;
651
652 if ( redraw )
653 {
654 SizeWindows();
655 }
656 }
657
658 bool wxSplitterWindow::OnSashPositionChange(int newSashPosition)
659 {
660 // is the left/upper pane too small?
661 if ( newSashPosition < m_minimumPaneSize )
662 return NULL;
663
664 // is the right/lower pane too small?
665 int w, h;
666 GetClientSize(&w, &h);
667
668 if ( m_splitMode == wxSPLIT_VERTICAL )
669 {
670 if ( w - newSashPosition < m_minimumPaneSize )
671 return FALSE;
672 }
673 else // m_splitMode = wxSPLIT_HORIZONTAL
674 {
675 if ( h - newSashPosition < m_minimumPaneSize )
676 return FALSE;
677 }
678
679 // it's ok to move sash
680 return TRUE;
681 }
682
683 // Called when the sash is double-clicked.
684 // The default behaviour is to remove the sash if the
685 // minimum pane size is zero.
686 void wxSplitterWindow::OnDoubleClickSash(int WXUNUSED(x), int WXUNUSED(y) )
687 {
688 if ( GetMinimumPaneSize() == 0 )
689 {
690 Unsplit();
691 }
692 }
693
694 // Initialize colours
695 void wxSplitterWindow::InitColours()
696 {
697 wxDELETE( m_facePen );
698 wxDELETE( m_faceBrush );
699 wxDELETE( m_mediumShadowPen );
700 wxDELETE( m_darkShadowPen );
701 wxDELETE( m_lightShadowPen );
702 wxDELETE( m_hilightPen );
703
704 // Shadow colours
705 #if defined(__WIN95__)
706 wxColour faceColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
707 m_facePen = new wxPen(faceColour, 1, wxSOLID);
708 m_faceBrush = new wxBrush(faceColour, wxSOLID);
709
710 wxColour mediumShadowColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DSHADOW));
711 m_mediumShadowPen = new wxPen(mediumShadowColour, 1, wxSOLID);
712
713 wxColour darkShadowColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DDKSHADOW));
714 m_darkShadowPen = new wxPen(darkShadowColour, 1, wxSOLID);
715
716 wxColour lightShadowColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DLIGHT));
717 m_lightShadowPen = new wxPen(lightShadowColour, 1, wxSOLID);
718
719 wxColour hilightColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHILIGHT));
720 m_hilightPen = new wxPen(hilightColour, 1, wxSOLID);
721 #else // !Win32
722 m_facePen = new wxPen("LIGHT GREY", 1, wxSOLID);
723 m_faceBrush = new wxBrush("LIGHT GREY", wxSOLID);
724 m_mediumShadowPen = new wxPen("GREY", 1, wxSOLID);
725 m_darkShadowPen = new wxPen("BLACK", 1, wxSOLID);
726 m_lightShadowPen = new wxPen("LIGHT GREY", 1, wxSOLID);
727 m_hilightPen = new wxPen("WHITE", 1, wxSOLID);
728 #endif // Win32/!Win32
729 }
730