Project Alice
Loading...
Searching...
No Matches
text Namespace Reference

Namespaces

namespace  detail
 
namespace  impl
 

Classes

class  bm_font
 
struct  char_descriptor
 
struct  columnar_layout
 
struct  embedded_flag
 
struct  embedded_unit_icon
 
struct  endless_layout
 
class  font
 
class  font_manager
 
struct  fp_currency
 
struct  fp_four_places
 
struct  fp_one_place
 
struct  fp_percentage
 
struct  fp_percentage_one_place
 
struct  fp_three_places
 
struct  fp_two_places
 
struct  glyph_sub_offset
 
struct  int_percentage
 
struct  int_wholenum
 
struct  layout
 
struct  layout_base
 
struct  layout_box
 
struct  layout_parameters
 
struct  line_break
 
struct  pretty_integer
 
struct  single_line_layout
 
struct  stored_glyph
 
struct  stored_glyphs
 
struct  surrogate_pair
 
struct  text_chunk
 
struct  vector_backed_ci_eq
 
struct  vector_backed_ci_hash
 
struct  vector_backed_eq
 
struct  vector_backed_hash
 

Typedefs

using substitution = std::variant< std::string_view, dcon::text_key, dcon::province_id, dcon::state_instance_id, dcon::nation_id, dcon::national_identity_id, int64_t, fp_one_place, sys::date, std::monostate, fp_two_places, fp_three_places, fp_four_places, fp_currency, pretty_integer, fp_percentage, fp_percentage_one_place, int_percentage, int_wholenum, dcon::state_definition_id, embedded_icon, embedded_flag, embedded_unit_icon >
 
using substitution_map = ankerl::unordered_dense::map< uint32_t, substitution >
 

Enumerations

enum class  font_selection { body_font , header_font , map_font }
 
enum class  font_feature { none , small_caps }
 
enum class  text_color : uint8_t {
  black , white , red , green ,
  yellow , unspecified , light_blue , dark_blue ,
  orange , lilac , light_grey , dark_red ,
  dark_green , gold , reset , brown
}
 
enum class  alignment : uint8_t { left , right , center }
 
enum class  variable_type : uint16_t {
  error_no_matching_value , action , active , actor ,
  adj , against , agressor , allowed ,
  amount , anyprovince , army , army_name ,
  astate , attacker , attunit , bac ,
  badboy , badword , base , base_percentage ,
  bat , bld , bon , bonus ,
  brig , bud , building , buy ,
  cap , capital , cash , casus ,
  cat , category , cb_target_name , cb_target_name_adj ,
  chan , chance , change , commander ,
  con , construction , continentname , cost ,
  count , countries , country , country1 ,
  country2 , countryadj , countryculture , countryname ,
  country_adj , creator , credits , crisisarea ,
  crisisattacker , crisisdefender , crisistaker , crisistaker_adj ,
  crisistarget , crisistarget_adj , cul , culture ,
  culture_group_union , curr , current , d ,
  date , date_long_0 , date_long_1 , date_short_0 ,
  day , days , defender , defunit ,
  desc , dest , details , direction ,
  dist , effect , effects , emilist ,
  employees , employee_max , enemy , engineermaxunits ,
  engineerunits , escorts , event , eventdesc ,
  exc , exp , faction , factory ,
  first , focus , folder , vtype_for ,
  fraction , vtype_friend , from , fromcountry ,
  fromcountry_adj , fromprovince , fromruler , funds ,
  goal , good , goods , gov ,
  government , govt , gp , gp_adj ,
  group , high_tax , hit , home ,
  hull , iamount , icountry , ide ,
  ideology , ilocation , immlist , impact ,
  iname , income , indep , inf ,
  infamy , input , inv , invention ,
  invested , invested_in_us_message , issue , law ,
  leader , lev , level , levels ,
  lim , limit , list , literacy ,
  loc , local , location , lord ,
  lose , low_tax , lvl , m ,
  max , maxloan , men , messenger ,
  mil , militancy , min , monarchtitle ,
  money , month , months , movement ,
  much , name , nation , nationalvalue ,
  natives , navy , navy_name , need ,
  needed , negative , neut , vtype_new ,
  newcountry , nf , now , num ,
  number , numfactories , numspecialfactories , odds ,
  old , oldcountry , vtype_operator , opinion ,
  opposing_army , opposing_navy , opressor , opt ,
  optimal , option , order , org ,
  organisation , other , otherresult , ourcapital ,
  ourcountry , ourcountry_adj , our_lead , our_num ,
  our_res , output , overlord , param ,
  party , passive , pay , pen ,
  penalty , per , perc , perc2 ,
  percent , percentage , player , policy ,
  pop , poptype , popularity , position ,
  positive , power , pres , prescence ,
  prestige , produced , producer , prog ,
  progress , proj , prov , provinceculture ,
  provincename , provincereligion , provinces , provs ,
  province , rank , rate , rec ,
  recipient , reconmaxunits , reconunits , reform ,
  region , rel , relation , religion ,
  req , reqlevel , required , resource ,
  result , rstate , rule , runs ,
  scr , sea , second , second_country ,
  self , sell , setting , ships ,
  size , skill , source , speed ,
  spheremaster , state , statename , str ,
  strata , strings_list_4 , string_0_0 , string_0_1 ,
  string_0_2 , string_0_3 , string_0_4 , string_9_0 ,
  sub , table , tag , tag0_0 ,
  tag_0_0 , tag_0_0_ , tag_0_0_adj , tag_0_0_upper ,
  tag_0_1 , tag_0_1_adj , tag_0_1_upper , tag_0_2 ,
  tag_0_2_adj , tag_0_3 , tag_0_3_adj , tag_1_0 ,
  tag_2_0 , tag_2_0_upper , tag_3_0 , tag_3_0_upper ,
  target , targetlist , target_country , tech ,
  temperature , terms , terrain , terrainmod ,
  text , theirlost , theirnum , theirship ,
  their_lead , their_num , their_res , them ,
  third , threat , time , title ,
  to , tot , totalemi , totalimm ,
  tra , truth , type , unemployed ,
  vtype_union , union_adj , unit , units ,
  until , usloss , usnum , val ,
  value , value_int1 , value_int_0_0 , value_int_0_1 ,
  value_int_0_2 , value_int_0_3 , value_int_0_4 , verb ,
  versus , war , wargoal , we ,
  what , where , which , who ,
  winner , x , y , year ,
  years , chief_of_navy , chief_of_staff , control ,
  head_of_government , owner , playername , yesterday ,
  avg , n , strength , total ,
  infantry , cavalry , special , thiscountry ,
  fromcontinent , fromcapital , crisistaker_continent , crisistaker_capital ,
  crisisattacker_continent , crisisattacker_adj , crisisattacker_capital , crisisdefender_continent ,
  crisisdefender_adj , crisisdefender_capital , culture_first_name , culture_last_name ,
  fromstatename , spheremaster_adj , spheremaster_union_adj
}
 
