Adds a drop-shadow to a component.
This object creates and manages a component which sits behind another component, creating a gaussian shadow around it. The shadow component will track the position of the component and if it's brought to the front it'll also follow this.
For desktop windows you don't need to use this class directly - just set the Component::windowHasDropShadow flag when calling Component::addToDesktop(), and the system will create one of these if it's needed (which it obviously isn't on the Mac, for example).
Public Member Functions | |
| DropShadower (const DropShadow &shadowType) | |
| Creates a DropShadower. | |
| ~DropShadower () override | |
| Destructor. | |
| void | setOwner (Component *componentToFollow) |
| Attaches the DropShadower to the component you want to shadow. | |
| juce::DropShadower::DropShadower | ( | const DropShadow & | shadowType | ) |
Creates a DropShadower.
Referenced by setOwner().
|
override |
Destructor.
| void juce::DropShadower::setOwner | ( | Component * | componentToFollow | ) |
Attaches the DropShadower to the component you want to shadow.
References DropShadower(), JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR, and JUCE_DECLARE_WEAK_REFERENCEABLE.