OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "views/examples/examples_main_base.h" | 5 #include "views/examples/examples_main_base.h" |
6 | 6 |
7 #include "app/app_paths.h" | 7 #include "app/app_paths.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
11 #include "views/controls/label.h" | 11 #include "views/controls/label.h" |
12 #include "views/focus/accelerator_handler.h" | 12 #include "views/focus/accelerator_handler.h" |
13 #include "views/grid_layout.h" | 13 #include "views/grid_layout.h" |
14 #include "views/widget/widget.h" | 14 #include "views/widget/widget.h" |
15 | 15 |
16 // Examples | 16 // Examples |
17 #include "views/examples/button_example.h" | 17 #include "views/examples/button_example.h" |
18 #include "views/examples/combobox_example.h" | 18 #include "views/examples/combobox_example.h" |
19 #include "views/examples/message_box_example.h" | 19 #include "views/examples/message_box_example.h" |
20 #include "views/examples/radio_button_example.h" | 20 #include "views/examples/radio_button_example.h" |
21 #include "views/examples/scroll_view_example.h" | 21 #include "views/examples/scroll_view_example.h" |
22 #include "views/examples/tabbed_pane_example.h" | 22 #include "views/examples/tabbed_pane_example.h" |
| 23 #include "views/examples/textfield_example.h" |
23 | 24 |
24 namespace examples { | 25 namespace examples { |
25 | 26 |
26 using views::Background; | 27 using views::Background; |
27 using views::ColumnSet; | 28 using views::ColumnSet; |
28 using views::GridLayout; | 29 using views::GridLayout; |
29 using views::Label; | 30 using views::Label; |
30 using views::TabbedPane; | 31 using views::TabbedPane; |
31 using views::View; | 32 using views::View; |
32 using views::Widget; | 33 using views::Widget; |
(...skipping 30 matching lines...) Expand all Loading... |
63 GridLayout::USE_PREF, 0, 0); | 64 GridLayout::USE_PREF, 0, 0); |
64 | 65 |
65 TabbedPane* tabbed_pane = new TabbedPane(); | 66 TabbedPane* tabbed_pane = new TabbedPane(); |
66 Label* message = new Label(); | 67 Label* message = new Label(); |
67 | 68 |
68 layout->StartRow(1, 0); | 69 layout->StartRow(1, 0); |
69 layout->AddView(tabbed_pane); | 70 layout->AddView(tabbed_pane); |
70 layout->StartRow(0 /* no expand */, 0); | 71 layout->StartRow(0 /* no expand */, 0); |
71 layout->AddView(message); | 72 layout->AddView(message); |
72 | 73 |
| 74 TextfieldExample textfield_example(tabbed_pane, message); |
73 ButtonExample button_example(tabbed_pane, message); | 75 ButtonExample button_example(tabbed_pane, message); |
74 ComboboxExample combobox_example(tabbed_pane, message); | 76 ComboboxExample combobox_example(tabbed_pane, message); |
75 TabbedPaneExample tabbed_pane_example(tabbed_pane, message); | 77 TabbedPaneExample tabbed_pane_example(tabbed_pane, message); |
76 MessageBoxExample message_box_example(tabbed_pane, message); | 78 MessageBoxExample message_box_example(tabbed_pane, message); |
77 RadioButtonExample radio_button_example(tabbed_pane, message); | 79 RadioButtonExample radio_button_example(tabbed_pane, message); |
78 ScrollViewExample scroll_view_example(tabbed_pane, message); | 80 ScrollViewExample scroll_view_example(tabbed_pane, message); |
79 | 81 |
80 widget->Show(); | 82 widget->Show(); |
81 | 83 |
82 views::AcceleratorHandler accelerator_handler; | 84 views::AcceleratorHandler accelerator_handler; |
83 MessageLoopForUI::current()->Run(&accelerator_handler); | 85 MessageLoopForUI::current()->Run(&accelerator_handler); |
84 } | 86 } |
85 | 87 |
86 } // namespace examples | 88 } // namespace examples |
OLD | NEW |