Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: views/examples/single_split_view_example.h

Issue 6247001: Re-land 71230.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/single_split_view_unittest.cc ('k') | views/views.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
33 34
34 splitted_view_1->SetColor(SK_ColorYELLOW, SK_ColorCYAN); 35 splitted_view_1->SetColor(SK_ColorYELLOW, SK_ColorCYAN);
35 36
36 views::GridLayout* layout = new views::GridLayout(container); 37 views::GridLayout* layout = new views::GridLayout(container);
37 container->SetLayoutManager(layout); 38 container->SetLayoutManager(layout);
38 39
39 // Add scroll view. 40 // Add scroll view.
40 views::ColumnSet* column_set = layout->AddColumnSet(0); 41 views::ColumnSet* column_set = layout->AddColumnSet(0);
41 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, 42 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
42 views::GridLayout::USE_PREF, 0, 0); 43 views::GridLayout::USE_PREF, 0, 0);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 76
76 // The SinleSplitView to test. 77 // The SinleSplitView to test.
77 views::SingleSplitView* single_split_view_; 78 views::SingleSplitView* single_split_view_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(SingleSplitViewExample); 80 DISALLOW_COPY_AND_ASSIGN(SingleSplitViewExample);
80 }; 81 };
81 82
82 } // namespace examples 83 } // namespace examples
83 84
84 #endif // VIEWS_EXAMPLES_SINGLE_SPLIT_VIEW_EXAMPLE_H_ 85 #endif // VIEWS_EXAMPLES_SINGLE_SPLIT_VIEW_EXAMPLE_H_
OLDNEW
« no previous file with comments | « views/controls/single_split_view_unittest.cc ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698