]> git.saurik.com Git - wxWidgets.git/blob - docs/doxygen/overviews/splitterwindow.h
More doxygen topic overview cleanup.
[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 The following screenshot shows the appearance of a splitter window with a
16 horizontal split.
17
18 The style wxSP_3D has been used to show a 3D border and 3D sash.
19
20 @image html splitter.bmp
21
22
23 @section overview_splitterwindow_example Example
24
25 The following fragment shows how to create a splitter window, creating two
26 subwindows and hiding one of them.
27
28 @code
29 splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0),
30 wxSize(400, 400), wxSP_3D);
31
32 leftWindow = new MyWindow(splitter);
33 leftWindow->SetScrollbars(20, 20, 50, 50);
34
35 rightWindow = new MyWindow(splitter);
36 rightWindow->SetScrollbars(20, 20, 50, 50);
37 rightWindow->Show(false);
38
39 splitter->Initialize(leftWindow);
40
41 // Set this to prevent unsplitting
42 // splitter->SetMinimumPaneSize(20);
43 @endcode
44
45 The next fragment shows how the splitter window can be manipulated after
46 creation.
47
48 @code
49 void MyFrame::OnSplitVertical(wxCommandEvent& event)
50 {
51 if ( splitter->IsSplit() )
52 splitter->Unsplit();
53 leftWindow->Show(true);
54 rightWindow->Show(true);
55 splitter->SplitVertically( leftWindow, rightWindow );
56 }
57
58 void MyFrame::OnSplitHorizontal(wxCommandEvent& event)
59 {
60 if ( splitter->IsSplit() )
61 splitter->Unsplit();
62 leftWindow->Show(true);
63 rightWindow->Show(true);
64 splitter->SplitHorizontally( leftWindow, rightWindow );
65 }
66
67 void MyFrame::OnUnsplit(wxCommandEvent& event)
68 {
69 if ( splitter->IsSplit() )
70 splitter->Unsplit();
71 }
72 @endcode
73
74 */
75