enum class  embedded_icon : uint8_t { check , xmark , army , navy }
 

Functions

bm_font const & get_bm_font (sys::state &state, uint16_t font_handle)
 
constexpr uint16_t pack_font_handle (uint32_t font_index, bool black, uint32_t size)
 
bool is_black_font (std::string_view txt)
 
uint32_t font_size (std::string_view txt)
 
uint32_t font_index (std::string_view txt)
 
uint16_t name_into_font_id (sys::state &state, std::string_view txt)
 
int32_t size_from_font_id (uint16_t id)
 
bool is_black_from_font_id (uint16_t id)
 
font_selection font_index_from_font_id (sys::state &state, uint16_t id)
 
int32_t transform_offset_b (int32_t x, int32_t y, int32_t btmap_x_off, int32_t btmap_y_off, uint32_t width, uint32_t height, uint32_t pitch)
 
void init_in_map (bool in_map[dr_size *dr_size], uint8_t const *bmp_data, int32_t btmap_x_off, int32_t btmap_y_off, uint32_t width, uint32_t height, uint32_t pitch)
 
void dead_reckoning (float distance_map[dr_size *dr_size], bool const in_map[dr_size *dr_size])
 
bool requires_surrogate_pair (uint32_t codepoint)
 
surrogate_pair make_surrogate_pair (uint32_t val) noexcept
 
std::string_view classic_unligate_utf8 (text::font &font, char32_t c)
 
text_color char_to_color (char in)
 
bool is_qmark_color (char in)
 
std::string lowercase_str (std::string_view sv)
 
uint32_t codepoint_from_utf8 (char const *start, char const *end)
 
size_t size_from_utf8 (char const *start, char const *)
 
bool codepoint_is_space (uint32_t c) noexcept
 
bool codepoint_is_line_break (uint32_t c) noexcept
 
void consume_csv_file (sys::state &state, char const *file_content, uint32_t file_size, int32_t target_column, bool as_unicode)
 
template<size_t N>
bool is_fixed_token_ci (std::string_view v, char const (&t)[N])
 
variable_type variable_type_from_name (std::string_view v)
 
char16_t win1250toUTF16 (char in)
 
std::string produce_simple_string (sys::state const &state, dcon::text_key id)
 
std::string produce_simple_string (sys::state const &state, std::string_view txt)
 
dcon::text_key find_or_add_key (sys::state &state, std::string_view key, bool as_unicode)
 
std::string prettify_currency (float num)
 
std::string prettify (int64_t num)
 
std::string get_short_state_name (sys::state &state, dcon::state_instance_id state_id)
 
std::string get_dynamic_state_name (sys::state &state, dcon::state_instance_id state_id)
 
std::string get_province_state_name (sys::state &state, dcon::province_id prov_id)
 
dcon::text_key get_name (sys::state &state, dcon::nation_id id)
 
dcon::text_key get_adjective (sys::state &state, dcon::nation_id id)
 
dcon::text_key get_ruler_title (sys::state &state, dcon::nation_id n)
 
std::string get_focus_category_name (sys::state const &state, nations::focus_type category)
 
std::string get_influence_level_name (sys::state const &state, uint8_t v)
 
std::string format_percentage (float num, size_t digits)
 
std::string format_float (float num, size_t digits)
 
std::string format_money (float num)
 
std::string format_wholenum (int32_t num)
 
std::string format_ratio (int32_t left, int32_t right)
 
void add_to_substitution_map (substitution_map &mp, variable_type key, substitution value)
 
dcon::text_key localize_month (sys::state const &state, uint16_t month)
 
std::string date_to_string (sys::state &state, sys::date date)
 
endless_layout create_endless_layout (sys::state &state, layout &dest, layout_parameters const &params)
 
void add_line_break_to_layout_box (sys::state &state, layout_base &dest, layout_box &box)
 
void add_line_break_to_layout (sys::state &state, columnar_layout &dest)
 
