JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
juce::FlexItem Class Referencefinal

Describes the properties of an item inside a FlexBox container. More...

#include "juce_FlexItem.h"

Classes

struct  Margin
 Represents a margin. More...
 

Public Types

enum class  AlignSelf {
  autoAlign , flexStart , flexEnd , center ,
  stretch
}
 Possible value for the alignSelf property. More...
 

Public Member Functions

 FlexItem () noexcept
 Creates an item with default parameters, and zero size.
 
 FlexItem (float width, float height) noexcept
 Creates an item with the given size.
 
 FlexItem (float width, float height, Component &targetComponent) noexcept
 Creates an item with the given size and target Component.
 
 FlexItem (float width, float height, FlexBox &flexBoxToControl) noexcept
 Creates an item that represents an embedded FlexBox with a given size.
 
 FlexItem (Component &componentToControl) noexcept
 Creates an item with a given target Component.
 
 FlexItem (FlexBox &flexBoxToControl) noexcept
 Creates an item that represents an embedded FlexBox.
 
FlexItem withFlex (float newFlexGrow) const noexcept
 Returns a copy of this object with a new flex-grow value.
 
FlexItem withFlex (float newFlexGrow, float newFlexShrink) const noexcept
 Returns a copy of this object with new flex-grow and flex-shrink values.
 
FlexItem withFlex (float newFlexGrow, float newFlexShrink, float newFlexBasis) const noexcept
 Returns a copy of this object with new flex-grow, flex-shrink and flex-basis values.
 
FlexItem withWidth (float newWidth) const noexcept
 Returns a copy of this object with a new width.
 
FlexItem withMinWidth (float newMinWidth) const noexcept
 Returns a copy of this object with a new minimum width.
 
FlexItem withMaxWidth (float newMaxWidth) const noexcept
 Returns a copy of this object with a new maximum width.
 
FlexItem withHeight (float newHeight) const noexcept
 Returns a copy of this object with a new height.
 
FlexItem withMinHeight (float newMinHeight) const noexcept
 Returns a copy of this object with a new minimum height.
 
FlexItem withMaxHeight (float newMaxHeight) const noexcept
 Returns a copy of this object with a new maximum height.
 
FlexItem withMargin (Margin) const noexcept
 Returns a copy of this object with a new margin.
 
FlexItem withOrder (int newOrder) const noexcept
 Returns a copy of this object with a new order.
 
FlexItem withAlignSelf (AlignSelf newAlignSelf) const noexcept
 Returns a copy of this object with a new alignSelf value.
 

Public Attributes

Rectangle< floatcurrentBounds
 The item's current bounds.
 
ComponentassociatedComponent
 If this is non-null, it represents a Component whose bounds are controlled by this item.
 
FlexBoxassociatedFlexBox
 If this is non-null, it represents a FlexBox whose bounds are controlled by this item.
 
int order
 Determines the order used to lay out items in their flex container.
 
float flexGrow
 Specifies the flex grow factor of this item.
 
float flexShrink
 Specifies the flex shrink factor of the item.
 
float flexBasis
 Specifies the flex-basis of the item.
 
AlignSelf alignSelf
 This is the align-self property of the item.
 
float width
 The item's width.
 
float minWidth
 The item's minimum width.
 
float maxWidth
 The item's maximum width.
 
float height
 The item's height.
 
float minHeight
 The item's minimum height.
 
float maxHeight
 The item's maximum height.
 
Margin margin
 The margin to leave around this item.
 

Static Public Attributes

static const int autoValue
 This constant can be used for sizes to indicate that 'auto' mode should be used.
 
static const int notAssigned
 This constant can be used for sizes to indicate that no value has been set.
 

Detailed Description

Describes the properties of an item inside a FlexBox container.

See also
FlexBox

@tags{GUI}

Definition at line 36 of file juce_FlexItem.h.

Member Enumeration Documentation

◆ AlignSelf

Possible value for the alignSelf property.

Enumerator
autoAlign 

Follows the FlexBox container's alignItems property.

flexStart 

Item is aligned towards the start of the cross axis.

flexEnd 

Item is aligned towards the end of the cross axis.

center 

Item is aligned towards the center of the cross axis.

stretch 

Item is stretched from start to end of the cross axis.

Definition at line 94 of file juce_FlexItem.h.

Constructor & Destructor Documentation

◆ FlexItem() [1/6]

juce::FlexItem::FlexItem ( )
noexcept

Creates an item with default parameters, and zero size.

Definition at line 796 of file juce_FlexBox.cpp.

◆ FlexItem() [2/6]

juce::FlexItem::FlexItem ( float  width,
float  height 
)
noexcept

Creates an item with the given size.

Definition at line 797 of file juce_FlexBox.cpp.

◆ FlexItem() [3/6]

juce::FlexItem::FlexItem ( float  width,
float  height,
Component targetComponent 
)
noexcept

Creates an item with the given size and target Component.

Definition at line 798 of file juce_FlexBox.cpp.

◆ FlexItem() [4/6]

juce::FlexItem::FlexItem ( float  width,
float  height,
FlexBox flexBoxToControl 
)
noexcept

Creates an item that represents an embedded FlexBox with a given size.

Definition at line 799 of file juce_FlexBox.cpp.

◆ FlexItem() [5/6]

juce::FlexItem::FlexItem ( Component componentToControl)
noexcept

Creates an item with a given target Component.

Definition at line 800 of file juce_FlexBox.cpp.

◆ FlexItem() [6/6]

juce::FlexItem::FlexItem ( FlexBox flexBoxToControl)
noexcept

Creates an item that represents an embedded FlexBox.

This class will not create a copy of the supplied flex box. You need to ensure that the life-time of flexBoxToControl is longer than the FlexItem.

Definition at line 801 of file juce_FlexBox.cpp.

Member Function Documentation

◆ withAlignSelf()

FlexItem juce::FlexItem::withAlignSelf ( AlignSelf  newAlignSelf) const
noexcept

Returns a copy of this object with a new alignSelf value.

Definition at line 839 of file juce_FlexBox.cpp.

◆ withFlex() [1/3]

FlexItem juce::FlexItem::withFlex ( float  newFlexGrow) const
noexcept

Returns a copy of this object with a new flex-grow value.

Definition at line 808 of file juce_FlexBox.cpp.

◆ withFlex() [2/3]

FlexItem juce::FlexItem::withFlex ( float  newFlexGrow,
float  newFlexShrink 
) const
noexcept

Returns a copy of this object with new flex-grow and flex-shrink values.

Definition at line 815 of file juce_FlexBox.cpp.

◆ withFlex() [3/3]

FlexItem juce::FlexItem::withFlex ( float  newFlexGrow,
float  newFlexShrink,
float  newFlexBasis 
) const
noexcept

Returns a copy of this object with new flex-grow, flex-shrink and flex-basis values.

Definition at line 822 of file juce_FlexBox.cpp.

◆ withHeight()

FlexItem juce::FlexItem::withHeight ( float  newHeight) const
noexcept

Returns a copy of this object with a new height.

Definition at line 835 of file juce_FlexBox.cpp.

◆ withMargin()

FlexItem juce::FlexItem::withMargin ( Margin  m) const
noexcept

Returns a copy of this object with a new margin.

Definition at line 837 of file juce_FlexBox.cpp.

◆ withMaxHeight()

FlexItem juce::FlexItem::withMaxHeight ( float  newMaxHeight) const
noexcept

Returns a copy of this object with a new maximum height.

Definition at line 834 of file juce_FlexBox.cpp.

◆ withMaxWidth()

FlexItem juce::FlexItem::withMaxWidth ( float  newMaxWidth) const
noexcept

Returns a copy of this object with a new maximum width.

Definition at line 831 of file juce_FlexBox.cpp.

◆ withMinHeight()

