OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_COMMON_GFX_CHROME_CANVAS_H_ | 5 #ifndef CHROME_COMMON_GFX_CHROME_CANVAS_H_ |
6 #define CHROME_COMMON_GFX_CHROME_CANVAS_H_ | 6 #define CHROME_COMMON_GFX_CHROME_CANVAS_H_ |
7 | 7 |
8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // By default DrawStringInt does not process the prefix ('&') character | 52 // By default DrawStringInt does not process the prefix ('&') character |
53 // specially. That is, the string "&foo" is rendered as "&foo". When | 53 // specially. That is, the string "&foo" is rendered as "&foo". When |
54 // rendering text from a resource that uses the prefix character for | 54 // rendering text from a resource that uses the prefix character for |
55 // mnemonics, the prefix should be processed and can be rendered as an | 55 // mnemonics, the prefix should be processed and can be rendered as an |
56 // underline (SHOW_PREFIX), or not rendered at all (HIDE_PREFIX). | 56 // underline (SHOW_PREFIX), or not rendered at all (HIDE_PREFIX). |
57 SHOW_PREFIX = 128, | 57 SHOW_PREFIX = 128, |
58 HIDE_PREFIX = 256, | 58 HIDE_PREFIX = 256, |
59 | 59 |
60 // Prevent ellipsizing | 60 // Prevent ellipsizing |
61 NO_ELLIPSIS = 512, | 61 NO_ELLIPSIS = 512, |
| 62 |
| 63 // Specifies if words can be split by new lines. |
| 64 // This only works with MULTI_LINE. |
| 65 CHARACTER_BREAK = 1024, |
62 }; | 66 }; |
63 | 67 |
64 // Creates an empty ChromeCanvas. Callers must use initialize before using | 68 // Creates an empty ChromeCanvas. Callers must use initialize before using |
65 // the canvas. | 69 // the canvas. |
66 ChromeCanvas(); | 70 ChromeCanvas(); |
67 | 71 |
68 ChromeCanvas(int width, int height, bool is_opaque); | 72 ChromeCanvas(int width, int height, bool is_opaque); |
69 | 73 |
70 virtual ~ChromeCanvas(); | 74 virtual ~ChromeCanvas(); |
71 | 75 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 #endif | 197 #endif |
194 | 198 |
195 DISALLOW_EVIL_CONSTRUCTORS(ChromeCanvas); | 199 DISALLOW_EVIL_CONSTRUCTORS(ChromeCanvas); |
196 }; | 200 }; |
197 | 201 |
198 #if defined(OS_WIN) || defined(TOOLKIT_GTK) | 202 #if defined(OS_WIN) || defined(TOOLKIT_GTK) |
199 typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint; | 203 typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint; |
200 #endif | 204 #endif |
201 | 205 |
202 #endif // CHROME_COMMON_GFX_CHROME_CANVAS_H_ | 206 #endif // CHROME_COMMON_GFX_CHROME_CANVAS_H_ |
OLD | NEW |