The wxToolBar class gives wxWindows programs an extra, and increasingly popular, user interface component: a set of bitmap buttons or toggles. A toolbar gives faster access to an application's facilities than menus, which have to be popped up and selected rather laboriously. Besides which, a toolbar looks prettier than a purely menu-based interface.
wxToolBar uses a canvas subwindow for drawing bitmaps, and so bitmap images cannot be mixed with panel items, but in most cases this won't be important. A toolbar might appear as a single row of images under the menubar, or it might be in a separate frame layout in several rows and columns. The class handles the layout of the images, unless explicit positioning is requested.
A tool is a bitmap which can either be a button (there is no 'state', it just generates an event when clicked) or it can be a toggle. If a toggle, a second bitmap can be provided to depict the 'on' state; if the second bitmap is omitted, either the inverse of the first bitmap will be used (for monochrome displays) or a thick border is drawn around the bitmap (for colour displays where inverting will not have the desired result).
Mouse click events for a given button are sent to a member called OnLeftClick, and so an application must derive from wxToolBar in order to use it. The application can also handle OnMouseEnter events for the tools, to give the user extra feedback about the tools as the mouse moves over them.