Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
about_view_layout.h
Go to the documentation of this file.
1#ifndef ABOUT_VIEW_LAYOUT_H
2#define ABOUT_VIEW_LAYOUT_H
3
4#include "screen_rect.h"
5#include "layout.h"
6
7#include <vector>
8
53{
54public:
55 explicit about_view_layout(
57 const int margin_width = get_default_margin_width()
58 );
59
61 const auto& get_background() const noexcept { return m_background; }
62 const auto& get_contributors() const noexcept { return m_contributors; }
63 const auto& get_copyright() const noexcept { return m_copyright; }
64 const auto& get_panel_outline() const noexcept { return m_panel_outline; }
65 const auto& get_subtitle() const noexcept { return m_subtitle; }
66 const auto& get_title() const noexcept { return m_title; }
67 const auto& get_url() const noexcept { return m_url; }
68
69private:
70
71 screen_rect m_background;
72 screen_rect m_contributors;
73 screen_rect m_copyright;
74 screen_rect m_panel_outline;
75 screen_rect m_subtitle;
76 screen_rect m_title;
77 screen_rect m_url;
78};
79
81std::vector<screen_rect> get_panels(const about_view_layout& layout);
82
85
86#endif // ABOUT_VIEW_LAYOUT_H
std::vector< screen_rect > get_panels(const about_view_layout &layout)
Get the panels in the layout.
Definition about_view_layout.cpp:57
void test_about_view_layout()
Test the about_view_layout class.
Definition about_view_layout.cpp:69
The layout of the menu view.
Definition about_view_layout.h:53
const auto & get_copyright() const noexcept
Definition about_view_layout.h:63
const auto & get_background() const noexcept
The size of the rectangle.
Definition about_view_layout.h:61
const auto & get_panel_outline() const noexcept
Definition about_view_layout.h:64
const auto & get_title() const noexcept
Definition about_view_layout.h:66
const auto & get_subtitle() const noexcept
Definition about_view_layout.h:65
const auto & get_url() const noexcept
Definition about_view_layout.h:67
const auto & get_contributors() const noexcept
Definition about_view_layout.h:62
A rectangle-shaped area on the screen.
Definition screen_rect.h:15
constexpr int get_default_margin_width() noexcept
Get the default margin width/size, in pixels.
Definition layout.h:7
screen_rect get_default_screen_rect() noexcept
Get the default screen rectangle.
Definition screen_rect.cpp:140