The Battle for Wesnoth  1.15.1+dev
Public Member Functions | Protected Attributes | List of all members
gui::menu::style Class Reference

#include <menu.hpp>

Inheritance diagram for gui::menu::style:
Inheritance graph

Public Member Functions

 style ()
 
virtual ~style ()
 
virtual void init ()
 
virtual SDL_Rect item_size (const std::string &item) const
 
virtual void draw_row_bg (menu &menu_ref, const std::size_t row_index, const SDL_Rect &rect, ROW_TYPE type)
 
virtual void draw_row (menu &menu_ref, const std::size_t row_index, const SDL_Rect &rect, ROW_TYPE type)
 
void scale_images (int max_width, int max_height)
 
surface get_item_image (const image::locator &i_locator) const
 
std::size_t get_font_size () const
 
std::size_t get_cell_padding () const
 
std::size_t get_thickness () const
 

Protected Attributes

std::size_t font_size_
 
std::size_t cell_padding_
 
std::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_
 

Detailed Description

Definition at line 34 of file menu.hpp.

Constructor & Destructor Documentation

◆ style()

gui::menu::style::style ( )

Definition at line 37 of file menu_style.cpp.

◆ ~style()

gui::menu::style::~style ( )
virtual

Definition at line 44 of file menu_style.cpp.

Member Function Documentation

◆ draw_row()

void gui::menu::style::draw_row ( menu menu_ref,
const std::size_t  row_index,
const SDL_Rect &  rect,
ROW_TYPE  type 
)
virtual

◆ draw_row_bg()

void gui::menu::style::draw_row_bg ( menu menu_ref,
const std::size_t  row_index,
const SDL_Rect &  rect,
ROW_TYPE  type 
)
virtual

◆ get_cell_padding()

std::size_t gui::menu::style::get_cell_padding ( ) const

Definition at line 57 of file menu_style.cpp.

References cell_padding_.

Referenced by gui::menu::column_widths_item().

◆ get_font_size()

std::size_t gui::menu::style::get_font_size ( ) const

Definition at line 56 of file menu_style.cpp.

References font_size_.

Referenced by gui::menu::draw_row().

◆ get_item_image()

surface gui::menu::style::get_item_image ( const image::locator i_locator) const

Definition at line 66 of file menu_style.cpp.

References image::get_image(), max_img_h_, max_img_w_, xbrz::scale(), and scale_surface().

Referenced by gui::menu::draw_row().

◆ get_thickness()

std::size_t gui::menu::style::get_thickness ( ) const

Definition at line 58 of file menu_style.cpp.

References thickness_.

Referenced by gui::menu::draw_row(), and help::help_menu::process().

◆ init()

virtual void gui::menu::style::init ( )
inlinevirtual

Reimplemented in gui::menu::imgsel_style.

Definition at line 39 of file menu.hpp.

Referenced by gui::menu::menu().

◆ item_size()

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

◆ scale_images()

void gui::menu::style::scale_images ( int  max_width,
int  max_height 
)

Definition at line 60 of file menu_style.cpp.

References max_img_h_, and max_img_w_.

Member Data Documentation

◆ cell_padding_

std::size_t gui::menu::style::cell_padding_
protected

Definition at line 52 of file menu.hpp.

Referenced by get_cell_padding().

◆ font_size_

std::size_t gui::menu::style::font_size_
protected

Definition at line 51 of file menu.hpp.

Referenced by get_font_size().

◆ heading_alpha_

double gui::menu::style::heading_alpha_
protected

Definition at line 56 of file menu.hpp.

Referenced by gui::menu::imgsel_style::load_images().

◆ heading_rgb_

int gui::menu::style::heading_rgb_
protected

Definition at line 55 of file menu.hpp.

Referenced by gui::menu::imgsel_style::load_images().

◆ max_img_h_

int gui::menu::style::max_img_h_
protected

Definition at line 57 of file menu.hpp.

Referenced by get_item_image(), and scale_images().

◆ max_img_w_

int gui::menu::style::max_img_w_
protected

Definition at line 57 of file menu.hpp.

Referenced by get_item_image(), and scale_images().

◆ normal_alpha_

double gui::menu::style::normal_alpha_
protected

Definition at line 56 of file menu.hpp.

Referenced by gui::menu::imgsel_style::load_images().

◆ normal_rgb_

int gui::menu::style::normal_rgb_
protected

Definition at line 55 of file menu.hpp.

Referenced by gui::menu::imgsel_style::load_images().

◆ selected_alpha_

double gui::menu::style::selected_alpha_
protected

Definition at line 56 of file menu.hpp.

Referenced by gui::menu::imgsel_style::load_images().

◆ selected_rgb_

int gui::menu::style::selected_rgb_
protected

Definition at line 55 of file menu.hpp.

Referenced by gui::menu::imgsel_style::load_images().

◆ thickness_

std::size_t gui::menu::style::thickness_
protected

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