FlexItem juce::FlexItem::withMinHeight ( float  newMinHeight) const
noexcept

Returns a copy of this object with a new minimum height.

Definition at line 833 of file juce_FlexBox.cpp.

◆ withMinWidth()

FlexItem juce::FlexItem::withMinWidth ( float  newMinWidth) const
noexcept

Returns a copy of this object with a new minimum width.

Definition at line 830 of file juce_FlexBox.cpp.

◆ withOrder()

FlexItem juce::FlexItem::withOrder ( int  newOrder) const
noexcept

Returns a copy of this object with a new order.

Definition at line 838 of file juce_FlexBox.cpp.

◆ withWidth()

FlexItem juce::FlexItem::withWidth ( float  newWidth) const
noexcept

Returns a copy of this object with a new width.

Definition at line 829 of file juce_FlexBox.cpp.

Member Data Documentation

◆ alignSelf

AlignSelf juce::FlexItem::alignSelf

This is the align-self property of the item.

This determines the alignment of the item along the cross-axis (perpendicular to the direction of flow).

Definition at line 107 of file juce_FlexItem.h.

◆ associatedComponent

Component* juce::FlexItem::associatedComponent

If this is non-null, it represents a Component whose bounds are controlled by this item.

Definition at line 65 of file juce_FlexItem.h.

◆ associatedFlexBox

FlexBox* juce::FlexItem::associatedFlexBox

If this is non-null, it represents a FlexBox whose bounds are controlled by this item.

Definition at line 68 of file juce_FlexItem.h.

◆ autoValue

const int juce::FlexItem::autoValue
static

This constant can be used for sizes to indicate that 'auto' mode should be used.

Definition at line 111 of file juce_FlexItem.h.

◆ currentBounds

Rectangle<float> juce::FlexItem::currentBounds

The item's current bounds.

Definition at line 62 of file juce_FlexItem.h.

◆ flexBasis

float juce::FlexItem::flexBasis

Specifies the flex-basis of the item.

This is the initial main size of a flex item in the direction of flow. It determines the size of the content-box unless specified otherwise using box-sizing.

Definition at line 91 of file juce_FlexItem.h.

◆ flexGrow

float juce::FlexItem::flexGrow

Specifies the flex grow factor of this item.

This indicates the amount of space inside the flex container the item should take up.

Definition at line 79 of file juce_FlexItem.h.

◆ flexShrink

float juce::FlexItem::flexShrink

Specifies the flex shrink factor of the item.

This indicates the rate at which the item shrinks if there is insufficient space in the container.

Definition at line 85 of file juce_FlexItem.h.

◆ height

float juce::FlexItem::height

The item's height.

Definition at line 119 of file juce_FlexItem.h.

◆ margin

Margin juce::FlexItem::margin

The margin to leave around this item.

Definition at line 137 of file juce_FlexItem.h.

◆ maxHeight

float juce::FlexItem::maxHeight

The item's maximum height.

Definition at line 121 of file juce_FlexItem.h.

◆ maxWidth

float juce::FlexItem::maxWidth

The item's maximum width.

Definition at line 117 of file juce_FlexItem.h.

◆ minHeight

float juce::FlexItem::minHeight

The item's minimum height.

Definition at line 120 of file juce_FlexItem.h.

◆ minWidth

float juce::FlexItem::minWidth

The item's minimum width.

Definition at line 116 of file juce_FlexItem.h.

◆ notAssigned

const int juce::FlexItem::notAssigned
static

This constant can be used for sizes to indicate that no value has been set.

Definition at line 113 of file juce_FlexItem.h.

◆ order

int juce::FlexItem::order

Determines the order used to lay out items in their flex container.

Elements are laid out in ascending order of thus order value. Elements with the same order value are laid out in the order in which they appear in the array.

Definition at line 74 of file juce_FlexItem.h.

◆ width

float juce::FlexItem::width

The item's width.

Definition at line 115 of file juce_FlexItem.h.


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