#include <filter_options.hpp>
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::string & | window_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_SORT > | sort_tgroup_ |
tgroup< ADDON_SORT_DIRECTION > | dir_tgroup_ |
Additional Inherited Members | |
Protected Member Functions inherited from gui2::tdialog | |
tfield_bool * | register_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_bool * | register_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_integer * | register_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_integer * | register_integer (const std::string &id, const bool mandatory, int &linked_variable) |
Creates a new integer field. More... | |
tfield_text * | register_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_text * | register_text (const std::string &id, const bool mandatory, std::string &linked_variable, const bool capture_focus=false) |
Creates a new text field. More... | |
tfield_label * | register_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_label * | register_image (const std::string &id, const bool mandatory, const std::string &filename) |
Registers a new control as image. More... | |
Definition at line 31 of file filter_options.hpp.
|
private |
Definition at line 86 of file filter_options.hpp.
|
private |
Definition at line 85 of file filter_options.hpp.
gui2::taddon_filter_options::taddon_filter_options | ( | ) |
Definition at line 116 of file filter_options.cpp.
References ADDON_CORE, ADDON_MEDIA, ADDON_MP_CAMPAIGN, ADDON_MP_ERA, ADDON_MP_FACTION, ADDON_MP_MAPS, ADDON_MP_MOD, ADDON_MP_SCENARIO, ADDON_OTHER, ADDON_SP_CAMPAIGN, ADDON_SP_MP_CAMPAIGN, ADDON_SP_SCENARIO, and ADDON_UNKNOWN.
|
inline |
|
inline |
Definition at line 47 of file filter_options.hpp.
References displayed_status_.
|
inline |
Definition at line 36 of file filter_options.hpp.
References displayed_types_.
Inherited from tdialog.
Reimplemented from gui2::tdialog.
Definition at line 254 of file filter_options.cpp.
References gui2::tgroup< T >::clear(), dir_tgroup_, displayed_status_, gui2::tlistbox::get_selected_row(), game_config::images::selected, and sort_tgroup_.
Inherited from tdialog.
Reimplemented from gui2::tdialog.
Definition at line 188 of file filter_options.cpp.
References gui2::tlistbox::add_row(), gui2::tgroup< T >::clear(), gui2::event::connect_signal_mouse_left_click(), dir_tgroup_, DIRECTION_ASCENDING, DIRECTION_DESCENDING, displayed_status_, FILTER_COUNT, register_dir_toggle(), register_sort_toggle(), gui2::tlistbox::select_row(), SORT_CREATED, SORT_NAMES, sort_tgroup_, SORT_UPDATED, status_label(), and toggle_all_displayed_types_button_callback().
|
private |
Definition at line 153 of file filter_options.cpp.
References displayed_types_.
Referenced by set_displayed_types().
|
private |
Definition at line 238 of file filter_options.cpp.
References gui2::tgroup< T >::add_member(), gui2::event::connect_signal_mouse_left_click(), dir_, dir_tgroup_, gui2::ttoggle_button::set_value(), and toggle_dir_callback().
Referenced by pre_show().
|
private |
Definition at line 146 of file filter_options.cpp.
References displayed_types_, displayed_types_fields_, and gui2::tdialog::register_bool().
|
private |
Definition at line 222 of file filter_options.cpp.
References gui2::tgroup< T >::add_member(), gui2::event::connect_signal_mouse_left_click(), gui2::ttoggle_button::set_value(), sort_, sort_tgroup_, and toggle_sort_callback().
Referenced by pre_show().
|
inline |
Definition at line 72 of file filter_options.hpp.
References dir_, and direction().
|
inline |
Definition at line 52 of file filter_options.hpp.
References displayed_status_.
|
inline |
Definition at line 42 of file filter_options.hpp.
References read_types_vector().
|
inline |
Definition at line 62 of file filter_options.hpp.
|
inline |
|
staticprivate |
Definition at line 269 of file filter_options.cpp.
References _(), FILTER_INSTALLED, FILTER_NOT_INSTALLED, and FILTER_UPGRADABLE.
Referenced by pre_show().
|
private |
Definition at line 161 of file filter_options.cpp.
References displayed_types_fields_, and field().
Referenced by pre_show().
|
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().
|
private |
Definition at line 178 of file filter_options.cpp.
References gui2::tgroup< T >::get_active_member_value(), sort_, and sort_tgroup_.
Referenced by register_sort_toggle().
|
privatevirtual |
Inherited from tdialog, implemented by REGISTER_DIALOG.
Implements gui2::tdialog.
|
private |
Definition at line 83 of file filter_options.hpp.
Referenced by direction(), register_dir_toggle(), set_direction(), and toggle_dir_callback().
|
private |
Definition at line 90 of file filter_options.hpp.
Referenced by post_show(), pre_show(), register_dir_toggle(), and toggle_dir_callback().
|
private |
Definition at line 78 of file filter_options.hpp.
Referenced by displayed_status(), post_show(), pre_show(), and set_displayed_status().
|
private |
Definition at line 79 of file filter_options.hpp.
Referenced by displayed_types(), read_types_vector(), and register_displayed_type_field().
|
private |
Definition at line 80 of file filter_options.hpp.
Referenced by register_displayed_type_field(), and toggle_all_displayed_types_button_callback().
|
private |
Definition at line 82 of file filter_options.hpp.
Referenced by register_sort_toggle(), set_sort(), sort(), and toggle_sort_callback().
|
private |
Definition at line 89 of file filter_options.hpp.
Referenced by post_show(), pre_show(), register_sort_toggle(), and toggle_sort_callback().