20 #include "widgets/widget.hpp"
33 ,
name(cfg[
"name"].t_str())
35 ,
core(cfg[
"core"].to_bool())
73 virtual const std::vector<item_group>&
get_groups()
const = 0;
95 virtual std::vector<std::string>
action_pressed()
const {
return std::vector<std::string>(); }
A config object defines a single node in a WML file, with access to child nodes.
virtual void swap()=0
For tools which support fg and bg items, exchange the two items.
virtual void set_start_item(std::size_t index)=0
virtual std::size_t start_num()=0
virtual std::vector< std::string > action_pressed() const
virtual bool scroll_down()=0
Scroll the editor-palette down one step if possible.
virtual void set_group(std::size_t index)=0
virtual const std::vector< item_group > & get_groups() const =0
virtual void next_group()=0
virtual bool scroll_up()=0
Scroll the editor-palette up one step if possible.
virtual bool can_scroll_down()=0
virtual bool can_scroll_up()=0
virtual bool supports_swap()
Whether the hotkey system should the enable GUI button connected to swap().
virtual void prev_group()=0
virtual void expand_palette_groups_menu(std::vector< config > &items, int i)=0
Menu expanding for palette group list.
virtual void adjust_size(const SDL_Rect &target)=0
virtual std::size_t num_items()=0
virtual sdl_handler_vector handler_members()
virtual ~common_palette()
virtual void select_bg_item(const std::string &item_id)=0
virtual void select_fg_item(const std::string &item_id)=0
Definitions for the interface to Wesnoth Markup Language (WML).
std::vector< events::sdl_handler * > sdl_handler_vector
Manage the empty-palette in the editor.
std::size_t index(std::string_view str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
Stores the info about the groups in a nice format.
item_group(const config &cfg)