~3v1n0/unity/overlay-border-scale

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/StaticCairoText.h

  • Committer: Daniel van Vugt
  • Date: 2012-03-14 06:24:18 UTC
  • mfrom: (2108 unity)
  • mto: This revision was merged to the branch mainline in revision 2146.
  • Revision ID: daniel.van.vugt@canonical.com-20120314062418-nprucpbr0m7qky5e
MergedĀ latestĀ lp:unity

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    NUX_ALIGN_BOTTOM = NUX_ALIGN_RIGHT
60
60
  } AlignState;
61
61
 
62
 
  StaticCairoText(const TCHAR* text, NUX_FILE_LINE_PROTO);
 
62
  StaticCairoText(std::string const& text, NUX_FILE_LINE_PROTO);
63
63
 
64
64
  ~StaticCairoText();
65
65
 
77
77
                bool             forceDraw);
78
78
 
79
79
  // public API
80
 
  void SetText(NString text);
81
 
  void SetTextColor(Color textColor);
 
80
  void SetText(std::string const& text);
 
81
  void SetTextColor(Color const& textColor);
82
82
  void SetTextEllipsize(EllipsizeState state);
83
83
  void SetTextAlignment(AlignState state);
84
84
  void SetTextVerticalAlignment(AlignState state);
85
85
  void SetFont(const char* fontstring);
86
86
  void SetLines(int maximum_lines);
87
87
 
88
 
  NString GetText();
 
88
  std::string GetText() const;
89
89
 
90
90
  int  GetLineCount();
 
91
  int GetBaseline() const;
91
92
 
92
93
  void GetTextExtents(int& width, int& height);
93
94
 
105
106
  int            _cached_extent_width;
106
107
  int            _cached_extent_height;
107
108
  bool           _need_new_extent_cache;
 
109
  int            _cached_base_width;
 
110
  int            _cached_base_height;
 
111
  int            _baseline;
108
112
 
109
 
  NString        _text;
 
113
  std::string    _text;
110
114
  Color          _textColor;
111
115
  EllipsizeState _ellipsize;
112
116
  AlignState     _align;