Loading...
Searching...
No Matches
ListSettings.h
Go to the documentation of this file.
1//
2// ListSettings.h
3//
4
5#ifndef MALENA_LISTSETTINGS_H
6#define MALENA_LISTSETTINGS_H
7
8#pragma once
9
12
13namespace ml
14{
24 {
25 bool showDividers = true;
26 bool showBackground = false;
27 float dividerThickness = 1.f;
28 float indent = 20.f;
29
30 // ── Assignment from parent levels ─────────────────────────────────────
31
33 { static_cast<ControlSettings&>(*this) = c; return *this; }
34
36 { static_cast<ControlSettings&>(*this) = g; return *this; }
37
38 // ── Getters / setters ─────────────────────────────────────────────────
39
40 [[nodiscard]] bool getShowDividers() const { return showDividers; }
41 [[nodiscard]] bool getShowBackground() const { return showBackground; }
42 [[nodiscard]] float getDividerThickness() const { return dividerThickness; }
43 [[nodiscard]] float getIndent() const { return indent; }
44
45 void setShowDividers(bool b) { showDividers = b; }
46 void setShowBackground(bool b) { showBackground = b; }
48 void setIndent(float i) { indent = i; }
49 };
50
51} // namespace ml
52
53#endif // MALENA_LISTSETTINGS_H
Definition Component.h:22
Settings trait for interactive UI controls — layout only.
Base settings trait for all visual components — geometry only.
Layout and behaviour settings for List.
void setShowDividers(bool b)
ListSettings & operator=(const GraphicSettings &g)
ListSettings & operator=(const ControlSettings &c)
void setDividerThickness(float t)
void setIndent(float i)
float getDividerThickness() const
bool getShowBackground() const
void setShowBackground(bool b)
bool getShowDividers() const
float getIndent() const
float indent
Indentation added to nested Lists.