| OLD | NEW |
| 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_CONTROLS_TABBED_PANE_TABBED_PANE_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_H_ |
| 6 #define UI_VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_H_ | 6 #define UI_VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 // Returns the number of tabs. | 34 // Returns the number of tabs. |
| 35 int GetTabCount(); | 35 int GetTabCount(); |
| 36 | 36 |
| 37 // Returns the contents of the selected tab or NULL if there is none. | 37 // Returns the contents of the selected tab or NULL if there is none. |
| 38 View* GetSelectedTab(); | 38 View* GetSelectedTab(); |
| 39 | 39 |
| 40 // Adds a new tab at the end of this TabbedPane with the specified |title|. | 40 // Adds a new tab at the end of this TabbedPane with the specified |title|. |
| 41 // |contents| is the view displayed when the tab is selected and is owned by | 41 // |contents| is the view displayed when the tab is selected and is owned by |
| 42 // the TabbedPane. | 42 // the TabbedPane. |
| 43 void AddTab(const string16& title, View* contents); | 43 void AddTab(const base::string16& title, View* contents); |
| 44 | 44 |
| 45 // Adds a new tab at |index| with |title|. |contents| is the view displayed | 45 // Adds a new tab at |index| with |title|. |contents| is the view displayed |
| 46 // when the tab is selected and is owned by the TabbedPane. If the tabbed pane | 46 // when the tab is selected and is owned by the TabbedPane. If the tabbed pane |
| 47 // is currently empty, the new tab is selected. | 47 // is currently empty, the new tab is selected. |
| 48 void AddTabAtIndex(int index, const string16& title, View* contents); | 48 void AddTabAtIndex(int index, const base::string16& title, View* contents); |
| 49 | 49 |
| 50 // Selects the tab at |index|, which must be valid. | 50 // Selects the tab at |index|, which must be valid. |
| 51 void SelectTabAt(int index); | 51 void SelectTabAt(int index); |
| 52 | 52 |
| 53 // Selects |tab| (the tabstrip view, not its content) if it is valid. | 53 // Selects |tab| (the tabstrip view, not its content) if it is valid. |
| 54 void SelectTab(Tab* tab); | 54 void SelectTab(Tab* tab); |
| 55 | 55 |
| 56 // Overridden from View: | 56 // Overridden from View: |
| 57 virtual gfx::Size GetPreferredSize() OVERRIDE; | 57 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 58 virtual const char* GetClassName() const OVERRIDE; | 58 virtual const char* GetClassName() const OVERRIDE; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 81 | 81 |
| 82 // The selected tab index or -1 if invalid. | 82 // The selected tab index or -1 if invalid. |
| 83 int selected_tab_index_; | 83 int selected_tab_index_; |
| 84 | 84 |
| 85 DISALLOW_COPY_AND_ASSIGN(TabbedPane); | 85 DISALLOW_COPY_AND_ASSIGN(TabbedPane); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace views | 88 } // namespace views |
| 89 | 89 |
| 90 #endif // UI_VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_H_ | 90 #endif // UI_VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_H_ |
| OLD | NEW |