15 #ifndef COMMON_PALETTES_H_INCLUDED
16 #define COMMON_PALETTES_H_INCLUDED
32 id(cfg[
"id"]),
name(cfg[
"name"].t_str()),
33 icon(cfg[
"icon"]),
core(cfg[
"core"].to_bool()) {}
65 virtual void draw() = 0;
71 virtual const std::vector<item_group>&
get_groups()
const = 0;
83 virtual void swap() = 0;
85 virtual std::vector<std::string>
action_pressed()
const {
return std::vector<std::string>(); }
virtual bool supports_swap()
std::vector< events::sdl_handler * > sdl_handler_vector
Stores the info about the groups in a nice format.
virtual void prev_group()=0
virtual void select_bg_item(const std::string &item_id)=0
virtual bool can_scroll_down()=0
virtual void next_group()=0
const std::vector< std::string > items
virtual ~common_palette()
common_palette(display &gui)
virtual void select_fg_item(const std::string &item_id)=0
virtual const std::vector< item_group > & get_groups() const =0
item_group(const config &cfg)
virtual bool scroll_up()=0
Scroll the editor-palette up one step if possible.
virtual bool can_scroll_up()=0
virtual int num_items()=0
map_display and display: classes which take care of displaying the map and game-data on the screen...
Manage the empty-palette in the editor.
virtual sdl_handler_vector handler_members()
virtual void expand_palette_groups_menu(std::vector< std::string > &items)=0
Menu expanding for palette group list.
virtual void adjust_size(const SDL_Rect &target)=0
GLuint const GLchar * name
virtual bool scroll_down()=0
Scroll the editor-palette down one step if possible.
tristate_palette(display &gui)
virtual void set_start_item(size_t index)=0
virtual std::vector< std::string > action_pressed() const
virtual void set_group(size_t index)=0
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string
virtual size_t start_num()=0