7#include "../utility/utility.hpp"
8#include "../macros.hpp"
12hi_export_module(hikogui.codec.indent);
14hi_export
namespace hi {
inline namespace v1 {
22 constexpr ~indent()
noexcept =
default;
23 constexpr indent()
noexcept =
default;
35 [[nodiscard]]
constexpr indent(
int spaces,
char space =
' ') noexcept : _space(space), _spaces(spaces), _depth(0) {}
41 return std::string(narrow_cast<std::size_t>(_depth) * narrow_cast<std::size_t>(_spaces), _space);
@ other
The gui_event does not have associated data.
The HikoGUI namespace.
Definition array_generic.hpp:20
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
Indentation for writing out text files.
Definition indent.hpp:20
constexpr indent & operator+=(int rhs) noexcept
Increase the depth of this indentation.
Definition indent.hpp:46
constexpr friend indent operator+(indent lhs, int rhs) noexcept
Get an indentation at increased depth.
Definition indent.hpp:62
constexpr indent(int spaces, char space=' ') noexcept
Constructor This constructor will start indentation at depth 0.
Definition indent.hpp:35
constexpr indent & operator++() noexcept
Increment the depth of this indentation.
Definition indent.hpp:54