The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 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)
 
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

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_
 

Detailed Description

Definition at line 34 of file menu.hpp.

Constructor & Destructor Documentation

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

Definition at line 37 of file menu_style.cpp.

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

Definition at line 48 of file menu_style.cpp.

Member Function Documentation

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

Definition at line 61 of file menu_style.cpp.

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

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

Definition at line 60 of file menu_style.cpp.

References font_size_.

Referenced by gui::menu::draw_row(), and item_size().

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

Definition at line 92 of file menu_style.cpp.

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

Referenced by gui::menu::draw_row(), and item_size().

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

Definition at line 62 of file menu_style.cpp.

References thickness_.

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

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().

SDL_Rect gui::menu::style::item_size ( const std::string item) const
virtual
void gui::menu::style::scale_images ( int  max_width,
int  max_height 
)

Definition at line 64 of file menu_style.cpp.

Referenced by dialogs::recruit_dialog().

Member Data Documentation

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

Definition at line 56 of file menu.hpp.

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

Definition at line 55 of file menu.hpp.

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

Definition at line 63 of file menu.hpp.

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

Definition at line 59 of file menu.hpp.

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

Definition at line 65 of file menu.hpp.

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

Definition at line 65 of file menu.hpp.

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

Definition at line 63 of file menu.hpp.

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

Definition at line 59 of file menu.hpp.

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

Definition at line 63 of file menu.hpp.

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

Definition at line 59 of file menu.hpp.

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

Definition at line 57 of file menu.hpp.

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


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