void add_line_break_to_layout (sys::state &state, endless_layout &dest)
 
void add_to_layout_box (sys::state &state, layout_base &dest, layout_box &box, embedded_flag ico)
 
void add_to_layout_box (sys::state &state, layout_base &dest, layout_box &box, embedded_icon ico)
 
void add_to_layout_box (sys::state &state, layout_base &dest, layout_box &box, embedded_unit_icon ico)
 
text::alignment localized_alignment (sys::state &state, text::alignment in)
 
ui::alignment localized_alignment (sys::state &state, ui::alignment in)
 
text::alignment to_text_alignment (ui::alignment in)
 
void add_to_layout_box (sys::state &state, layout_base &dest, layout_box &box, std::string_view text, text_color color, substitution source)
 
void add_unparsed_text_to_layout_box (sys::state &state, layout_base &dest, layout_box &box, std::string_view sv, substitution_map const &mp)
 
void add_to_layout_box (sys::state &state, layout_base &dest, layout_box &box, dcon::text_key source_text, substitution_map const &mp)
 
void add_to_layout_box (sys::state &state, layout_base &dest, layout_box &box, substitution val, text_color color)
 
void add_to_layout_box (sys::state &state, layout_base &dest, layout_box &box, std::string const &val, text_color color)
 
void add_space_to_layout_box (sys::state &state, layout_base &dest, layout_box &box)
 
layout_box open_layout_box (layout_base &dest, int32_t indent)
 
void close_layout_box (columnar_layout &dest, layout_box &box)
 
void close_layout_box (endless_layout &dest, layout_box &box)
 
void close_layout_box (single_line_layout &dest, layout_box &box)
 
void close_layout_box (layout_base &dest, layout_box &box)
 
columnar_layout create_columnar_layout (sys::state &state, layout &dest, layout_parameters const &params, int32_t column_width)
 
void localised_format_box (sys::state &state, layout_base &dest, layout_box &box, std::string_view key, text::substitution_map const &sub)
 
void localised_single_sub_box (sys::state &state, layout_base &dest, layout_box &box, std::string_view key, variable_type subkey, substitution value)
 
void add_line (sys::state &state, layout_base &dest, dcon::text_key txt, int32_t indent)
 
void add_line (sys::state &state, layout_base &dest, dcon::text_key txt, variable_type subkey, substitution value, int32_t indent)
 
void add_line (sys::state &state, layout_base &dest, dcon::text_key txt, variable_type subkey, substitution value, variable_type subkey_b, substitution value_b, int32_t indent)
 
void add_line (sys::state &state, layout_base &dest, dcon::text_key txt, variable_type subkey, substitution value, variable_type subkey_b, substitution value_b, variable_type subkey_c, substitution value_c, int32_t indent)
 
void add_line (sys::state &state, layout_base &dest, dcon::text_key txt, variable_type subkey, substitution value, variable_type subkey_b, substitution value_b, variable_type subkey_c, substitution value_c, variable_type subkey_d, substitution value_d, int32_t indent)
 
void add_line (sys::state &state, layout_base &dest, std::string_view key, int32_t indent)
 
void add_line_with_condition (sys::state &state, layout_base &dest, std::string_view key, bool condition_met, int32_t indent)
 
void add_line_with_condition (sys::state &state, layout_base &dest, std::string_view key, bool condition_met, variable_type subkey, substitution value, int32_t indent)
 
void add_line_with_condition (sys::state &state, layout_base &dest, std::string_view key, bool condition_met, variable_type subkey, substitution value, variable_type subkeyb, substitution valueb, int32_t indent)
 
void add_line_with_condition (sys::state &state, layout_base &dest, std::string_view key, bool condition_met, variable_type subkey, substitution value, variable_type subkeyb, substitution valueb, variable_type subkeyc, substitution valuec, int32_t indent)
 
void add_line (sys::state &state, layout_base &dest, std::string_view key, variable_type subkey, substitution value, int32_t indent)
 
void add_line (sys::state &state, layout_base &dest, std::string_view key, variable_type subkey, substitution value, variable_type subkey_b, substitution value_b, int32_t indent)
 
void add_line (sys::state &state, layout_base &dest, std::string_view key, variable_type subkey, substitution value, variable_type subkey_b, substitution value_b, variable_type subkey_c, substitution value_c, int32_t indent)
 
void add_line (sys::state &state, layout_base &dest, std::string_view key, variable_type subkey, substitution value, variable_type subkey_b, substitution value_b, variable_type subkey_c, substitution value_c, variable_type subkey_d, substitution value_d, int32_t indent)
 
void add_divider_to_layout_box (sys::state &state, layout_base &dest, layout_box &box)
 
void nation_name_and_flag (sys::state &state, dcon::nation_id n, layout_base &dest, int32_t indent)
 
std::string resolve_string_substitution (sys::state &state, dcon::text_key source_text, substitution_map const &mp)
 
std::string resolve_string_substitution (sys::state &state, std::string_view key, substitution_map const &mp)
 
void add_to_substitution_map (substitution_map &mp, variable_type key, std::string const &)
 
template<class T >
std::string get_name_as_string (sys::state &state, T t)
 
template<class T >
std::string get_adjective_as_string (sys::state &state, T t)
 
std::string get_name_as_string (sys::state &state, dcon::nation_id n)
 
std::string get_adjective_as_string (sys::state &state, dcon::nation_id n)
 
std::string get_name_as_string (sys::state &state, dcon::nation_fat_id n)
 
