15 #ifndef EDITOR_PALETTES_H_INCLUDED
16 #define EDITOR_PALETTES_H_INCLUDED
29 ,
size_t item_size,
size_t item_width,
mouse_action** active_mouse_action)
113 virtual void draw_item(
const Item& item,
surface& item_image, std::stringstream& tooltip) = 0;
132 widget::hide(hidden);
194 #endif // EDITOR_PALETTES_H_INCLUDED
virtual bool scroll_up()
Scroll the editor-palette up one step if possible.
const Item & selected_fg_item() const
Return the currently selected foreground/background item.
virtual void select_bg_item(const std::string &item_id)
mouse_action ** active_mouse_action_
const Item & selected_bg_item() const
virtual bool can_scroll_down()
std::string selected_fg_item_
void set_start_item(size_t index)
std::vector< events::sdl_handler * > sdl_handler_vector
virtual void select_fg_item(const std::string &item_id)
Select a foreground item.
int num_visible_items()
Return the number of items in the palette.
size_t active_group_index()
virtual void setup(const config &cfg)=0
Setup the internal data structure.
virtual bool can_scroll_up()
const std::vector< std::string > & active_group()
virtual bool is_selected_bg_item(const std::string &id)
const std::vector< std::string > items
virtual bool scroll_down()
Scroll the editor-palette down one step if possible.
std::map< std::string, Item > item_map
virtual bool is_selected_fg_item(const std::string &id)
virtual void draw_item(const Item &item, surface &item_image, std::stringstream &tooltip)=0
std::map< std::string, std::vector< std::string > > group_map_
editor_palette(editor_display &gui, const config &, size_t item_size, size_t item_width, mouse_action **active_mouse_action)
GLubyte GLubyte GLubyte GLubyte w
void draw(surface screen)
Manage the empty-palette in the editor.
int num_items()
Return the number of items in the palette.
std::vector< gui::tristate_button > buttons_
void adjust_size(const SDL_Rect &target)
Update the size of this widget.
const std::vector< item_group > & get_groups() const
int set_help_string(const std::string &str)
void scroll_top()
Scroll the editor-palette to the top.
std::set< std::string > non_core_items_
void expand_palette_groups_menu(std::vector< std::pair< std::string, std::string > > &items)
Menu expanding for palette group list.
virtual std::string get_help_string()=0
virtual const std::string & get_id(const Item &item)=0
CVideo & video()
Gets the underlying screen object.
std::string active_group_
std::vector< item_group > groups_
The editor_groups as defined in editor-groups.cfg.
A mouse action receives events from the controller, and responds to them by creating an appropriate e...
virtual void draw_contents()
A config object defines a single node in a WML file, with access to child nodes.
virtual sdl_handler_vector handler_members()
virtual const std::string & active_group_id()
std::string selected_bg_item_
GLsizei const GLcharARB ** string
void clear_help_string(int handle)
void set_group(size_t index)
void scroll_bottom()
Scroll the editor-palette to the bottom.