| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This file defines utility functions for working with text in views. | 5 // This file defines utility functions for working with text in views. |
| 6 | 6 |
| 7 #ifndef VIEWS_VIEW_TEXT_UTILS_H_ | 7 #ifndef VIEWS_VIEW_TEXT_UTILS_H_ |
| 8 #define VIEWS_VIEW_TEXT_UTILS_H_ | 8 #define VIEWS_VIEW_TEXT_UTILS_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "gfx/rect.h" | 13 #include "ui/gfx/font.h" |
| 14 #include "gfx/font.h" | 14 #include "ui/gfx/rect.h" |
| 15 | 15 |
| 16 namespace gfx { | 16 namespace gfx { |
| 17 class Canvas; | 17 class Canvas; |
| 18 class Size; | 18 class Size; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace views { | 21 namespace views { |
| 22 class Label; | 22 class Label; |
| 23 class Link; | 23 class Link; |
| 24 } | 24 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // |word_width| fits at position |position| within the |bounds| rectangle. If | 67 // |word_width| fits at position |position| within the |bounds| rectangle. If |
| 68 // not, |position| is updated to wrap to the beginning of the next line. | 68 // not, |position| is updated to wrap to the beginning of the next line. |
| 69 void WrapIfWordDoesntFit(int word_width, | 69 void WrapIfWordDoesntFit(int word_width, |
| 70 int font_height, | 70 int font_height, |
| 71 gfx::Size* position, | 71 gfx::Size* position, |
| 72 const gfx::Rect& bounds); | 72 const gfx::Rect& bounds); |
| 73 | 73 |
| 74 } // namespace view_text_utils | 74 } // namespace view_text_utils |
| 75 | 75 |
| 76 #endif // CHROME_BROWSER_VIEWS_VIEW_TEXT_UTILS_H_ | 76 #endif // CHROME_BROWSER_VIEWS_VIEW_TEXT_UTILS_H_ |
| OLD | NEW |