std::string get_adjective_as_string (sys::state &state, dcon::nation_fat_id n)
 

Variables

constexpr float rt_2 = 1.41421356237309504f
 
constexpr uint32_t max_texture_layers = 256
 
constexpr int magnification_factor = 4
 
constexpr int dr_size = 64 * magnification_factor
 

Typedef Documentation

◆ substitution

using text::substitution = typedef std::variant<std::string_view, dcon::text_key, dcon::province_id, dcon::state_instance_id, dcon::nation_id, dcon::national_identity_id, int64_t, fp_one_place, sys::date, std::monostate, fp_two_places, fp_three_places, fp_four_places, fp_currency, pretty_integer, fp_percentage, fp_percentage_one_place, int_percentage, int_wholenum, dcon::state_definition_id, embedded_icon, embedded_flag, embedded_unit_icon>

Definition at line 790 of file text.hpp.

◆ substitution_map

using text::substitution_map = typedef ankerl::unordered_dense::map<uint32_t, substitution>

Definition at line 794 of file text.hpp.

Enumeration Type Documentation

◆ alignment

enum class text::alignment : uint8_t
strong
Enumerator
left 
right 
center 

Definition at line 36 of file text.hpp.

◆ embedded_icon

enum class text::embedded_icon : uint8_t
strong
Enumerator
check 
xmark 
army 
navy 

Definition at line 781 of file text.hpp.

◆ font_feature

enum class text::font_feature
strong
Enumerator
none 
small_caps 

Definition at line 40 of file fonts.hpp.

◆ font_selection

enum class text::font_selection
strong
Enumerator
body_font 
header_font 
map_font 

Definition at line 20 of file fonts.hpp.

◆ text_color

enum class text::text_color : uint8_t
strong
Enumerator
black 
white 
red 
green 
yellow 
unspecified 
light_blue 
dark_blue 
orange 
lilac 
light_grey 
dark_red 
dark_green 
gold 
reset 
brown 

Definition at line 18 of file text.hpp.

◆ variable_type

enum class text::variable_type : uint16_t
strong
Enumerator
error_no_matching_value 
action 
active 
actor 
adj 
against 
agressor 
allowed 
amount 
anyprovince 
army 
army_name 
astate 
attacker 
attunit 
bac 
badboy 
badword 
base 
base_percentage 
bat 
bld 
bon 
bonus 
brig 
bud 
building 
buy 
cap 
capital 
cash 
casus 
cat 
category 
cb_target_name 
cb_target_name_adj 
chan 
chance 
change 
commander 
con 
construction 
continentname 
cost 
count 
countries 
country 
country1 
country2 
countryadj 
countryculture 
countryname 
country_adj 
creator 
credits 
crisisarea 
crisisattacker 
crisisdefender 
crisistaker 
crisistaker_adj 
crisistarget 
crisistarget_adj 
cul 
culture 
culture_group_union 
curr 
current 
date 
date_long_0 
date_long_1 
date_short_0 
day 
days 
defender 
defunit 
desc 
dest 
details 
direction 
dist 
effect 
effects 
emilist 
employees 
employee_max 
enemy 
engineermaxunits 
engineerunits 
escorts 
event 
eventdesc 
exc 
exp 
faction 
factory 
first 
focus 
folder 
vtype_for 
fraction 
vtype_friend 
from 
fromcountry 
fromcountry_adj 
fromprovince 
fromruler 
funds 
goal 
good 
goods 
gov 
government 
govt 
gp 
gp_adj 
group 
high_tax 
hit 
home 
hull 
iamount 
icountry 
ide 
ideology 
ilocation 
immlist 
impact 
iname 
income 
indep 
inf 
infamy 
input 
inv 
invention 
invested 
invested_in_us_message 
issue 
law 
leader 
lev 
level 
levels 
lim 
limit 
list 
literacy 
loc 
local 
location 
lord 
lose 
low_tax 
lvl 
max 
maxloan 
men 
messenger 
mil 
militancy 
min 
monarchtitle 
money 
month 
months 
movement 
much 
name 
nation 
nationalvalue 
natives 
navy 
navy_name 
need 
needed 
negative 
neut 
vtype_new 
newcountry 
nf 
now 
num 
number 
numfactories 
numspecialfactories 
odds 
old 
oldcountry 
vtype_operator 
opinion 
opposing_army 
opposing_navy 
opressor 
opt 
optimal 
option 
order 
org 
organisation 
other 
otherresult 
ourcapital 
ourcountry 
ourcountry_adj 
our_lead 
our_num 
our_res 
output 
overlord 
param 
party 
passive 
pay 
pen 
penalty 
per 
perc 
perc2 
percent 
percentage 
player 
policy 
pop 
poptype 
popularity 
position 
positive 
power 
pres 
prescence 
prestige 
produced 
producer 
prog 
progress 
proj 
prov 
provinceculture 
provincename 
provincereligion 
provinces 
provs 
province 
rank 
rate 
rec 
recipient 
reconmaxunits 
reconunits 
reform 
region 
rel 
relation 
religion 
req 
reqlevel 
required 
resource 
result 
rstate 
rule 
runs 
scr 
sea 
second 
second_country 
self 
sell 
setting 
ships 
size 
skill 
source 
speed 
spheremaster 
state 
statename 
str 
strata 
strings_list_4 
string_0_0 
string_0_1 
string_0_2 
string_0_3 
string_0_4 
string_9_0 
sub 
table 
tag 
tag0_0 
tag_0_0 
tag_0_0_ 
tag_0_0_adj 
tag_0_0_upper 
tag_0_1 
tag_0_1_adj 
tag_0_1_upper 
tag_0_2 
tag_0_2_adj 
tag_0_3 
tag_0_3_adj 
tag_1_0 
tag_2_0 
tag_2_0_upper 
tag_3_0 
tag_3_0_upper 
target 
targetlist 
target_country 
tech 
temperature 
terms 
terrain 
terrainmod 
text 
theirlost 
theirnum 
theirship 
their_lead 
their_num 
their_res 
them 
third 
threat 
time 
title 
to 
tot 
totalemi 
totalimm 
tra 
truth 
type 
unemployed 
vtype_union 
union_adj 
unit 
units 
until 
usloss 
usnum 
val 
value 
value_int1 
value_int_0_0 
value_int_0_1 
value_int_0_2 
value_int_0_3 
value_int_0_4 
verb 
versus 
war 
wargoal 
we 
what 
where 
which 
who 
winner 
year 
years 
chief_of_navy 
chief_of_staff 
control 
head_of_government 
owner 
playername 
yesterday 
avg 
strength 
total 
infantry 
cavalry 
special 
thiscountry 
fromcontinent 
fromcapital 
crisistaker_continent 
crisistaker_capital 
crisisattacker_continent 
crisisattacker_adj 
crisisattacker_capital 
crisisdefender_continent 
crisisdefender_adj 
crisisdefender_capital 
culture_first_name 
culture_last_name 
fromstatename 
spheremaster_adj 
spheremaster_union_adj 

