| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GFX_RENDER_TEXT_H_ | 5 #ifndef UI_GFX_RENDER_TEXT_H_ |
| 6 #define UI_GFX_RENDER_TEXT_H_ | 6 #define UI_GFX_RENDER_TEXT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 bool cursor_visible() const { return cursor_visible_; } | 119 bool cursor_visible() const { return cursor_visible_; } |
| 120 void set_cursor_visible(bool visible) { cursor_visible_ = visible; } | 120 void set_cursor_visible(bool visible) { cursor_visible_ = visible; } |
| 121 | 121 |
| 122 bool insert_mode() const { return insert_mode_; } | 122 bool insert_mode() const { return insert_mode_; } |
| 123 void ToggleInsertMode(); | 123 void ToggleInsertMode(); |
| 124 | 124 |
| 125 bool focused() const { return focused_; } | 125 bool focused() const { return focused_; } |
| 126 void set_focused(bool focused) { focused_ = focused; } | 126 void set_focused(bool focused) { focused_ = focused; } |
| 127 | 127 |
| 128 const StyleRange& default_style() const { return default_style_; } | 128 const StyleRange& default_style() const { return default_style_; } |
| 129 void set_default_style(StyleRange style) { default_style_ = style; } | 129 void set_default_style(const StyleRange& style) { default_style_ = style; } |
| 130 | 130 |
| 131 const Rect& display_rect() const { return display_rect_; } | 131 const Rect& display_rect() const { return display_rect_; } |
| 132 void SetDisplayRect(const Rect& r); | 132 void SetDisplayRect(const Rect& r); |
| 133 | 133 |
| 134 // This cursor position corresponds to SelectionModel::selection_end. In | 134 // This cursor position corresponds to SelectionModel::selection_end. In |
| 135 // addition to representing the selection end, it's also where logical text | 135 // addition to representing the selection end, it's also where logical text |
| 136 // edits take place, and doesn't necessarily correspond to | 136 // edits take place, and doesn't necessarily correspond to |
| 137 // SelectionModel::caret_pos. | 137 // SelectionModel::caret_pos. |
| 138 size_t GetCursorPosition() const; | 138 size_t GetCursorPosition() const; |
| 139 void SetCursorPosition(size_t position); | 139 void SetCursorPosition(size_t position); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 // The cached bounds and offset are invalidated by changes to the cursor, | 360 // The cached bounds and offset are invalidated by changes to the cursor, |
| 361 // selection, font, and other operations that adjust the visible text bounds. | 361 // selection, font, and other operations that adjust the visible text bounds. |
| 362 bool cached_bounds_and_offset_valid_; | 362 bool cached_bounds_and_offset_valid_; |
| 363 | 363 |
| 364 DISALLOW_COPY_AND_ASSIGN(RenderText); | 364 DISALLOW_COPY_AND_ASSIGN(RenderText); |
| 365 }; | 365 }; |
| 366 | 366 |
| 367 } // namespace gfx | 367 } // namespace gfx |
| 368 | 368 |
| 369 #endif // UI_GFX_RENDER_TEXT_H_ | 369 #endif // UI_GFX_RENDER_TEXT_H_ |
| OLD | NEW |