The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
constants.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 - 2017 by Mark de Wever <koraq@xs4all.nl>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #pragma once
16 
17 #include <string>
18 
19 namespace font {
20 
21 // font sizes, to be made theme parameters
22 extern const int SIZE_NORMAL;
23 // automatic computation of other font sizes, to be made a default for theme-provided values
24 extern const int SIZE_TINY, SIZE_SMALL,
26 
27 // For arbitrary scaling:
28 // (Not used in defining the SIZE_* consts because of spurious compiler warnings.)
29 inline int relative_size(int size)
30 {
31  return (SIZE_NORMAL * size / 14);
32 }
33 
34 // GUI1 built-in maximum
35 extern const size_t max_text_line_width;
36 
37 // String constants
38 extern const std::string
39  ellipsis,
40 
47 
50 
51 } // end namespace font
std::vector< char_t > string
const std::string weapon_details_sep
Definition: constants.cpp:45
Note: Specific to sdl_ttf.
int relative_size(int size)
Definition: constants.hpp:29
const int SIZE_PLUS
Definition: constants.cpp:26
const size_t max_text_line_width
Definition: constants.cpp:32
const int SIZE_NORMAL
Definition: constants.cpp:19
const int SIZE_XLARGE
Definition: constants.cpp:29
const std::string unicode_minus
Definition: constants.cpp:37
const std::string ellipsis
Definition: constants.cpp:35
const int SIZE_15
Definition: constants.cpp:25
const std::string unicode_multiplication_sign
Definition: constants.cpp:41
const std::string unicode_figure_dash
Definition: constants.cpp:40
size_t size(const utf8::string &str)
Length in characters of a UTF-8 string.
Definition: unicode.cpp:86
const std::string unicode_en_dash
Definition: constants.cpp:38
const std::string unicode_bullet
Definition: constants.cpp:42
const int SIZE_TITLE
Definition: constants.cpp:28
const int SIZE_LARGE
Definition: constants.cpp:27
const std::string weapon_numbers_sep
Definition: constants.cpp:44
const std::string unicode_em_dash
Definition: constants.cpp:39
const int SIZE_SMALL
Definition: constants.cpp:23
const int SIZE_TINY
Definition: constants.cpp:22