clarify role of wxToolBarToolBase (fixes #9874)
[wxWidgets.git] / interface / wx / toolbar.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: toolbar.h
3 // Purpose: interface of wxToolBar
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxToolBar
11
12 A toolbar is a bar of buttons and/or other controls usually placed below
13 the menu bar in a wxFrame.
14
15 You may create a toolbar that is managed by a frame calling
16 wxFrame::CreateToolBar(). Under Pocket PC, you should always use this
17 function for creating the toolbar to be managed by the frame, so that
18 wxWidgets can use a combined menubar and toolbar. Where you manage your
19 own toolbars, create wxToolBar as usual.
20
21 There are several different types of tools you can add to a toolbar.
22 These types are controlled by the ::wxItemKind enumeration.
23
24 Note that many methods in wxToolBar such as wxToolBar::AddTool return a
25 @c wxToolBarToolBase* object.
26 This should be regarded as an opaque handle representing the newly added
27 toolbar item, providing access to its id and position within the toolbar.
28 Changes to the item's state should be made through calls to wxToolBar methods,
29 for example wxToolBar::EnableTool.
30 Calls to @c wxToolBarToolBase methods (undocumented by purpose) will not change
31 the visible state of the item within the the tool bar.
32
33 <b>wxMSW note</b>: Note that under wxMSW toolbar paints tools to reflect
34 system-wide colours. If you use more than 16 colours in your tool bitmaps,
35 you may wish to suppress this behaviour, otherwise system colours in your
36 bitmaps will inadvertently be mapped to system colours.
37 To do this, set the msw.remap system option before creating the toolbar:
38 @code
39 wxSystemOptions::SetOption(wxT("msw.remap"), 0);
40 @endcode
41 If you wish to use 32-bit images (which include an alpha channel for
42 transparency) use:
43 @code
44 wxSystemOptions::SetOption(wxT("msw.remap"), 2);
45 @endcode
46 Then colour remapping is switched off, and a transparent background
47 used. But only use this option under Windows XP with true colour:
48 @code
49 if (wxTheApp->GetComCtl32Version() >= 600 && ::wxDisplayDepth() >= 32)
50 @endcode
51
52 @beginStyleTable
53 @style{wxTB_FLAT}
54 Gives the toolbar a flat look (Windows and GTK only).
55 @style{wxTB_DOCKABLE}
56 Makes the toolbar floatable and dockable (GTK only).
57 @style{wxTB_HORIZONTAL}
58 Specifies horizontal layout (default).
59 @style{wxTB_VERTICAL}
60 Specifies vertical layout.
61 @style{wxTB_TEXT}
62 Shows the text in the toolbar buttons; by default only icons are shown.
63 @style{wxTB_NOICONS}
64 Specifies no icons in the toolbar buttons; by default they are shown.
65 @style{wxTB_NODIVIDER}
66 Specifies no divider (border) above the toolbar (Windows only)
67 @style{wxTB_NOALIGN}
68 Specifies no alignment with the parent window (Windows only, not very
69 useful).
70 @style{wxTB_HORZ_LAYOUT}
71 Shows the text and the icons alongside, not vertically stacked (Windows
72 and GTK 2 only). This style must be used with @c wxTB_TEXT.
73 @style{wxTB_HORZ_TEXT}
74 Combination of @c wxTB_HORZ_LAYOUT and @c wxTB_TEXT.
75 @style{wxTB_NO_TOOLTIPS}
76 Don't show the short help tooltips for the tools when the mouse hovers
77 over them.
78 @style{wxTB_BOTTOM}
79 Align the toolbar at the bottom of parent window.
80 @style{wxTB_RIGHT}
81 Align the toolbar at the right side of parent window.
82 @endStyleTable
83
84 See also @ref overview_windowstyles. Note that the wxMSW native toolbar
85 ignores @c wxTB_NOICONS style. Also, toggling the @c wxTB_TEXT works only
86 if the style was initially on.
87
88 @beginEventTable{wxCommandEvent}
89 @event{EVT_TOOL(id, func)}
90 Process a @c wxEVT_COMMAND_TOOL_CLICKED event (a synonym for @c
91 wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool.
92 @event{EVT_MENU(id, func)}
93 The same as EVT_TOOL().
94 @event{EVT_TOOL_RANGE(id1, id2, func)}
95 Process a @c wxEVT_COMMAND_TOOL_CLICKED event for a range of
96 identifiers. Pass the ids of the tools.
97 @event{EVT_MENU_RANGE(id1, id2, func)}
98 The same as EVT_TOOL_RANGE().
99 @event{EVT_TOOL_RCLICKED(id, func)}
100 Process a @c wxEVT_COMMAND_TOOL_RCLICKED event. Pass the id of the
101 tool.
102 @event{EVT_TOOL_RCLICKED_RANGE(id1, id2, func)}
103 Process a @c wxEVT_COMMAND_TOOL_RCLICKED event for a range of ids. Pass
104 the ids of the tools.
105 @event{EVT_TOOL_ENTER(id, func)}
106 Process a @c wxEVT_COMMAND_TOOL_ENTER event. Pass the id of the toolbar
107 itself. The value of wxCommandEvent::GetSelection() is the tool id, or
108 -1 if the mouse cursor has moved off a tool.
109 @event{EVT_TOOL_DROPDOWN(id, func)}
110 Process a @c wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED event. If unhandled,
111 displays the default dropdown menu set using
112 wxToolBar::SetDropdownMenu().
113 @endEventTable
114
115 The toolbar class emits menu commands in the same way that a frame menubar
116 does, so you can use one EVT_MENU() macro for both a menu item and a toolbar
117 button. The event handler functions take a wxCommandEvent argument. For most
118 event macros, the identifier of the tool is passed, but for EVT_TOOL_ENTER()
119 the toolbar window identifier is passed and the tool identifier is retrieved
120 from the wxCommandEvent. This is because the identifier may be @c wxID_ANY when the
121 mouse moves off a tool, and @c wxID_ANY is not allowed as an identifier in the event
122 system.
123
124 @library{wxcore}
125 @category{miscwnd}
126
127 @see @ref overview_toolbar
128 */
129 class wxToolBar : public wxControl
130 {
131 public:
132 /**
133 Default constructor.
134 */
135 wxToolBar();
136
137 /**
138 Constructs a toolbar.
139
140 @param parent
141 Pointer to a parent window.
142 @param id
143 Window identifier. If -1, will automatically create an identifier.
144 @param pos
145 Window position. ::wxDefaultPosition indicates that wxWidgets should
146 generate a default position for the window.
147 If using the wxWindow class directly, supply an actual position.
148 @param size
149 Window size. ::wxDefaultSize indicates that wxWidgets should generate
150 a default size for the window.
151 @param style
152 Window style. See wxToolBar initial description for details.
153 @param name
154 Window name.
155
156 @remarks After a toolbar is created, you use AddTool() and perhaps
157 AddSeparator(), and then you must call Realize() to construct
158 and display the toolbar tools.
159 */
160 wxToolBar(wxWindow* parent, wxWindowID id,
161 const wxPoint& pos = wxDefaultPosition,
162 const wxSize& size = wxDefaultSize,
163 long style = wxTB_HORIZONTAL | wxBORDER_NONE,
164 const wxString& name = wxToolBarNameStr);
165
166 /**
167 Toolbar destructor.
168 */
169 virtual ~wxToolBar();
170
171 /**
172 Adds a new check (or toggle) tool to the toolbar. The parameters are the
173 same as in AddTool().
174
175 @see AddTool()
176 */
177 wxToolBarToolBase* AddCheckTool(int toolId, const wxString& label,
178 const wxBitmap& bitmap1,
179 const wxBitmap& bmpDisabled = wxNullBitmap,
180 const wxString& shortHelp = wxEmptyString,
181 const wxString& longHelp = wxEmptyString,
182 wxObject* clientData = NULL);
183
184 /**
185 Adds any control to the toolbar, typically e.g. a wxComboBox.
186
187 @param control
188 The control to be added.
189 @param label
190 Text to be displayed near the control.
191
192 @remarks
193 wxMSW: the label is only displayed if there is enough space
194 available below the embedded control.
195
196 @remarks
197 wxMac: labels are only displayed if wxWidgets is built with @c
198 wxMAC_USE_NATIVE_TOOLBAR set to 1
199 */
200 virtual wxToolBarToolBase* AddControl(wxControl* control,
201 const wxString& label = wxEmptyString);
202
203 /**
204 Adds a new radio tool to the toolbar. Consecutive radio tools form a
205 radio group such that exactly one button in the group is pressed at any
206 moment, in other words whenever a button in the group is pressed the
207 previously pressed button is automatically released. You should avoid
208 having the radio groups of only one element as it would be impossible
209 for the user to use such button.
210
211 By default, the first button in the radio group is initially pressed,
212 the others are not.
213
214
215 @see AddTool()
216 */
217 wxToolBarToolBase* AddRadioTool(int toolId, const wxString& label,
218 const wxBitmap& bitmap1,
219 const wxBitmap& bmpDisabled = wxNullBitmap,
220 const wxString& shortHelp = wxEmptyString,
221 const wxString& longHelp = wxEmptyString,
222 wxObject* clientData = NULL);
223
224 /**
225 Adds a separator for spacing groups of tools.
226
227 Note that the meaning of a "separator" is a vertical line under wxMSW and
228 a simple space under wxGTK.
229
230 @see AddTool(), SetToolSeparation()
231 */
232 virtual wxToolBarToolBase* AddSeparator();
233
234 /**
235 Adds a tool to the toolbar.
236
237 @param tool
238 The tool to be added.
239
240 @remarks After you have added tools to a toolbar, you must call
241 Realize() in order to have the tools appear.
242
243 @see AddSeparator(), AddCheckTool(), AddRadioTool(),
244 InsertTool(), DeleteTool(), Realize(), SetDropdownMenu()
245 */
246 virtual wxToolBarToolBase* AddTool(wxToolBarToolBase* tool);
247
248 /**
249 Adds a tool to the toolbar. This most commonly used version has fewer
250 parameters than the full version below which specifies the more rarely
251 used button features.
252
253 @param toolId
254 An integer by which the tool may be identified in subsequent
255 operations.
256 @param label
257 The string to be displayed with the tool.
258 @param bitmap
259 The primary tool bitmap.
260 @param shortHelp
261 This string is used for the tools tooltip.
262 @param kind
263 May be ::wxITEM_NORMAL for a normal button (default), ::wxITEM_CHECK
264 for a checkable tool (such tool stays pressed after it had been
265 toggled) or ::wxITEM_RADIO for a checkable tool which makes part of
266 a radio group of tools each of which is automatically unchecked
267 whenever another button in the group is checked. ::wxITEM_DROPDOWN
268 specifies that a drop-down menu button will appear next to the
269 tool button (only GTK+ and MSW). Call SetDropdownMenu() afterwards.
270
271 @remarks After you have added tools to a toolbar, you must call
272 Realize() in order to have the tools appear.
273
274 @see AddSeparator(), AddCheckTool(), AddRadioTool(),
275 InsertTool(), DeleteTool(), Realize(), SetDropdownMenu()
276 */
277 wxToolBarToolBase* AddTool(int toolId, const wxString& label,
278 const wxBitmap& bitmap,
279 const wxString& shortHelp = wxEmptyString,
280 wxItemKind kind = wxITEM_NORMAL);
281
282 /**
283 Adds a tool to the toolbar.
284
285 @param toolId
286 An integer by which the tool may be identified in subsequent
287 operations.
288 @param label
289 The string to be displayed with the tool.
290 @param bitmap
291 The primary tool bitmap.
292 @param bmpDisabled
293 The bitmap used when the tool is disabled. If it is equal to
294 ::wxNullBitmap (default), the disabled bitmap is automatically
295 generated by greying the normal one.
296 @param shortHelpString
297 This string is used for the tools tooltip.
298 @param longHelpString
299 This string is shown in the statusbar (if any) of the parent frame
300 when the mouse pointer is inside the tool.
301 @param kind
302 May be ::wxITEM_NORMAL for a normal button (default), ::wxITEM_CHECK
303 for a checkable tool (such tool stays pressed after it had been
304 toggled) or ::wxITEM_RADIO for a checkable tool which makes part of
305 a radio group of tools each of which is automatically unchecked
306 whenever another button in the group is checked. ::wxITEM_DROPDOWN
307 specifies that a drop-down menu button will appear next to the
308 tool button (only GTK+ and MSW). Call SetDropdownMenu() afterwards.
309 @param clientData
310 An optional pointer to client data which can be retrieved later
311 using GetToolClientData().
312
313 @remarks After you have added tools to a toolbar, you must call
314 Realize() in order to have the tools appear.
315
316 @see AddSeparator(), AddCheckTool(), AddRadioTool(),
317 InsertTool(), DeleteTool(), Realize(), SetDropdownMenu()
318 */
319 wxToolBarToolBase* AddTool(int toolId, const wxString& label,
320 const wxBitmap& bitmap,
321 const wxBitmap& bmpDisabled = wxNullBitmap,
322 wxItemKind kind = wxITEM_NORMAL,
323 const wxString& shortHelpString = wxEmptyString,
324 const wxString& longHelpString = wxEmptyString,
325 wxObject* clientData = NULL);
326
327 /**
328 Deletes all the tools in the toolbar.
329 */
330 virtual void ClearTools();
331
332 /**
333 Removes the specified tool from the toolbar and deletes it. If you don't
334 want to delete the tool, but just to remove it from the toolbar (to
335 possibly add it back later), you may use RemoveTool() instead.
336
337 @note It is unnecessary to call Realize() for the change to take
338 place, it will happen immediately.
339
340 @returns @true if the tool was deleted, @false otherwise.
341
342 @see DeleteToolByPos()
343 */
344 virtual bool DeleteTool(int toolId);
345
346 /**
347 This function behaves like DeleteTool() but it deletes the tool at the
348 specified position and not the one with the given id.
349 */
350 virtual bool DeleteToolByPos(size_t pos);
351
352 /**
353 Enables or disables the tool.
354
355 @param toolId
356 Tool to enable or disable.
357 @param enable
358 If @true, enables the tool, otherwise disables it.
359
360 @remarks Some implementations will change the visible state of the tool
361 to indicate that it is disabled.
362
363
364 @see GetToolEnabled(), ToggleTool()
365 */
366 virtual void EnableTool(int toolId, bool enable);
367
368 /**
369 Returns a pointer to the tool identified by @a id or @NULL if no
370 corresponding tool is found.
371 */
372 wxToolBarToolBase* FindById(int id) const;
373
374 /**
375 Returns a pointer to the control identified by @a id or @NULL if no
376 corresponding control is found.
377 */
378 virtual wxControl* FindControl(int id);
379
380 /**
381 Finds a tool for the given mouse position.
382
383 @param x
384 X position.
385 @param y
386 Y position.
387
388 @return A pointer to a tool if a tool is found, or @NULL otherwise.
389
390 @remarks Currently not implemented in wxGTK (always returns @NULL
391 there).
392 */
393 virtual wxToolBarToolBase* FindToolForPosition(wxCoord x, wxCoord y) const;
394
395 /**
396 Returns the left/right and top/bottom margins, which are also used for
397 inter-toolspacing.
398
399 @see SetMargins()
400 */
401 wxSize GetMargins() const;
402
403 /**
404 Returns the size of bitmap that the toolbar expects to have. The default
405 bitmap size is 16 by 15 pixels.
406
407 @remarks Note that this is the size of the bitmap you pass to AddTool(),
408 and not the eventual size of the tool button.
409
410 @see SetToolBitmapSize(), GetToolSize()
411 */
412 virtual wxSize GetToolBitmapSize() const;
413
414 /**
415 Get any client data associated with the tool.
416
417 @param toolId
418 Id of the tool, as passed to AddTool().
419
420 @return Client data, or @NULL if there is none.
421 */
422 virtual wxObject* GetToolClientData(int toolId) const;
423
424 /**
425 Called to determine whether a tool is enabled (responds to user input).
426
427 @param toolId
428 Id of the tool in question.
429
430 @return @true if the tool is enabled, @false otherwise.
431
432 @see EnableTool()
433 */
434 virtual bool GetToolEnabled(int toolId) const;
435
436 /**
437 Returns the long help for the given tool.
438
439 @param toolId
440 The tool in question.
441
442 @see SetToolLongHelp(), SetToolShortHelp()
443 */
444 virtual wxString GetToolLongHelp(int toolId) const;
445
446 /**
447 Returns the value used for packing tools.
448
449 @see SetToolPacking()
450 */
451 virtual int GetToolPacking() const;
452
453 /**
454 Returns the tool position in the toolbar, or @c wxNOT_FOUND if the tool
455 is not found.
456 */
457 virtual int GetToolPos(int toolId) const;
458
459 /**
460 Returns the default separator size.
461
462 @see SetToolSeparation()
463 */
464 virtual int GetToolSeparation() const;
465
466 /**
467 Returns the short help for the given tool.
468
469 @param toolId
470 The tool in question.
471
472 @see GetToolLongHelp(), SetToolShortHelp()
473 */
474 virtual wxString GetToolShortHelp(int toolId) const;
475
476 /**
477 Returns the size of a whole button, which is usually larger than a tool
478 bitmap because of added 3D effects.
479
480 @see SetToolBitmapSize(), GetToolBitmapSize()
481 */
482 virtual wxSize GetToolSize() const;
483
484 /**
485 Gets the on/off state of a toggle tool.
486
487 @param toolId
488 The tool in question.
489
490 @return @true if the tool is toggled on, @false otherwise.
491
492 @see ToggleTool()
493 */
494 virtual bool GetToolState(int toolId) const;
495
496 /**
497 Returns the number of tools in the toolbar.
498 */
499 size_t GetToolsCount() const;
500
501 /**
502 Inserts the control into the toolbar at the given position. You must
503 call Realize() for the change to take place.
504
505 @see AddControl(), InsertTool()
506 */
507 virtual wxToolBarToolBase* InsertControl(size_t pos, wxControl* control,
508 const wxString& label = wxEmptyString);
509
510 /**
511 Inserts the separator into the toolbar at the given position. You must
512 call Realize() for the change to take place.
513
514 @see AddSeparator(), InsertTool()
515 */
516 virtual wxToolBarToolBase* InsertSeparator(size_t pos);
517
518 //@{
519 /**
520 Inserts the tool with the specified attributes into the toolbar at the
521 given position.
522
523 You must call Realize() for the change to take place.
524
525 @see AddTool(), InsertControl(), InsertSeparator()
526 */
527 wxToolBarToolBase* InsertTool(size_t pos, int toolId,
528 const wxBitmap& bitmap1,
529 const wxBitmap& bitmap2 = wxNullBitmap,
530 bool isToggle = false,
531 wxObject* clientData = NULL,
532 const wxString& shortHelpString = "",
533 const wxString& longHelpString = "");
534 wxToolBarToolBase* InsertTool(size_t pos,
535 wxToolBarToolBase* tool);
536 //@}
537
538 /**
539 Called when the user clicks on a tool with the left mouse button. This
540 is the old way of detecting tool clicks; although it will still work,
541 you should use the EVT_MENU() or EVT_TOOL() macro instead.
542
543 @param toolId
544 The identifier passed to AddTool().
545 @param toggleDown
546 @true if the tool is a toggle and the toggle is down, otherwise is
547 @false.
548
549 @return If the tool is a toggle and this function returns @false, the
550 toggle state (internal and visual) will not be changed. This
551 provides a way of specifying that toggle operations are not
552 permitted in some circumstances.
553
554 @see OnMouseEnter(), OnRightClick()
555 */
556 virtual bool OnLeftClick(int toolId, bool toggleDown);
557
558 /**
559 This is called when the mouse cursor moves into a tool or out of the
560 toolbar. This is the old way of detecting mouse enter events;
561 although it will still work, you should use the EVT_TOOL_ENTER()
562 macro instead.
563
564 @param toolId
565 Greater than -1 if the mouse cursor has moved into the tool, or -1
566 if the mouse cursor has moved. The programmer can override this to
567 provide extra information about the tool, such as a short
568 description on the status line.
569
570 @remarks With some derived toolbar classes, if the mouse moves quickly
571 out of the toolbar, wxWidgets may not be able to detect it.
572 Therefore this function may not always be called when expected.
573 */
574 virtual void OnMouseEnter(int toolId);
575
576 /**
577 @deprecated This is the old way of detecting tool right clicks;
578 although it will still work, you should use the
579 EVT_TOOL_RCLICKED() macro instead.
580
581 Called when the user clicks on a tool with the right mouse button. The
582 programmer should override this function to detect right tool clicks.
583
584 @param toolId
585 The identifier passed to AddTool().
586 @param x
587 The x position of the mouse cursor.
588 @param y
589 The y position of the mouse cursor.
590
591 @remarks A typical use of this member might be to pop up a menu.
592
593 @see OnMouseEnter(), OnLeftClick()
594 */
595 virtual void OnRightClick(int toolId, long x, long y);
596
597 /**
598 This function should be called after you have added tools.
599 */
600 virtual bool Realize();
601
602 /**
603 Removes the given tool from the toolbar but doesn't delete it. This
604 allows to insert/add this tool back to this (or another) toolbar later.
605
606 @note It is unnecessary to call Realize() for the change to take place,
607 it will happen immediately.
608
609
610 @see DeleteTool()
611 */
612 virtual wxToolBarToolBase* RemoveTool(int id);
613
614 /**
615 Sets the bitmap resource identifier for specifying tool bitmaps as
616 indices into a custom bitmap. Windows CE only.
617 */
618 void SetBitmapResource(int resourceId);
619
620 /**
621 Sets the dropdown menu for the tool given by its @e id. The tool itself
622 will delete the menu when it's no longer needed. Only supported under
623 GTK+ und MSW.
624
625 If you define a EVT_TOOL_DROPDOWN() handler in your program, you must
626 call wxEvent::Skip() from it or the menu won't be displayed.
627 */
628 bool SetDropdownMenu(int id, wxMenu* menu);
629
630 /**
631 Set the values to be used as margins for the toolbar.
632
633 @param x
634 Left margin, right margin and inter-tool separation value.
635 @param y
636 Top margin, bottom margin and inter-tool separation value.
637
638 @remarks This must be called before the tools are added if absolute
639 positioning is to be used, and the default (zero-size) margins are
640 to be overridden.
641
642 @see GetMargins()
643 */
644 virtual void SetMargins(int x, int y);
645
646 /**
647 Set the margins for the toolbar.
648
649 @param size
650 Margin size.
651
652 @remarks This must be called before the tools are added if absolute
653 positioning is to be used, and the default (zero-size) margins are
654 to be overridden.
655
656 @see GetMargins(), wxSize
657 */
658 void SetMargins(const wxSize& size);
659
660 /**
661 Sets the default size of each tool bitmap. The default bitmap size is 16
662 by 15 pixels.
663
664 @param size
665 The size of the bitmaps in the toolbar.
666
667 @remarks This should be called to tell the toolbar what the tool bitmap
668 size is. Call it before you add tools.
669
670 @see GetToolBitmapSize(), GetToolSize()
671 */
672 virtual void SetToolBitmapSize(const wxSize& size);
673
674 /**
675 Sets the client data associated with the tool.
676 */
677 virtual void SetToolClientData(int id, wxObject* clientData);
678
679 /**
680 Sets the bitmap to be used by the tool with the given ID when the tool
681 is in a disabled state. This can only be used on Button tools, not
682 controls.
683
684 @note The native toolbar classes on the main platforms all synthesize
685 the disabled bitmap from the normal bitmap, so this function will
686 have no effect on those platforms.
687
688 */
689 virtual void SetToolDisabledBitmap(int id, const wxBitmap& bitmap);
690
691 /**
692 Sets the long help for the given tool.
693
694 @param toolId
695 The tool in question.
696 @param helpString
697 A string for the long help.
698
699 @remarks You might use the long help for displaying the tool purpose on
700 the status line.
701
702 @see GetToolLongHelp(), SetToolShortHelp(),
703 */
704 virtual void SetToolLongHelp(int toolId, const wxString& helpString);
705
706 /**
707 Sets the bitmap to be used by the tool with the given ID. This can only
708 be used on Button tools, not controls.
709 */
710 virtual void SetToolNormalBitmap(int id, const wxBitmap& bitmap);
711
712 /**
713 Sets the value used for spacing tools. The default value is 1.
714
715 @param packing
716 The value for packing.
717
718 @remarks The packing is used for spacing in the vertical direction if
719 the toolbar is horizontal, and for spacing in the horizontal
720 direction if the toolbar is vertical.
721
722 @see GetToolPacking()
723 */
724 virtual void SetToolPacking(int packing);
725
726 /**
727 Sets the default separator size. The default value is 5.
728
729 @param separation
730 The separator size.
731
732 @see AddSeparator()
733 */
734 virtual void SetToolSeparation(int separation);
735
736 /**
737 Sets the short help for the given tool.
738
739 @param toolId
740 The tool in question.
741 @param helpString
742 The string for the short help.
743
744 @remarks An application might use short help for identifying the tool
745 purpose in a tooltip.
746
747
748 @see GetToolShortHelp(), SetToolLongHelp()
749 */
750 virtual void SetToolShortHelp(int toolId, const wxString& helpString);
751
752 /**
753 Toggles a tool on or off. This does not cause any event to get emitted.
754
755 @param toolId
756 Tool in question.
757 @param toggle
758 If @true, toggles the tool on, otherwise toggles it off.
759
760 @remarks Only applies to a tool that has been specified as a toggle
761 tool.
762 */
763 virtual void ToggleTool(int toolId, bool toggle);
764 };
765