Krotos Modules 3
Loading...
Searching...
No Matches
krotos::ResizableComponent Class Reference

#include <ResizableComponent.h>

Inheritance diagram for krotos::ResizableComponent:

Public Member Functions

 ResizableComponent (String name, int minimumWidth=15, int minumumHeight=15)
 
void resized () override
 
void paint (Graphics &g) override
 
void setResizable (bool isResizable)
 
ComponentBoundsConstrainer & getConstrainer ()
 

Private Attributes

std::unique_ptr< ResizableBorderComponent > resizableBorder
 
ComponentBoundsConstrainer constrainer
 

Detailed Description

A simple component that can resize itself and its children using a resizable border.

Add a component to this as a child and it will be automatically resized when this is resized. Think of it like a resizable wrapper around a component.

See also
ComponentBoundsConstrainer
ResizableBorderComponent

Constructor & Destructor Documentation

◆ ResizableComponent()

krotos::ResizableComponent::ResizableComponent ( String name,
int minimumWidth = 15,
int minumumHeight = 15 )

Creates a resizable component, setting it's name at the same time. Use just like you would a normal juce component. name The component name

Member Function Documentation

◆ getConstrainer()

ComponentBoundsConstrainer & krotos::ResizableComponent::getConstrainer ( )
inline

Returns a reference to the ComponentBoundsConstrainer to allow configuration of constraint restrictions such as minimum & maximum size, etc.

See also
ComponentBoundsConstrainer

◆ paint()

void krotos::ResizableComponent::paint ( Graphics & g)
override

◆ resized()

void krotos::ResizableComponent::resized ( )
override

◆ setResizable()

void krotos::ResizableComponent::setResizable ( bool isResizable)
inline

Sets the visibility of the ResizableBorder

Member Data Documentation

◆ constrainer

ComponentBoundsConstrainer krotos::ResizableComponent::constrainer
private

◆ resizableBorder

std::unique_ptr<ResizableBorderComponent> krotos::ResizableComponent::resizableBorder
private

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