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 Member Functions | Private Attributes | List of all members
gui2::taddon_list Class Reference

Shows the list of addons on the server. More...

#include <list.hpp>

Inheritance diagram for gui2::taddon_list:
Inheritance graph

Public Member Functions

 taddon_list (const config &cfg)
 
- 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 Member Functions

void register_sort_button (twindow &window, const std::string &id, const tgenerator_::torder_func &up, const tgenerator_::torder_func &down)
 
void register_sort_button_alphabetical (twindow &window, const std::string &id, const std::string &prop_id)
 
void register_sort_button_numeric (twindow &window, const std::string &id, const std::string &prop_id)
 
void on_order_button_click (twindow &window, const tgenerator_::torder_func &up, const tgenerator_::torder_func &down, twidget &w)
 
void on_filtertext_changed (ttext_ *textbox, const std::string &text)
 
void on_addon_select (twindow &window)
 
virtual const std::stringwindow_id () const
 Inherited from tdialog, implemented by REGISTER_DIALOG. More...
 
void pre_show (twindow &window)
 Inherited from tdialog. More...
 
void browse_url_callback (ttext_box &url_box)
 
void copy_url_callback (ttext_box &url_box)
 
void options_button_callback (twindow &window)
 
void show_help (twindow &window)
 

Private Attributes

std::vector< tselectable_ * > orders_
 
const configcfg_
 Config which contains the list with the campaigns. More...
 
config::const_child_itors cfg_iterators_
 Debug iterators for testing with –new-widgets. More...
 
addons_list addons_
 
addons_tracking_list tracking_info_
 
std::vector< std::stringids_
 

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

Shows the list of addons on the server.

Definition at line 35 of file list.hpp.

Constructor & Destructor Documentation

gui2::taddon_list::taddon_list ( const config cfg)
explicit

Definition at line 179 of file list.cpp.

References read_addons_list().

Member Function Documentation

void gui2::taddon_list::browse_url_callback ( ttext_box url_box)
private

Definition at line 512 of file list.cpp.

References gui2::ttext_::get_value(), and desktop::open_object().

Referenced by pre_show().

void gui2::taddon_list::copy_url_callback ( ttext_box url_box)
private

Definition at line 519 of file list.cpp.

References desktop::clipboard::copy_to_clipboard(), and gui2::ttext_::get_value().

Referenced by pre_show().

void gui2::taddon_list::on_addon_select ( twindow window)
private
void gui2::taddon_list::on_filtertext_changed ( ttext_ textbox,
const std::string text 
)
private
void gui2::taddon_list::on_order_button_click ( twindow window,
const tgenerator_::torder_func up,
const tgenerator_::torder_func down,
twidget w 
)
private
void gui2::taddon_list::options_button_callback ( twindow window)
private

Definition at line 493 of file list.cpp.

References UNUSED.

Referenced by pre_show().

void gui2::taddon_list::pre_show ( twindow window)
privatevirtual
void gui2::taddon_list::register_sort_button ( twindow window,
const std::string id,
const tgenerator_::torder_func up,
const tgenerator_::torder_func down 
)
private
void gui2::taddon_list::register_sort_button_alphabetical ( twindow window,
const std::string id,
const std::string prop_id 
)
private

Definition at line 234 of file list.cpp.

References cfg_, and register_sort_button().

Referenced by pre_show().

void gui2::taddon_list::register_sort_button_numeric ( twindow window,
const std::string id,
const std::string prop_id 
)
private

Definition at line 242 of file list.cpp.

References cfg_, and register_sort_button().

Referenced by pre_show().

void gui2::taddon_list::show_help ( twindow window)
private

Definition at line 507 of file list.cpp.

References help::show_help(), and gui2::twindow::video().

Referenced by pre_show().

virtual const std::string& gui2::taddon_list::window_id ( ) const
privatevirtual

Inherited from tdialog, implemented by REGISTER_DIALOG.

Implements gui2::tdialog.

Member Data Documentation

addons_list gui2::taddon_list::addons_
private

Definition at line 65 of file list.hpp.

Referenced by on_addon_select(), and pre_show().

const config& gui2::taddon_list::cfg_
private

Config which contains the list with the campaigns.

Definition at line 58 of file list.hpp.

Referenced by on_filtertext_changed(), pre_show(), register_sort_button_alphabetical(), and register_sort_button_numeric().

config::const_child_itors gui2::taddon_list::cfg_iterators_
private

Debug iterators for testing with –new-widgets.

Definition at line 63 of file list.hpp.

std::vector<std::string> gui2::taddon_list::ids_
private

Definition at line 69 of file list.hpp.

Referenced by on_addon_select(), and pre_show().

std::vector<tselectable_*> gui2::taddon_list::orders_
private

Definition at line 48 of file list.hpp.

Referenced by on_order_button_click(), and register_sort_button().

addons_tracking_list gui2::taddon_list::tracking_info_
private

Definition at line 67 of file list.hpp.

Referenced by on_addon_select(), and pre_show().


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