JUCE
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions
DropShadower Class Reference

Adds a drop-shadow to a component. More...

Inherits ComponentListener.

List of all members.

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)

Detailed Description

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).


Constructor & Destructor Documentation

DropShadower::DropShadower ( float  alpha = 0.5f,
int  xOffset = 1,
int  yOffset = 5,
float  blurRadius = 10.0f 
)

Creates a DropShadower.

Parameters:
alphathe opacity of the shadows, from 0 to 1.0
xOffsetthe horizontal displacement of the shadow, in pixels
yOffsetthe vertical displacement of the shadow, in pixels
blurRadiusthe radius of the blur to use for creating the shadow
virtual DropShadower::~DropShadower ( ) [virtual]

Destructor.


Member Function Documentation

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.

Reimplemented from ComponentListener.

void DropShadower::componentVisibilityChanged ( Component component) [virtual]

Reimplemented from ComponentListener.


The documentation for this class was generated from the following file: