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

text_handle.hpp « drape_frontend - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2dd060350d221fc7d297b8ffe4ef26dd5bc59cc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once

#include "drape/overlay_handle.hpp"
#include "drape/pointers.hpp"
#include "drape/utils/vertex_decl.hpp"

#include "base/string_utils.hpp"

#include <string>

namespace dp
{
class TextureManager;
}

namespace df
{
class TextHandle : public dp::OverlayHandle
{
public:
  TextHandle(dp::OverlayID const & id, strings::UniString const & text,
             dp::Anchor anchor, uint64_t priority, int fixedHeight,
             ref_ptr<dp::TextureManager> textureManager,
             int minVisibleScale, bool isBillboard);

  TextHandle(dp::OverlayID const & id, strings::UniString const & text,
             dp::Anchor anchor, uint64_t priority, int fixedHeight,
             ref_ptr<dp::TextureManager> textureManager,
             gpu::TTextDynamicVertexBuffer && normals,
             int minVisibleScale, bool IsBillboard);

  bool Update(ScreenBase const & screen) override;

  void GetAttributeMutation(ref_ptr<dp::AttributeBufferMutator> mutator) const override;

  bool IndexesRequired() const override;

  void SetForceUpdateNormals(bool forceUpdate) const;

#ifdef DEBUG_OVERLAYS_OUTPUT
  virtual std::string GetOverlayDebugInfo() override;
#endif

protected:
  gpu::TTextDynamicVertexBuffer m_buffer;
  mutable bool m_forceUpdateNormals;

private:
  mutable bool m_isLastVisible;

  strings::UniString m_text;
  ref_ptr<dp::TextureManager> m_textureManager;
  bool m_glyphsReady;
  int m_fixedHeight;
};
}  // namespace df