33 normalImage (
std::move (normalIm)),
34 toggledOnImage (
std::move (toggledOnIm))
36 jassert (normalImage !=
nullptr);
46 preferredSize = minSize = maxSize = toolbarDepth;
59void ToolbarButton::setCurrentImage (
Drawable*
const newImage)
61 if (newImage != currentImage)
64 currentImage = newImage;
66 if (currentImage !=
nullptr)
75void ToolbarButton::updateDrawable()
77 if (currentImage !=
nullptr)
97Drawable* ToolbarButton::getImageToUse()
const
103 return toggledOnImage.get();
105 return normalImage.get();
110 setCurrentImage (getImageToUse());
void setInterceptsMouseClicks(bool allowClicksOnThisComponent, bool allowClicksOnChildComponents) noexcept
Changes the default return value for the hitTest() method.
void setAlpha(float newAlpha)
Changes the transparency of this component.
void addAndMakeVisible(Component *child, int zOrder=-1)
Adds a child component to this one, and also makes the child visible if it isn't already.
void removeChildComponent(Component *childToRemove)
Removes one of this component's child-components.
bool isEnabled() const noexcept
Returns true if the component (and all its parents) are enabled.
The base class for objects which can draw themselves, e.g.
void setTransformToFit(const Rectangle< float > &areaInParent, RectanglePlacement placement)
Sets a transform for this drawable that will position it within the specified area of its parent comp...
A graphics context, used for drawing a component or image.
@ centred
A shorthand value that is equivalent to (xMid | yMid).
Manages a rectangle and allows geometric operations to be performed on it.