The Battle for Wesnoth  1.19.0-dev
Public Member Functions | Private Attributes | Friends | List of all members
frame_builder Class Reference

Easily build frame parameters with the serialized constructors. More...

#include <frame.hpp>

Public Member Functions

 frame_builder ()
 
 frame_builder (const config &cfg, const std::string &frame_string="")
 
frame_builderduration (const int duration)
 Allow easy chained modifications. More...
 
frame_builderimage (const std::string &image, const std::string &image_mod="")
 
frame_builderimage_diagonal (const std::string &image_diagonal, const std::string &image_mod="")
 
frame_buildersound (const std::string &sound)
 
frame_buildertext (const std::string &text, const color_t text_color)
 
frame_builderhalo (const std::string &halo, const std::string &halo_x, const std::string &halo_y, const std::string &halo_mod)
 
frame_builderblend (const std::string &blend_ratio, const color_t blend_color)
 
frame_builderhighlight (const std::string &highlight)
 
frame_builderoffset (const std::string &offset)
 
frame_buildersubmerge (const std::string &submerge)
 
frame_builderx (const std::string &x)
 
frame_buildery (const std::string &y)
 
frame_builderdirectional_x (const std::string &directional_x)
 
frame_builderdirectional_y (const std::string &directional_y)
 
frame_builderauto_vflip (const bool auto_vflip)
 
frame_builderauto_hflip (const bool auto_hflip)
 
frame_builderprimary_frame (const bool primary_frame)
 
frame_builderdrawing_layer (const std::string &drawing_layer)
 

Private Attributes

int duration_
 
std::string image_
 
std::string image_diagonal_
 
std::string image_mod_
 
std::string halo_
 
std::string halo_x_
 
std::string halo_y_
 
std::string halo_mod_
 
std::string sound_
 
std::string text_
 
std::optional< color_ttext_color_
 
std::optional< color_tblend_with_
 
std::string blend_ratio_
 
std::string highlight_ratio_
 
std::string offset_
 
std::string submerge_
 
std::string x_
 
std::string y_
 
std::string directional_x_
 
std::string directional_y_
 
boost::tribool auto_vflip_
 
boost::tribool auto_hflip_
 
boost::tribool primary_frame_
 
std::string drawing_layer_
 

Friends

class frame_parsed_parameters
 

Detailed Description

Easily build frame parameters with the serialized constructors.

Definition at line 77 of file frame.hpp.

Constructor & Destructor Documentation

◆ frame_builder() [1/2]

frame_builder::frame_builder ( )

Definition at line 45 of file frame.cpp.

◆ frame_builder() [2/2]

frame_builder::frame_builder ( const config cfg,
const std::string &  frame_string = "" 
)

Member Function Documentation

◆ auto_hflip()

frame_builder & frame_builder::auto_hflip ( const bool  auto_hflip)

Definition at line 223 of file frame.cpp.

References auto_hflip_.

◆ auto_vflip()

frame_builder & frame_builder::auto_vflip ( const bool  auto_vflip)

Definition at line 217 of file frame.cpp.

References auto_vflip_.

◆ blend()

frame_builder & frame_builder::blend ( const std::string &  blend_ratio,
const color_t  blend_color 
)

Definition at line 168 of file frame.cpp.

References blend_ratio_, and blend_with_.

◆ directional_x()

frame_builder & frame_builder::directional_x ( const std::string &  directional_x)

Definition at line 205 of file frame.cpp.

References directional_x_.

◆ directional_y()

frame_builder & frame_builder::directional_y ( const std::string &  directional_y)

Definition at line 211 of file frame.cpp.

References directional_y_.

◆ drawing_layer()

frame_builder & frame_builder::drawing_layer ( const std::string &  drawing_layer)

Definition at line 235 of file frame.cpp.

References drawing_layer_.

◆ duration()

frame_builder & frame_builder::duration ( const int  duration)

Allow easy chained modifications.

Will raised assert if used after initialization

Definition at line 162 of file frame.cpp.

References duration_.

Referenced by frame_builder().

◆ halo()

frame_builder & frame_builder::halo ( const std::string &  halo,
const std::string &  halo_x,
const std::string &  halo_y,
const std::string &  halo_mod 
)

Definition at line 153 of file frame.cpp.

References halo_, halo_mod_, halo_x_, and halo_y_.

◆ highlight()

frame_builder & frame_builder::highlight ( const std::string &  highlight)

Definition at line 175 of file frame.cpp.

References highlight_ratio_.

◆ image()

frame_builder & frame_builder::image ( const std::string &  image,
const std::string &  image_mod = "" 
)

Definition at line 126 of file frame.cpp.

References image_, and image_mod_.

◆ image_diagonal()

frame_builder & frame_builder::image_diagonal ( const std::string &  image_diagonal,
const std::string &  image_mod = "" 
)

