]> git.saurik.com Git - wxWidgets.git/blob - docs/doxygen/overviews/splitterwindow.h
adding a new topic overview about writing custom widgets; currently there's no offici...
[wxWidgets.git] / docs / doxygen / overviews / splitterwindow.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: splitterwindow.h
3 // Purpose: topic overview
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10
11 @page overview_splitterwindow wxSplitterWindow Overview
12
13 Classes: wxSplitterWindow
14
15 @li @ref overview_splitterwindow_appearance
16 @li @ref overview_splitterwindow_example
17
18 <hr>
19
20
21 @section overview_splitterwindow_appearance Appearance
22
23 The following screenshot shows the appearance of a splitter window with a
24 horizontal split.
25
26 The style wxSP_3D has been used to show a 3D border and 3D sash.
27
28 @image html overview_splitter_3d.png
29
30
31 @section overview_splitterwindow_example Example
32
33 The following fragment shows how to create a splitter window, creating two
34 subwindows and hiding one of them.
35
36 @code
37 splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0),
38 wxSize(400, 400), wxSP_3D);
39
40 leftWindow = new MyWindow(splitter);
41 leftWindow->SetScrollbars(20, 20, 50, 50);
42
43 rightWindow = new MyWindow(splitter);
44 rightWindow->SetScrollbars(20, 20, 50, 50);
45 rightWindow->Show(false);
46
47 splitter->Initialize(leftWindow);
48
49 // Set this to prevent unsplitting
50 // splitter->SetMinimumPaneSize(20);
51 @endcode
52
53 The next fragment shows how the splitter window can be manipulated after
54 creation.
55
56 @code
57 void MyFrame::OnSplitVertical(wxCommandEvent& event)
58 {
59 if ( splitter->IsSplit() )
60 splitter->Unsplit();
61 leftWindow->Show(true);
62 rightWindow->Show(true);
63 splitter->SplitVertically( leftWindow, rightWindow );
64 }
65
66 void MyFrame::OnSplitHorizontal(wxCommandEvent& event)
67 {
68 if ( splitter->IsSplit() )
69 splitter->Unsplit();
70 leftWindow->Show(true);
71 rightWindow->Show(true);
72 splitter->SplitHorizontally( leftWindow, rightWindow );
73 }
74
75 void MyFrame::OnUnsplit(wxCommandEvent& event)
76 {
77 if ( splitter->IsSplit() )
78 splitter->Unsplit();
79 }
80 @endcode
81
82 */
83