RelativeCoordinatePositionerBase Class Referenceabstract

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

Inheritance diagram for RelativeCoordinatePositionerBase:

Classes

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

Public Member Functions

 RelativeCoordinatePositionerBase (Component &)
 
 ~RelativeCoordinatePositionerBase ()
 
void componentMovedOrResized (Component &, bool, bool)
 Called when the component's position or size changes. More...
 
void componentParentHierarchyChanged (Component &)
 Called to indicate that the component's parents have changed. More...
 
void componentChildrenChanged (Component &)
 Called when the component has children added or removed, or their z-order changes. More...
 
void componentBeingDeleted (Component &)
 Called when the component is in the process of being deleted. More...
 
void markersChanged (MarkerList *)
 Called when something in the given marker list changes. More...
 
void markerListBeingDeleted (MarkerList *)
 Called when the given marker list is being deleted. More...
 
void apply ()
 
bool addCoordinate (const RelativeCoordinate &)
 
bool addPoint (const RelativePoint &)
 
- Public Member Functions inherited from Component::Positioner
 Positioner (Component &component) noexcept
 Creates a Positioner which can control the specified component. More...
 
virtual ~Positioner ()
 Destructor. More...
 
ComponentgetComponent () const noexcept
 Returns the component that this positioner controls. More...
 
virtual void applyNewBounds (const Rectangle< int > &newBounds)=0
 Attempts to set the component's position to the given rectangle. More...
 
- Public Member Functions inherited from ComponentListener
virtual ~ComponentListener ()
 Destructor. 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 componentNameChanged (Component &component)
 Called when the component's name is changed. More...
 
- Public Member Functions inherited from MarkerList::Listener
virtual ~Listener ()
 Destructor. More...
 

Protected Member Functions

virtual bool registerCoordinates ()=0
 
virtual void applyToComponentBounds ()=0
 

Detailed Description

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

Constructor & Destructor Documentation

◆ RelativeCoordinatePositionerBase()

RelativeCoordinatePositionerBase::RelativeCoordinatePositionerBase ( Component )

◆ ~RelativeCoordinatePositionerBase()

RelativeCoordinatePositionerBase::~RelativeCoordinatePositionerBase ( )

Member Function Documentation

◆ componentMovedOrResized()

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

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

◆ componentParentHierarchyChanged()

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

Reimplemented from ComponentListener.

◆ componentChildrenChanged()

void RelativeCoordinatePositionerBase::componentChildrenChanged ( Component component)
virtual

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

◆ componentBeingDeleted()

void RelativeCoordinatePositionerBase::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 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.

◆ markersChanged()

void RelativeCoordinatePositionerBase::markersChanged ( MarkerList markerList)
virtual

Called when something in the given marker list changes.

Implements MarkerList::Listener.

◆ markerListBeingDeleted()

void RelativeCoordinatePositionerBase::markerListBeingDeleted ( MarkerList markerList)
virtual

Called when the given marker list is being deleted.

Reimplemented from MarkerList::Listener.

◆ apply()

void RelativeCoordinatePositionerBase::apply ( )

◆ addCoordinate()

bool RelativeCoordinatePositionerBase::addCoordinate ( const RelativeCoordinate )

◆ addPoint()

bool RelativeCoordinatePositionerBase::addPoint ( const RelativePoint )

◆ registerCoordinates()

virtual bool RelativeCoordinatePositionerBase::registerCoordinates ( )
protectedpure virtual

◆ applyToComponentBounds()

virtual void RelativeCoordinatePositionerBase::applyToComponentBounds ( )
protectedpure virtual

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