OLD | NEW |
1 | |
2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 // 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 |
4 // found in the LICENSE file. | 3 // found in the LICENSE file. |
5 | 4 |
6 #include "views/examples/text_example.h" | 5 #include "ui/views/examples/text_example.h" |
7 | 6 |
8 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
9 #include "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
10 #include "ui/gfx/canvas.h" | 9 #include "ui/gfx/canvas.h" |
11 #include "ui/gfx/canvas_skia.h" | 10 #include "ui/gfx/canvas_skia.h" |
| 11 #include "ui/views/examples/example_combobox_model.h" |
12 #include "views/controls/button/checkbox.h" | 12 #include "views/controls/button/checkbox.h" |
13 #include "views/controls/label.h" | 13 #include "views/controls/label.h" |
14 #include "views/examples/example_combobox_model.h" | |
15 #include "views/layout/grid_layout.h" | 14 #include "views/layout/grid_layout.h" |
16 #include "views/view.h" | 15 #include "views/view.h" |
17 | 16 |
18 namespace { | 17 namespace { |
19 | 18 |
20 const char kShortText[] = "Batman"; | 19 const char kShortText[] = "Batman"; |
21 const char kMediumText[] = "The quick brown fox jumps over the lazy dog."; | 20 const char kMediumText[] = "The quick brown fox jumps over the lazy dog."; |
22 const char kLongText[] = | 21 const char kLongText[] = |
23 "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod " | 22 "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod " |
24 "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim " | 23 "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim " |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 case 2: | 319 case 2: |
321 text_flags |= gfx::Canvas::HIDE_PREFIX; | 320 text_flags |= gfx::Canvas::HIDE_PREFIX; |
322 break; | 321 break; |
323 } | 322 } |
324 } | 323 } |
325 text_view_->set_text_flags(text_flags); | 324 text_view_->set_text_flags(text_flags); |
326 text_view_->SchedulePaint(); | 325 text_view_->SchedulePaint(); |
327 } | 326 } |
328 | 327 |
329 } // namespace examples | 328 } // namespace examples |
OLD | NEW |