Definition at line 37 of file text.hpp.

Function Documentation

◆ add_divider_to_layout_box()

void text::add_divider_to_layout_box ( sys::state state,
layout_base dest,
layout_box box 
)

Definition at line 2098 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_line() [1/10]

void text::add_line ( sys::state state,
layout_base dest,
dcon::text_key  txt,
int32_t  indent 
)

Definition at line 1899 of file text.cpp.

Here is the call graph for this function:

◆ add_line() [2/10]

void text::add_line ( sys::state state,
layout_base dest,
dcon::text_key  txt,
variable_type  subkey,
substitution  value,
int32_t  indent 
)

Definition at line 1904 of file text.cpp.

Here is the call graph for this function:

◆ add_line() [3/10]

void text::add_line ( sys::state state,
layout_base dest,
dcon::text_key  txt,
variable_type  subkey,
substitution  value,
variable_type  subkey_b,
substitution  value_b,
int32_t  indent 
)

Definition at line 1911 of file text.cpp.

Here is the call graph for this function:

◆ add_line() [4/10]

void text::add_line ( sys::state state,
layout_base dest,
dcon::text_key  txt,
variable_type  subkey,
substitution  value,
variable_type  subkey_b,
substitution  value_b,
variable_type  subkey_c,
substitution  value_c,
int32_t  indent 
)

Definition at line 1921 of file text.cpp.

Here is the call graph for this function:

◆ add_line() [5/10]

void text::add_line ( sys::state state,
layout_base dest,
dcon::text_key  txt,
variable_type  subkey,
substitution  value,
variable_type  subkey_b,
substitution  value_b,
variable_type  subkey_c,
substitution  value_c,
variable_type  subkey_d,
substitution  value_d,
int32_t  indent 
)

Definition at line 1932 of file text.cpp.

Here is the call graph for this function:

◆ add_line() [6/10]

void text::add_line ( sys::state state,
layout_base dest,
std::string_view  key,
int32_t  indent 
)

Definition at line 1946 of file text.cpp.

Here is the call graph for this function:

◆ add_line() [7/10]

void text::add_line ( sys::state state,
layout_base dest,
std::string_view  key,
variable_type  subkey,
substitution  value,
int32_t  indent 
)

Definition at line 2036 of file text.cpp.

Here is the call graph for this function:

◆ add_line() [8/10]

void text::add_line ( sys::state state,
layout_base dest,
std::string_view  key,
variable_type  subkey,
substitution  value,
variable_type  subkey_b,
substitution  value_b,
int32_t  indent 
)

Definition at line 2050 of file text.cpp.

Here is the call graph for this function:

◆ add_line() [9/10]

void text::add_line ( sys::state state,
layout_base dest,
std::string_view  key,
variable_type  subkey,
substitution  value,
variable_type  subkey_b,
substitution  value_b,
variable_type  subkey_c,
substitution  value_c,
int32_t  indent 
)

Definition at line 2064 of file text.cpp.

Here is the call graph for this function:

◆ add_line() [10/10]

void text::add_line ( sys::state state,
layout_base dest,
std::string_view  key,
variable_type  subkey,
substitution  value,
variable_type  subkey_b,
substitution  value_b,
variable_type  subkey_c,
substitution  value_c,
variable_type  subkey_d,
substitution  value_d,
int32_t  indent 
)

Definition at line 2079 of file text.cpp.

Here is the call graph for this function:

◆ add_line_break_to_layout() [1/2]

void text::add_line_break_to_layout ( sys::state state,
columnar_layout dest 
)

Definition at line 1152 of file text.cpp.

◆ add_line_break_to_layout() [2/2]

void text::add_line_break_to_layout ( sys::state state,
endless_layout dest 
)

Definition at line 1158 of file text.cpp.

◆ add_line_break_to_layout_box()

