Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
include
menu_view_layout.h
Go to the documentation of this file.
1
#ifndef MENU_VIEW_LAYOUT_H
2
#define MENU_VIEW_LAYOUT_H
3
4
#include "
menu_view_item.h
"
5
#include "
screen_rect.h
"
6
#include "
layout.h
"
7
8
#include <vector>
9
62
class
menu_view_layout
63
{
64
public
:
65
explicit
menu_view_layout
(
66
const
screen_rect
& r =
get_default_screen_rect
(),
67
const
int
margin_width =
get_default_margin_width
()
68
);
69
71
const
screen_rect
&
get_selectable_rect
(
const
menu_view_item
item)
const
noexcept
;
72
74
const
auto
&
get_menu_panel
() const noexcept {
return
m_menu_panel; }
75
77
const
auto
&
get_title
() const noexcept {
return
m_title; }
78
const
auto
&
get_subtitle
() const noexcept {
return
m_subtitle; }
79
const
auto
&
get_background_image
() const noexcept {
return
m_background_image; }
80
const
auto
&
get_start
() const noexcept {
return
m_start; }
81
const
auto
&
get_about
() const noexcept {
return
m_about; }
82
const
auto
&
get_options
() const noexcept {
return
m_options; }
83
const
auto
&
get_quit
() const noexcept {
return
m_quit; }
84
85
private
:
86
88
screen_rect
m_menu_panel;
89
90
screen_rect
m_title;
91
screen_rect
m_subtitle;
92
screen_rect
m_background_image;
93
screen_rect
m_start;
94
screen_rect
m_options;
95
screen_rect
m_about;
96
screen_rect
m_quit;
97
};
98
100
std::vector<screen_rect>
get_panels
(
const
menu_view_layout
& layout);
101
103
void
test_menu_view_layout
();
104
105
#endif
// MENU_VIEW_LAYOUT_H
menu_view_layout
The layout of the Menu dialog.
Definition
menu_view_layout.h:63
menu_view_layout::get_menu_panel
const auto & get_menu_panel() const noexcept
The rectangle around the buttons.
Definition
menu_view_layout.h:74
menu_view_layout::get_title
const auto & get_title() const noexcept
The screen area where the frames per seconds are displayed.
Definition
menu_view_layout.h:77
menu_view_layout::get_selectable_rect
const screen_rect & get_selectable_rect(const menu_view_item item) const noexcept
Get a screen rect.
Definition
menu_view_layout.cpp:84
menu_view_layout::get_quit
const auto & get_quit() const noexcept
Definition
menu_view_layout.h:83
menu_view_layout::get_subtitle
const auto & get_subtitle() const noexcept
Definition
menu_view_layout.h:78
menu_view_layout::get_start
const auto & get_start() const noexcept
Definition
menu_view_layout.h:80
menu_view_layout::get_about
const auto & get_about() const noexcept
Definition
menu_view_layout.h:81
menu_view_layout::get_options
const auto & get_options() const noexcept
Definition
menu_view_layout.h:82
menu_view_layout::get_background_image
const auto & get_background_image() const noexcept
Definition
menu_view_layout.h:79
screen_rect
A rectangle-shaped area on the screen.
Definition
screen_rect.h:15
layout.h
get_default_margin_width
constexpr int get_default_margin_width() noexcept
Get the default margin width/size, in pixels.
Definition
layout.h:7
menu_view_item.h
menu_view_item
menu_view_item
The items in the Menu dialog.
Definition
menu_view_item.h:8
test_menu_view_layout
void test_menu_view_layout()
Test the menu_view_layout class.
Definition
menu_view_layout.cpp:98
get_panels
std::vector< screen_rect > get_panels(const menu_view_layout &layout)
Get the panels in the layout.
Definition
menu_view_layout.cpp:69
screen_rect.h
get_default_screen_rect
screen_rect get_default_screen_rect() noexcept
Get the default screen rectangle.
Definition
screen_rect.cpp:140
Generated by
1.9.8