48 items.erase(items.begin() +
i);
54 virtual const std::vector<item_group>&
get_groups()
const override {
static const std::vector<item_group> empty;
return empty; }
57 virtual void layout()
override;
73 virtual void swap()
override {}
81 virtual void select_item(
const std::string& item_id);
83 void add_item(
const std::string&
id);
List of starting locations and location ids.
virtual bool can_scroll_down() override
std::unique_ptr< location_palette_button > button_goto_
void adjust_size(const SDL_Rect &target) override
Update the size of this widget.
std::vector< std::string > items_
virtual bool scroll_up() override
Scroll the editor-palette up one step if possible.
void scroll_top()
Scroll the editor-palette to the top.
virtual void layout() override
Called by draw_manager to validate layout before drawing.
void hide(bool hidden) override
void set_start_item(std::size_t index) override
std::vector< location_palette_item > buttons_
std::size_t num_items() override
Return the number of items in the palette.
const std::string & selected_item() const
Return the currently selected item.
virtual bool can_scroll_up() override
virtual void next_group() override
std::size_t start_num(void) override
virtual void draw_contents() override
Called by widget::draw()
virtual void prev_group() override
void add_item(const std::string &id)
virtual bool is_selected_item(const std::string &id)
std::string get_help_string() const
virtual bool supports_swap() override
Whether the hotkey system should the enable GUI button connected to swap().
virtual const std::vector< item_group > & get_groups() const override
std::unique_ptr< location_palette_button > button_add_
editor_toolkit & toolkit_
virtual sdl_handler_vector handler_members() override
virtual void swap() override
For tools which support fg and bg items, exchange the two items.
std::string selected_item_
virtual std::vector< std::string > action_pressed() const override
std::size_t num_visible_items()
Return the number of GUI elements that can show items.
virtual void set_group(std::size_t) override
void expand_palette_groups_menu(std::vector< config > &items, int i) override
Menu expanding for palette group list.
virtual void select_item(const std::string &item_id)
virtual bool scroll_down() override
Scroll the editor-palette down one step if possible.
std::unique_ptr< location_palette_button > button_delete_
location_palette(editor_display &gui, editor_toolkit &toolkit)
A class grating read only view to a vector of config objects, viewed as one config with all children ...
std::vector< events::sdl_handler * > sdl_handler_vector
Manage the empty-palette in the editor.
std::size_t index(const std::string &str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.