]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/doxygen/overviews/splitterwindow.h
allow handling events in a function taking the base class of the event class correspo...
[wxWidgets.git] / docs / doxygen / overviews / splitterwindow.h
... / ...
CommitLineData
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
13Classes: 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
23The following screenshot shows the appearance of a splitter window with a
24horizontal split.
25
26The 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
33The following fragment shows how to create a splitter window, creating two
34subwindows and hiding one of them.
35
36@code
37splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0),
38 wxSize(400, 400), wxSP_3D);
39
40leftWindow = new MyWindow(splitter);
41leftWindow->SetScrollbars(20, 20, 50, 50);
42
43rightWindow = new MyWindow(splitter);
44rightWindow->SetScrollbars(20, 20, 50, 50);
45rightWindow->Show(false);
46
47splitter->Initialize(leftWindow);
48
49// Set this to prevent unsplitting
50// splitter->SetMinimumPaneSize(20);
51@endcode
52
53The next fragment shows how the splitter window can be manipulated after
54creation.
55
56@code
57void 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
66void 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
75void MyFrame::OnUnsplit(wxCommandEvent& event)
76{
77 if ( splitter->IsSplit() )
78 splitter->Unsplit();
79}
80@endcode
81
82*/
83