Photosine 0.5
Loading...
Searching...
No Matches

#include <ResizeLineComponent.h>

Inheritance diagram for ResizeLineComponent:

Public Member Functions

 ResizeLineComponent (juce::Identifier treePropertyID, float min1, float min2)
 ResizeLineComponent (float min1, float min2)
 ~ResizeLineComponent () override
void setHorizontal (bool shouldBeHorizontal)
float getFirstPosition ()
float getSecondPosition ()
void reposition ()
void recalculateConstraints ()
juce::Component virtual members
void paint (juce::Graphics &g) override
void resized () override
juce::MouseListener virtual members
void mouseDrag (const juce::MouseEvent &event) override
void mouseDown (const juce::MouseEvent &event) override
void mouseUp (const juce::MouseEvent &event) override

Public Attributes

const juce::Identifier valueTreeID

Private Attributes

bool isHorizontal = true
bool isMouseDown = false
bool usesValueTree = true
float minNear
float minFar
float dragOffset

Detailed Description

UI component that allows the user to resize the border between other components.

Constructor & Destructor Documentation

◆ ResizeLineComponent() [1/2]

ResizeLineComponent::ResizeLineComponent ( juce::Identifier treePropertyID,
float min1,
float min2 )
inline

Initializes to store position value within the project value tree, provided a property ID.

Parameters
treePropertyIDID of value tree property in the main project value tree.
min1the minimum distance from the left of the parent component if vertical, or top if horizontal.
min2the minimum distance from the right of the parent component if vertical, or bottom if horizontal.

◆ ResizeLineComponent() [2/2]

ResizeLineComponent::ResizeLineComponent ( float min1,
float min2 )
inline

Initializes to use component positioning value only.

Parameters
min1the minimum distance from the left of the parent component if vertical, or top if horizontal.
min2the minimum distance from the right of the parent component if vertical, or bottom if horizontal.

◆ ~ResizeLineComponent()

ResizeLineComponent::~ResizeLineComponent ( )
inlineoverride

Member Function Documentation

◆ getFirstPosition()

float ResizeLineComponent::getFirstPosition ( )
inline

Returns the left bounds to use for positioning if vertical, top if horizontal.

◆ getSecondPosition()

float ResizeLineComponent::getSecondPosition ( )
inline

Returns the right bounds to use for positioning if vertical, bottom if horizontal.

◆ mouseDown()

void ResizeLineComponent::mouseDown ( const juce::MouseEvent & event)
inlineoverride

◆ mouseDrag()

void ResizeLineComponent::mouseDrag ( const juce::MouseEvent & event)
inlineoverride

◆ mouseUp()

void ResizeLineComponent::mouseUp ( const juce::MouseEvent & event)
inlineoverride

◆ paint()

void ResizeLineComponent::paint ( juce::Graphics & g)
inlineoverride

◆ recalculateConstraints()

void ResizeLineComponent::recalculateConstraints ( )
inline

Calculates if component is within the minimums specified in the constructor, adjusts it if necessary.

◆ reposition()

void ResizeLineComponent::reposition ( )
inline

Position component from value tree if one is used.

◆ resized()

void ResizeLineComponent::resized ( )
inlineoverride

◆ setHorizontal()

void ResizeLineComponent::setHorizontal ( bool shouldBeHorizontal)
inline

Sets the component to be horizontal if true, vertical if false.

Member Data Documentation

◆ dragOffset

float ResizeLineComponent::dragOffset
private

◆ isHorizontal

bool ResizeLineComponent::isHorizontal = true
private

◆ isMouseDown

bool ResizeLineComponent::isMouseDown = false
private

◆ minFar

float ResizeLineComponent::minFar
private

◆ minNear

float ResizeLineComponent::minNear
private

◆ usesValueTree

bool ResizeLineComponent::usesValueTree = true
private

◆ valueTreeID

const juce::Identifier ResizeLineComponent::valueTreeID

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