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

#include <menu.hpp>

Inheritance diagram for gui::menu::style:

Public Member Functions

 style ()
 
virtual ~style ()
 
virtual void init ()
 
virtual SDL_Rect item_size (const indented_menu_item &imi) 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)
 
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_
 
double normal_alpha_
 
double selected_alpha_
 

Detailed Description

Definition at line 57 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 43 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

Reimplemented in gui::menu::imgsel_style.

Definition at line 493 of file menu.cpp.

References gui::menu::draw_row(), and draw::rect().

Referenced by gui::menu::draw_contents(), and gui::menu::imgsel_style::draw_row().

◆ 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

Reimplemented in gui::menu::imgsel_style.

Definition at line 470 of file menu.cpp.

References c, draw::fill(), gui::menu::NORMAL_ROW, and gui::menu::SELECTED_ROW.

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

◆ get_cell_padding()

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

Definition at line 56 of file menu_style.cpp.

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

◆ get_font_size()

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

Definition at line 55 of file menu_style.cpp.

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

◆ get_thickness()

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

Definition at line 57 of file menu_style.cpp.

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

◆ init()

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

Reimplemented in gui::menu::imgsel_style.

Definition at line 62 of file menu.hpp.

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

◆ item_size()

SDL_Rect gui::menu::style::item_size ( const indented_menu_item imi) const
virtual

Member Data Documentation

◆ cell_padding_

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

Definition at line 73 of file menu.hpp.

◆ font_size_

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

Definition at line 72 of file menu.hpp.

◆ normal_alpha_

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

Definition at line 77 of file menu.hpp.

◆ normal_rgb_

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

Definition at line 76 of file menu.hpp.

◆ selected_alpha_

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

Definition at line 77 of file menu.hpp.

◆ selected_rgb_

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

Definition at line 76 of file menu.hpp.

◆ thickness_

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

Definition at line 74 of file menu.hpp.


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