diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-05-16 17:31:39 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:15:41 +0300 |
commit | 751657cf725436fd5ed74b5f70a6afa80be436c1 (patch) | |
tree | 55497beb3776f42c8e0eda9aa859959f41482953 /map/bookmark.hpp | |
parent | e9f7e1d796d22ba2fab598ab2cd7e3d18d34f010 (diff) |
[core] create new bookmark animation
Diffstat (limited to 'map/bookmark.hpp')
-rw-r--r-- | map/bookmark.hpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/map/bookmark.hpp b/map/bookmark.hpp index f181951d85..f3716d0f17 100644 --- a/map/bookmark.hpp +++ b/map/bookmark.hpp @@ -13,7 +13,12 @@ #include "../std/string.hpp" #include "../std/noncopyable.hpp" #include "../std/iostream.hpp" +#include "../std/shared_ptr.hpp" +namespace anim +{ + class Task; +} class Track; @@ -27,8 +32,8 @@ public: } BookmarkData(string const & name, string const & type, - string const & description = "", double scale = -1.0, - time_t timeStamp = my::INVALID_TIME_STAMP) + string const & description = "", double scale = -1.0, + time_t timeStamp = my::INVALID_TIME_STAMP) : m_name(name) , m_description(description) , m_type(type) @@ -63,10 +68,12 @@ private: class Bookmark : public ICustomDrawable { BookmarkData m_data; + double m_animScaleFactor; public: Bookmark(m2::PointD const & ptOrg, UserMarkContainer * container) : ICustomDrawable(ptOrg, container) + , m_animScaleFactor(1.0) { } @@ -75,6 +82,7 @@ public: UserMarkContainer * container) : ICustomDrawable(ptOrg, container) , m_data(data) + , m_animScaleFactor(1.0) { } @@ -100,10 +108,9 @@ public: double GetScale() const { return m_data.GetScale(); } void SetScale(double scale) { m_data.SetScale(scale); } - virtual graphics::DisplayList * GetDisplayList(UserMarkDLCache * cache) const - { - return cache->FindUserMark(UserMarkDLCache::Key(GetType(), graphics::EPosAbove, GetContainer()->GetDepth())); - } + virtual graphics::DisplayList * GetDisplayList(UserMarkDLCache * cache) const; + virtual double GetAnimScaleFactor() const; + shared_ptr<anim::Task> CreateAnimTask(Framework & fm); }; class BookmarkCategory : public UserMarkContainer @@ -178,6 +185,9 @@ protected: virtual string GetTypeName() const { return "search-result"; } virtual string GetActiveTypeName() const { return "search-result-active"; } virtual UserMark * AllocateUserMark(m2::PointD const & ptOrg); + +private: + bool m_blockAnimation; }; /// <category index, bookmark index> |