void text::add_line_break_to_layout_box ( sys::state state,
layout_base dest,
layout_box box 
)

Definition at line 1147 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_line_with_condition() [1/4]

void text::add_line_with_condition ( sys::state state,
layout_base dest,
std::string_view  key,
bool  condition_met,
int32_t  indent 
)

Definition at line 1955 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_line_with_condition() [2/4]

void text::add_line_with_condition ( sys::state state,
layout_base dest,
std::string_view  key,
bool  condition_met,
variable_type  subkey,
substitution  value,
int32_t  indent 
)

Definition at line 1973 of file text.cpp.

Here is the call graph for this function:

◆ add_line_with_condition() [3/4]

void text::add_line_with_condition ( sys::state state,
layout_base dest,
std::string_view  key,
bool  condition_met,
variable_type  subkey,
substitution  value,
variable_type  subkeyb,
substitution  valueb,
int32_t  indent 
)

Definition at line 1993 of file text.cpp.

Here is the call graph for this function:

◆ add_line_with_condition() [4/4]

void text::add_line_with_condition ( sys::state state,
layout_base dest,
std::string_view  key,
bool  condition_met,
variable_type  subkey,
substitution  value,
variable_type  subkeyb,
substitution  valueb,
variable_type  subkeyc,
substitution  valuec,
int32_t  indent 
)

Definition at line 2014 of file text.cpp.

Here is the call graph for this function:

◆ add_space_to_layout_box()

void text::add_space_to_layout_box ( sys::state state,
layout_base dest,
layout_box box 
)

Definition at line 1788 of file text.cpp.

Here is the call graph for this function:

◆ add_to_layout_box() [1/7]

void text::add_to_layout_box ( sys::state state,
layout_base dest,
layout_box box,
dcon::text_key  source_text,
substitution_map const &  mp 
)

Definition at line 1768 of file text.cpp.

Here is the call graph for this function:

◆ add_to_layout_box() [2/7]

void text::add_to_layout_box ( sys::state state,
layout_base dest,
layout_box box,
embedded_flag  ico 
)

Definition at line 1165 of file text.cpp.

Here is the call graph for this function:

◆ add_to_layout_box() [3/7]

void text::add_to_layout_box ( sys::state state,
layout_base dest,
layout_box box,
embedded_icon  ico 
)

Definition at line 1176 of file text.cpp.

Here is the call graph for this function:

◆ add_to_layout_box() [4/7]

void text::add_to_layout_box ( sys::state state,
layout_base dest,
layout_box box,
embedded_unit_icon  ico 
)

Definition at line 1188 of file text.cpp.

Here is the call graph for this function:

◆ add_to_layout_box() [5/7]

void text::add_to_layout_box ( sys::state state,
layout_base dest,
layout_box box,
std::string const &  val,
text_color  color 
)

Definition at line 1785 of file text.cpp.

Here is the call graph for this function:

◆ add_to_layout_box() [6/7]

void text::add_to_layout_box ( sys::state state,
layout_base dest,
layout_box box,
std::string_view  text,
text_color  color,
substitution  source 
)

Definition at line 1233 of file text.cpp.

Here is the call graph for this function:

◆ add_to_layout_box() [7/7]

void text::add_to_layout_box ( sys::state state,
layout_base dest,
layout_box box,
substitution  val,
text_color  color 
)

Definition at line 1781 of file text.cpp.

Here is the call graph for this function:

◆ add_to_substitution_map() [1/2]

void text::add_to_substitution_map ( substitution_map mp,
variable_type  key,
std::string const &   
)

◆ add_to_substitution_map() [2/2]

void text::add_to_substitution_map ( substitution_map mp,
variable_type  key,
substitution  value 
)

Definition at line 1068 of file text.cpp.

◆ add_unparsed_text_to_layout_box()

void text::add_unparsed_text_to_layout_box ( sys::state state,
layout_base dest,
layout_box box,
std::string_view  sv,
substitution_map const &  mp 
)

Definition at line 1601 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ char_to_color()

text_color text::char_to_color ( char  in)

Definition at line 18 of file text.cpp.

Here is the caller graph for this function:

◆ classic_unligate_utf8()

std::string_view text::classic_unligate_utf8 ( text::font font,
char32_t  c 
)

◆ close_layout_box() [1/4]

void text::close_layout_box ( columnar_layout dest,
layout_box box 
)

Definition at line 1807 of file text.cpp.

Here is the call graph for this function:

◆ close_layout_box() [2/4]

void text::close_layout_box ( endless_layout dest,
layout_box box 
)

Definition at line 1847 of file text.cpp.

Here is the call graph for this function:

◆ close_layout_box() [3/4]

void text::close_layout_box ( layout_base dest,
layout_box box 
)

Definition at line 1859 of file text.cpp.

◆ close_layout_box() [4/4]

void text::close_layout_box ( single_line_layout dest,
layout_box box 
)

Definition at line 1855 of file text.cpp.

Here is the call graph for this function:

◆ codepoint_from_utf8()

uint32_t text::codepoint_from_utf8 ( char const *  start,
char const *  end 
)

Definition at line 66 of file text.cpp.

Here is the caller graph for this function:

◆ codepoint_is_line_break()

bool text::codepoint_is_line_break ( uint32_t  c)
noexcept

Definition at line 92 of file text.cpp.

◆ codepoint_is_space()

bool text::codepoint_is_space ( uint32_t  c)
noexcept

Definition at line 88 of file text.cpp.

