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

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

Issue 12211122: Reland Remove NativeTabbedPane[Win|Wrapper]; promote Views impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix leak of tab content Views. Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "ui/views/controls/button/text_button.h" 12 #include "ui/views/controls/button/text_button.h"
13 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h" 13 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h"
14 #include "ui/views/examples/example_base.h" 14 #include "ui/views/examples/example_base.h"
15 15
16 namespace views { 16 namespace views {
17 class TabbedPane; 17 class TabbedPane;
18 18
19 namespace examples { 19 namespace examples {
20 20
21 // A TabbedPane example tests adding/removing/selecting tabs. 21 // A TabbedPane example tests adding and selecting tabs.
22 class TabbedPaneExample : public ExampleBase, 22 class TabbedPaneExample : public ExampleBase,
23 public ButtonListener, 23 public ButtonListener,
24 public TabbedPaneListener { 24 public TabbedPaneListener {
25 public: 25 public:
26 TabbedPaneExample(); 26 TabbedPaneExample();
27 virtual ~TabbedPaneExample(); 27 virtual ~TabbedPaneExample();
28 28
29 // ExampleBase: 29 // ExampleBase:
30 virtual void CreateExampleView(View* container) OVERRIDE; 30 virtual void CreateExampleView(View* container) OVERRIDE;
31 31
32 private: 32 private:
33 // ButtonListener: 33 // ButtonListener:
34 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; 34 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
35 35
36 // TabbedPaneListener: 36 // TabbedPaneListener:
37 virtual void TabSelectedAt(int index) OVERRIDE; 37 virtual void TabSelectedAt(int index) OVERRIDE;
38 38
39 // Print the status of the tab in the status area. 39 // Print the status of the tab in the status area.
40 void PrintStatus(); 40 void PrintStatus();
41 41
42 void AddButton(const std::string& label); 42 void AddButton(const std::string& label);
43 43
44 // The tabbed pane to be tested. 44 // The tabbed pane to be tested.
45 TabbedPane* tabbed_pane_; 45 TabbedPane* tabbed_pane_;
46 46
47 // Control buttons to add, remove or select tabs. 47 // Control buttons to add and select tabs.
48 Button* add_; 48 Button* add_;
49 Button* add_at_; 49 Button* add_at_;
50 Button* remove_at_;
51 Button* select_at_; 50 Button* select_at_;
52 51
53 DISALLOW_COPY_AND_ASSIGN(TabbedPaneExample); 52 DISALLOW_COPY_AND_ASSIGN(TabbedPaneExample);
54 }; 53 };
55 54
56 } // namespace examples 55 } // namespace examples
57 } // namespace views 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/controls/tabbed_pane/tabbed_pane_unittest.cc ('k') | ui/views/examples/tabbed_pane_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698