| 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/controls/combobox/combobox.h" |
| 11 #include "ui/views/examples/example_combobox_model.h" | 12 #include "ui/views/examples/example_combobox_model.h" |
| 12 #include "ui/views/layout/grid_layout.h" | 13 #include "ui/views/layout/grid_layout.h" |
| 13 #include "views/controls/button/checkbox.h" | 14 #include "views/controls/button/checkbox.h" |
| 14 #include "views/controls/combobox/combobox.h" | |
| 15 #include "views/controls/label.h" | 15 #include "views/controls/label.h" |
| 16 #include "views/view.h" | 16 #include "views/view.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 const char kShortText[] = "Batman"; | 20 const char kShortText[] = "Batman"; |
| 21 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."; |
| 22 const char kLongText[] = | 22 const char kLongText[] = |
| 23 "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod " | 23 "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod " |
| 24 "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... |
| 320 case 2: | 320 case 2: |
| 321 text_flags |= gfx::Canvas::HIDE_PREFIX; | 321 text_flags |= gfx::Canvas::HIDE_PREFIX; |
| 322 break; | 322 break; |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 text_view_->set_text_flags(text_flags); | 325 text_view_->set_text_flags(text_flags); |
| 326 text_view_->SchedulePaint(); | 326 text_view_->SchedulePaint(); |
| 327 } | 327 } |
| 328 | 328 |
| 329 } // namespace examples | 329 } // namespace examples |
| OLD | NEW |