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