The Battle for Wesnoth  1.19.7+dev
Todo List
Member addon_info::resolve_dependencies (const addons_list &addons) const
Tag resolved dependencies with information about where they come from, and implement more dependency tiers.
Member ADDON_INSTALLED_BROKEN
This option isn't currently implemented!
Member addons_client::request_addons_list (config &cfg, bool icons)
FIXME: get rid of this legacy "campaign"/"campaigns" silliness
Member addons_client::upload_addon (const std::string &id, std::string &response_message, config &cfg, bool local_only)
Notify the user about the automatic passphrase.
Member battle_context::choose_defender_weapon (nonempty_unit_const_ptr attacker, nonempty_unit_const_ptr defender, unsigned attacker_weapon, const map_location &attacker_loc, const map_location &defender_loc, const combatant *prev_def)
FIXME: Hand previous defender unit in here.
Member battle_context::get_attacker_combatant (const combatant *prev_def=nullptr)
FIXME: better to initialize combatant initially (move into battle_context_unit_stats?), just do fight() when required.
Member BOOST_AUTO_TEST_CASE (test_l_modification_decoding_1_arg)
check if the surface is correct
Member BOOST_AUTO_TEST_CASE (test_mask_modification_decoding_3_args)
check if the surface is correct
Member BOOST_AUTO_TEST_CASE (test_fire_event)
Add the rest of the events.
Member BOOST_AUTO_TEST_CASE (test_blit_modification_decoding_1_arg)
check if the surface is correct
Member BOOST_AUTO_TEST_CASE (test_blit_modification_decoding_3_args)
check if the surface is correct
Member BOOST_AUTO_TEST_CASE (test_mask_modification_decoding_1_arg)
check if the surface is correct
Member connect_signals (std::stringstream &sstr, gui2::widget &widget)
Add the rest of the events.
Member deprecated_message (const std::string &elem_name, DEP_LEVEL level, const class version_info &version, const std::string &detail="")
version should probably be made optional to handle INDEFINITE and REMOVED deprecation, but I don't think we can do that without including version_info.hpp in this header.
Member editor::brush_drag_mouse_action::drag_end (editor_display &disp, int x, int y)
partial actions (the entire drag should end up as one action)
Member editor::brush_drag_mouse_action::drag_left (editor_display &disp, int x, int y, bool &partial, editor_action *last_undo)
partial actions support and merging of many drag actions into one
Member editor::brush_drag_mouse_action::drag_right (editor_display &disp, int x, int y, bool &partial, editor_action *last_undo)
partial actions support and merging of many drag actions into one
Member editor::brush_drag_mouse_action::previous_drag_hex_
keep a set of all "visited" locations to reduce action count in long drags that hit the same hexes multiple times?
Class editor::editor_action_item
remove commented-out code (no separate ticket, but editor cleanup is on the roadmap for 1.15.11) action_item.cpp is full of commented-out code, it seems to be deadweight with the real implementation to be found in mouse_action_item.cpp.
Member editor::map_context::undo_stack_
Use boost's pointer-owning container?
Member editor::mouse_action_fill::click_left (editor_display &disp, int x, int y) override
only take the base terrain into account when searching for contiguous terrain when painting base only
Member editor::mouse_action_fill::click_right (editor_display &disp, int x, int y) override
only take the base terrain into account when searching for contiguous terrain when painting base only
Page Event dispatching.

This might change in the near future.

The hotkeys need to be implemented like above in 1.9.

Describe drawing and resizing once the code is stable and working as wanted in these areas.

Document further.

Validate the code it seems a down event with a captured mouse doesn't really work as wanted. (Rare case but should work properly.) In general the mouse event handling needs testing to see whether the proper events are send all the time.

Member exception_translator_config (const config::error &e)
add all others exception handlers too
Member font::pango_text::get_column_line (const point &position) const
There's still a bug left. When you select a text which is in the ellipses on the right side the text gets reformatted with ellipses on the left and the selected character is not the one under the cursor. Other widget toolkits don't show ellipses and have no indication more text is available. Haven't found what the best thing to do would be. Until that time leave it as is.
Class game_config::config_cache

Make smarter filetree checksum caching so only required parts of tree are checked at startup. Trees are overlapping so have to split trees to subtrees to only do check once per file.

