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

Side by Side Diff: views/controls/tabbed_pane/tabbed_pane.h

Issue 2812026: Auto-size the views version of the options dialog. (Closed)
Patch Set: Fix autosizing issue with gtk pref pages in chromeos options dialog. Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 VIEWS_CONTROLS_TABBED_PANE_H_ 5 #ifndef VIEWS_CONTROLS_TABBED_PANE_H_
6 #define VIEWS_CONTROLS_TABBED_PANE_H_ 6 #define VIEWS_CONTROLS_TABBED_PANE_H_
7 7
8 #include "views/view.h" 8 #include "views/view.h"
9 9
10 namespace views { 10 namespace views {
11 11
12 class NativeTabbedPaneWrapper; 12 class NativeTabbedPaneWrapper;
13 13
14 // The TabbedPane class is a view that shows tabs. When the user clicks on a 14 // The TabbedPane class is a view that shows tabs. When the user clicks on a
15 // tab, the associated view is displayed. 15 // tab, the associated view is displayed.
16 // TODO (jcampan): implement GetPreferredSize().
17 16
18 class TabbedPane : public View { 17 class TabbedPane : public View {
19 public: 18 public:
20 TabbedPane(); 19 TabbedPane();
21 virtual ~TabbedPane(); 20 virtual ~TabbedPane();
22 21
23 // An interface an object can implement to be notified about events within 22 // An interface an object can implement to be notified about events within
24 // the TabbedPane. 23 // the TabbedPane.
25 class Listener { 24 class Listener {
26 public: 25 public:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 64
66 // View overrides: 65 // View overrides:
67 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); 66 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
68 // Handles Ctrl+Tab and Ctrl+Shift+Tab navigation of pages. 67 // Handles Ctrl+Tab and Ctrl+Shift+Tab navigation of pages.
69 virtual bool AcceleratorPressed(const views::Accelerator& accelerator); 68 virtual bool AcceleratorPressed(const views::Accelerator& accelerator);
70 virtual std::string GetClassName() const; 69 virtual std::string GetClassName() const;
71 virtual void Layout(); 70 virtual void Layout();
72 virtual void Focus(); 71 virtual void Focus();
73 virtual void PaintFocusBorder(gfx::Canvas* canvas); 72 virtual void PaintFocusBorder(gfx::Canvas* canvas);
74 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); 73 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
74 virtual gfx::Size GetPreferredSize();
75 75
76 NativeTabbedPaneWrapper* native_wrapper() const { 76 NativeTabbedPaneWrapper* native_wrapper() const {
77 return native_tabbed_pane_; 77 return native_tabbed_pane_;
78 } 78 }
79 79
80 protected: 80 protected:
81 // The object that actually implements the tabbed-pane. 81 // The object that actually implements the tabbed-pane.
82 // Protected for tests access. 82 // Protected for tests access.
83 NativeTabbedPaneWrapper* native_tabbed_pane_; 83 NativeTabbedPaneWrapper* native_tabbed_pane_;
84 84
85 private: 85 private:
86 // The tabbed-pane's class name. 86 // The tabbed-pane's class name.
87 static const char kViewClassName[]; 87 static const char kViewClassName[];
88 88
89 // Creates the native wrapper. 89 // Creates the native wrapper.
90 void CreateWrapper(); 90 void CreateWrapper();
91 91
92 // We support Ctrl+Tab and Ctrl+Shift+Tab to navigate tabbed option pages. 92 // We support Ctrl+Tab and Ctrl+Shift+Tab to navigate tabbed option pages.
93 void LoadAccelerators(); 93 void LoadAccelerators();
94 94
95 // The listener we notify about tab selection changes. 95 // The listener we notify about tab selection changes.
96 Listener* listener_; 96 Listener* listener_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(TabbedPane); 98 DISALLOW_COPY_AND_ASSIGN(TabbedPane);
99 }; 99 };
100 100
101 } // namespace views 101 } // namespace views
102 102
103 #endif // VIEWS_CONTROLS_TABBED_PANE_H_ 103 #endif // VIEWS_CONTROLS_TABBED_PANE_H_
OLDNEW
« no previous file with comments | « views/controls/tabbed_pane/native_tabbed_pane_wrapper.h ('k') | views/controls/tabbed_pane/tabbed_pane.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698