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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(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_WIN_H_
6 #define VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WIN_H_
7
8 #include "views/controls/native_control_win.h"
9 #include "views/controls/tabbed_pane/native_tabbed_pane_wrapper.h"
10
11 namespace views {
12
13 class WidgetWin;
14
15 class NativeTabbedPaneWin : public NativeControlWin,
16 public NativeTabbedPaneWrapper {
17 public:
18 explicit NativeTabbedPaneWin(TabbedPane* tabbed_pane);
19 virtual ~NativeTabbedPaneWin();
20
21 // NativeTabbedPaneWrapper implementation:
22 virtual void AddTab(const std::wstring& title, View* contents);
23 virtual void AddTabAtIndex(int index,
24 const std::wstring& title,
25 View* contents,
26 bool select_if_first_tab);
27 virtual View* RemoveTabAtIndex(int index);
28 virtual void SelectTabAt(int index);
29 virtual int GetTabCount();
30 virtual int GetSelectedTabIndex();
31 virtual View* GetSelectedTab();
32 virtual View* GetView();
33 virtual void SetFocus();
34 virtual gfx::NativeView GetTestingHandle() const;
35
36 // NativeControlWin overrides.
37 virtual void CreateNativeControl();
38 virtual bool ProcessMessage(UINT message,
39 WPARAM w_param,
40 LPARAM l_param,
41 LRESULT* result);
42
43 // View overrides:
44 virtual void Layout();
45 virtual FocusTraversable* GetFocusTraversable();
46 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child);
47
48 private:
49 // Changes the contents view to the view associated with the tab at |index|.
50 void DoSelectTabAt(int index);
51
52 // Resizes the HWND control to macth the size of the containing view.
53 void ResizeContents();
54
55 // The tabbed-pane we are bound to.
56 TabbedPane* tabbed_pane_;
57
58 // The views associated with the different tabs.
59 std::vector<View*> tab_views_;
60
61 // The window displayed in the tab.
62 WidgetWin* content_window_;
63
64 DISALLOW_COPY_AND_ASSIGN(NativeTabbedPaneWin);
65 };
66
67 } // namespace views
68
69 #endif // VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WIN_H_
OLDNEW
« 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