◆ consume_csv_file()

void text::consume_csv_file ( sys::state state,
char const *  file_content,
uint32_t  file_size,
int32_t  target_column,
bool  as_unicode 
)

Definition at line 96 of file text.cpp.

Here is the caller graph for this function:

◆ create_columnar_layout()

columnar_layout text::create_columnar_layout ( sys::state state,
layout dest,
layout_parameters const &  params,
int32_t  column_width 
)

Definition at line 1873 of file text.cpp.

Here is the caller graph for this function:

◆ create_endless_layout()

endless_layout text::create_endless_layout ( sys::state state,
layout dest,
layout_parameters const &  params 
)

Definition at line 1100 of file text.cpp.

Here is the caller graph for this function:

◆ date_to_string()

std::string text::date_to_string ( sys::state state,
sys::date  date 
)

Definition at line 1082 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dead_reckoning()

void text::dead_reckoning ( float  distance_map[dr_size *dr_size],
bool const  in_map[dr_size *dr_size] 
)

Definition at line 200 of file fonts.cpp.

Here is the caller graph for this function:

◆ find_or_add_key()

dcon::text_key text::find_or_add_key ( sys::state state,
std::string_view  key,
bool  as_unicode 
)

Definition at line 695 of file text.cpp.

◆ font_index()

uint32_t text::font_index ( std::string_view  txt)

Definition at line 68 of file fonts.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ font_index_from_font_id()

font_selection text::font_index_from_font_id ( sys::state state,
uint16_t  id 
)

Definition at line 130 of file fonts.cpp.

Here is the caller graph for this function:

◆ font_size()

uint32_t text::font_size ( std::string_view  txt)

Definition at line 35 of file fonts.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ format_float()

std::string text::format_float ( float  num,
size_t  digits 
)

Definition at line 981 of file text.cpp.

◆ format_money()

std::string text::format_money ( float  num)

Definition at line 1029 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ format_percentage()

std::string text::format_percentage ( float  num,
size_t  digits 
)

Definition at line 977 of file text.cpp.

Here is the call graph for this function:

◆ format_ratio()

std::string text::format_ratio ( int32_t  left,
int32_t  right 
)

Definition at line 1064 of file text.cpp.

Here is the caller graph for this function:

◆ format_wholenum()

std::string text::format_wholenum ( int32_t  num)

Definition at line 1033 of file text.cpp.

Here is the caller graph for this function:

◆ get_adjective()

dcon::text_key text::get_adjective ( sys::state state,
dcon::nation_id  id 
)

Definition at line 890 of file text.cpp.

Here is the caller graph for this function:

◆ get_adjective_as_string() [1/3]

std::string text::get_adjective_as_string ( sys::state state,
dcon::nation_fat_id  n 
)
inline

Definition at line 978 of file text.hpp.

Here is the call graph for this function:

◆ get_adjective_as_string() [2/3]

std::string text::get_adjective_as_string ( sys::state state,
dcon::nation_id  n 
)
inline

Definition at line 972 of file text.hpp.

Here is the call graph for this function:

◆ get_adjective_as_string() [3/3]

template<class T >
std::string text::get_adjective_as_string ( sys::state state,
t 
)

Definition at line 958 of file text.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_bm_font()

bm_font const & text::get_bm_font ( sys::state state,
uint16_t  font_handle 
)

Definition at line 162 of file bmfont.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_dynamic_state_name()

std::string text::get_dynamic_state_name ( sys::state state,
dcon::state_instance_id  state_id 
)

Definition at line 837 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_focus_category_name()

std::string text::get_focus_category_name ( sys::state const &  state,
nations::focus_type  category 
)

Definition at line 909 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_influence_level_name()

std::string text::get_influence_level_name ( sys::state const &  state,
uint8_t  v 
)

Definition at line 958 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_name()

dcon::text_key text::get_name ( sys::state state,
dcon::nation_id  id 
)

Definition at line 880 of file text.cpp.

◆ get_name_as_string() [1/3]

std::string text::get_name_as_string ( sys::state state,
dcon::nation_fat_id  n 
)
inline

Definition at line 975 of file text.hpp.

Here is the call graph for this function:

◆ get_name_as_string() [2/3]

std::string text::get_name_as_string ( sys::state state,
dcon::nation_id  n 
)
inline

Definition at line 969 of file text.hpp.

Here is the call graph for this function:

◆ get_name_as_string() [3/3]

template<class T >
std::string text::get_name_as_string ( sys::state state,
t 
)

Definition at line 954 of file text.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_province_state_name()

std::string text::get_province_state_name ( sys::state state,
dcon::province_id  prov_id 
)

Definition at line 864 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_ruler_title()

dcon::text_key text::get_ruler_title ( sys::state state,
dcon::nation_id  n 
)

Definition at line 899 of file text.cpp.

Here is the caller graph for this function:

◆ get_short_state_name()

std::string text::get_short_state_name ( sys::state state,
dcon::state_instance_id  state_id 
)

Definition at line 821 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_in_map()

void text::init_in_map ( bool  in_map[dr_size *dr_size],
uint8_t const *  bmp_data,
int32_t  btmap_x_off,
int32_t  btmap_y_off,
uint32_t  width,
uint32_t  height,
uint32_t  pitch 
)

Definition at line 186 of file fonts.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_black_font()

bool text::is_black_font ( std::string_view  txt)

Definition at line 25 of file fonts.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_black_from_font_id()

bool text::is_black_from_font_id ( uint16_t  id)

