AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
aui::HVLayout< direction > Struct Template Reference

Shared implementation of AVerticalLayout and AHorizontalLayout. More...

#include <AUI/Layout/HVLayout.h>

Static Public Member Functions#

template<typename T>
static T & getAxisValue (glm::tvec2< T > &v)
 On direction == HORIZONTAL returns x; on direction == VERTICAL returns y.
 
template<typename T>
static T getAxisValue (const glm::tvec2< T > &v)
 On direction == HORIZONTAL returns x; on direction == VERTICAL returns y.
 
template<typename T>
static T & getPerpAxisValue (glm::tvec2< T > &v)
 On direction == HORIZONTAL returns y; on direction == VERTICAL returns x.
 
template<typename T>
static T getPerpAxisValue (const glm::tvec2< T > &v)
 On direction == HORIZONTAL returns y; on direction == VERTICAL returns x.
 
static void onResize (glm::ivec2 paddedPosition, glm::ivec2 paddedSize, ranges::range auto &&views, int spacing)
 
static int getMinimumWidth (ranges::range auto &&views, int spacing)
 
static int getMinimumHeight (ranges::range auto &&views, int spacing)
 

Detailed Description#

template<ALayoutDirection direction>
struct aui::HVLayout< direction >

HVLayout does not strictly requires to layout AView. The only requirement is to pass range of items that implement methods required by HVLayout (as AView does). This make compile time polymorphism possible.

ASplitter is an example of object that requires AHorizontalLayout/AVerticalLayout-like behaviour with some changes.