Make cache system easily allow validation of in memory cache objects using hash checksum of preproc_map.

Member game_display::game_mode
if the current implementation is wanted we can change the stuff back to a boolean
Member game_display::update () override
FIXME: must modify changed, but best to do it at the floating_label level
Member game_events::WML_HANDLER_FUNCTION (set_global_variable,, pcfg)
Finish experimenting.
Member game_events::WML_HANDLER_FUNCTION (replace_map,, cfg)
Finish experimenting.
Member game_events::WML_HANDLER_FUNCTION (get_global_variable,, pcfg)
Finish experimenting.
Member game_events::WML_HANDLER_FUNCTION (clear_global_variable,, pcfg)
Finish experimenting.
Member game_state::add_side_wml (config cfg)
: maybe add parameters like id etc?
Class gamemap
Update for new map-format.
Member get_variations (const std::string &base, const std::string &variations)
optimize this function
Namespace gui2

This implementation is quite a hack that needs to be rewritten cleanly

The items below are not implemented yet.

Page GUI2 Iterator.

Write the entire visiting algorithm.

Write the entire visiting algorithm.

Member gui2::builder_widget::optional_replacements
: evaluate whether to combine the two build() functions with this as the sole parameter.
Member gui2::chatbox::set_active_window_changed_callback (const std::function< void(void)> &f)
: remove
Member gui2::circle_shape::draw (wfl::map_formula_callable &variables) override
formulas are now recalculated every draw cycle which is a bit silly unless there has been a resize. So to optimize we should use an extra flag or do the calculation in a separate routine.
Member gui2::dialogs::file_dialog::is_selection_type_acceptable (SELECTION_TYPE stype) const
This currently never returns true for SELECTION_IS_DIR, awaiting a need to implement a directory selection mode.
Member gui2::dialogs::mp_join_game::close_faction_select_dialog_if_open ()
maybe move this to a general-purpose close() function in modal_dialog and modeless_dialog? It could be useful.
Member gui2::dialogs::wml_message_base::pre_show () override
This function enables the wml markup for all items, but the interface is a bit hacky.
Member gui2::event::dispatcher::register_hotkey (const hotkey::HOTKEY_COMMAND id, const hotkey_function &function)
add a static function register_global_hotkey.
Member gui2::event::dispatcher::want_keyboard_input_
The entire mouse and keyboard handling can use a code review to seen whether it might be combined in one flag field. At the moment the keyboard doesn't look whether a dialog has the mouse focus before sending the event, so maybe we should add an active dispatcher to keep track of it. But since at the moment there are only non-modal windows and tooltips it's not a problem.
Member gui2::event::distributor::distributor (widget &owner, const dispatcher::queue_position queue_position)
Test whether the state is properly tracked when an input blocker is used.
Member gui2::event::distributor::signal_handler_keyboard_internal (event::ui_event evt, P1 &&p1, P2 &&p2, P3 &&p3)

Make sure we're not in the event chain.

Test whether recursion protection is needed.

Member gui2::event::distributor::signal_handler_notify_removal (dispatcher &widget, const ui_event event)
Evaluate whether moving the cleanup parts in the subclasses.
Member gui2::generator< minimum_selection, maximum_selection, my_placement, select_action >::child::shown
functions now test for visible and shown, that can use some polishing.
Member gui2::generator< minimum_selection, maximum_selection, my_placement, select_action >::create_walker () override
Implement properly.
Member gui2::grid::demand_reduce_height (const unsigned maximum_height) override
Implement.
Member gui2::grid::demand_reduce_width (const unsigned maximum_width) override
Implement.
Member gui2::grid::reduce_height (const unsigned maximum_height)
Implement.
Member gui2::grid::reduce_width (const unsigned maximum_width)
Implement.
Member gui2::grid::request_reduce_height (const unsigned maximum_height) override

this point shouldn't be reached, find out why it does.

Improve this code.

