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-03-07 16:05:57 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:12:40 +0300
commit69f6e406743e9bfa4813989cec71d9465b1524e2 (patch)
tree98ec8f1e4163bcfced4abafcd37499c51401ccd9 /map/ruler.hpp
parentaa9010fa705edb99280619e9e74e04fbff2b0430 (diff)
new ruler with chess and poetesses
Diffstat (limited to 'map/ruler.hpp')
-rw-r--r--map/ruler.hpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/map/ruler.hpp b/map/ruler.hpp
index 4e26ae4b9e..81a35e9991 100644
--- a/map/ruler.hpp
+++ b/map/ruler.hpp
@@ -10,6 +10,11 @@
#include "../graphics/display_list.hpp"
+namespace anim
+{
+ class Task;
+}
+
namespace graphics
{
namespace gl
@@ -29,6 +34,12 @@ class Ruler : public gui::Element
{
private:
+ shared_ptr<anim::Task> m_rulerAnim;
+ void AlfaAnimEnded(bool isVisible);
+ bool IsHidingAnim() const;
+ float GetCurrentAlfa() const;
+ void CreateAnim(double startAlfa, double endAlfa, double timeInterval, double timeOffset, bool isVisibleAtEnd);
+
/// @todo Remove this variables. All this stuff are constants
/// (get values from Framework constructor)
unsigned m_minPxWidth;
@@ -57,8 +68,13 @@ private:
int m_currSystem;
void CalcMetresDiff(double v);
- shared_ptr<gui::CachedTextView> m_scaleText;
- scoped_ptr<graphics::DisplayList> m_dl;
+ graphics::DisplayList * m_dl;
+ void PurgeMainDL();
+ void CacheMainDL();
+
+ graphics::DisplayList * m_textDL[2];
+ void PurgeTextDL(int index);
+ void UpdateText(const string & text);
Framework * m_framework;
@@ -72,14 +88,13 @@ public:
Ruler(Params const & p);
- void setController(gui::Controller * controller);
+ void AnimateShow();
+ void AnimateHide();
void setMinPxWidth(unsigned minPxWidth);
void setMinMetersWidth(double v);
void setMaxMetersWidth(double v);
- void setFont(gui::Element::EState state, graphics::FontDesc const & f);
-
vector<m2::AnyRectD> const & boundRects() const;
void draw(graphics::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const;