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

#include <filter_options.hpp>

Inheritance diagram for gui2::taddon_filter_options:
Inheritance graph

Public Member Functions

 taddon_filter_options ()
 
std::vector< bool > displayed_types () const
 
void set_displayed_types (const std::vector< bool > &types)
 
ADDON_STATUS_FILTER displayed_status () const
 
void set_displayed_status (ADDON_STATUS_FILTER status)
 
ADDON_SORT sort () const
 
void set_sort (ADDON_SORT sort)
 
ADDON_SORT_DIRECTION direction () const
 
void set_direction (ADDON_SORT_DIRECTION direction)
 
- Public Member Functions inherited from gui2::tdialog
 tdialog ()
 
virtual ~tdialog ()
 
bool show (CVideo &video, const unsigned auto_close_time=0)
 Shows the window. More...
 
int get_retval () const
 
void set_always_save_fields (const bool always_save_fields)
 
void set_restore (const bool restore)
 

Private Types

typedef std::pair
< ttoggle_button *, ADDON_SORT
sort_toggle
 
typedef std::pair
< ttoggle_button
*, ADDON_SORT_DIRECTION
dir_toggle
 

Private Member Functions

void register_displayed_type_field (const std::string &field_id, ADDON_TYPE addon_type)
 
void read_types_vector (const std::vector< bool > &v)
 
void toggle_all_displayed_types_button_callback (twindow &window)
 
void register_sort_toggle (twindow &window, const std::string &toggle_id, ADDON_SORT value)
 
void register_dir_toggle (twindow &window, const std::string &toggle_id, ADDON_SORT_DIRECTION value)
 
void toggle_sort_callback ()
 
void toggle_dir_callback ()
 
virtual const std::stringwindow_id () const
 Inherited from tdialog, implemented by REGISTER_DIALOG. More...
 
void pre_show (twindow &window)
 Inherited from tdialog. More...
 
void post_show (twindow &window)
 Inherited from tdialog. More...
 

Static Private Member Functions

static std::string status_label (ADDON_STATUS_FILTER s)
 

Private Attributes

ADDON_STATUS_FILTER displayed_status_
 
boost::array< bool,
ADDON_TYPES_COUNT
displayed_types_
 
std::vector< tfield_bool * > displayed_types_fields_
 
ADDON_SORT sort_
 
ADDON_SORT_DIRECTION dir_
 
tgroup< ADDON_SORTsort_tgroup_
 
tgroup< ADDON_SORT_DIRECTIONdir_tgroup_
 

Additional Inherited Members

- Protected Member Functions inherited from gui2::tdialog
tfield_boolregister_bool (const std::string &id, const bool mandatory, const std::function< bool()> &callback_load_value=std::function< bool()>(), const std::function< void(const bool)> &callback_save_value=std::function< void(const bool)>(), const std::function< void(twidget &)> &callback_change=std::function< void(twidget &)>())
 Creates a new boolean field. More...
 
tfield_boolregister_bool (const std::string &id, const bool mandatory, bool &linked_variable, const std::function< void(twidget &)> &callback_change=std::function< void(twidget &)>())
 Creates a new boolean field. More...
 
tfield_integerregister_integer (const std::string &id, const bool mandatory, const std::function< int()> &callback_load_value=std::function< int()>(), const std::function< void(const int)> &callback_save_value=std::function< void(const int)>())
 Creates a new integer field. More...
 
tfield_integerregister_integer (const std::string &id, const bool mandatory, int &linked_variable)
 Creates a new integer field. More...
 
tfield_textregister_text (const std::string &id, const bool mandatory, const std::function< std::string()> &callback_load_value=std::function< std::string()>(), const std::function< void(const std::string &)> &callback_save_value=std::function< void(const std::string &)>(), const bool capture_focus=false)
 Creates a new text field. More...
 
tfield_textregister_text (const std::string &id, const bool mandatory, std::string &linked_variable, const bool capture_focus=false)
 Creates a new text field. More...
 
tfield_labelregister_label (const std::string &id, const bool mandatory, const std::string &text, const bool use_markup=false)
 Registers a new control as a label. More...
 
tfield_labelregister_image (const std::string &id, const bool mandatory, const std::string &filename)
 Registers a new control as image. More...
 

Detailed Description

Definition at line 31 of file filter_options.hpp.

Member Typedef Documentation

Definition at line 86 of file filter_options.hpp.

Definition at line 85 of file filter_options.hpp.

Constructor & Destructor Documentation

gui2::taddon_filter_options::taddon_filter_options ( )

Member Function Documentation

ADDON_SORT_DIRECTION gui2::taddon_filter_options::direction ( ) const
inline

Definition at line 67 of file filter_options.hpp.

References dir_.

Referenced by set_direction().

ADDON_STATUS_FILTER gui2::taddon_filter_options::displayed_status ( ) const
inline

Definition at line 47 of file filter_options.hpp.

References displayed_status_.

std::vector<bool> gui2::taddon_filter_options::displayed_types ( ) const
inline

Definition at line 36 of file filter_options.hpp.

References displayed_types_.

void gui2::taddon_filter_options::post_show ( twindow window)
privatevirtual
void gui2::taddon_filter_options::pre_show ( twindow window)
privatevirtual
void gui2::taddon_filter_options::read_types_vector ( const std::vector< bool > &  v)
private

Definition at line 153 of file filter_options.cpp.

References displayed_types_.

Referenced by set_displayed_types().

void gui2::taddon_filter_options::register_dir_toggle ( twindow window,
const std::string toggle_id,
ADDON_SORT_DIRECTION  value 
)
private
void gui2::taddon_filter_options::register_displayed_type_field ( const std::string field_id,
ADDON_TYPE  addon_type 
)
private
void gui2::taddon_filter_options::register_sort_toggle ( twindow window,
const std::string toggle_id,
ADDON_SORT  value 
)
private
void gui2::taddon_filter_options::set_direction ( ADDON_SORT_DIRECTION  direction)
inline

Definition at line 72 of file filter_options.hpp.

References dir_, and direction().

void gui2::taddon_filter_options::set_displayed_status ( ADDON_STATUS_FILTER  status)
inline

Definition at line 52 of file filter_options.hpp.

References displayed_status_.

void gui2::taddon_filter_options::set_displayed_types ( const std::vector< bool > &  types)
inline

Definition at line 42 of file filter_options.hpp.

References read_types_vector().

void gui2::taddon_filter_options::set_sort ( ADDON_SORT  sort)
inline

Definition at line 62 of file filter_options.hpp.

References sort(), and sort_.

ADDON_SORT gui2::taddon_filter_options::sort ( ) const
inline

Definition at line 57 of file filter_options.hpp.

References sort_.

Referenced by set_sort().

std::string gui2::taddon_filter_options::status_label ( ADDON_STATUS_FILTER  s)
staticprivate

Definition at line 269 of file filter_options.cpp.

References _(), FILTER_INSTALLED, FILTER_NOT_INSTALLED, and FILTER_UPGRADABLE.

Referenced by pre_show().

void gui2::taddon_filter_options::toggle_all_displayed_types_button_callback ( twindow window)
private

Definition at line 161 of file filter_options.cpp.

References displayed_types_fields_, and field().

Referenced by pre_show().

void gui2::taddon_filter_options::toggle_dir_callback ( )
private

Definition at line 183 of file filter_options.cpp.

References dir_, dir_tgroup_, and gui2::tgroup< T >::get_active_member_value().

Referenced by register_dir_toggle().

void gui2::taddon_filter_options::toggle_sort_callback ( )
private
virtual const std::string& gui2::taddon_filter_options::window_id ( ) const
privatevirtual

Inherited from tdialog, implemented by REGISTER_DIALOG.

Implements gui2::tdialog.

Member Data Documentation

ADDON_SORT_DIRECTION gui2::taddon_filter_options::dir_
private
tgroup<ADDON_SORT_DIRECTION> gui2::taddon_filter_options::dir_tgroup_
private

Definition at line 90 of file filter_options.hpp.

Referenced by post_show(), pre_show(), register_dir_toggle(), and toggle_dir_callback().

ADDON_STATUS_FILTER gui2::taddon_filter_options::displayed_status_
private

Definition at line 78 of file filter_options.hpp.

Referenced by displayed_status(), post_show(), pre_show(), and set_displayed_status().

boost::array<bool, ADDON_TYPES_COUNT> gui2::taddon_filter_options::displayed_types_
private
std::vector<tfield_bool*> gui2::taddon_filter_options::displayed_types_fields_
private
ADDON_SORT gui2::taddon_filter_options::sort_
private

Definition at line 82 of file filter_options.hpp.

Referenced by register_sort_toggle(), set_sort(), sort(), and toggle_sort_callback().

tgroup<ADDON_SORT> gui2::taddon_filter_options::sort_tgroup_
private

Definition at line 89 of file filter_options.hpp.

Referenced by post_show(), pre_show(), register_sort_toggle(), and toggle_sort_callback().


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