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
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_EXAMPLES_TABBED_PANE_EXAMPLE_H_
6 #define UI_VIEWS_EXAMPLES_TABBED_PANE_EXAMPLE_H_
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "ui/views/controls/button/button.h"
13 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h"
14 #include "ui/views/examples/example_base.h"
21 // A TabbedPane example tests adding and selecting tabs.
22 class TabbedPaneExample : public ExampleBase,
23 public ButtonListener,
24 public TabbedPaneListener {
27 virtual ~TabbedPaneExample();
30 virtual void CreateExampleView(View* container) OVERRIDE;
34 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
36 // TabbedPaneListener:
37 virtual void TabSelectedAt(int index) OVERRIDE;
39 // Print the status of the tab in the status area.
42 void AddButton(const std::string& label);
44 // The tabbed pane to be tested.
45 TabbedPane* tabbed_pane_;
47 // Control buttons to add and select tabs.
52 DISALLOW_COPY_AND_ASSIGN(TabbedPaneExample);
55 } // namespace examples
58 #endif // UI_VIEWS_EXAMPLES_TABBED_PANE_EXAMPLE_H_