The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
gui::menu::imgsel_style Class Reference

#include <menu.hpp>

Inheritance diagram for gui::menu::imgsel_style:
Inheritance graph

Classes

struct  bg_cache
 

Public Member Functions

 imgsel_style (const std::string &img_base, bool has_bg, int normal_rgb, int selected_rgb, int heading_rgb, double normal_alpha, double selected_alpha, double heading_alpha)
 
virtual ~imgsel_style ()
 
virtual SDL_Rect item_size (const std::string &item) const
 
virtual void draw_row_bg (menu &menu_ref, const size_t row_index, const SDL_Rect &rect, ROW_TYPE type)
 
virtual void draw_row (menu &menu_ref, const size_t row_index, const SDL_Rect &rect, ROW_TYPE type)
 
virtual void init ()
 
bool load_images ()
 
- Public Member Functions inherited from gui::menu::style
 style ()
 
virtual ~style ()
 
void scale_images (int max_width, int max_height)
 
surface get_item_image (const image::locator &i_locator) const
 
size_t get_font_size () const
 
size_t get_cell_padding () const
 
size_t get_thickness () const
 

Protected Attributes

const std::string img_base_
 
std::map< std::string, surfaceimg_map_
 
- Protected Attributes inherited from gui::menu::style
size_t font_size_
 
size_t cell_padding_
 
size_t thickness_
 
int normal_rgb_
 
int selected_rgb_
 
int heading_rgb_
 
double normal_alpha_
 
double selected_alpha_
 
double heading_alpha_
 
int max_img_w_
 
int max_img_h_
 

Private Member Functions

bool load_image (const std::string &img_sub)
 

Private Attributes

bool has_background_
 
bool initialized_
 
bool load_failed_
 
int normal_rgb2_
 
int selected_rgb2_
 
int heading_rgb2_
 
double normal_alpha2_
 
double selected_alpha2_
 
double heading_alpha2_
 
bg_cache bg_cache_
 

Detailed Description

Definition at line 69 of file menu.hpp.

Constructor & Destructor Documentation

gui::menu::imgsel_style::imgsel_style ( const std::string img_base,
bool  has_bg,
int  normal_rgb,
int  selected_rgb,
int  heading_rgb,
double  normal_alpha,
double  selected_alpha,
double  heading_alpha 
)

Definition at line 50 of file menu_style.cpp.

gui::menu::imgsel_style::~imgsel_style ( )
virtual

Definition at line 57 of file menu_style.cpp.

Member Function Documentation

void gui::menu::imgsel_style::draw_row ( menu menu_ref,
const size_t  row_index,
const SDL_Rect &  rect,
ROW_TYPE  type 
)
virtual
void gui::menu::imgsel_style::draw_row_bg ( menu menu_ref,
const size_t  row_index,
const SDL_Rect &  rect,
ROW_TYPE  type 
)
virtual
virtual void gui::menu::imgsel_style::init ( )
inlinevirtual

Reimplemented from gui::menu::style.

Definition at line 81 of file menu.hpp.

References load_images().

SDL_Rect gui::menu::imgsel_style::item_size ( const std::string item) const
virtual

Reimplemented from gui::menu::style.

Definition at line 347 of file menu_style.cpp.

References gui::menu::style::item_size(), and gui::menu::style::thickness_.

bool gui::menu::imgsel_style::load_image ( const std::string img_sub)
private

Definition at line 113 of file menu_style.cpp.

References image::get_image(), and surface::null().

bool gui::menu::imgsel_style::load_images ( )

Definition at line 128 of file menu_style.cpp.

References gui::widget::height(), initialized_, thickness_, and gui::widget::width().

Referenced by init().

Member Data Documentation

bg_cache gui::menu::imgsel_style::bg_cache_
private

Definition at line 111 of file menu.hpp.

bool gui::menu::imgsel_style::has_background_
private

Definition at line 94 of file menu.hpp.

double gui::menu::imgsel_style::heading_alpha2_
private

Definition at line 98 of file menu.hpp.

int gui::menu::imgsel_style::heading_rgb2_
private

Definition at line 97 of file menu.hpp.

const std::string gui::menu::imgsel_style::img_base_
protected

Definition at line 85 of file menu.hpp.

std::map<std::string,surface> gui::menu::imgsel_style::img_map_
protected

Definition at line 89 of file menu.hpp.

bool gui::menu::imgsel_style::initialized_
private

Definition at line 95 of file menu.hpp.

bool gui::menu::imgsel_style::load_failed_
private

Definition at line 96 of file menu.hpp.

double gui::menu::imgsel_style::normal_alpha2_
private

Definition at line 98 of file menu.hpp.

int gui::menu::imgsel_style::normal_rgb2_
private

Definition at line 97 of file menu.hpp.

double gui::menu::imgsel_style::selected_alpha2_
private

Definition at line 98 of file menu.hpp.

int gui::menu::imgsel_style::selected_rgb2_
private

Definition at line 97 of file menu.hpp.


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