Loading...
Searching...
No Matches
juce::Component::Positioner Class Referenceabstract

## Detailed Description

Base class for objects that can be used to automatically position a component according to some kind of algorithm.

The component class simply holds onto a reference to a Positioner, but doesn't actually do anything with it - all the functionality must be implemented by the positioner itself (e.g. it might choose to watch some kind of value and move the component when the value changes).

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

- juce_gui_basics/components/juce_Component.h

Inheritance diagram for juce::Component::Positioner:

## Public Member Functions

| Positioner (Component &component) noexcept
| Creates a Positioner which can control the specified component.
virtual | ~Positioner ()=default
| Destructor.
Component & | getComponent () const noexcept
| Returns the component that this positioner controls.
virtual void | applyNewBounds (const Rectangle< int > &newBounds)=0
| Attempts to set the component's position to the given rectangle.

## Constructors and Destructors

## Positioner()

juce::Component::Positioner::Positioner | ( | Component & | component | ) |

explicit noexcept

Creates a Positioner which can control the specified component.

References juce::Component::Component().

Referenced by applyNewBounds().

## ~Positioner()

virtual juce::Component::Positioner::~Positioner | ( |  | ) |

virtual default

Destructor.

## Member Functions

## getComponent()

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

inline noexcept

Returns the component that this positioner controls.

References juce::Component::Component().

## applyNewBounds()

virtual void juce::Component::Positioner::applyNewBounds | ( | const Rectangle< int > & | newBounds | ) |

pure virtual

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.

References juce::Component::Component(), and Positioner().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited