LMMS
Loading...
Searching...
No Matches
juce::GridItem Class Reference

#include <juce_GridItem.h>

Classes

struct  Span
struct  Property
struct  StartAndEndProperty
struct  Margin

Public Types

enum class  Keyword { autoValue }
enum class  JustifySelf : int {
  start = 0 , end , center , stretch ,
  autoValue
}
enum class  AlignSelf : int {
  start = 0 , end , center , stretch ,
  autoValue
}
enum  { useDefaultValue = -2 , notAssigned = -1 }

Public Member Functions

 GridItem () noexcept
 GridItem (Component &componentToUse) noexcept
 GridItem (Component *componentToUse) noexcept
void setArea (Property rowStart, Property columnStart, Property rowEnd, Property columnEnd)
void setArea (Property rowStart, Property columnStart)
void setArea (const String &areaName)
GridItem withArea (Property rowStart, Property columnStart, Property rowEnd, Property columnEnd) const noexcept
GridItem withArea (Property rowStart, Property columnStart) const noexcept
GridItem withArea (const String &areaName) const noexcept
GridItem withRow (StartAndEndProperty row) const noexcept
GridItem withColumn (StartAndEndProperty column) const noexcept
GridItem withAlignSelf (AlignSelf newAlignSelf) const noexcept
GridItem withJustifySelf (JustifySelf newJustifySelf) const noexcept
GridItem withWidth (float newWidth) const noexcept
GridItem withHeight (float newHeight) const noexcept
GridItem withSize (float newWidth, float newHeight) const noexcept
GridItem withMargin (Margin newMargin) const noexcept
GridItem withOrder (int newOrder) const noexcept

Public Attributes

ComponentassociatedComponent = nullptr
int order = 0
JustifySelf justifySelf = JustifySelf::autoValue
AlignSelf alignSelf = AlignSelf::autoValue
StartAndEndProperty column = { Keyword::autoValue, Keyword::autoValue }
StartAndEndProperty row = { Keyword::autoValue, Keyword::autoValue }
String area
float width = notAssigned
float minWidth = 0.0f
float maxWidth = notAssigned
float height = notAssigned
float minHeight = 0.0f
float maxHeight = notAssigned
Margin margin
Rectangle< float > currentBounds

Detailed Description

Defines an item in a Grid

See also
Grid

@tags{GUI}

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
useDefaultValue 
notAssigned 

◆ AlignSelf

enum class juce::GridItem::AlignSelf : int
strong

Possible values for the alignSelf property.

Enumerator
start 

Content inside the item is aligned towards the top.

end 

Content inside the item is aligned towards the bottom.

center 

Content inside the item is aligned towards the center.

stretch 

Content inside the item is stretched from top to bottom.

autoValue 

Follows the Grid container's alignItems property.

◆ JustifySelf

enum class juce::GridItem::JustifySelf : int
strong

Possible values for the justifySelf property.

Enumerator
start 

Content inside the item is justified towards the left.

end 

Content inside the item is justified towards the right.

center 

Content inside the item is justified towards the center.

stretch 

Content inside the item is stretched from left to right.

autoValue 

Follows the Grid container's justifyItems property.

◆ Keyword

enum class juce::GridItem::Keyword
strong
Enumerator
autoValue 

Constructor & Destructor Documentation

◆ GridItem() [1/3]

juce::GridItem::GridItem ( )
defaultnoexcept

Creates an item with default parameters.

◆ GridItem() [2/3]

juce::GridItem::GridItem ( Component & componentToUse)
noexcept

Creates an item with a given Component to use.

◆ GridItem() [3/3]

juce::GridItem::GridItem ( Component * componentToUse)
noexcept

Creates an item with a given Component to use.

Member Function Documentation

◆ setArea() [1/3]

void juce::GridItem::setArea ( const String & areaName)

Short-hand

◆ setArea() [2/3]

void juce::GridItem::setArea ( Property rowStart,
Property columnStart )

Short-hand, span of 1 by default

◆ setArea() [3/3]

void juce::GridItem::setArea ( Property rowStart,
Property columnStart,
Property rowEnd,
Property columnEnd )

Short-hand

◆ withAlignSelf()

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

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

◆ withArea() [1/3]

GridItem juce::GridItem::withArea ( const String & areaName) const
noexcept

Short-hand

◆ withArea() [2/3]

GridItem juce::GridItem::withArea ( Property rowStart,
Property columnStart ) const
noexcept

Short-hand, span of 1 by default

◆ withArea() [3/3]

GridItem juce::GridItem::withArea ( Property rowStart,
Property columnStart,
Property rowEnd,
Property columnEnd ) const
noexcept

Short-hand

◆ withColumn()

GridItem juce::GridItem::withColumn ( StartAndEndProperty column) const
noexcept

Returns a copy of this object with a new column property.

◆ withHeight()

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

Returns a copy of this object with a new height.

◆ withJustifySelf()

GridItem juce::GridItem::withJustifySelf ( JustifySelf newJustifySelf) const
noexcept

Returns a copy of this object with a new justifySelf property.

◆ withMargin()

GridItem juce::GridItem::withMargin ( Margin newMargin) const
noexcept

Returns a copy of this object with a new margin.

◆ withOrder()

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

Returns a copy of this object with a new order.

◆ withRow()

GridItem juce::GridItem::withRow ( StartAndEndProperty row) const
noexcept

Returns a copy of this object with a new row property.

◆ withSize()

GridItem juce::GridItem::withSize ( float newWidth,
float newHeight ) const
noexcept

Returns a copy of this object with a new size.

◆ withWidth()

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

Returns a copy of this object with a new width.

Member Data Documentation

◆ alignSelf

AlignSelf juce::GridItem::alignSelf = AlignSelf::autoValue

This is the align-self property of the item. This determines the alignment of the item along the column.

◆ area

String juce::GridItem::area

◆ associatedComponent

Component* juce::GridItem::associatedComponent = nullptr

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

◆ column

These are the start and end properties of the column.

◆ currentBounds

Rectangle<float> juce::GridItem::currentBounds

The item's current bounds.

◆ height

float juce::GridItem::height = notAssigned

◆ justifySelf

JustifySelf juce::GridItem::justifySelf = JustifySelf::autoValue

This is the justify-self property of the item. This determines the alignment of the item along the row.

◆ margin

Margin juce::GridItem::margin

The margin to leave around this item.

◆ maxHeight

float juce::GridItem::maxHeight = notAssigned

◆ maxWidth

float juce::GridItem::maxWidth = notAssigned

◆ minHeight

float juce::GridItem::minHeight = 0.0f

◆ minWidth

float juce::GridItem::minWidth = 0.0f

◆ order

int juce::GridItem::order = 0

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

◆ row

These are the start and end properties of the row.

◆ width

float juce::GridItem::width = notAssigned

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