| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2009 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. |
| 4 |
| 5 #ifndef VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_GTK_H_ |
| 6 #define VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_GTK_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "views/controls/native_control_gtk.h" |
| 11 #include "views/controls/tabbed_pane/native_tabbed_pane_wrapper.h" |
| 12 |
| 13 namespace views { |
| 14 |
| 15 class WidgetGtk; |
| 16 |
| 17 class NativeTabbedPaneGtk : public NativeControlGtk, |
| 18 public NativeTabbedPaneWrapper { |
| 19 public: |
| 20 explicit NativeTabbedPaneGtk(TabbedPane* tabbed_pane); |
| 21 virtual ~NativeTabbedPaneGtk(); |
| 22 |
| 23 // NativeTabbedPaneWrapper implementation: |
| 24 virtual void AddTab(const std::wstring& title, View* contents); |
| 25 virtual void AddTabAtIndex(int index, |
| 26 const std::wstring& title, |
| 27 View* contents, |
| 28 bool select_if_first_tab); |
| 29 virtual View* RemoveTabAtIndex(int index); |
| 30 virtual void SelectTabAt(int index); |
| 31 virtual int GetTabCount(); |
| 32 virtual int GetSelectedTabIndex(); |
| 33 virtual View* GetSelectedTab(); |
| 34 virtual View* GetView(); |
| 35 virtual void SetFocus(); |
| 36 virtual gfx::NativeView GetTestingHandle() const; |
| 37 |
| 38 // NativeControlGtk overrides. |
| 39 virtual void CreateNativeControl(); |
| 40 |
| 41 private: |
| 42 void DoAddTabAtIndex(int index, |
| 43 const std::wstring& title, |
| 44 View* contents, |
| 45 bool select_if_first_tab); |
| 46 View* GetTabViewAt(int index); |
| 47 void OnSwitchPage(int selected_tab_index); |
| 48 |
| 49 static void CallSwitchPage(GtkNotebook* widget, |
| 50 GtkNotebookPage* page, |
| 51 guint selected_tab_index, |
| 52 NativeTabbedPaneGtk* tabbed_pane); |
| 53 |
| 54 // The tabbed-pane we are bound to. |
| 55 TabbedPane* tabbed_pane_; |
| 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(NativeTabbedPaneGtk); |
| 58 }; |
| 59 |
| 60 } // namespace views |
| 61 |
| 62 #endif // VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_GTK_H_ |
| OLD | NEW |