A component containing a list of toolbar items, which the user can drag onto a toolbar to add them. More...
Inherits Component, and DragAndDropContainer.
Public Member Functions | |
| ToolbarItemPalette (ToolbarItemFactory &factory, Toolbar *toolbar) | |
| Creates a palette of items for a given factory, with the aim of adding them to the specified toolbar. | |
| ~ToolbarItemPalette () | |
| Destructor. | |
| void | resized () |
| Called when this component's size has been changed. | |
A component containing a list of toolbar items, which the user can drag onto a toolbar to add them.
You can use this class directly, but it's a lot easier to call Toolbar::showCustomisationDialog(), which automatically shows one of these in a dialog box with lots of extra controls.
| ToolbarItemPalette::ToolbarItemPalette | ( | ToolbarItemFactory & | factory, |
| Toolbar * | toolbar | ||
| ) |
Creates a palette of items for a given factory, with the aim of adding them to the specified toolbar.
The ToolbarItemFactory::getAllToolbarItemIds() method is used to create the set of items that are shown in this palette.
The toolbar and factory must not be deleted while this object exists.
| ToolbarItemPalette::~ToolbarItemPalette | ( | ) |
Destructor.
| void ToolbarItemPalette::resized | ( | ) | [virtual] |
Called when this component's size has been changed.
A component can implement this method to do things such as laying out its child components when its width or height changes.
The method is called synchronously as a result of the setBounds or setSize methods, so repeatedly changing a components size will repeatedly call its resized method (unlike things like repainting, where multiple calls to repaint are coalesced together).
If the component is a top-level window on the desktop, its size could also be changed by operating-system factors beyond the application's control.
Reimplemented from Component.