65     virtual void layout() 
override;
 
  108     virtual const std::string& 
get_id(
const Item& item) = 0;
 
  130     virtual void set_group(
const std::string& 
id);
 
const std::vector< item_group > & get_groups() const override
 
std::set< std::string > non_core_items_
 
std::vector< item_group > groups_
The editor_groups as defined in editor-groups.cfg.
 
void next_group() override
 
std::string active_group_
 
std::size_t items_start_
Index of the item at the top-left of the visible area, used for scrolling up and down.
 
virtual const std::string & active_group_id()
 
std::vector< gui::tristate_button > buttons_
 
std::size_t columns_
Number of items per row.
 
const Item & selected_bg_item() const
 
void prev_group() override
 
virtual bool scroll_up() override
Scroll the editor-palette up one step if possible.
 
virtual void select_bg_item(const std::string &item_id) override
 
virtual bool is_selected_bg_item(const std::string &id)
 
const std::vector< std::string > & active_group()
 
virtual std::string get_help_string() const =0
 
std::size_t num_items() override
Return the number of items in the currently-active group.
 
virtual bool is_selected_fg_item(const std::string &id)
 
std::size_t active_group_index()
 
virtual void draw_contents() override
Called by widget::draw()
 
int item_size_
Both the width and the height of the square buttons.
 
void swap() override
For tools which support fg and bg items, exchange the two items.
 
virtual const std::string & get_id(const Item &item)=0
 
editor_palette(editor_display &gui, int item_size, std::size_t columns, editor_toolkit &toolkit)
 
editor_toolkit & toolkit_
 
virtual bool scroll_down() override
Scroll the editor-palette down one step if possible.
 
std::map< std::string, std::vector< std::string > > group_map_
 
virtual void setup_item(const Item &item, texture &item_base_image, texture &item_overlay_image, std::stringstream &tooltip)=0
Setup item image and tooltip.
 
virtual bool can_scroll_up() override
 
virtual void select_fg_item(const std::string &item_id) override
Select a foreground item.
 
void adjust_size(const rect &target) override
Update the size of this widget.
 
virtual void setup(const game_config_view &cfg)=0
Setup the internal data structure.
 
virtual void layout() override
Called by draw_manager to validate layout before drawing.
 
virtual bool can_scroll_down() override
 
std::size_t start_num(void) override
 
void set_start_item(std::size_t index) override
 
void hide(bool hidden) override
 
void expand_palette_groups_menu(std::vector< config > &items) override
Menu expanding for palette group list.
 
std::string selected_bg_item_
 
std::map< std::string, Item > item_map
 
void set_group(std::size_t index) override
 
virtual sdl_handler_vector handler_members() override
 
std::string selected_fg_item_
 
int item_space_
item_size_ plus some padding.
 
const Item & selected_fg_item() const
Return the currently selected foreground/background item.
 
A class grating read only view to a vector of config objects, viewed as one config with all children ...
 
Wrapper class to encapsulate creation and management of an SDL_Texture.
 
std::vector< events::sdl_handler * > sdl_handler_vector
 
std::string tooltip
Shown when hovering over an entry in the filter's drop-down list.
 
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.
 
An abstract description of a rectangle with integer coordinates.