Chromium Code Reviews| Index: ui/gfx/render_text_linux.h |
| =================================================================== |
| --- ui/gfx/render_text_linux.h (revision 109708) |
| +++ ui/gfx/render_text_linux.h (working copy) |
| @@ -8,6 +8,8 @@ |
| #include <pango/pango.h> |
|
msw
2011/11/28 20:01:17
I don't think you need this blank line, both are s
xji
2011/11/29 01:37:02
Done.
|
| +#include <vector> |
| + |
| #include "ui/gfx/render_text.h" |
| namespace gfx { |
| @@ -34,8 +36,12 @@ |
| BreakType break_type) OVERRIDE; |
| virtual SelectionModel LeftEndSelectionModel() OVERRIDE; |
| virtual SelectionModel RightEndSelectionModel() OVERRIDE; |
| + virtual std::vector<Rect> GetSubstringBounds(size_t from, size_t to) OVERRIDE; |
| + virtual void SetSelectionModel( |
| + const SelectionModel& selection_model) OVERRIDE; |
| virtual bool IsCursorablePosition(size_t position) OVERRIDE; |
| virtual void UpdateLayout() OVERRIDE; |
| + virtual void DrawVisualText(Canvas* canvas) OVERRIDE; |
| private: |
| virtual size_t IndexOfAdjacentGrapheme(size_t index, bool next) OVERRIDE; |
| @@ -96,6 +102,10 @@ |
| size_t Utf16IndexToUtf8Index(size_t index) const; |
| size_t Utf8IndexToUtf16Index(size_t index) const; |
| + // Save the visual bounds containing the logical substring within |from| to |
| + // |to| into |bounds|. |
| + void GetSubstringBounds(size_t from, size_t to, std::vector<Rect>* bounds); |
|
msw
2011/11/28 20:01:17
Our style guide discourages overloading function n
xji
2011/11/29 01:37:02
changed the name to CalculateSubstringBounds.
|
| + |
| // Pango Layout. |
| PangoLayout* layout_; |
| // A single line layout resulting from laying out via |layout_|. |
| @@ -106,6 +116,9 @@ |
| // Number of attributes in |log_attrs_|. |
| int num_log_attrs_; |
| + // Vector of the visual bounds containing the logical substring of selection. |
| + std::vector<Rect> selection_visual_bounds_; |
| + |
| // The text in the |layout_|. |
| const char* layout_text_; |
| // The text length. |