Definition at line 127 of file fonts.cpp.

Here is the caller graph for this function:

◆ is_fixed_token_ci()

template<size_t N>
bool text::is_fixed_token_ci ( std::string_view  v,
char const (&)  t[N] 
)

Definition at line 125 of file text.cpp.

Here is the caller graph for this function:

◆ is_qmark_color()

bool text::is_qmark_color ( char  in)
inline

Definition at line 53 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ localised_format_box()

void text::localised_format_box ( sys::state state,
layout_base dest,
layout_box box,
std::string_view  key,
text::substitution_map const &  sub 
)

Definition at line 1880 of file text.cpp.

Here is the call graph for this function:

◆ localised_single_sub_box()

void text::localised_single_sub_box ( sys::state state,
layout_base dest,
layout_box box,
std::string_view  key,
variable_type  subkey,
substitution  value 
)

Definition at line 1888 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ localize_month()

dcon::text_key text::localize_month ( sys::state const &  state,
uint16_t  month 
)

Definition at line 1072 of file text.cpp.

Here is the caller graph for this function:

◆ localized_alignment() [1/2]

text::alignment text::localized_alignment ( sys::state state,
text::alignment  in 
)

Definition at line 1201 of file text.cpp.

◆ localized_alignment() [2/2]

ui::alignment text::localized_alignment ( sys::state state,
ui::alignment  in 
)

Definition at line 1209 of file text.cpp.

◆ lowercase_str()

std::string text::lowercase_str ( std::string_view  sv)

Definition at line 57 of file text.cpp.

◆ make_surrogate_pair()

surrogate_pair text::make_surrogate_pair ( uint32_t  val)
inlinenoexcept

Definition at line 55 of file fonts.hpp.

Here is the caller graph for this function:

◆ name_into_font_id()

uint16_t text::name_into_font_id ( sys::state state,
std::string_view  txt 
)

Definition at line 93 of file fonts.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nation_name_and_flag()

void text::nation_name_and_flag ( sys::state state,
dcon::nation_id  n,
layout_base dest,
int32_t  indent 
)

Definition at line 2104 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ open_layout_box()

layout_box text::open_layout_box ( layout_base dest,
int32_t  indent 
)

Definition at line 1799 of file text.cpp.

◆ pack_font_handle()

constexpr uint16_t text::pack_font_handle ( uint32_t  font_index,
bool  black,
uint32_t  size 
)
constexpr

Definition at line 21 of file fonts.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prettify()

std::string text::prettify ( int64_t  num)

Definition at line 762 of file text.cpp.

Here is the caller graph for this function:

◆ prettify_currency()

std::string text::prettify_currency ( float  num)

Definition at line 702 of file text.cpp.

Here is the caller graph for this function:

◆ produce_simple_string() [1/2]

std::string text::produce_simple_string ( sys::state const &  state,
dcon::text_key  id 
)

Definition at line 617 of file text.cpp.

Here is the call graph for this function:

◆ produce_simple_string() [2/2]

std::string text::produce_simple_string ( sys::state const &  state,
std::string_view  txt 
)

Definition at line 687 of file text.cpp.

Here is the call graph for this function:

◆ requires_surrogate_pair()

bool text::requires_surrogate_pair ( uint32_t  codepoint)
inline

Definition at line 46 of file fonts.hpp.

Here is the caller graph for this function:

◆ resolve_string_substitution() [1/2]

std::string text::resolve_string_substitution ( sys::state state,
dcon::text_key  source_text,
substitution_map const &  mp 
)

Definition at line 2113 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolve_string_substitution() [2/2]

std::string text::resolve_string_substitution ( sys::state state,
std::string_view  key,
substitution_map const &  mp 
)

Definition at line 2199 of file text.cpp.

Here is the call graph for this function:

◆ size_from_font_id()

int32_t text::size_from_font_id ( uint16_t  id)

Definition at line 119 of file fonts.cpp.

Here is the caller graph for this function:

◆ size_from_utf8()

size_t text::size_from_utf8 ( char const *  start,
char const *   
)

Definition at line 82 of file text.cpp.

Here is the caller graph for this function:

◆ to_text_alignment()

text::alignment text::to_text_alignment ( ui::alignment  in)

Definition at line 1217 of file text.cpp.

Here is the caller graph for this function:

◆ transform_offset_b()

int32_t text::transform_offset_b ( int32_t  x,
int32_t  y,
int32_t  btmap_x_off,
int32_t  btmap_y_off,
uint32_t  width,
uint32_t  height,
uint32_t  pitch 
)

Definition at line 172 of file fonts.cpp.

Here is the caller graph for this function:

◆ variable_type_from_name()

variable_type text::variable_type_from_name ( std::string_view  v)

Definition at line 137 of file text.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ win1250toUTF16()

char16_t text::win1250toUTF16 ( char  in)

Definition at line 587 of file text.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ dr_size

constexpr int text::dr_size = 64 * magnification_factor
inlineconstexpr

Definition at line 18 of file fonts.hpp.

◆ magnification_factor

constexpr int text::magnification_factor = 4
inlineconstexpr

Definition at line 17 of file fonts.hpp.

◆ max_texture_layers

constexpr uint32_t text::max_texture_layers = 256
inlineconstexpr

Definition at line 16 of file fonts.hpp.

◆ rt_2

constexpr float text::rt_2 = 1.41421356237309504f
constexpr

Definition at line 184 of file fonts.cpp.