diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-05-16 13:30:16 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:15:39 +0300 |
commit | bf8badaa32714d758c65ba7d0f386afcfdbec3dd (patch) | |
tree | 054fc0dd8f5c08991092cee8a1f01922126c1289 /map/user_mark_container.hpp | |
parent | bd1c2ce569c24c068f2e7f3072c59e35996234ee (diff) |
[core] customize user mark drawing.
Diffstat (limited to 'map/user_mark_container.hpp')
-rw-r--r-- | map/user_mark_container.hpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/map/user_mark_container.hpp b/map/user_mark_container.hpp index 16f5347225..2ea5a34e68 100644 --- a/map/user_mark_container.hpp +++ b/map/user_mark_container.hpp @@ -2,6 +2,7 @@ #include "events.hpp" #include "user_mark.hpp" +#include "user_mark_dl_cache.hpp" #include "../geometry/point2d.hpp" #include "../geometry/rect2d.hpp" @@ -49,7 +50,7 @@ public: }; UserMarkContainer(Type type, double layerDepth, Framework & framework); - ~UserMarkContainer(); + virtual ~UserMarkContainer(); void SetScreen(graphics::Screen * cacheScreen); @@ -61,14 +62,14 @@ public: // In multiple select choose mark with min(d) UserMark const * FindMarkInRect(m2::AnyRectD const & rect, double & d); - void Draw(PaintOverlayEvent const & e); + void Draw(PaintOverlayEvent const & e, UserMarkDLCache * cache) const; void ActivateMark(UserMark const * mark); void DiactivateMark(); void Clear(); Type const & GetType() const { return m_type; } - string const & GetTypeName() const; + double GetDepth() const { return m_layerDepth; } static void InitPoiSelectionMark(UserMarkContainer * container); static UserMark * UserMarkForPoi(m2::PointD const & ptOrg); @@ -76,9 +77,14 @@ public: Controller const & GetController() const { return m_controller; } Controller & GetController() { return m_controller; } +protected: + virtual string GetTypeName() const; + virtual string GetActiveTypeName() const; + virtual UserMark * AllocateUserMark(m2::PointD const & ptOrg); + private: friend class Controller; - UserMark * CreateUserMark(m2::PointD ptOrg); + UserMark * CreateUserMark(m2::PointD const & ptOrg); size_t GetUserMarkCount() const; UserMark const * GetUserMark(size_t index) const; UserMark * GetUserMark(size_t index); @@ -86,22 +92,12 @@ private: void DeleteUserMark(size_t index); private: - graphics::DisplayList * GetDL(); - graphics::DisplayList * GetActiveDL(); - graphics::DisplayList * CreateDL(string const & symbolName); - void Purge(); - void ReleaseScreen(); - -private: Controller m_controller; Type m_type; bool m_isVisible; double m_layerDepth; vector<UserMark *> m_userMarks; UserMark const * m_activeMark; - graphics::DisplayList * m_symbolDL; - graphics::DisplayList * m_activeSymbolDL; - graphics::Screen * m_cacheScreen; private: /// animation support |