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

Side by Side Diff: ui/views/examples/tabbed_pane_example.h

Issue 8687013: Get the examples to run in aura_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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
OLDNEW
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 #ifndef UI_VIEWS_EXAMPLES_TABBED_PANE_EXAMPLE_H_ 5 #ifndef UI_VIEWS_EXAMPLES_TABBED_PANE_EXAMPLE_H_
6 #define UI_VIEWS_EXAMPLES_TABBED_PANE_EXAMPLE_H_ 6 #define UI_VIEWS_EXAMPLES_TABBED_PANE_EXAMPLE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "ui/views/controls/button/text_button.h" 11 #include "ui/views/controls/button/text_button.h"
12 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h" 12 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h"
13 #include "ui/views/examples/example_base.h" 13 #include "ui/views/examples/example_base.h"
14 14
15 namespace views { 15 namespace views {
16 class TabbedPane; 16 class TabbedPane;
17 }
18 17
19 namespace examples { 18 namespace examples {
20 19
21 // A TabbedPane example tests adding/removing/selecting tabs. 20 // A TabbedPane example tests adding/removing/selecting tabs.
22 class TabbedPaneExample : public ExampleBase, 21 class TabbedPaneExample : public ExampleBase,
23 public views::ButtonListener, 22 public ButtonListener,
24 public views::TabbedPaneListener { 23 public TabbedPaneListener {
25 public: 24 public:
26 explicit TabbedPaneExample(ExamplesMain* main); 25 TabbedPaneExample();
27 virtual ~TabbedPaneExample(); 26 virtual ~TabbedPaneExample();
28 27
29 // ExampleBase: 28 // ExampleBase:
30 virtual void CreateExampleView(views::View* container) OVERRIDE; 29 virtual void CreateExampleView(View* container) OVERRIDE;
31 30
32 private: 31 private:
33 // views::ButtonListener: 32 // ButtonListener:
34 virtual void ButtonPressed(views::Button* sender, 33 virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
35 const views::Event& event) OVERRIDE;
36 34
37 // views::TabbedPaneListener: 35 // TabbedPaneListener:
38 virtual void TabSelectedAt(int index) OVERRIDE; 36 virtual void TabSelectedAt(int index) OVERRIDE;
39 37
40 // Print the status of the tab in the status area. 38 // Print the status of the tab in the status area.
41 void PrintStatus(); 39 void PrintStatus();
42 40
43 void AddButton(const std::string& label); 41 void AddButton(const std::string& label);
44 42
45 // The tabbed pane to be tested. 43 // The tabbed pane to be tested.
46 views::TabbedPane* tabbed_pane_; 44 TabbedPane* tabbed_pane_;
47 45
48 // Control buttons to add, remove or select tabs. 46 // Control buttons to add, remove or select tabs.
49 views::Button* add_; 47 Button* add_;
50 views::Button* add_at_; 48 Button* add_at_;
51 views::Button* remove_at_; 49 Button* remove_at_;
52 views::Button* select_at_; 50 Button* select_at_;
53 51
54 DISALLOW_COPY_AND_ASSIGN(TabbedPaneExample); 52 DISALLOW_COPY_AND_ASSIGN(TabbedPaneExample);
55 }; 53 };
56 54
57 } // namespace examples 55 } // namespace examples
56 } // namespace views
58 57
59 #endif // UI_VIEWS_EXAMPLES_TABBED_PANE_EXAMPLE_H_ 58 #endif // UI_VIEWS_EXAMPLES_TABBED_PANE_EXAMPLE_H_
OLDNEW
« no previous file with comments | « ui/views/examples/single_split_view_example.cc ('k') | ui/views/examples/tabbed_pane_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698