Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Classes | Functions
game_view_layout.h File Reference
#include "ccfwd.h"
#include "screen_rect.h"
#include "game_coordinate.h"
#include "screen_coordinate.h"
#include "game_options.h"
#include "layout.h"
#include "side.h"
#include "board_layout.h"
#include "game_statistics_widget_layout.h"
#include "navigation_controls_layout.h"
#include "in_game_controls_layout.h"
#include <iosfwd>
#include <map>
#include <vector>
Include dependency graph for game_view_layout.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  game_view_layout
 The layout of the Game dialog. More...
 

Functions

screen_coordinate convert_to_screen_coordinate (const game_coordinate &coordinat, const game_view_layout &layout)
 Convert an in-game coordinat to an on-screen coordinat.
 
screen_rect convert_to_screen_rect (const game_rect &coordinat, const game_view_layout &layout)
 Convert an in-game coordinat to an on-screen coordinat.
 
screen_rect convert_to_screen_rect (const square &s, const game_view_layout &layout)
 Convert an in-game square to an on-screen screen rectange.
 
game_coordinate convert_to_game_coordinate (const screen_coordinate &coordinat, const game_view_layout &layout)
 Convert an on-screen coordinat to an in-game coordinat.
 
int get_board_height (const game_view_layout &layout) noexcept
 Get the height of the board in pixels.
 
int get_board_width (const game_view_layout &layout) noexcept
 Get the width of the board in pixels.
 
double get_square_height (const game_view_layout &layout) noexcept
 Get the height of a square.
 
double get_square_width (const game_view_layout &layout) noexcept
 Get the width of a square.
 
void test_game_view_layout ()
 Test the game_view_layout class.
 
std::ostream & operator<< (std::ostream &os, const game_view_layout &layout) noexcept
 

Function Documentation

◆ convert_to_game_coordinate()

game_coordinate convert_to_game_coordinate ( const screen_coordinate coordinat,
const game_view_layout layout 
)

Convert an on-screen coordinat to an in-game coordinat.

◆ convert_to_screen_coordinate()

screen_coordinate convert_to_screen_coordinate ( const game_coordinate coordinat,
const game_view_layout layout 
)

Convert an in-game coordinat to an on-screen coordinat.

◆ convert_to_screen_rect() [1/2]

screen_rect convert_to_screen_rect ( const game_rect coordinat,
const game_view_layout layout 
)

Convert an in-game coordinat to an on-screen coordinat.

◆ convert_to_screen_rect() [2/2]

screen_rect convert_to_screen_rect ( const square s,
const game_view_layout layout 
)

Convert an in-game square to an on-screen screen rectange.

◆ get_board_height()

int get_board_height ( const game_view_layout layout)
noexcept

Get the height of the board in pixels.

◆ get_board_width()

int get_board_width ( const game_view_layout layout)
noexcept

Get the width of the board in pixels.

◆ get_square_height()

double get_square_height ( const game_view_layout layout)
noexcept

Get the height of a square.

◆ get_square_width()

double get_square_width ( const game_view_layout layout)
noexcept

Get the width of a square.

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const game_view_layout layout 
)
noexcept

◆ test_game_view_layout()

void test_game_view_layout ( )

Test the game_view_layout class.