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