Base class for Component::Positioners that are based upon relative coordinates. More...
#include <juce_RelativeCoordinatePositioner.h>
Classes | |
class | ComponentScope |
Used for resolving a RelativeCoordinate expression in the context of a component. More... | |
Public Member Functions | |
RelativeCoordinatePositionerBase (Component &) | |
~RelativeCoordinatePositionerBase () | |
bool | addCoordinate (const RelativeCoordinate &) |
bool | addPoint (const RelativePoint &) |
void | apply () |
virtual void | applyNewBounds (const Rectangle< int > &newBounds)=0 |
Attempts to set the component's position to the given rectangle. More... | |
void | componentBeingDeleted (Component &) |
Called when the component is in the process of being deleted. More... | |
virtual void | componentBroughtToFront (Component &component) |
Called when the component is brought to the top of the z-order. More... | |
void | componentChildrenChanged (Component &) |
Called when the component has children added or removed, or their z-order changes. More... | |
void | componentMovedOrResized (Component &, bool, bool) |
Called when the component's position or size changes. More... | |
virtual void | componentNameChanged (Component &component) |
Called when the component's name is changed. More... | |
void | componentParentHierarchyChanged (Component &) |
Called to indicate that the component's parents have changed. More... | |
virtual void | componentVisibilityChanged (Component &component) |
Called when the component is made visible or invisible. More... | |
Component & | getComponent () const noexcept |
Returns the component that this positioner controls. More... | |
void | markerListBeingDeleted (MarkerList *) |
Called when the given marker list is being deleted. More... | |
void | markersChanged (MarkerList *) |
Called when something in the given marker list changes. More... | |
Protected Member Functions | |
virtual void | applyToComponentBounds ()=0 |
virtual bool | registerCoordinates ()=0 |
Private Member Functions | |
void | registerComponentListener (Component &) |
void | registerMarkerListListener (MarkerList *) |
void | unregisterListeners () |
Private Attributes | |
bool | registeredOk |
Array< Component * > | sourceComponents |
Array< MarkerList * > | sourceMarkerLists |
Friends | |
class | DependencyFinderScope |
Base class for Component::Positioners that are based upon relative coordinates.
RelativeCoordinatePositionerBase::RelativeCoordinatePositionerBase | ( | Component & | ) |
RelativeCoordinatePositionerBase::~RelativeCoordinatePositionerBase | ( | ) |
bool RelativeCoordinatePositionerBase::addCoordinate | ( | const RelativeCoordinate & | ) |
bool RelativeCoordinatePositionerBase::addPoint | ( | const RelativePoint & | ) |
void RelativeCoordinatePositionerBase::apply | ( | ) |
|
pure virtualinherited |
Attempts to set the component's position to the given rectangle.
Unlike simply calling Component::setBounds(), this may involve the positioner being smart enough to adjust itself to fit the new bounds, e.g. a RelativeRectangle's positioner may try to reverse the expressions used to make them fit these new coordinates.
|
protectedpure virtual |
|
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!
Reimplemented from ComponentListener.
|
virtualinherited |
Called when the component is brought to the top of the z-order.
component | the component that was moved |
Reimplemented in DropShadower.
|
virtual |
Called when the component has children added or removed, or their z-order changes.
component | the component whose children have changed |
Reimplemented from ComponentListener.
|
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 from ComponentListener.
|
virtualinherited |
Called when the component's name is changed.
Reimplemented in MultiDocumentPanel.
Referenced by MultiDocumentPanel::getCurrentTabbedComponent().
|
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 from ComponentListener.
|
virtualinherited |
Called when the component is made visible or invisible.
component | the component that changed |
Reimplemented in Label, ComponentMovementWatcher, and DropShadower.
Referenced by ComponentMovementWatcher::getComponent().
|
inlinenoexceptinherited |
Returns the component that this positioner controls.
|
virtual |
Called when the given marker list is being deleted.
Reimplemented from MarkerList::Listener.
|
virtual |
Called when something in the given marker list changes.
Implements MarkerList::Listener.
|
private |
|
protectedpure virtual |
|
private |
|
private |
|
friend |
|
private |
|
private |