JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::RelativeCoordinatePositionerBase Class Referenceabstract

Base class for Component::Positioners that are based upon relative coordinates. More...

#include <juce_RelativeCoordinatePositioner.h>

Inheritance diagram for juce::RelativeCoordinatePositionerBase:
Collaboration diagram for juce::RelativeCoordinatePositionerBase:

Classes

class  ComponentScope
 Used for resolving a RelativeCoordinate expression in the context of a component. More...
 

Public Member Functions

 RelativeCoordinatePositionerBase (Component &)
 
 ~RelativeCoordinatePositionerBase () override
 
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 &) override
 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 &) override
 Called when the component has children added or removed, or their z-order changes. More...
 
virtual void componentEnablementChanged (Component &component)
 
void componentMovedOrResized (Component &, bool, bool) override
 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 &) override
 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...
 
ComponentgetComponent () const noexcept
 Returns the component that this positioner controls. More...
 
void markerListBeingDeleted (MarkerList *) override
 Called when the given marker list is being deleted. More...
 
void markersChanged (MarkerList *) override
 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

Componentcomponent
 
bool registeredOk
 
Array< Component * > sourceComponents
 
Array< MarkerList * > sourceMarkerLists
 

Friends

class DependencyFinderScope
 

Detailed Description

Base class for Component::Positioners that are based upon relative coordinates.

@tags{GUI}

Constructor & Destructor Documentation

◆ RelativeCoordinatePositionerBase()

juce::RelativeCoordinatePositionerBase::RelativeCoordinatePositionerBase ( Component )

◆ ~RelativeCoordinatePositionerBase()

juce::RelativeCoordinatePositionerBase::~RelativeCoordinatePositionerBase ( )
override

Member Function Documentation

◆ addCoordinate()

bool juce::RelativeCoordinatePositionerBase::addCoordinate ( const RelativeCoordinate )

◆ addPoint()

bool juce::RelativeCoordinatePositionerBase::addPoint ( const RelativePoint )

◆ apply()

void juce::RelativeCoordinatePositionerBase::apply ( )

◆ applyNewBounds()

virtual void juce::Component::Positioner::applyNewBounds ( const Rectangle< int > &  newBounds)
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.

◆ applyToComponentBounds()

virtual void juce::RelativeCoordinatePositionerBase::applyToComponentBounds ( )
protectedpure virtual

◆ componentBeingDeleted()

void juce::RelativeCoordinatePositionerBase::componentBeingDeleted ( Component component)
overridevirtual

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!

Parameters
componentthe component that was deleted

Reimplemented from juce::ComponentListener.

◆ componentBroughtToFront()

virtual void juce::ComponentListener::componentBroughtToFront ( Component component)
virtualinherited

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

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

Reimplemented in juce::FocusOutline, and juce::DropShadower.

◆ componentChildrenChanged()

void juce::RelativeCoordinatePositionerBase::componentChildrenChanged ( Component component)
overridevirtual

Called when the component has children added or removed, or their z-order changes.

Parameters
componentthe component whose children have changed
See also
Component::childrenChanged, Component::addChildComponent, Component::removeChildComponent

Reimplemented from juce::ComponentListener.

◆ componentEnablementChanged()

virtual void juce::ComponentListener::componentEnablementChanged ( Component component)
virtualinherited

◆ componentMovedOrResized()

void juce::RelativeCoordinatePositionerBase::componentMovedOrResized ( Component component,
bool  wasMoved,
bool  wasResized 
)
overridevirtual

Called when the component's position or size changes.

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

Reimplemented from juce::ComponentListener.

◆ componentNameChanged()

virtual void juce::ComponentListener::componentNameChanged ( Component component)
virtualinherited

Called when the component's name is changed.

Parameters
componentthe component that had its name changed
See also
Component::setName, Component::getName

Reimplemented in juce::MultiDocumentPanel.

◆ componentParentHierarchyChanged()

void juce::RelativeCoordinatePositionerBase::componentParentHierarchyChanged ( Component component)
overridevirtual

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
componentthe component that this listener is registered with
See also
Component::parentHierarchyChanged

Reimplemented from juce::ComponentListener.

◆ componentVisibilityChanged()

virtual void juce::ComponentListener::componentVisibilityChanged ( Component component)
virtualinherited

Called when the component is made visible or invisible.

Parameters
componentthe component that changed
See also
Component::setVisible

Reimplemented in juce::Label, juce::FocusOutline, juce::ComponentMovementWatcher, and juce::DropShadower.

◆ getComponent()

Component& juce::Component::Positioner::getComponent ( ) const
inlinenoexceptinherited

Returns the component that this positioner controls.

◆ markerListBeingDeleted()

void juce::RelativeCoordinatePositionerBase::markerListBeingDeleted ( MarkerList markerList)
overridevirtual

Called when the given marker list is being deleted.

Reimplemented from juce::MarkerList::Listener.

◆ markersChanged()

void juce::RelativeCoordinatePositionerBase::markersChanged ( MarkerList markerList)
overridevirtual

Called when something in the given marker list changes.

Implements juce::MarkerList::Listener.

◆ registerComponentListener()

void juce::RelativeCoordinatePositionerBase::registerComponentListener ( Component )
private

◆ registerCoordinates()

virtual bool juce::RelativeCoordinatePositionerBase::registerCoordinates ( )
protectedpure virtual

◆ registerMarkerListListener()

void juce::RelativeCoordinatePositionerBase::registerMarkerListListener ( MarkerList )
private

◆ unregisterListeners()

void juce::RelativeCoordinatePositionerBase::unregisterListeners ( )
private

Friends And Related Function Documentation

◆ DependencyFinderScope

friend class DependencyFinderScope
friend

Member Data Documentation

◆ component

Component& juce::Component::Positioner::component
privateinherited

◆ registeredOk

bool juce::RelativeCoordinatePositionerBase::registeredOk
private

◆ sourceComponents

Array<Component*> juce::RelativeCoordinatePositionerBase::sourceComponents
private

◆ sourceMarkerLists

Array<MarkerList*> juce::RelativeCoordinatePositionerBase::sourceMarkerLists
private

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