| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 VIEWS_EXAMPLES_SINGLE_SPLIT_VIEW_EXAMPLE_H_ | 5 #ifndef VIEWS_EXAMPLES_SINGLE_SPLIT_VIEW_EXAMPLE_H_ |
| 6 #define VIEWS_EXAMPLES_SINGLE_SPLIT_VIEW_EXAMPLE_H_ | 6 #define VIEWS_EXAMPLES_SINGLE_SPLIT_VIEW_EXAMPLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "views/controls/single_split_view.h" | 9 #include "views/controls/single_split_view.h" |
| 10 #include "views/examples/example_base.h" | 10 #include "views/examples/example_base.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 virtual std::wstring GetExampleTitle() { | 22 virtual std::wstring GetExampleTitle() { |
| 23 return L"Single Split View"; | 23 return L"Single Split View"; |
| 24 } | 24 } |
| 25 | 25 |
| 26 virtual void CreateExampleView(views::View* container) { | 26 virtual void CreateExampleView(views::View* container) { |
| 27 SplittedView* splitted_view_1 = new SplittedView(); | 27 SplittedView* splitted_view_1 = new SplittedView(); |
| 28 SplittedView* splitted_view_2 = new SplittedView(); | 28 SplittedView* splitted_view_2 = new SplittedView(); |
| 29 | 29 |
| 30 single_split_view_ = new views::SingleSplitView( | 30 single_split_view_ = new views::SingleSplitView( |
| 31 splitted_view_1, splitted_view_2, | 31 splitted_view_1, splitted_view_2, |
| 32 views::SingleSplitView::HORIZONTAL_SPLIT, | 32 views::SingleSplitView::HORIZONTAL_SPLIT); |
| 33 NULL); | |
| 34 | 33 |
| 35 splitted_view_1->SetColor(SK_ColorYELLOW, SK_ColorCYAN); | 34 splitted_view_1->SetColor(SK_ColorYELLOW, SK_ColorCYAN); |
| 36 | 35 |
| 37 views::GridLayout* layout = new views::GridLayout(container); | 36 views::GridLayout* layout = new views::GridLayout(container); |
| 38 container->SetLayoutManager(layout); | 37 container->SetLayoutManager(layout); |
| 39 | 38 |
| 40 // Add scroll view. | 39 // Add scroll view. |
| 41 views::ColumnSet* column_set = layout->AddColumnSet(0); | 40 views::ColumnSet* column_set = layout->AddColumnSet(0); |
| 42 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, | 41 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, |
| 43 views::GridLayout::USE_PREF, 0, 0); | 42 views::GridLayout::USE_PREF, 0, 0); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 75 |
| 77 // The SinleSplitView to test. | 76 // The SinleSplitView to test. |
| 78 views::SingleSplitView* single_split_view_; | 77 views::SingleSplitView* single_split_view_; |
| 79 | 78 |
| 80 DISALLOW_COPY_AND_ASSIGN(SingleSplitViewExample); | 79 DISALLOW_COPY_AND_ASSIGN(SingleSplitViewExample); |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 } // namespace examples | 82 } // namespace examples |
| 84 | 83 |
| 85 #endif // VIEWS_EXAMPLES_SINGLE_SPLIT_VIEW_EXAMPLE_H_ | 84 #endif // VIEWS_EXAMPLES_SINGLE_SPLIT_VIEW_EXAMPLE_H_ |
| OLD | NEW |