]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/toolbar.tex
Changed documentation const convention for non-objects; added some manual files
[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 canvas 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 canvas.
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 canvas. 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 There are no specific styles for this class.
582
583 See also \helpref{window styles overview}{windowstyles}.
584
585 \wxheading{Remarks}
586
587 Note that this toolbar paints tools to reflect user-selected colours.
588 The toolbar orientation must always be {\bf wxVERTICAL}.
589
590 For member functions, see the documentation for \helpref{wxToolBarBase}{wxtoolbarbase}.
591
592 \wxheading{See also}
593
594 \overview{Toolbar overview}{wxtoolbaroverview},\rtfsp
595 \helpref{wxToolBarBase}{wxtoolbarbase},\rtfsp
596 \helpref{wxToolBarSimple}{wxtoolbarsimple},\rtfsp
597 \helpref{wxToolBarMSW}{wxtoolbarmsw}
598
599 \latexignore{\rtfignore{\wxheading{Members}}}
600
601 \membersection{wxToolBar95::wxToolBar95}\label{wxtoolbar95constr}
602
603 \func{}{wxToolBar95}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
604 \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
605 \param{long }{style = 0}, \param{int }{orientation = wxVERTICAL},\rtfsp
606 \param{int }{nRowsOrColumns = 1}, \param{const wxString\& }{name = ``toolBar"}}
607
608 Constructs a toolbar.
609
610 \wxheading{Parameters}
611
612 \docparam{parent}{Parent window. Must not be NULL.}
613
614 \docparam{id}{Window identifier. A value of -1 indicates a default value.}
615
616 \docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
617
618 \docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
619
620 \docparam{orientation}{Specifies a wxVERTICAL or wxHORIZONTAL orientation for laying out
621 the toolbar.}
622
623 \docparam{nRowsOrColumns}{Specifies the number of rows or
624 columns, whose meaning depends on {\it orientation}. If laid out
625 vertically, {\it nRowsOrColumns} specifies the number of rows to draw
626 before the next column is started; if horizontal, it refers to the
627 number of columns to draw before the next row is started.}
628
629 \docparam{style}{Window style. See \helpref{wxToolBar95}{wxtoolbar95}.}
630
631 \docparam{name}{Window name.}
632
633 \section{\class{wxToolBarMSW}}\label{wxtoolbarmsw}
634
635 This class should be used when a 3D-effect toolbar is required for Windows versions earlier
636 than Windows 95.
637
638 \wxheading{Derived from}
639
640 \helpref{wxToolBarBase}{wxtoolbarbase}\\
641 \helpref{wxControl}{wxcontrol}\\
642 \helpref{wxWindow}{wxwindow}\\
643 \helpref{wxEvtHandler}{wxevthandler}\\
644 \helpref{wxObject}{wxobject}
645
646 \wxheading{Window styles}
647
648 There are no specific styles for this class.
649
650 See also \helpref{window styles overview}{windowstyles}.
651
652 \wxheading{Remarks}
653
654 Note that this toolbar does not paint tools to reflect user-selected colours: grey shading is used.
655
656 For member functions, see the documentation for \helpref{wxToolBarBase}{wxtoolbarbase}.
657
658 \wxheading{See also}
659
660 \overview{Toolbar overview}{wxtoolbaroverview},\rtfsp
661 \helpref{wxToolBarBase}{wxtoolbarbase},\rtfsp
662 \helpref{wxToolBarSimple}{wxtoolbarsimple},\rtfsp
663 \helpref{wxToolBar95}{wxtoolbar95}
664
665 \latexignore{\rtfignore{\wxheading{Members}}}
666
667 \membersection{wxToolBarMSW::wxToolBarMSW}\label{wxtoolbarmswconstr}
668
669 \func{}{wxToolBarMSW}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
670 \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
671 \param{long }{style = 0}, \param{int }{orientation = wxVERTICAL},\rtfsp
672 \param{int }{nRowsOrColumns = 1}, \param{const wxString\& }{name = ``toolBar"}}
673
674 Constructs a toolbar.
675
676 \wxheading{Parameters}
677
678 \docparam{parent}{Parent window. Must not be NULL.}
679
680 \docparam{id}{Window identifier. A value of -1 indicates a default value.}
681
682 \docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
683
684 \docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
685
686 \docparam{orientation}{Specifies a wxVERTICAL or wxHORIZONTAL orientation for laying out
687 the toolbar.}
688
689 \docparam{nRowsOrColumns}{Specifies the number of rows or
690 columns, whose meaning depends on {\it orientation}. If laid out
691 vertically, {\it nRowsOrColumns} specifies the number of rows to draw
692 before the next column is started; if horizontal, it refers to the
693 number of columns to draw before the next row is started.}
694
695 \docparam{style}{Window style. See \helpref{wxToolBarMSW}{wxtoolbarmsw}.}
696
697 \docparam{name}{Window name.}
698
699
700 \section{\class{wxToolBarSimple}}\label{wxtoolbarsimple}
701
702 This is the generic toolbar class which has an identical appearance
703 on all platforms.
704
705 \wxheading{Derived from}
706
707 \helpref{wxToolBarBase}{wxtoolbarbase}\\
708 \helpref{wxControl}{wxcontrol}\\
709 \helpref{wxWindow}{wxwindow}\\
710 \helpref{wxEvtHandler}{wxevthandler}\\
711 \helpref{wxObject}{wxobject}
712
713 \wxheading{Window styles}
714
715 \twocolwidtha{5cm}
716 \begin{twocollist}\itemsep=0pt
717 \twocolitem{\windowstyle{wxTB\_3DBUTTONS}}{Gives the simple toolbar a mild 3D look to its buttons.}
718 \end{twocollist}
719
720 See also \helpref{window styles overview}{windowstyles}.
721
722 \wxheading{Remarks}
723
724 In this class, disabling a toolbar tool does not change its appearance.
725
726 For member functions, see the documentation for \helpref{wxToolBarBase}{wxtoolbarbase}.
727
728 \wxheading{See also}
729
730 \overview{Toolbar overview}{wxtoolbaroverview},\rtfsp
731 \helpref{wxToolBarBase}{wxtoolbarbase},\rtfsp
732 \helpref{wxToolBarSimple}{wxtoolbarsimple},\rtfsp
733 \helpref{wxToolBar95}{wxtoolbar95}
734
735 \latexignore{\rtfignore{\wxheading{Members}}}
736
737 \membersection{wxToolBarSimple::wxToolBarSimple}\label{wxtoolbarsimpleconstr}
738
739 \func{}{wxToolBarSimple}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
740 \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
741 \param{long }{style = 0}, \param{int }{orientation = wxVERTICAL},\rtfsp
742 \param{int }{nRowsOrColumns = 1}, \param{const wxString\& }{name = ``toolBar"}}
743
744 Constructs a toolbar.
745
746 \wxheading{Parameters}
747
748 \docparam{parent}{Parent window. Must not be NULL.}
749
750 \docparam{id}{Window identifier. A value of -1 indicates a default value.}
751
752 \docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
753
754 \docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
755
756 \docparam{orientation}{Specifies a wxVERTICAL or wxHORIZONTAL orientation for laying out
757 the toolbar.}
758
759 \docparam{nRowsOrColumns}{Specifies the number of rows or
760 columns, whose meaning depends on {\it orientation}. If laid out
761 vertically, {\it nRowsOrColumns} specifies the number of rows to draw
762 before the next column is started; if horizontal, it refers to the
763 number of columns to draw before the next row is started.}
764
765 \docparam{style}{Window style. See \helpref{wxToolBarSimple}{wxtoolbarsimple}.}
766
767 \docparam{name}{Window name.}
768
769
770