AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
AHorizontalLayout Class Reference

Places views in a row. More...

#include <AUI/Layout/AHorizontalLayout.h>

Public Member Functions

 AHorizontalLayout (int spacing)
 
void onResize (int x, int y, int width, int height) override
 
int getMinimumWidth () override
 
int getMinimumHeight () override
 
void setSpacing (int spacing) override
 Layout spacing.
 
int getSpacing () const
 
ALayoutDirection getLayoutDirection () override
 

Static Public Attributes

static constexpr ALayoutDirection DIRECTION = ALayoutDirection::HORIZONTAL
 

Detailed Description

Places views in a row.

Declarative notation Horizontal { }

Horizontal layout manager places views in a row, fitting their height to the container's height. Has a Horizontal shortcut that allows easy usage in UI building:

setContents(
Horizontal {
_new<AButton>("1"),
_new<AButton>("2"),
_new<AButton>("3"),
}
);

Member Function Documentation

◆ getLayoutDirection()

ALayoutDirection AHorizontalLayout::getLayoutDirection ( )
overridevirtual

Reimplemented from ALayout.

◆ getMinimumHeight()

int AHorizontalLayout::getMinimumHeight ( )
overridevirtual

Implements ALayout.

◆ getMinimumWidth()

int AHorizontalLayout::getMinimumWidth ( )
overridevirtual

Implements ALayout.

◆ onResize()

void AHorizontalLayout::onResize ( int x,
int y,
int width,
int height )
overridevirtual

Implements ALayout.

◆ setSpacing()

void AHorizontalLayout::setSpacing ( int spacing)
overridevirtual

Layout spacing.

Parameters
spacingspacing in px.

Reimplemented from ALayout.


The documentation for this class was generated from the following files:
Inheritance diagram for AHorizontalLayout:
Collaboration diagram for AHorizontalLayout: