| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 bool insert_mode() const { return insert_mode_; } | 161 bool insert_mode() const { return insert_mode_; } |
| 162 void toggle_insert_mode() { insert_mode_ = !insert_mode_; } | 162 void toggle_insert_mode() { insert_mode_ = !insert_mode_; } |
| 163 | 163 |
| 164 bool focused() const { return focused_; } | 164 bool focused() const { return focused_; } |
| 165 void set_focused(bool focused) { focused_ = focused; } | 165 void set_focused(bool focused) { focused_ = focused; } |
| 166 | 166 |
| 167 const StyleRange& default_style() const { return default_style_; } | 167 const StyleRange& default_style() const { return default_style_; } |
| 168 void set_default_style(StyleRange style) { default_style_ = style; } | 168 void set_default_style(StyleRange style) { default_style_ = style; } |
| 169 | 169 |
| 170 const Rect& display_rect() const { return display_rect_; } | 170 const Rect& display_rect() const { return display_rect_; } |
| 171 virtual void set_display_rect(const Rect& r) { display_rect_ = r; } | 171 virtual void set_display_rect(const Rect& r); |
| 172 | 172 |
| 173 const Point& display_offset() const { return display_offset_; } | 173 const Point& display_offset() const { return display_offset_; } |
| 174 | 174 |
| 175 // This cursor position corresponds to SelectionModel::selection_end. In | 175 // This cursor position corresponds to SelectionModel::selection_end. In |
| 176 // addition to representing the selection end, it's also where logical text | 176 // addition to representing the selection end, it's also where logical text |
| 177 // edits take place, and doesn't necessarily correspond to | 177 // edits take place, and doesn't necessarily correspond to |
| 178 // SelectionModel::caret_pos. | 178 // SelectionModel::caret_pos. |
| 179 size_t GetCursorPosition() const; | 179 size_t GetCursorPosition() const; |
| 180 void SetCursorPosition(const size_t position); | 180 void SetCursorPosition(const size_t position); |
| 181 | 181 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 Rect display_rect_; | 321 Rect display_rect_; |
| 322 // The offset for the text to be drawn, relative to the display area. | 322 // The offset for the text to be drawn, relative to the display area. |
| 323 Point display_offset_; | 323 Point display_offset_; |
| 324 | 324 |
| 325 DISALLOW_COPY_AND_ASSIGN(RenderText); | 325 DISALLOW_COPY_AND_ASSIGN(RenderText); |
| 326 }; | 326 }; |
| 327 | 327 |
| 328 } // namespace gfx | 328 } // namespace gfx |
| 329 | 329 |
| 330 #endif // UI_GFX_RENDER_TEXT_H_ | 330 #endif // UI_GFX_RENDER_TEXT_H_ |
| OLD | NEW |