Smolgui
Immediate gui library based on SFML
Loading...
Searching...
No Matches
Panel.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <functional>
5#include <SFML/Graphics/Rect.hpp>
7
8namespace sgui
9{
10
12
15struct Panel
16{
17 Panel () = default;
18 Panel (const sf::FloatRect& box, const bool vis = true, const bool header = true)
19 : visible (vis), hasHeader (header), position (box.position), size (box.size) {}
20 // data
21 bool clipped = true;
22 bool closable = false;
23 bool closed = false;
24 bool visible = true;
25 bool hasHeader = true;
26 bool hasMenu = false;
27 bool movable = true;
28 bool reduced = false;
29 bool scrollable = true;
30 bool isScrolled = false;
31 sf::Vector2f position = {};
32 sf::Vector2f size = {};
33 std::string title = "";
34};
35
37
40struct Window
41{
42 Window () = default;
43 // data
44 Panel panel = {};
47};
48
49} // namespace sgui
Definition Interpolation.h:16
Store constraints on position for gui panel. Alignment always precede relative position.
Definition Constraints.h:36
store panel posiiton, size and some parameters
Definition Panel.h:16
bool movable
is it movable ?
Definition Panel.h:27
sf::Vector2f position
position of the panel
Definition Panel.h:31
bool hasMenu
has it a menu ?
Definition Panel.h:26
bool hasHeader
has it an header ?
Definition Panel.h:25
bool isScrolled
is it scrolled ?
Definition Panel.h:30
Panel(const sf::FloatRect &box, const bool vis=true, const bool header=true)
Definition Panel.h:18
std::string title
title of the panel
Definition Panel.h:33
bool scrollable
is it scrollable ?
Definition Panel.h:29
bool closed
is it closed ?
Definition Panel.h:23
bool clipped
is contents clipped ?
Definition Panel.h:21
bool reduced
is it reduced (header only) ?
Definition Panel.h:28
sf::Vector2f size
size of the panel
Definition Panel.h:32
bool closable
is it closable ?
Definition Panel.h:22
bool visible
is it rendered ?
Definition Panel.h:24
Panel()=default
Store widget options : tooltip, position, description.
Definition Options.h:41
WidgetOptions options
options of the window
Definition Panel.h:46
Constraints constraints
position constraints
Definition Panel.h:45
Panel panel
panel of the window
Definition Panel.h:44
Window()=default