Defines an item in a Grid. More...

Classes

struct  Margin
 
struct  Property
 
struct  Span
 
struct  StartAndEndProperty
 

Public Types

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

Public Member Functions

 GridItem () noexcept
 
 GridItem (juce::Component &componentToUse) noexcept
 
 GridItem (juce::Component *componentToUse) noexcept
 
 ~GridItem () noexcept
 Destructor. More...
 
void setArea (Property rowStart, Property columnStart, Property rowEnd, Property columnEnd)
 Short-hand. More...
 
void setArea (Property rowStart, Property columnStart)
 Short-hand, span of 1 by default. More...
 
void setArea (const juce::String &areaName)
 Short-hand. More...
 
GridItem withArea (Property rowStart, Property columnStart, Property rowEnd, Property columnEnd) const noexcept
 Short-hand. More...
 
GridItem withArea (Property rowStart, Property columnStart) const noexcept
 Short-hand, span of 1 by default. More...
 
GridItem withArea (const juce::String &areaName) const noexcept
 Short-hand. More...
 
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
 Returns a copy of this object with a new order. More...
 

Public Attributes

juce::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 }
 
juce::String area
 
float width = notAssigned
 
float minWidth = 0
 
float maxWidth = notAssigned
 
float height = notAssigned
 
float minHeight = 0
 
float maxHeight = notAssigned
 
Margin margin
 
juce::Rectangle< float > currentBounds
 

Detailed Description

Defines an item in a Grid.

See also
Grid

Member Enumeration Documentation

◆ Keyword

enum GridItem::Keyword
strong
Enumerator
autoValue 

◆ JustifySelf

enum GridItem::JustifySelf : int
strong
Enumerator
start 
end 
center 
stretch 
autoValue 

◆ AlignSelf

enum GridItem::AlignSelf : int
strong
Enumerator
start 
end 
center 
stretch 
autoValue 

◆ anonymous enum

anonymous enum
Enumerator
useDefaultValue 
notAssigned 

Constructor & Destructor Documentation

◆ GridItem() [1/3]

GridItem::GridItem ( )
noexcept

◆ GridItem() [2/3]

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

◆ GridItem() [3/3]

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

◆ ~GridItem()

GridItem::~GridItem ( )
noexcept

Destructor.

Member Function Documentation

◆ setArea() [1/3]

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

Short-hand.

◆ setArea() [2/3]

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

Short-hand, span of 1 by default.

◆ setArea() [3/3]

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

Short-hand.

◆ withArea() [1/3]

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

Short-hand.

◆ withArea() [2/3]

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

Short-hand, span of 1 by default.

◆ withArea() [3/3]

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

Short-hand.

◆ withRow()

GridItem GridItem::withRow ( StartAndEndProperty  row) const
noexcept

◆ withColumn()

GridItem GridItem::withColumn ( StartAndEndProperty  column) const
noexcept

◆ withAlignSelf()

GridItem GridItem::withAlignSelf ( AlignSelf  newAlignSelf) const
noexcept

◆ withJustifySelf()

GridItem GridItem::withJustifySelf ( JustifySelf  newJustifySelf) const
noexcept

◆ withWidth()

GridItem GridItem::withWidth ( float  newWidth) const
noexcept

◆ withHeight()

GridItem GridItem::withHeight ( float  newHeight) const
noexcept

◆ withSize()

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

◆ withMargin()

GridItem GridItem::withMargin ( Margin  newMargin) const
noexcept

◆ withOrder()

GridItem GridItem::withOrder ( int  newOrder) const
noexcept

Returns a copy of this object with a new order.

Member Data Documentation

◆ associatedComponent

juce::Component* GridItem::associatedComponent = nullptr

◆ order

int GridItem::order = 0

◆ justifySelf

JustifySelf GridItem::justifySelf = JustifySelf::autoValue

◆ alignSelf

AlignSelf GridItem::alignSelf = AlignSelf::autoValue

◆ column

◆ row

◆ area

juce::String GridItem::area

◆ width

float GridItem::width = notAssigned

◆ minWidth

float GridItem::minWidth = 0

◆ maxWidth

float GridItem::maxWidth = notAssigned

◆ height

float GridItem::height = notAssigned

◆ minHeight

float GridItem::minHeight = 0

◆ maxHeight

float GridItem::maxHeight = notAssigned

◆ margin

Margin GridItem::margin

◆ currentBounds

juce::Rectangle<float> GridItem::currentBounds

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