Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExMix <rahuba.youri@mapswithme.com>2014-06-28 21:41:52 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:19:02 +0300
commit81ae6f0d1f9f5d9a487aa6b8596fcc0d522936a8 (patch)
treeed2a121b9733bf044136608832abffc01c42593b /map/pin_click_manager.hpp
parentda54d1b28f11d9aaa7f6bef72ff8391de486fdc3 (diff)
[core] move logic about second tap into core.
Send activation callback when active mark already exist on "long click" or when it's click into "user mark/my position". Don't send OnDissmis when active mark not exist rename ballon_manager files into pin_click_manager as class
Diffstat (limited to 'map/pin_click_manager.hpp')
-rw-r--r--map/pin_click_manager.hpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/map/pin_click_manager.hpp b/map/pin_click_manager.hpp
new file mode 100644
index 0000000000..b711cd3028
--- /dev/null
+++ b/map/pin_click_manager.hpp
@@ -0,0 +1,55 @@
+#pragma once
+#include "bookmark.hpp"
+
+#include "../graphics/defines.hpp"
+
+#include "../geometry/point2d.hpp"
+
+#include "../std/shared_ptr.hpp"
+#include "../std/function.hpp"
+
+
+class Framework;
+class PaintEvent;
+namespace location { class GpsInfo; }
+namespace gui { class Element; }
+namespace url_scheme { struct ApiPoint; }
+
+class PinClickManager
+{
+ Framework & m_f;
+
+ void OnActivateUserMark(UserMarkCopy * mark);
+ void OnDismiss();
+
+ void SetBalloonVisible(bool isVisible);
+
+public:
+ PinClickManager(Framework & f);
+
+ void RenderPolicyCreated(graphics::EDensity density) {}
+ void LocationChanged(location::GpsInfo const & info) {}
+
+ void OnBookmarkClick(BookmarkAndCategory const & bnc);
+
+ void OnShowMark(UserMark const * mark);
+
+ void Hide();
+
+ void RemovePin();
+ void Dismiss();
+
+private:
+ /// @name Platform dependent listeners to show special activities.
+ //@{
+ // You must delete UserMarkCopy obtained by this callback
+ function<void (UserMarkCopy *)> m_userMarkListener;
+ function<void (void)> m_dismissListener;
+
+public:
+ template <class T> void ConnectUserMarkListener(T const & t) { m_userMarkListener = t; }
+ template <class T> void ConnectDismissListener(T const & t) { m_dismissListener = t; }
+
+ void ClearListeners();
+ //@}
+};