summaryrefslogtreecommitdiffstats
path: root/views/widget/widget_gtk.h
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 17:40:13 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 17:40:13 +0000
commitcec6c9c550f44741c7acacfd5d3f67e919110c4c (patch)
treef6778f4a10b1aa5b0a7b74526c632377214703b1 /views/widget/widget_gtk.h
parent210796e7c8207e56dae29392b62e1e79ec9f837f (diff)
downloadchromium_src-cec6c9c550f44741c7acacfd5d3f67e919110c4c.zip
chromium_src-cec6c9c550f44741c7acacfd5d3f67e919110c4c.tar.gz
chromium_src-cec6c9c550f44741c7acacfd5d3f67e919110c4c.tar.bz2
See original review at
http://codereview.chromium.org/251001/show This CL hooks the focus traversal for the TabbedPaneView on Linux with toolkit views. It also has few focus related fixed (focus with buttons, clearing focus effectively in the focus manager). BUG=None TEST=Run the view_examples app. Press tab to move the focus. Try the different tabs. Review URL: http://codereview.chromium.org/246030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27504 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/widget_gtk.h')
-rw-r--r--views/widget/widget_gtk.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h
index 7ce3329..080c1a0 100644
--- a/views/widget/widget_gtk.h
+++ b/views/widget/widget_gtk.h
@@ -8,6 +8,7 @@
#include <gtk/gtk.h>
#include "base/message_loop.h"
+#include "views/focus/focus_manager.h"
#include "views/widget/widget.h"
class OSExchangeData;
@@ -26,7 +27,10 @@ class View;
class WindowGtk;
// Widget implementation for GTK.
-class WidgetGtk : public Widget, public MessageLoopForUI::Observer {
+class WidgetGtk
+ : public Widget,
+ public MessageLoopForUI::Observer,
+ public FocusTraversable {
public:
// Type of widget.
enum Type {
@@ -112,6 +116,20 @@ class WidgetGtk : public Widget, public MessageLoopForUI::Observer {
virtual void WillProcessEvent(GdkEvent* event);
virtual void DidProcessEvent(GdkEvent* event);
+ // FocusTraversable implementation:
+ virtual View* FindNextFocusableView(View* starting_view,
+ bool reverse,
+ Direction direction,
+ bool check_starting_view,
+ FocusTraversable** focus_traversable,
+ View** focus_traversable_view);
+ virtual FocusTraversable* GetFocusTraversableParent();
+ virtual View* GetFocusTraversableParentView();
+
+ // Sets the focus traversable parents.
+ void SetFocusTraversableParent(FocusTraversable* parent);
+ void SetFocusTraversableParentView(View* parent_view);
+
// Retrieves the WidgetGtk associated with |widget|.
static WidgetGtk* GetViewForNative(GtkWidget* widget);