Member gui2::grid::request_reduce_width (const unsigned maximum_width) override
this point shouldn't be reached, find out why it does.
Member gui2::grid::set_column_grow_factor (const unsigned column, const unsigned factor)
refer to a page with the layout manipulation info.
Member gui2::grid::set_row_grow_factor (const unsigned row, const unsigned factor)
refer to a page with the layout manipulation info.
Member gui2::gui_definition::gui_definition (const config &cfg)
Regarding sounds: Need to evaluate but probably we want the widget definition be able to:
  • Override the default (and clear it). This will allow toggle buttons in a listbox to sound like a toggle panel.
  • Override the default and above per instance of the widget, some buttons can give a different sound.
Member gui2::image_shape::draw (wfl::map_formula_callable &variables) override
formulas are now recalculated every draw cycle which is a bit silly unless there has been a resize. So to optimize we should use an extra flag or do the calculation in a separate routine.
Member gui2::implementation::builder_multi_page::builder_multi_page (const config &cfg)
This part is untested.
Class gui2::implementation::builder_window
See whether this hack can be removed.
Member gui2::line_shape::draw (wfl::map_formula_callable &variables) override
formulas are now recalculated every draw cycle which is a bit silly unless there has been a resize. So to optimize we should use an extra flag or do the calculation in a separate routine.
Member gui2::listbox::generator_
A listbox must have the following config parameters in the instantiation:
  • fixed row height?
  • fixed column width? and if so the following ways to set them
  • fixed depending on header ids
  • fixed depending on footer ids
  • fixed depending on first row ids
  • fixed depending on list (the user has to enter a list of ids)
Member gui2::listbox::list_item_clicked (widget &caller)
Hack to capture the keyboard focus.
Member gui2::listbox::set_content_size (const point &origin, const point &size) override
This function needs more testing.
Member gui2::matrix::create_walker () override
Implement properly.
Member gui2::pane::create_walker () override
Implement properly.
Member gui2::policy::placement::horizontal_list::create_item (const unsigned index)
implement.
Class gui2::policy::placement::independent
Implement.
Class gui2::policy::placement::table
Implement.
Member gui2::policy::placement::table::create_item (const unsigned)
implement.
Member gui2::policy::placement::vertical_list::create_item (const unsigned index)
implement.
Member gui2::scrollbar_base::child_callback_positioner_moved ()
This is a kind of hack due to the fact there's no simple callback slot mechanism. See whether we can implement a generic way to attach callback which would remove quite some extra code.
Member gui2::scrollbar_base::recalculate ()
In the MP lobby it can happen that a listbox has first zero items, then gets filled and since there are no visible items the second assert after this block will be triggered. Use this ugly hack to avoid that case. (This hack also added the gui/widgets/window.hpp include.)
Member gui2::scrollbar_base::slider
Abstract the code so this friend is no longer needed.
Class gui2::scrollbar_container
events are not yet send to the content grid.
Member gui2::scrollbar_container::content_resize_request (const bool force_sizing=false)
Try to handle AUTO_VISIBLE_FIRST_RUN here as well.
Member gui2::scrollbar_container::request_reduce_height (const unsigned maximum_height) override
Evaluate whether sizing hints are required.
Member gui2::scrollbar_container::set_scrollbar_button_status ()

scrollbar visibility.

scrollbar visibility.

Member gui2::slider_base::child_callback_positioner_moved ()
This is a kind of hack due to the fact there's no simple callback slot mechanism. See whether we can implement a generic way to attach callback which would remove quite some extra code.
Member gui2::styled_widget::calculate_best_size () const override
The value send should subtract the border size and read it after calculation to get the proper result.
Member gui2::styled_widget::layout_initialize (const bool full_initialization) override
Also handle the tooltip state. Handle if shrunken_ && use_tooltip_on_label_overflow_.
Member gui2::styled_widget::renderer_
Maybe if still too slow we might also copy this cache to the canvas so it can reuse our results, but for now it seems fast enough. Unfortunately that would make the dependency between the classes bigger as wanted.
Member gui2::styled_widget::set_members (const widget_item &data)

do we need to add the debug colors here as well?

document this feature on the wiki.

Class gui2::text_box_base
Validate whether the NOTIFY_MODIFIED is always fired properly. The current implementation is added for some quick testing so some cases might be forgotten.
Member gui2::text_box_base::handle_key_left_arrow (SDL_Keymod modifier, bool &handled)
implement the ctrl key.
Member gui2::text_box_base::handle_key_right_arrow (SDL_Keymod modifier, bool &handled)
implement the ctrl key.
Member gui2::text_box_base::on_modified (const Func &f)
Should we pass the other callback parameters to the handler?
Member gui2::toggle_panel::border_space () const override
only due to the fact our definition is slightly different from panel_definition we need to override this function and do about the same, look at a way to 'fix' that.
Member gui2::toggle_panel::find_at (const point &coordinate, const bool must_be_active) override
since there is no mouse event nesting (or event nesting at all) we need to capture all events. This means items on the panel will never receive an event, which gives problems with for example the intended button on the addon panel. So we need to chain mouse events as well and also add a handled flag for them.
Member gui2::toggle_panel::get_client_rect () const override
only due to the fact our definition is slightly different from panel_definition we need to override this function and do about the same, look at a way to 'fix' that.
Member gui2::tree_view::node_definitions_
evaluate which way the dependency should go.
Member gui2::tree_view_node::clear ()
Also try to find the optimal width.
Member gui2::tree_view_node::create_walker () override
Implement properly.
Member gui2::tree_view_node::signal_handler_toggle_left_click (const event::ui_event event)
Rewrite this sizing code for the folding/unfolding.
Member gui2::viewport::create_walker () override
Implement properly.
Member gui2::widget::demand_reduce_height (const unsigned maximum_height)
Make pure virtual.
Member gui2::widget::demand_reduce_width (const unsigned maximum_width)
Make pure virtual.
Member gui2::widget::linked_group_
For now the linked group is initialized when the layout of the widget is initialized. The best time to set it would be upon adding the widget in the window. Need to look whether it is possible in a clean way. Maybe a signal just prior to showing a window where the widget can do some of it's on things, would also be nice for widgets that need a finalizer function.
Member gui2::widget::move (const int x_offset, const int y_offset)
Implement the function to all derived classes.
Member gui2::widget::request_reduce_height (const unsigned maximum_height)
Make pure virtual.
Member gui2::window::add_linked_widget (const std::string &id, widget *widget)
Untested if a new widget is added after showing the widgets.
Member gui2::window::add_to_keyboard_chain (widget *widget)
rename to keyboard_add_to_chain.
Member gui2::window::click_dismiss_
After testing the click dismiss feature it should be documented in the wiki.
Member gui2::window::layout () override

implement the scrollbars on the window.

implement the scrollbars on the window.

Member gui2::window::remove_from_keyboard_chain (widget *widget)
rename to keyboard_remove_from_chain.
Member gui2::window::set_enter_disabled (const bool enter_disabled)
this function should be merged with the hotkey support once that has been added.
Member gui2::window::set_escape_disabled (const bool escape_disabled)
this function should be merged with the hotkey support once that has been added.
Member gui2::window::show_non_modal ()
implement auto_close_timeout.
Member gui2::window::show_tooltip ()
implement auto_close_timeout.
Member gui2::window::window (const builder_window::window_resolution &definition)
: should eventally become part of global hotkey handling.
Member gui2::window_definition::resolution::resolution (const config &cfg)
Evaluate whether the grid should become mandatory.
Member gui::scrollarea::scrollarea (bool auto_join=true)
FIXME: parameterlist ??
Member gui::scrollbar::scrollbar ()
FIXME: parameterlist ??
Member hotkey::del_hotkey (const hotkey_ptr &item)
unusued?
Member hotkey::hotkey_base::get_description () const
unused
Member hotkey::hotkey_command::hotkey_command (HOTKEY_COMMAND cmd, const std::string &id, const t_string &desc, bool hidden, bool toggle, hk_scopes scope, HOTKEY_CATEGORY category, const t_string &tooltip)
: see if we can remove this with c++20.
Member make_addon_title (const std::string &id)
In the future we should store more local information about add-ons and use this only as a fallback; it could be desirable to fetch translated names as well somehow.
Class map_location
Update for new map-format.
Member metrics::record_sample (const simple_wml::string_span &name, const std::chrono::steady_clock::duration &parsing_time, const std::chrono::steady_clock::duration &processing_time)
: Currently unused.
Class movetype
make this more logical. Ideas:
  • for 1.15, support both "flying" and "flies" in [movetype]
  • for 1.17 or later, drop the "flies"
