]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/toolbar.tex
added wxUpdateUI generation
[wxWidgets.git] / docs / latex / wx / toolbar.tex
1 \section{\class{wxToolBarBase}}\label{wxtoolbarbase}
2
3 {\bf wxToolBarBase} is the base class for a number of toolbar classes. The most portable
4 one of these is the generic \helpref{wxToolBarSimple}{wxtoolbarsimple} class. {\bf wxToolBarBase} defines
5 automatic scrolling management functionality which is identical to \helpref{wxScrolledWindow}{wxscrolledwindow},
6 so please refer to this class also.
7
8 \wxheading{Derived from}
9
10 \helpref{wxControl}{wxcontrol}\\
11 \helpref{wxWindow}{wxwindow}\\
12 \helpref{wxEvtHandler}{wxevthandler}\\
13 \helpref{wxObject}{wxobject}
14
15 \wxheading{Remarks}
16
17 Because there is a variety of toolbar classes, you may wish to choose which class
18 is best for your application on each platform, and define {\bf wxToolBar} appropriately. For example:
19
20 \begin{verbatim}
21 #if WIN95
22 class wxToolBar: public wxToolBar95
23 #elif defined(wx_msw)
24 class wxToolBar: public wxToolBarMSW
25 #else
26 class wxToolBar: public wxToolBarSimple
27 #endif
28 {
29 };
30 \end{verbatim}
31
32 TODO: maybe change the confusing names: GetDefaultSize becomes GetToolBitmapSize, and
33 GetDefaultButtonSize becomes GetToolSize. Document SetRows for wxToolBar95, and make it
34 part of the base API?
35
36 \wxheading{Event handling}
37
38 Derive a new class from an existing toolbar class, and override appropriate virtual functions.
39
40 TODO: make consistent with other event handling; have wxToolBarEvent and appropriate macros.
41
42 \wxheading{See also}
43
44 \overview{Toolbar overview}{wxtoolbaroverview},\rtfsp
45 \helpref{wxToolBarSimple}{wxtoolbarsimple},\rtfsp
46 \helpref{wxToolBarMSW}{wxtoolbarmsw},\rtfsp
47 \helpref{wxToolBar95}{wxtoolbar95},\rtfsp
48 \helpref{wxScrolledWindow}{wxscrolledwindow}
49
50 \latexignore{\rtfignore{\wxheading{Members}}}
51
52 \membersection{wxToolBarBase::wxToolBarBase}\label{wxtoolbarbaseconstr}
53
54 \func{}{wxToolBarBase}{\void}
55
56 Default constructor.
57
58 %\wxheading{See also}
59 %
60 %\helpref{wxToolBarBase::Create}{wxtoolbarbasecreate}
61 %
62 \membersection{wxToolBarBase::\destruct{wxToolBarBase}}
63
64 \func{void}{\destruct{wxToolBarBase}}{\void}
65
66 Toolbar destructor.
67
68 \membersection{wxToolBarBase::AddSeparator}\label{wxtoolbarbaseaddseparator}
69
70 \func{void}{AddSeparator}{\void}
71
72 Adds a separator for spacing groups of tools.
73
74 \wxheading{See also}
75
76 \helpref{wxToolBarBase::AddTool}{wxtoolbarbaseaddtool}, \helpref{wxToolBarBase::SetToolSeparation}{wxtoolbarbasesettoolseparation}
77
78 \membersection{wxToolBarBase::AddTool}\label{wxtoolbarbaseaddtool}
79
80 \func{wxToolBarBaseTool*}{AddTool}{\param{int}{ toolIndex}, \param{const wxBitmap\&}{ bitmap1},\rtfsp
81 \param{const wxBitmap\&}{ bitmap2 = (wxBitmap *)NULL}, \param{const bool}{ isToggle = FALSE},\rtfsp
82 \param{const float}{ xPos = -1}, \param{const float}{ yPos = -1},\rtfsp
83 \param{wxObject *}{clientData = NULL}, \param{const wxString\& }{shortHelpString = ""}, \param{const wxString\& }{longHelpString = ""}}
84
85 Adds a tool to the toolbar.
86
87 \wxheading{Parameters}
88
89 \docparam{toolIndex}{An integer by which
90 the tool may be identified in subsequent operations.}
91
92 \docparam{isToggle}{Specifies whether the tool is a toggle or not: a toggle tool may be in
93 two states, whereas a non-toggle tool is just a button.}
94
95 \docparam{bitmap1}{The primary tool bitmap for toggle and button tools.}
96
97 \docparam{bitmap2}{The second bitmap specifies the on-state bitmap for a toggle
98 tool. If this is NULL, either an inverted version of the primary bitmap is
99 used for the on-state of a toggle tool (monochrome displays) or a black
100 border is drawn around the tool (colour displays). Note that to pass a NULL value,
101 you need to cast it to (wxBitmap *) so that C++ can construct an appropriate temporary
102 wxBitmap object.}
103
104 \docparam{xPos}{Specifies the x position of the tool if automatic layout is not suitable.}
105
106 \docparam{yPos}{Specifies the y position of the tool if automatic layout is not suitable.}
107
108 \docparam{clientData}{An optional pointer to client data which can be
109 retrieved later using \helpref{wxToolBarBase::GetToolClientData}{wxtoolbarbasegettoolclientdata}.}
110
111 \docparam{shortHelpString}{Used for displaying a tooltip for the tool in the
112 Windows 95 implementation of wxButtonBar. Pass the empty string if this is not required.}
113
114 \docparam{longHelpString}{Used to displayer longer help, such as status line help.
115 Pass the empty string if this is not required.}
116
117 \wxheading{See also}
118
119 \helpref{wxToolBarBase::AddSeparator}{wxtoolbarbaseaddseparator}
120
121 \membersection{wxToolBarBase::CreateTools}\label{wxtoolbarbasecreatetools}
122
123 \func{bool}{CreateTools}{\void}
124
125 Call this function after all tools have been added to the toolbar, to actually
126 create the tools.
127
128 \wxheading{Remarks}
129
130 Strictly speaking, this is required only for the Windows 95 version of wxButtonBar,
131 but for portability it should be called anyway.
132
133 \wxheading{See also}
134
135 \helpref{wxToolBarBase::AddTool}{wxtoolbarbaseaddtool}
136
137 \membersection{wxToolBarBase::DrawTool}\label{wxtoolbarbasedrawtool}
138
139 \func{void}{DrawTool}{\param{wxMemoryDC\& }{memDC}, \param{wxToolBarBaseTool* }{tool}}
140
141 Draws the specified tool onto the window using the given memory device context.
142
143 \wxheading{Parameters}
144
145 \docparam{memDC}{A memory DC to be used for drawing the tool.}
146
147 \docparam{tool}{Tool to be drawn.}
148
149 \wxheading{Remarks}
150
151 For internal use only.
152
153 \membersection{wxToolBarBase::EnableTool}\label{wxtoolbarbaseenabletool}
154
155 \func{void}{EnableTool}{\param{int }{toolIndex}, \param{const bool}{ enable}}
156
157 Enables or disables the tool.
158
159 \wxheading{Parameters}
160
161 \docparam{toolIndex}{Tool to enable or disable.}
162
163 \docparam{enable}{If TRUE, enables the tool, otherwise disables it.}
164
165 \wxheading{Remarks}
166
167 For \helpref{wxToolBarSimple}{wxtoolbarsimple}, does nothing. Some other implementations
168 will change the visible state of the tool to indicate that it is disabled.
169
170 \wxheading{See also}
171
172 \helpref{wxToolBarBase::GetToolEnabled}{wxtoolbarbasegettoolenabled},\rtfsp
173 %\helpref{wxToolBarBase::SetToolState}{wxtoolbarbasesettoolstate},\rtfsp
174 \helpref{wxToolBarBase::ToggleTool}{wxtoolbarbasetoggletool}
175
176 \membersection{wxToolBarBase::FindToolForPosition}\label{wxtoolbarbasefindtoolforposition}
177
178 \constfunc{wxToolBarBaseTool*}{FindToolForPosition}{\param{const float}{ x}, \param{const float}{ y}}
179
180 Finds a tool for the given mouse position.
181
182 \wxheading{Parameters}
183
184 \docparam{x}{X position.}
185
186 \docparam{y}{Y position.}
187
188 \wxheading{Return value}
189
190 A pointer to a tool if a tool is found, or NULL otherwise.
191
192 \wxheading{Remarks}
193
194 Used internally, and should not need to be used by the programmer.
195
196 \membersection{wxToolBarBase::GetDefaultButtonSize}\label{wxtoolbarbasegetdefaultbuttonsize}
197
198 \func{wxSize}{GetDefaultButtonSize}{\void}
199
200 Returns the size of a whole button, which is usually larger than a tool bitmap because
201 of added 3D effects.
202
203 \wxheading{See also}
204
205 \helpref{wxToolBarBase::SetDefaultSize}{wxtoolbarbasesetdefaultsize},\rtfsp
206 \helpref{wxToolBarBase::GetDefaultSize}{wxtoolbarbasegetdefaultsize}
207
208 \membersection{wxToolBarBase::GetDefaultSize}\label{wxtoolbarbasegetdefaultsize}
209
210 \func{wxSize}{GetDefaultSize}{\void}
211
212 Returns the size of bitmap that the toolbar expects to have. The default bitmap size is 16 by 15 pixels.
213
214 \wxheading{Remarks}
215
216 Note that this is the size of the bitmap you pass to \helpref{wxToolBarBase::AddTool}{wxtoolbarbaseaddtool},
217 and not the eventual size of the tool button.
218
219 \wxheading{See also}
220
221 \helpref{wxToolBarBase::SetDefaultSize}{wxtoolbarbasesetdefaultsize},\rtfsp
222 \helpref{wxToolBarBase::GetDefaultButtonSize}{wxtoolbarbasegetdefaultbuttonsize}
223
224 \membersection{wxToolBarBase::GetMargins}\label{wxtoolbarbasegetmargins}
225
226 \constfunc{wxSize}{GetMargins}{\void}
227
228 Returns the left/right and top/bottom margins, which are also used for inter-toolspacing.
229
230 \wxheading{See also}
231
232 \helpref{wxToolBarBase::SetMargins}{wxtoolbarbasesetmargins}
233
234 \membersection{wxToolBarBase::GetMaxSize}\label{wxtoolbarbasegetmaxsize}
235
236 \constfunc{void}{GetMaxSize}{\param{float*}{ w}, \param{float*}{ h}}
237
238 Gets the maximum size taken up by the tools after layout, including margins.
239 This can be used to size a frame around the toolbar window.
240
241 \wxheading{Parameters}
242
243 \docparam{w}{Receives the maximum horizontal size.}
244
245 \docparam{h}{Receives the maximum vertical size.}
246
247 \membersection{wxToolBarBase::GetToolClientData}\label{wxtoolbarbasegettoolclientdata}
248
249 \constfunc{wxObject*}{GetToolClientData}{\param{int }{toolIndex}}
250
251 Get any client data associated with the tool.
252
253 \wxheading{Parameters}
254
255 \docparam{toolIndex}{Index of the tool, as passed to \helpref{wxToolBarBase::AddTool}{wxtoolbarbaseaddtool}.}
256
257 \wxheading{Return value}
258
259 Client data, or NULL if there is none.
260
261 \membersection{wxToolBarBase::GetToolEnabled}\label{wxtoolbarbasegettoolenabled}
262
263 \constfunc{bool}{GetToolEnabled}{\param{int }{toolIndex}}
264
265 Called to determine whether a tool is enabled (responds to user input).
266
267 \wxheading{Parameters}
268
269 \docparam{toolIndex}{Index of the tool in question.}
270
271 \wxheading{Return value}
272
273 TRUE if the tool is enabled, FALSE otherwise.
274
275 %\wxheading{See also}
276 %
277 %\helpref{wxToolBarBase::SetToolEnabled}{wxtoolbarbasesettoolenabled}
278 %
279 \membersection{wxToolBarBase::GetToolLongHelp}\label{wxtoolbarbasegettoollonghelp}
280
281 \constfunc{wxString}{GetToolLongHelp}{\param{int }{toolIndex}}
282
283 Returns the long help for the given tool.
284
285 \wxheading{Parameters}
286
287 \docparam{toolIndex}{The tool in question.}
288
289 \wxheading{See also}
290
291 \helpref{wxToolBarBase::SetToolLongHelp}{wxtoolbarbasesettoollonghelp},\rtfsp
292 \helpref{wxToolBarBase::SetToolShortHelp}{wxtoolbarbasesettoolshorthelp}\rtfsp
293
294 \membersection{wxToolBarBase::GetToolPacking}\label{wxtoolbarbasegettoolpacking}
295
296 \constfunc{int}{GetToolPacking}{\void}
297
298 Returns the value used for packing tools.
299
300 \wxheading{See also}
301
302 \helpref{wxToolBarBase::SetToolPacking}{wxtoolbarbasesettoolpacking}
303
304 \membersection{wxToolBarBase::GetToolSeparation}\label{wxtoolbarbasegettoolseparation}
305
306 \constfunc{int}{GetToolSeparation}{\void}
307
308 Returns the default separator size.
309
310 \wxheading{See also}
311
312 \helpref{wxToolBarBase::SetToolSeparation}{wxtoolbarbasesettoolseparation}
313
314 \membersection{wxToolBarBase::GetToolShortHelp}\label{wxtoolbarbasegettoolshorthelp}
315
316 \constfunc{wxString}{GetToolShortHelp}{\param{int }{toolIndex}}
317
318 Returns the short help for the given tool.
319
320 Returns the long help for the given tool.
321
322 \wxheading{Parameters}
323
324 \docparam{toolIndex}{The tool in question.}
325
326 \wxheading{See also}
327
328 \helpref{wxToolBarBase::GetToolLongHelp}{wxtoolbarbasegettoollonghelp},\rtfsp
329 \helpref{wxToolBarBase::SetToolShortHelp}{wxtoolbarbasesettoolshorthelp}\rtfsp
330
331 \membersection{wxToolBarBase::GetToolState}\label{wxtoolbarbasegettoolstate}
332
333 \constfunc{bool}{GetToolState}{\param{int }{toolIndex}}
334
335 Gets the on/off state of a toggle tool.
336
337 \wxheading{Parameters}
338
339 \docparam{toolIndex}{The tool in question.}
340
341 \wxheading{Return value}
342
343 TRUE if the tool is toggled on, FALSE otherwise.
344
345 %\wxheading{See also}
346 %
347 %\helpref{wxToolBarBase::SetToolState}{wxtoolbarbasesettoolstate}
348 %
349 \membersection{wxToolBarBase::Layout}\label{wxtoolbarbaselayout}
350
351 \func{void}{Layout}{\void}
352
353 Called by the application after the tools have been added to
354 automatically lay the tools out on the window. If you have given
355 absolute positions when adding the tools, do not call this.
356
357 \membersection{wxToolBarBase::OnLeftClick}\label{wxtoolbarbaseonleftclick}
358
359 \func{bool}{OnLeftClick}{\param{int}{ toolIndex}, \param{bool}{ toggleDown}}
360
361 Called when the user clicks on a tool with the left mouse button. The
362 programmer should override this function to detect left tool clicks.
363
364 \wxheading{Parameters}
365
366 \docparam{toolIndex}{The identifier passed to \helpref{wxToolBarBase::AddTool}{wxtoolbarbaseaddtool}.}
367
368 \docparam{toggleDown}{TRUE if the tool is a toggle and the toggle is down, otherwise is FALSE.}
369
370 \wxheading{Return value}
371
372 If the tool is a toggle and this function returns FALSE, the toggle
373 toggle state (internal and visual) will not be changed. This provides a way of
374 specifying that toggle operations are not permitted in some circumstances.
375
376 \wxheading{See also}
377
378 \helpref{wxToolBarBase::OnMouseEnter}{wxtoolbarbaseonmouseenter},\rtfsp
379 \helpref{wxToolBarBase::OnRightClick}{wxtoolbarbaseonrightclick}
380
381 \membersection{wxToolBarBase::OnMouseEnter}\label{wxtoolbarbaseonmouseenter}
382
383 \func{void}{OnMouseEnter}{\param{int}{ toolIndex}}
384
385 This is called when the mouse cursor moves into a tool or out of
386 the toolbar.
387
388 \wxheading{Parameters}
389
390 \docparam{toolIndex}{Greater than -1 if the mouse cursor has moved into the tool,
391 or -1 if the mouse cursor has moved. The
392 programmer can override this to provide extra information about the tool,
393 such as a short description on the status line.}
394
395 \wxheading{Remarks}
396
397 With some derived toolbar classes, if the mouse moves quickly out of the toolbar, wxWindows may not be able to
398 detect it. Therefore this function may not always be called when expected.
399
400 \membersection{wxToolBarBase::OnRightClick}\label{wxtoolbarbaseonrightclick}
401
402 \func{void}{OnRightClick}{\param{int}{ toolIndex}, \param{float}{ x}, \param{float}{ y}}
403
404 Called when the user clicks on a tool with the right mouse button. The
405 programmer should override this function to detect right tool clicks.
406
407 \wxheading{Parameters}
408
409 \docparam{toolIndex}{The identifier passed to \helpref{wxToolBarBase::AddTool}{wxtoolbarbaseaddtool}.}
410
411 \docparam{x}{The x position of the mouse cursor.}
412
413 \docparam{y}{The y position of the mouse cursor.}
414
415 \wxheading{Remarks}
416
417 A typical use of this member might be to pop up a menu.
418
419 \wxheading{See also}
420
421 \helpref{wxToolBarBase::OnMouseEnter}{wxtoolbarbaseonmouseenter},\rtfsp
422 \helpref{wxToolBarBase::OnLeftClick}{wxtoolbarbaseonleftclick}
423
424 \membersection{wxToolBarBase::SetDefaultSize}\label{wxtoolbarbasesetdefaultsize}
425
426 \func{void}{SetDefaultSize}{\param{const wxSize\&}{ size}}
427
428 Sets the default size of each tool bitmap. The default bitmap size is 16 by 15 pixels.
429
430 \wxheading{Parameters}
431
432 \docparam{size}{The size of the bitmaps in the toolbar.}
433
434 \wxheading{Remarks}
435
436 This should be called to tell the toolbar what the tool bitmap size is. Call
437 it before you add tools.
438
439 Note that this is the size of the bitmap you pass to \helpref{wxToolBarBase::AddTool}{wxtoolbarbaseaddtool},
440 and not the eventual size of the tool button.
441
442 \wxheading{See also}
443
444 \helpref{wxToolBarBase::GetDefaultSize}{wxtoolbarbasegetdefaultsize},\rtfsp
445 \helpref{wxToolBarBase::GetDefaultButtonSize}{wxtoolbarbasegetdefaultbuttonsize}
446
447 \membersection{wxToolBarBase::SetMargins}\label{wxtoolbarbasesetmargins}
448
449 \func{void}{SetMargins}{\param{const wxSize\&}{ size}}
450
451 \func{void}{SetMargins}{\param{int}{ x}, \param{int}{ y}}
452
453 Set the values to be used as margins for the toolbar.
454
455 \wxheading{Parameters}
456
457 \docparam{size}{Margin size.}
458
459 \docparam{x}{Left margin, right margin and inter-tool separation value.}
460
461 \docparam{y}{Top margin, bottom margin and inter-tool separation value.}
462
463 \wxheading{Remarks}
464
465 This must be called before the tools are added if absolute positioning is to be used, and the
466 default (zero-size) margins are to be overridden.
467
468 \wxheading{See also}
469
470 \helpref{wxToolBarBase::GetMargins}{wxtoolbarbasegetmargins}, \helpref{wxSize}{wxsize}
471
472 \membersection{wxToolBarBase::SetToolLongHelp}\label{wxtoolbarbasesettoollonghelp}
473
474 \func{void}{SetToolLongHelp}{\param{int }{toolIndex}, \param{const wxString\& }{helpString}}
475
476 Sets the long help for the given tool.
477
478 \wxheading{Parameters}
479
480 \docparam{toolIndex}{The tool in question.}
481
482 \docparam{helpString}{A string for the long help.}
483
484 \wxheading{Remarks}
485
486 You might use the long help for displaying the tool purpose on the status line.
487
488 \wxheading{See also}
489
490 \helpref{wxToolBarBase::GetToolLongHelp}{wxtoolbarbasegettoollonghelp},\rtfsp
491 \helpref{wxToolBarBase::SetToolShortHelp}{wxtoolbarbasesettoolshorthelp},\rtfsp
492
493 \membersection{wxToolBarBase::SetToolPacking}\label{wxtoolbarbasesettoolpacking}
494
495 \func{void}{SetToolPacking}{\param{int}{ packing}}
496
497 Sets the value used for spacing tools. The default value is 1.
498
499 \wxheading{Parameters}
500
501 \docparam{packing}{The value for packing.}
502
503 \wxheading{Remarks}
504
505 The packing is used for spacing in the vertical direction if the toolbar is horizontal,
506 and for spacing in the horizontal direction if the toolbar is vertical.
507
508 \wxheading{See also}
509
510 \helpref{wxToolBarBase::GetToolPacking}{wxtoolbarbasegettoolpacking}
511
512 \membersection{wxToolBarBase::SetToolShortHelp}\label{wxtoolbarbasesettoolshorthelp}
513
514 \func{void}{SetToolShortHelp}{\param{int }{toolIndex}, \param{const wxString\& }{helpString}}
515
516 Sets the short help for the given tool.
517
518 \wxheading{Parameters}
519
520 \docparam{toolIndex}{The tool in question.}
521
522 \docparam{helpString}{The string for the short help.}
523
524 \wxheading{Remarks}
525
526 An application might use short help for identifying the tool purpose in a tooltip.
527
528 \wxheading{See also}
529
530 \helpref{wxToolBarBase::GetToolShortHelp}{wxtoolbarbasegettoolshorthelp}, \helpref{wxToolBarBase::SetToolLongHelp}{wxtoolbarbasesettoollonghelp}
531
532 \membersection{wxToolBarBase::SetToolSeparation}\label{wxtoolbarbasesettoolseparation}
533
534 \func{void}{SetToolSeparation}{\param{int}{ separation}}
535
536 Sets the default separator size. The default value is 5.
537
538 \wxheading{Parameters}
539
540 \docparam{separation}{The separator size.}
541
542 \wxheading{See also}
543
544 \helpref{wxToolBarBase::AddSeparator}{wxtoolbarbaseaddseparator}
545
546 \membersection{wxToolBarBase::ToggleTool}\label{wxtoolbarbasetoggletool}
547
548 \func{void}{ToggleTool}{\param{int }{toolIndex}, \param{const bool}{ toggle}}
549
550 Toggles a tool on or off.
551
552 \wxheading{Parameters}
553
554 \docparam{toolIndex}{Tool in question.}
555
556 \docparam{toggle}{If TRUE, toggles the tool on, otherwise toggles it off.}
557
558 \wxheading{Remarks}
559
560 Only applies to a tool that has been specified as a toggle tool.
561
562 \wxheading{See also}
563
564 \helpref{wxToolBarBase::GetToolState}{wxtoolbarbasegettoolstate}
565
566 \section{\class{wxToolBar95}}\label{wxtoolbar95}
567
568 This class should be used when a 3D-effect toolbar is required under Windows 95.
569 It uses the native toolbar control.
570
571 \wxheading{Derived from}
572
573 \helpref{wxToolBarBase}{wxtoolbarbase}\\
574 \helpref{wxControl}{wxcontrol}\\
575 \helpref{wxWindow}{wxwindow}\\
576 \helpref{wxEvtHandler}{wxevthandler}\\
577 \helpref{wxObject}{wxobject}
578
579 \wxheading{Window styles}
580
581 \twocolwidtha{5cm}
582 \begin{twocollist}\itemsep=0pt
583 \twocolitem{\windowstyle{wxTB\_FLAT}}{Gives the toolbar a flat look ('coolbar' or 'flatbar' style).}
584 \end{twocollist}
585
586 See also \helpref{window styles overview}{windowstyles}.
587
588 \wxheading{Remarks}
589
590 Note that this toolbar paints tools to reflect user-selected colours.
591 The toolbar orientation must always be {\bf wxVERTICAL}.
592
593 For member functions, see the documentation for \helpref{wxToolBarBase}{wxtoolbarbase}.
594
595 \wxheading{See also}
596
597 \overview{Toolbar overview}{wxtoolbaroverview},\rtfsp
598 \helpref{wxToolBarBase}{wxtoolbarbase},\rtfsp
599 \helpref{wxToolBarSimple}{wxtoolbarsimple},\rtfsp
600 \helpref{wxToolBarMSW}{wxtoolbarmsw}
601
602 \latexignore{\rtfignore{\wxheading{Members}}}
603
604 \membersection{wxToolBar95::wxToolBar95}\label{wxtoolbar95constr}
605
606 \func{}{wxToolBar95}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
607 \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
608 \param{long }{style = 0}, \param{int }{orientation = wxVERTICAL},\rtfsp
609 \param{int }{nRowsOrColumns = 1}, \param{const wxString\& }{name = ``toolBar"}}
610
611 Constructs a toolbar.
612
613 \wxheading{Parameters}
614
615 \docparam{parent}{Parent window. Must not be NULL.}
616
617 \docparam{id}{Window identifier. A value of -1 indicates a default value.}
618
619 \docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
620
621 \docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
622
623 \docparam{orientation}{Specifies a wxVERTICAL or wxHORIZONTAL orientation for laying out
624 the toolbar.}
625
626 \docparam{nRowsOrColumns}{Specifies the number of rows or
627 columns, whose meaning depends on {\it orientation}. If laid out
628 vertically, {\it nRowsOrColumns} specifies the number of rows to draw
629 before the next column is started; if horizontal, it refers to the
630 number of columns to draw before the next row is started.}
631
632 \docparam{style}{Window style. See \helpref{wxToolBar95}{wxtoolbar95}.}
633
634 \docparam{name}{Window name.}
635
636 \section{\class{wxToolBarMSW}}\label{wxtoolbarmsw}
637
638 This class should be used when a 3D-effect toolbar is required for Windows versions earlier
639 than Windows 95.
640
641 \wxheading{Derived from}
642
643 \helpref{wxToolBarBase}{wxtoolbarbase}\\
644 \helpref{wxControl}{wxcontrol}\\
645 \helpref{wxWindow}{wxwindow}\\
646 \helpref{wxEvtHandler}{wxevthandler}\\
647 \helpref{wxObject}{wxobject}
648
649 \wxheading{Window styles}
650
651 There are no specific styles for this class.
652
653 See also \helpref{window styles overview}{windowstyles}.
654
655 \wxheading{Remarks}
656
657 Note that this toolbar does not paint tools to reflect user-selected colours: grey shading is used.
658
659 For member functions, see the documentation for \helpref{wxToolBarBase}{wxtoolbarbase}.
660
661 \wxheading{See also}
662
663 \overview{Toolbar overview}{wxtoolbaroverview},\rtfsp
664 \helpref{wxToolBarBase}{wxtoolbarbase},\rtfsp
665 \helpref{wxToolBarSimple}{wxtoolbarsimple},\rtfsp
666 \helpref{wxToolBar95}{wxtoolbar95}
667
668 \latexignore{\rtfignore{\wxheading{Members}}}
669
670 \membersection{wxToolBarMSW::wxToolBarMSW}\label{wxtoolbarmswconstr}
671
672 \func{}{wxToolBarMSW}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
673 \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
674 \param{long }{style = 0}, \param{int }{orientation = wxVERTICAL},\rtfsp
675 \param{int }{nRowsOrColumns = 1}, \param{const wxString\& }{name = ``toolBar"}}
676
677 Constructs a toolbar.
678
679 \wxheading{Parameters}
680
681 \docparam{parent}{Parent window. Must not be NULL.}
682
683 \docparam{id}{Window identifier. A value of -1 indicates a default value.}
684
685 \docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
686
687 \docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
688
689 \docparam{orientation}{Specifies a wxVERTICAL or wxHORIZONTAL orientation for laying out
690 the toolbar.}
691
692 \docparam{nRowsOrColumns}{Specifies the number of rows or
693 columns, whose meaning depends on {\it orientation}. If laid out
694 vertically, {\it nRowsOrColumns} specifies the number of rows to draw
695 before the next column is started; if horizontal, it refers to the
696 number of columns to draw before the next row is started.}
697
698 \docparam{style}{Window style. See \helpref{wxToolBarMSW}{wxtoolbarmsw}.}
699
700 \docparam{name}{Window name.}
701
702
703 \section{\class{wxToolBarSimple}}\label{wxtoolbarsimple}
704
705 This is the generic toolbar class which has an identical appearance
706 on all platforms.
707
708 \wxheading{Derived from}
709
710 \helpref{wxToolBarBase}{wxtoolbarbase}\\
711 \helpref{wxControl}{wxcontrol}\\
712 \helpref{wxWindow}{wxwindow}\\
713 \helpref{wxEvtHandler}{wxevthandler}\\
714 \helpref{wxObject}{wxobject}
715
716 \wxheading{Window styles}
717
718 \twocolwidtha{5cm}
719 \begin{twocollist}\itemsep=0pt
720 \twocolitem{\windowstyle{wxTB\_3DBUTTONS}}{Gives the simple toolbar a mild 3D look to its buttons.}
721 \end{twocollist}
722
723 See also \helpref{window styles overview}{windowstyles}.
724
725 \wxheading{Remarks}
726
727 In this class, disabling a toolbar tool does not change its appearance.
728
729 For member functions, see the documentation for \helpref{wxToolBarBase}{wxtoolbarbase}.
730
731 \wxheading{See also}
732
733 \overview{Toolbar overview}{wxtoolbaroverview},\rtfsp
734 \helpref{wxToolBarBase}{wxtoolbarbase},\rtfsp
735 \helpref{wxToolBarSimple}{wxtoolbarsimple},\rtfsp
736 \helpref{wxToolBar95}{wxtoolbar95}
737
738 \latexignore{\rtfignore{\wxheading{Members}}}
739
740 \membersection{wxToolBarSimple::wxToolBarSimple}\label{wxtoolbarsimpleconstr}
741
742 \func{}{wxToolBarSimple}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
743 \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
744 \param{long }{style = 0}, \param{int }{orientation = wxVERTICAL},\rtfsp
745 \param{int }{nRowsOrColumns = 1}, \param{const wxString\& }{name = ``toolBar"}}
746
747 Constructs a toolbar.
748
749 \wxheading{Parameters}
750
751 \docparam{parent}{Parent window. Must not be NULL.}
752
753 \docparam{id}{Window identifier. A value of -1 indicates a default value.}
754
755 \docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
756
757 \docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
758
759 \docparam{orientation}{Specifies a wxVERTICAL or wxHORIZONTAL orientation for laying out
760 the toolbar.}
761
762 \docparam{nRowsOrColumns}{Specifies the number of rows or
763 columns, whose meaning depends on {\it orientation}. If laid out
764 vertically, {\it nRowsOrColumns} specifies the number of rows to draw
765 before the next column is started; if horizontal, it refers to the
766 number of columns to draw before the next row is started.}
767
768 \docparam{style}{Window style. See \helpref{wxToolBarSimple}{wxtoolbarsimple}.}
769
770 \docparam{name}{Window name.}
771
772
773