JUCE
|
Gets informed about changes to a component's hierarchy or position. More...
Public Member Functions | |
virtual | ~ComponentListener ()=default |
Destructor. More... | |
virtual void | componentMovedOrResized (Component &component, bool wasMoved, bool wasResized) |
Called when the component's position or size changes. More... | |
virtual void | componentBroughtToFront (Component &component) |
Called when the component is brought to the top of the z-order. More... | |
virtual void | componentVisibilityChanged (Component &component) |
Called when the component is made visible or invisible. More... | |
virtual void | componentChildrenChanged (Component &component) |
Called when the component has children added or removed, or their z-order changes. More... | |
virtual void | componentParentHierarchyChanged (Component &component) |
Called to indicate that the component's parents have changed. More... | |
virtual void | componentNameChanged (Component &component) |
Called when the component's name is changed. More... | |
virtual void | componentBeingDeleted (Component &component) |
Called when the component is in the process of being deleted. More... | |
virtual void | componentEnablementChanged (Component &component) |
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!
|
virtualdefault |
Destructor.
|
virtual |
Called when the component's position or size changes.
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 |
Reimplemented in Label, Viewport, ComponentMovementWatcher, and RelativeCoordinatePositionerBase.
Referenced by ComponentMovementWatcher::getComponent(), and Viewport::getHorizontalScrollBar().
|
virtual |
Called when the component is brought to the top of the z-order.
component | the component that was moved |
|
virtual |
Called when the component is made visible or invisible.
component | the component that changed |
Reimplemented in Label, and ComponentMovementWatcher.
Referenced by ComponentMovementWatcher::getComponent().
|
virtual |
Called when the component has children added or removed, or their z-order changes.
component | the component whose children have changed |
Reimplemented in RelativeCoordinatePositionerBase.
|
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).
component | the component that this listener is registered with |
Reimplemented in Label, ComponentMovementWatcher, and RelativeCoordinatePositionerBase.
Referenced by ComponentMovementWatcher::getComponent().
|
virtual |
Called when the component's name is changed.
component | the component that had its name changed |
Reimplemented in MultiDocumentPanel.
Referenced by MultiDocumentPanel::getCurrentTabbedComponent().
|
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 in here.
In particular, bear in mind that it's the Component base class's destructor that calls this - so if the object that's being deleted is a subclass of Component, then the subclass layers of the object will already have been destructed when it gets to this point!
component | the component that was deleted |
Reimplemented in ComponentMovementWatcher, and RelativeCoordinatePositionerBase.
Referenced by ComponentMovementWatcher::getComponent().
|
virtual |