Definition at line 133 of file frame.cpp.

References image_diagonal_, and image_mod_.

◆ offset()

frame_builder & frame_builder::offset ( const std::string &  offset)

Definition at line 181 of file frame.cpp.

References offset_.

◆ primary_frame()

frame_builder & frame_builder::primary_frame ( const bool  primary_frame)

Definition at line 229 of file frame.cpp.

References primary_frame_.

◆ sound()

frame_builder & frame_builder::sound ( const std::string &  sound)

Definition at line 140 of file frame.cpp.

References sound_.

◆ submerge()

frame_builder & frame_builder::submerge ( const std::string &  submerge)

Definition at line 187 of file frame.cpp.

References submerge_.

◆ text()

frame_builder & frame_builder::text ( const std::string &  text,
const color_t  text_color 
)

Definition at line 146 of file frame.cpp.

References text_, and text_color_.

◆ x()

frame_builder & frame_builder::x ( const std::string &  x)

Definition at line 193 of file frame.cpp.

References x_.

◆ y()

frame_builder & frame_builder::y ( const std::string &  y)

Definition at line 199 of file frame.cpp.

References y_.

Friends And Related Function Documentation

◆ frame_parsed_parameters

friend class frame_parsed_parameters
friend

Definition at line 104 of file frame.hpp.

Member Data Documentation

◆ auto_hflip_

boost::tribool frame_builder::auto_hflip_
private

Definition at line 131 of file frame.hpp.

Referenced by auto_hflip(), and frame_builder().

◆ auto_vflip_

boost::tribool frame_builder::auto_vflip_
private

Definition at line 130 of file frame.hpp.

Referenced by auto_vflip(), and frame_builder().

◆ blend_ratio_

std::string frame_builder::blend_ratio_
private

Definition at line 121 of file frame.hpp.

Referenced by blend().

◆ blend_with_

std::optional<color_t> frame_builder::blend_with_
private

Definition at line 119 of file frame.hpp.

Referenced by blend(), and frame_builder().

◆ directional_x_

std::string frame_builder::directional_x_
private

Definition at line 127 of file frame.hpp.

Referenced by directional_x().

◆ directional_y_

std::string frame_builder::directional_y_
private

Definition at line 128 of file frame.hpp.

Referenced by directional_y().

◆ drawing_layer_

std::string frame_builder::drawing_layer_
private

Definition at line 134 of file frame.hpp.

Referenced by drawing_layer().

◆ duration_

int frame_builder::duration_
private

Definition at line 106 of file frame.hpp.

Referenced by duration(), and frame_builder().

◆ halo_

std::string frame_builder::halo_
private

Definition at line 111 of file frame.hpp.

Referenced by frame_builder(), and halo().

◆ halo_mod_

std::string frame_builder::halo_mod_
private

Definition at line 114 of file frame.hpp.

Referenced by halo().

◆ halo_x_

std::string frame_builder::halo_x_
private

Definition at line 112 of file frame.hpp.

Referenced by halo().

◆ halo_y_

std::string frame_builder::halo_y_
private

Definition at line 113 of file frame.hpp.

Referenced by halo().

◆ highlight_ratio_

std::string frame_builder::highlight_ratio_
private

Definition at line 122 of file frame.hpp.

Referenced by highlight().

◆ image_

std::string frame_builder::image_
private

Definition at line 108 of file frame.hpp.

Referenced by frame_builder(), and image().

◆ image_diagonal_

std::string frame_builder::image_diagonal_
private

Definition at line 109 of file frame.hpp.

Referenced by frame_builder(), and image_diagonal().

◆ image_mod_

std::string frame_builder::image_mod_
private

Definition at line 110 of file frame.hpp.

Referenced by image(), and image_diagonal().

◆ offset_

std::string frame_builder::offset_
private

Definition at line 123 of file frame.hpp.

Referenced by offset().

◆ primary_frame_

boost::tribool frame_builder::primary_frame_
private

Definition at line 132 of file frame.hpp.

Referenced by frame_builder(), and primary_frame().

◆ sound_

std::string frame_builder::sound_
private

Definition at line 115 of file frame.hpp.

Referenced by sound().

◆ submerge_

std::string frame_builder::submerge_
private

Definition at line 124 of file frame.hpp.

Referenced by submerge().

◆ text_

std::string frame_builder::text_
private

Definition at line 116 of file frame.hpp.

Referenced by text().

◆ text_color_

std::optional<color_t> frame_builder::text_color_
private

Definition at line 118 of file frame.hpp.

Referenced by frame_builder(), and text().

◆ x_

std::string frame_builder::x_
private

Definition at line 125 of file frame.hpp.

Referenced by x().

◆ y_

std::string frame_builder::y_
private

Definition at line 126 of file frame.hpp.

Referenced by y().


The documentation for this class was generated from the following files: