Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
controls_view_layout.h
Go to the documentation of this file.
1#ifndef CONTROLS_VIEW_LAYOUT_H
2#define CONTROLS_VIEW_LAYOUT_H
3
5#include "screen_rect.h"
6#include "layout.h"
7#include <vector>
8
42{
43public:
44 explicit controls_view_layout(
46 const int margin_width = get_default_margin_width()
47 );
48
49 const screen_rect& get_selectable_rect(const controls_view_item item) const noexcept;
50
51 const screen_rect& get_action_1_label() const noexcept { return m_action_1_label; }
52 const screen_rect& get_action_1_value() const noexcept { return m_action_1_value; }
53 const screen_rect& get_action_2_label() const noexcept { return m_action_2_label; }
54 const screen_rect& get_action_2_value() const noexcept { return m_action_2_value; }
55 const screen_rect& get_action_3_label() const noexcept { return m_action_3_label; }
56 const screen_rect& get_action_3_value() const noexcept { return m_action_3_value; }
57 const screen_rect& get_action_4_label() const noexcept { return m_action_4_label; }
58 const screen_rect& get_action_4_value() const noexcept { return m_action_4_value; }
59
61 const screen_rect& get_background() const noexcept { return m_background; }
62
63 const screen_rect& get_controller_type_label() const noexcept { return m_controller_type_label; }
64 const screen_rect& get_controller_type_value() const noexcept { return m_controller_type_value; }
65 const screen_rect& get_do_label() const noexcept { return m_do_label; }
66 const screen_rect& get_do_value() const noexcept { return m_do_value; }
67 const screen_rect& get_down_label() const noexcept { return m_down_label; }
68 const screen_rect& get_down_value() const noexcept { return m_down_value; }
69 const screen_rect& get_left_label() const noexcept { return m_left_label; }
70 const screen_rect& get_left_value() const noexcept { return m_left_value; }
71 const screen_rect& get_next_label() const noexcept { return m_next_label; }
72 const screen_rect& get_next_value() const noexcept { return m_next_value; }
73 const screen_rect& get_right_label() const noexcept { return m_right_label; }
74 const screen_rect& get_right_value() const noexcept { return m_right_value; }
75 const screen_rect& get_up_label() const noexcept { return m_up_label; }
76 const screen_rect& get_up_value() const noexcept { return m_up_value; }
77
78private:
79
80 screen_rect m_action_1_label;
81 screen_rect m_action_1_value;
82 screen_rect m_action_2_label;
83 screen_rect m_action_2_value;
84 screen_rect m_action_3_label;
85 screen_rect m_action_3_value;
86 screen_rect m_action_4_label;
87 screen_rect m_action_4_value;
88 screen_rect m_background;
89 screen_rect m_controller_type_label;
90 screen_rect m_controller_type_value;
91 screen_rect m_do_label;
92 screen_rect m_do_value;
93 screen_rect m_down_label;
94 screen_rect m_down_value;
95 screen_rect m_left_label;
96 screen_rect m_left_value;
97 screen_rect m_next_label;
98 screen_rect m_next_value;
99 screen_rect m_right_label;
100 screen_rect m_right_value;
101 screen_rect m_up_label;
102 screen_rect m_up_value;
103};
104
106std::vector<screen_rect> get_panels(const controls_view_layout& layout);
107
110
111#endif // CONTROLS_VIEW_LAYOUT_H
The layout of the Controls dialog.
Definition controls_view_layout.h:42
const screen_rect & get_action_4_value() const noexcept
Definition controls_view_layout.h:58
const screen_rect & get_selectable_rect(const controls_view_item item) const noexcept
Definition controls_view_layout.cpp:158
const screen_rect & get_action_1_label() const noexcept
Definition controls_view_layout.h:51
const screen_rect & get_do_label() const noexcept
Definition controls_view_layout.h:65
const screen_rect & get_down_label() const noexcept
Definition controls_view_layout.h:67
const screen_rect & get_left_value() const noexcept
Definition controls_view_layout.h:70
const screen_rect & get_action_3_label() const noexcept
Definition controls_view_layout.h:55
const screen_rect & get_controller_type_value() const noexcept
Definition controls_view_layout.h:64
const screen_rect & get_action_2_label() const noexcept
Definition controls_view_layout.h:53
const screen_rect & get_do_value() const noexcept
Definition controls_view_layout.h:66
const screen_rect & get_down_value() const noexcept
Definition controls_view_layout.h:68
const screen_rect & get_up_label() const noexcept
Definition controls_view_layout.h:75
const screen_rect & get_right_value() const noexcept
Definition controls_view_layout.h:74
const screen_rect & get_right_label() const noexcept
Definition controls_view_layout.h:73
const screen_rect & get_next_value() const noexcept
Definition controls_view_layout.h:72
const screen_rect & get_up_value() const noexcept
Definition controls_view_layout.h:76
const screen_rect & get_action_4_label() const noexcept
Definition controls_view_layout.h:57
const screen_rect & get_action_1_value() const noexcept
Definition controls_view_layout.h:52
const screen_rect & get_next_label() const noexcept
Definition controls_view_layout.h:71
const screen_rect & get_action_2_value() const noexcept
Definition controls_view_layout.h:54
const screen_rect & get_background() const noexcept
The size of this layout.
Definition controls_view_layout.h:61
const screen_rect & get_action_3_value() const noexcept
Definition controls_view_layout.h:56
const screen_rect & get_controller_type_label() const noexcept
Definition controls_view_layout.h:63
const screen_rect & get_left_label() const noexcept
Definition controls_view_layout.h:69
A rectangle-shaped area on the screen.
Definition screen_rect.h:15
controls_view_item
The items in the Controls dialog.
Definition controls_view_item.h:8
void test_controls_view_layout()
Test the controls_view_layout class.
Definition controls_view_layout.cpp:179
std::vector< screen_rect > get_panels(const controls_view_layout &layout)
Get the panels in the layout.
Definition controls_view_layout.cpp:128
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