ComponentListener Class Reference

Gets informed about changes to a component's hierarchy or position. More...

Inherited by Component::SafePointer< ComponentType > [private], ComponentMovementWatcher, DropShadower, Label [private], MultiDocumentPanel [private], Component::SafePointer< Component > [private], and Viewport [private].

List of all members.

Public Member Functions

virtual ~ComponentListener ()
 Destructor.
virtual void componentMovedOrResized (Component &component, bool wasMoved, bool wasResized)
 Called when the component's position or size changes.
virtual void componentBroughtToFront (Component &component)
 Called when the component is brought to the top of the z-order.
virtual void componentVisibilityChanged (Component &component)
 Called when the component is made visible or invisible.
virtual void componentChildrenChanged (Component &component)
 Called when the component has children added or removed.
virtual void componentParentHierarchyChanged (Component &component)
 Called to indicate that the component's parents have changed.
virtual void componentNameChanged (Component &component)
 Called when the component's name is changed.
virtual void componentBeingDeleted (Component &component)
 Called when the component is in the process of being deleted.

Detailed Description

Gets informed about changes to a component's hierarchy or position.

To monitor a component for changes, register a subclass of ComponentListener with the component using Component::addComponentListener().

Be sure to deregister listeners before you delete them!

See also:
Component::addComponentListener, Component::removeComponentListener

Constructor & Destructor Documentation

virtual ComponentListener::~ComponentListener (  )  [virtual]

Destructor.


Member Function Documentation

virtual void ComponentListener::componentMovedOrResized ( Component component,
bool  wasMoved,
bool  wasResized 
) [virtual]

Called when the component's position or size changes.

Parameters:
component the component that was moved or resized
wasMoved true if the component's top-left corner has just moved
wasResized true if the component's width or height has just changed
See also:
Component::setBounds, Component::resized, Component::moved

Reimplemented in Label, ComponentMovementWatcher, Viewport, and DropShadower.

virtual void ComponentListener::componentBroughtToFront ( Component component  )  [virtual]

Called when the component is brought to the top of the z-order.

Parameters:
component the component that was moved
See also:
Component::toFront, Component::broughtToFront

Reimplemented in DropShadower.

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

Called when the component is made visible or invisible.

Parameters:
component the component that changed
See also:
Component::setVisible

Reimplemented in Label, DropShadower, and CarbonViewWrapperComponent.

virtual void ComponentListener::componentChildrenChanged ( Component component  )  [virtual]

Called when the component has children added or removed.

Parameters:
component the component whose children were changed
See also:
Component::childrenChanged, Component::addChildComponent, Component::removeChildComponent

Reimplemented in DropShadower.

virtual void ComponentListener::componentParentHierarchyChanged ( Component component  )  [virtual]

Called to indicate that the component's parents have changed.

When a component is added or removed from its parent, all of its children will produce this notification (recursively - so all children of its children will also be called as well).

Parameters:
component the component that this listener is registered with
See also:
Component::parentHierarchyChanged

Reimplemented in Label, ComponentMovementWatcher, and DropShadower.

virtual void ComponentListener::componentNameChanged ( Component component  )  [virtual]

Called when the component's name is changed.

See also:
Component::setName, Component::getName

Reimplemented in MultiDocumentPanel.

virtual void ComponentListener::componentBeingDeleted ( Component component  )  [virtual]

Called when the component is in the process of being deleted.

This callback is made from inside the destructor, so be very, very cautious about what you do inside the callback.

It will be called before the component has been removed from its parent, and before any child components have been removed.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Apr 26 11:42:11 2010 for JUCE by  doxygen 1.6.3