diff options
author | vng <viktor.govako@gmail.com> | 2015-06-19 15:11:25 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:52:05 +0300 |
commit | 6ee951fe27bfbe8b71e2144fb90da397f8be24d9 (patch) | |
tree | 92aa4ffb13b1963c570c02db79d7cb196fa93d95 /map/bookmark_manager.hpp | |
parent | 1bf72c99889285df69fc0869d3ab4a192bb029c4 (diff) |
Make rect holder strategy in functional style.
Diffstat (limited to 'map/bookmark_manager.hpp')
-rw-r--r-- | map/bookmark_manager.hpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/map/bookmark_manager.hpp b/map/bookmark_manager.hpp index 084accce96..32ea493245 100644 --- a/map/bookmark_manager.hpp +++ b/map/bookmark_manager.hpp @@ -5,6 +5,8 @@ #include "map/route_track.hpp" #include "std/unique_ptr.hpp" +#include "std/function.hpp" + class Framework; class PaintEvent; @@ -66,14 +68,11 @@ public: void ActivateMark(UserMark const * mark, bool needAnim); bool UserMarkHasActive() const; bool IsUserMarkActive(UserMark const * container) const; - class TouchRectHolder - { - public: - virtual m2::AnyRectD const & GetTouchArea(UserMarkContainer::Type type) const = 0; - }; + + typedef function<m2::AnyRectD const & (UserMarkContainer::Type)> TouchRectHolder; UserMark const * FindNearestUserMark(m2::AnyRectD const & rect) const; - UserMark const * FindNearestUserMark(TouchRectHolder & holder) const; + UserMark const * FindNearestUserMark(TouchRectHolder const & holder) const; /// Additional layer methods void UserMarksSetVisible(UserMarkContainer::Type type, bool isVisible); |