Don't lie about wxImageList in XRC format spec.
[wxWidgets.git] / docs / doxygen / overviews / toolbar.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: toolbar.h
3 // Purpose: topic overview
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
7
8 /**
9
10 @page overview_toolbar Toolbar Overview
11
12 @tableofcontents
13
14 The toolbar family of classes allows an application to use toolbars in a
15 variety of configurations and styles.
16
17 The toolbar is a popular user interface component and contains a set of bitmap
18 buttons or toggles. A toolbar gives faster access to an application's
19 facilities than menus, which have to be popped up and selected rather
20 laboriously.
21
22 Instead of supplying one toolbar class with a number of different
23 implementations depending on platform, wxWidgets separates out the classes.
24 This is because there are a number of different toolbar styles that you may
25 wish to use simultaneously, and also, future toolbar implementations will
26 emerge which cannot all be shoe-horned into the one class.
27
28 For each platform, the symbol wxToolBar is defined to be one of the specific
29 toolbar classes.
30
31 The following is a summary of the toolbar classes and their differences:
32
33 @li wxToolBarBase: This is a base class with pure virtual functions, and should
34 not be used directly.
35 @li wxToolBarSimple: A simple toolbar class written entirely with generic
36 wxWidgets functionality. A simple 3D effect for buttons is possible, but it
37 is not consistent with the Windows look and feel. This toolbar can scroll,
38 and you can have arbitrary numbers of rows and columns.
39 @li wxToolBarMSW: This class implements an old-style Windows toolbar, only on
40 Windows. There are small, three-dimensional buttons, which do not
41 (currently) reflect the current Windows colour settings: the buttons are
42 grey. This is the default wxToolBar on 16-bit windows.
43 @li wxToolBar95: Uses the native Windows 95 toolbar class. It dynamically
44 adjusts it's background and button colours according to user colour
45 settings. CreateTools must be called after the tools have been added. No
46 absolute positioning is supported but you can specify the number of rows,
47 and add tool separators with @c AddSeparator. Tooltips are supported.
48 @c OnRightClick is not supported. This is the default wxToolBar on Windows
49 95, Windows NT 4 and above. With the style wxTB_FLAT, the flat toolbar look
50 is used, with a border that is highlighted when the cursor moves over the
51 buttons.
52
53 A toolbar might appear as a single row of images under the menubar, or it might
54 be in a separate frame layout in several rows and columns. The class handles
55 the layout of the images, unless explicit positioning is requested.
56
57 A tool is a bitmap which can either be a button (there is no 'state', it just
58 generates an event when clicked) or it can be a toggle. If a toggle, a second
59 bitmap can be provided to depict the 'on' state; if the second bitmap is
60 omitted, either the inverse of the first bitmap will be used (for monochrome
61 displays) or a thick border is drawn around the bitmap (for colour displays
62 where inverting will not have the desired result).
63
64 The Windows-specific toolbar classes expect 16-colour bitmaps that are 16
65 pixels wide and 15 pixels high. If you want to use a different size, call
66 @c SetToolBitmapSize as the demo shows, before adding tools to the button bar.
67 Don't supply more than one bitmap for each tool, because the toolbar generates
68 all three images (normal, depressed, and checked) from the single bitmap you
69 give it.
70
71
72 @section overview_toolbar_library Using the Toolbar Library
73
74 Include @c "wx/toolbar.h", or if using a class directly, one of:
75
76 - @c "wx/msw/tbarmsw.h" for wxToolBarMSW
77 - @c "wx/msw/tbar95.h" for wxToolBar95
78 - @c "wx/tbarsmpl.h" for wxToolBarSimple
79
80 An example of using a toolbar is given in the "toolbar" sample.
81
82 */