15 #define GETTEXT_DOMAIN "wesnoth-lib"
30 return group_id->second++;
45 return std::find_if(
groups_.lower_bound(
group_->get_group_id()),
67 std::bind(&drop_groups::value_type::second,_1),
73 return itor->second->get_id();
94 int hit_right = hit_loc.x + hit_loc.w;
95 int hit_lower = hit_loc.y + hit_loc.h;
98 return (this_right > hit_loc.x
101 && this_lower > hit_loc.y
102 &&
loc_.y < hit_lower);
bool hit_rect(const SDL_Rect &hit_loc, const int not_id) const
drop_target_group get_group_id() const
static target_id next_id_
drop_target(const drop_group_manager_ptr group, const SDL_Rect &loc)
Registers drop target and saves reference to location.
static drop_groups groups_
static drop_target_group create_group()
std::multimap< drop_target_group, drop_target * > drop_groups
int handle_drop()
Called by widget object when droping happens.
drop_groups::iterator find_this() const
bool is_this_id(const int id) const
Checks if id matches id for this object.
const drop_target_group group_id_
drop_group_manager_ptr group_
std::map< std::string, tfilter >::iterator itor
static drop_target_group next_group_
std::map< drop_target_group, int > target_id
Handles droping for drag able ui items.
int next_free_id(const drop_target_group &group) const
static void delete_group(const drop_target_group id)