Adds a drop-shadow to a component. More...
Inherits ComponentListener.
Public Member Functions | |
| DropShadower (float alpha=0.5f, int xOffset=1, int yOffset=5, float blurRadius=10.0f) | |
| Creates a DropShadower. | |
| virtual | ~DropShadower () |
| Destructor. | |
| void | setOwner (Component *componentToFollow) |
| Attaches the DropShadower to the component you want to shadow. | |
| void | componentMovedOrResized (Component &component, bool wasMoved, bool wasResized) |
| void | componentBroughtToFront (Component &component) |
| void | componentParentHierarchyChanged (Component &component) |
| void | componentVisibilityChanged (Component &component) |
Adds a drop-shadow to a component.
This object creates and manages a set of components which sit around a component, creating a gaussian shadow around it. The components will track the position of the component and if it's brought to the front they'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).
| DropShadower::DropShadower | ( | float | alpha = 0.5f, |
| int | xOffset = 1, |
||
| int | yOffset = 5, |
||
| float | blurRadius = 10.0f |
||
| ) |
Creates a DropShadower.
| alpha | the opacity of the shadows, from 0 to 1.0 |
| xOffset | the horizontal displacement of the shadow, in pixels |
| yOffset | the vertical displacement of the shadow, in pixels |
| blurRadius | the radius of the blur to use for creating the shadow |
| virtual DropShadower::~DropShadower | ( | ) | [virtual] |
Destructor.
| void DropShadower::setOwner | ( | Component * | componentToFollow | ) |
Attaches the DropShadower to the component you want to shadow.
| void DropShadower::componentMovedOrResized | ( | Component & | component, |
| bool | wasMoved, | ||
| bool | wasResized | ||
| ) | [virtual] |
Reimplemented from ComponentListener.
| void DropShadower::componentBroughtToFront | ( | Component & | component | ) | [virtual] |
Reimplemented from ComponentListener.
| void DropShadower::componentParentHierarchyChanged | ( | Component & | component | ) | [virtual] |
Reimplemented from ComponentListener.
| void DropShadower::componentVisibilityChanged | ( | Component & | component | ) | [virtual] |
Reimplemented from ComponentListener.