Member mp::initial_level_config (saved_game &state)
: see if all the comments ai algorithms are still up-to-date and relevant.
Member ng::configure_engine::side_cfg () const

This might not be 100% correct, but at the moment it is not possible to show fog and shroud per player. This might change in the future.

: Is the above even still true? – vultraz, 2017-10-05

Member pathfind::teleport_map::get_adjacents (map_location loc) const
what does this function actually have to do with adjacent hexes?
Member prefs::get_history (const std::string &id)
FIXME only used for gui2. Could be used for the above histories.
Member read_addons_list (const config &cfg, addons_list &dest)
FIXME: get rid of this legacy "campaign"/"campaigns" silliness
Member terrain_builder::load_images (building_rule &rule)
improve this, 99% of terrains are not animated.
Member terrain_builder::rebuild_terrain (const map_location &loc)
TODO: rename this function
Member terrain_builder::tile::rebuild_cache (const std::string &tod, logs *log=nullptr)
improve this
Member terrain_type::is_indivisible () const
what about a terrain where is_mvt_indivisible() != is_def_indivisible()?
Member terrain_type::is_nonnull () const

number_ should never be NONE_TERRAIN

there's two different VOID_TERRAINS - see the comment attached to the definition of VOID_TERRAIN.

unclear what this should mean, so replace it with a clearly-named successor.

Member terrain_type::terrain_type (const config &cfg)
reenable these validations. The problem is that all MP scenarios/campaigns share the same namespace and one rogue scenario can avoid the player to create a MP game. So every scenario/campaign should get its own namespace to be safe.
Member unit::anim_comp () const
Document this
Member unit::hp_bar_scaling () const
: document further
Member unit::invisible (const map_location &loc, bool see_all=true) const
FIXME: We use the cache only when using the default see_all=true Maybe add a second cache if the see_all=false become more frequent.
Member unit::rename (const std::string &name)
should this also take a t_string?
Member unit::set_user_end_turn (bool value=true)
Verify meaning and explain better
Member unit::STATE_UNHEALABLE
Explain better
Member unit::toggle_user_end_turn ()
Verify meaning and explain better
Member unit::usage () const
document further
Member unit::user_end_turn () const
Verify meaning and explain better
Member unit::xp_bar_scaling () const
: document further
Member unit_drawer::selected_or_reachable (const map_location &loc) const
: better name...
Class utf8::invalid_utf8_exception
FIXME: This clearly needs a better name for that reason.
Member utils::erase (Container &container, const Value &value)
C++20: use std::erase
Member utils::quoted_split (const std::string &val, char c=',', int flags=REMOVE_EMPTY|STRIP_SPACES, char quote='\\')
Why not change split()? That would change the methods post condition.
Member validate_draw (std::stringstream &sstr)
Add the rest of the events.
Class variable_info_mutable< V >
: should these functions take a reference?
Member video::set_resolution (const point &resolution)
this is no longer useful as fullscreen is always native resolution.
Member wb::highlighter::highlight_main_visitor::visit (recall_ptr)
: find some suitable effect for mouseover on planned recall.
Member wb::highlighter::set_mouseover_hex (const map_location &hex)
"is_numbering_hex" is not the "correct" criterion by which to select the highlighted/selected action. It's just convenient for me to use at the moment since it happens to coincide with the "correct" criterion, which is to use find_main_highlight.
Member wb::manager::should_clear_undo () const
When there are network allies, only clear the undo stack when we have set a preferences option
Member wb::move::ARROW_BRIGHTNESS
Make use of safe_enum idiom?
Member wb::recall::to_config () const
Find a better way to serialize unit_ because underlying_id isn't cutting it
Member wesnothd::game::add_player (player_iterator player, bool observer=false)
differentiate between "observers not allowed" and "player already in the game" errors. maybe return a string with an error message.
Member wesnothd::server::ban_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
FIXME: make a proper check for valid IPs.
Member wesnothd::server::gban_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
FIXME: make a proper check for valid IPs.
Member wesnothd::server::handle_player_in_game (player_iterator player, simple_wml::document &doc)
FIXME: Why not save the level data in the history_?
Member wesnothd::server::kickban_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
FIXME: make a proper check for valid IPs.