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

Unified Diff: views/controls/tabbed_pane/native_tabbed_pane_win.h

Issue 155668: Refactoring of tabbed-pane component so it can be ported to Linux toolkit_view (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/tabbed_pane.cc ('k') | views/controls/tabbed_pane/native_tabbed_pane_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/tabbed_pane/native_tabbed_pane_win.h
===================================================================
--- views/controls/tabbed_pane/native_tabbed_pane_win.h (revision 0)
+++ views/controls/tabbed_pane/native_tabbed_pane_win.h (revision 0)
@@ -0,0 +1,69 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WIN_H_
+#define VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WIN_H_
+
+#include "views/controls/native_control_win.h"
+#include "views/controls/tabbed_pane/native_tabbed_pane_wrapper.h"
+
+namespace views {
+
+class WidgetWin;
+
+class NativeTabbedPaneWin : public NativeControlWin,
+ public NativeTabbedPaneWrapper {
+ public:
+ explicit NativeTabbedPaneWin(TabbedPane* tabbed_pane);
+ virtual ~NativeTabbedPaneWin();
+
+ // NativeTabbedPaneWrapper implementation:
+ virtual void AddTab(const std::wstring& title, View* contents);
+ virtual void AddTabAtIndex(int index,
+ const std::wstring& title,
+ View* contents,
+ bool select_if_first_tab);
+ virtual View* RemoveTabAtIndex(int index);
+ virtual void SelectTabAt(int index);
+ virtual int GetTabCount();
+ virtual int GetSelectedTabIndex();
+ virtual View* GetSelectedTab();
+ virtual View* GetView();
+ virtual void SetFocus();
+ virtual gfx::NativeView GetTestingHandle() const;
+
+ // NativeControlWin overrides.
+ virtual void CreateNativeControl();
+ virtual bool ProcessMessage(UINT message,
+ WPARAM w_param,
+ LPARAM l_param,
+ LRESULT* result);
+
+ // View overrides:
+ virtual void Layout();
+ virtual FocusTraversable* GetFocusTraversable();
+ virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child);
+
+ private:
+ // Changes the contents view to the view associated with the tab at |index|.
+ void DoSelectTabAt(int index);
+
+ // Resizes the HWND control to macth the size of the containing view.
+ void ResizeContents();
+
+ // The tabbed-pane we are bound to.
+ TabbedPane* tabbed_pane_;
+
+ // The views associated with the different tabs.
+ std::vector<View*> tab_views_;
+
+ // The window displayed in the tab.
+ WidgetWin* content_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(NativeTabbedPaneWin);
+};
+
+} // namespace views
+
+#endif // VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WIN_H_
Property changes on: views\controls\tabbed_pane\native_tabbed_pane_win.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « views/controls/tabbed_pane.cc ('k') | views/controls/tabbed_pane/native_tabbed_pane_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698