Smolgui
Immediate gui library based on SFML
Loading...
Searching...
No Matches
sgui::Layout Class Reference

allow to store and load Gui layou More...

#include <Layout.h>

Public Member Functions

bool loadFromFile (const std::string &set)
 load layouts from file
void saveInFile (const bool compact=false)
 save all layouts in their respecting file
std::vector< std::string > entries (const std::string &set) const
 get entries names in a layout
void add (const std::string &set, const std::string &entry, LayoutEntry &&data)
 add or remove an entry to the layout
template<typename LayoutType>
bool has (const std::string &entry) const
 test if entry exist
template<typename LayoutType>
LayoutType & get (const std::string &entry, bool addLayoutType=true)
 get entry data without any sanity check
template<typename LayoutType>
const LayoutType & get (const std::string &entry, bool addLayoutType=true) const
 get mutable entry data without any sanity check

Detailed Description

allow to store and load Gui layou

Member Function Documentation

◆ add()

void sgui::Layout::add ( const std::string & set,
const std::string & entry,
LayoutEntry && data )

add or remove an entry to the layout

◆ entries()

std::vector< std::string > sgui::Layout::entries ( const std::string & set) const

get entries names in a layout

◆ get() [1/2]

template<typename LayoutType>
LayoutType & sgui::Layout::get ( const std::string & entry,
bool addLayoutType = true )

get entry data without any sanity check

◆ get() [2/2]

template<typename LayoutType>
const LayoutType & sgui::Layout::get ( const std::string & entry,
bool addLayoutType = true ) const

get mutable entry data without any sanity check

◆ has()

template<typename LayoutType>
bool sgui::Layout::has ( const std::string & entry) const

test if entry exist

◆ loadFromFile()

bool sgui::Layout::loadFromFile ( const std::string & set)

load layouts from file

◆ saveInFile()

void sgui::Layout::saveInFile ( const bool compact = false)

save all layouts in their respecting file


The documentation for this class was generated from the following files:
  • /github/workspace/src/sgui/Resources/Layout.h
  • /github/workspace/src/sgui/Resources/Layout.cpp