36 jassert (normalImage !=
nullptr);
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.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...