]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/panel.tex
Use const
[wxWidgets.git] / docs / latex / wx / panel.tex
CommitLineData
a660d684
KB
1\section{\class{wxPanel}}\label{wxpanel}
2
3A panel is a window on which controls are placed. It is usually placed within a frame.
4It contains minimal extra functionality over and above its parent class wxWindow; its main
5purpose is to be similar in appearance and functionality to a dialog, but with the flexibility of
6having any window as a parent.
7
b23386b2
JS
8{\it Note:} if not all characters are being intercepted by your OnKeyDown or OnChar handler,
9it may be because you are using the wxTAB\_TRAVERSAL style, which grabs some keypresses for use
10by child controls.
11
a660d684
KB
12\wxheading{Derived from}
13
14\helpref{wxWindow}{wxwindow}\\
15\helpref{wxEvtHandler}{wxevthandler}\\
16\helpref{wxObject}{wxobject}
17
954b8ae6
JS
18\wxheading{Include files}
19
20<wx/panel.h>
21
a660d684
KB
22\wxheading{Window styles}
23
24There are no specific styles for this window.
25
26See also \helpref{window styles overview}{windowstyles}.
27
28\wxheading{Remarks}
29
30By default, a panel has the same colouring as a dialog.
31
a660d684
KB
32\wxheading{See also}
33
34\helpref{wxDialog}{wxdialog}
35
36\latexignore{\rtfignore{\wxheading{Members}}}
37
dcbd177f 38\membersection{wxPanel::wxPanel}\label{wxpanelctor}
a660d684
KB
39
40\func{}{wxPanel}{\void}
41
42Default constructor.
43
b9eb3d9d 44\func{}{wxPanel}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = \texttt{wxID\_ANY}},\rtfsp
a660d684
KB
45\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
46\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
eaaa6a06 47\param{long}{ style = wxTAB\_TRAVERSAL},\rtfsp
a660d684
KB
48\param{const wxString\& }{name = ``panel"}}
49
50Constructor.
51
52\wxheading{Parameters}
53
54\docparam{parent}{The parent window.}
55
56\docparam{id}{An identifier for the panel. A value of -1 is taken to mean a default.}
57
58\docparam{pos}{The panel position. A value of (-1, -1) indicates a default position, chosen by
fc2171bd 59either the windowing system or wxWidgets, depending on platform.}
a660d684
KB
60
61\docparam{size}{The panel size. A value of (-1, -1) indicates a default size, chosen by
fc2171bd 62either the windowing system or wxWidgets, depending on platform.}
a660d684
KB
63
64\docparam{style}{The window style. See \helpref{wxPanel}{wxpanel}.}
65
66\docparam{name}{Used to associate a name with the window,
67allowing the application user to set Motif resource values for
68individual dialog boxes.}
69
70\wxheading{See also}
71
72\helpref{wxPanel::Create}{wxpanelcreate}
73
dcbd177f 74\membersection{wxPanel::\destruct{wxPanel}}\label{wxpaneldtor}
a660d684
KB
75
76\func{}{\destruct{wxPanel}}{\void}
77
78Destructor. Deletes any child windows before deleting the physical window.
79
80\membersection{wxPanel::Create}\label{wxpanelcreate}
81
b9eb3d9d 82\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = \texttt{wxID\_ANY}},\rtfsp
a660d684
KB
83\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
84\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
eaaa6a06 85\param{long}{ style = wxTAB\_TRAVERSAL},\rtfsp
a660d684
KB
86\param{const wxString\& }{name = ``panel"}}
87
dcbd177f 88Used for two-step panel construction. See \helpref{wxPanel::wxPanel}{wxpanelctor}\rtfsp
a660d684
KB
89for details.
90
91\membersection{wxPanel::InitDialog}\label{wxpanelinitdialog}
92
93\func{void}{InitDialog}{\void}
94
f4fcc291 95Sends a \helpref{wxInitDialogEvent}{wxinitdialogevent}, which
a660d684
KB
96in turn transfers data to the dialog via validators.
97
98\wxheading{See also}
99
f4fcc291 100\helpref{wxInitDialogEvent}{wxinitdialogevent}
a660d684
KB
101
102\membersection{wxPanel::OnSysColourChanged}\label{wxpanelonsyscolourchanged}
103
104\func{void}{OnSysColourChanged}{\param{wxSysColourChangedEvent\& }{event}}
105
106The default handler for wxEVT\_SYS\_COLOUR\_CHANGED.
107
108\wxheading{Parameters}
109
110\docparam{event}{The colour change event.}
111
112\wxheading{Remarks}
113
114Changes the panel's colour to conform to the current settings (Windows only).
115Add an event table entry for your panel class if you wish the behaviour
116to be different (such as keeping a user-defined
f4fcc291 117background colour). If you do override this function, call wxEvent::Skip to
a660d684
KB
118propagate the notification to child windows and controls.
119
120\wxheading{See also}
121
122\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}
123
ababa106 124
ababa106
RR
125\membersection{wxPanel::SetFocus}\label{wxpanelsetfocus}
126
127\func{virtual void}{SetFocus}{\void}
128
129Overrides \helpref{wxWindow::SetFocus}{wxwindowsetfocus}. This method
130uses the (undocumented) mix-in class wxControlContainer which manages
131the focus and TAB logic for controls which usually have child controls.
132In practice, if you call this method and the control has at least
133one child window, the focus will be given to the child window.
134
135\wxheading{See also}
136
137\helpref{wxFocusEvent}{wxfocusevent}
138\helpref{wxWindow::SetFocus}{wxwindowsetfocus}
139
140
141\membersection{wxPanel::SetFocusIgnoringChildren}\label{wxpanelsetfocusignoringchildren}
142
143\func{virtual void}{SetFocusIgnoringChildren}{\void}
144
145In contrast to \helpref{wxPanel::SetFocus}{wxpanelsetfocus} (see above)
146this will set the focus to the panel even of there are child windows
147in the panel. This is only rarely needed.
148
149\wxheading{See also}
150
151\helpref{wxFocusEvent}{wxfocusevent}
152\helpref{wxPanel::SetFocus}{wxpanelsetfocus}
153