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

Side by Side Diff: ui/views/controls/combobox/native_combobox_gtk.h

Issue 9728002: Removing deprecated GTK-Views code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « no previous file | ui/views/controls/combobox/native_combobox_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_GTK_H_
6 #define UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_GTK_H_
7 #pragma once
8
9 #include "ui/base/gtk/gtk_signal.h"
10 #include "ui/views/controls/combobox/native_combobox_wrapper.h"
11 #include "ui/views/controls/native_control_gtk.h"
12
13 namespace views {
14
15 class NativeComboboxGtk : public NativeControlGtk,
16 public NativeComboboxWrapper {
17 public:
18 explicit NativeComboboxGtk(Combobox* combobox);
19 virtual ~NativeComboboxGtk();
20
21 // Overridden from NativeComboboxWrapper:
22 virtual void UpdateFromModel() OVERRIDE;
23 virtual void UpdateSelectedItem() OVERRIDE;
24 virtual void UpdateEnabled() OVERRIDE;
25 virtual int GetSelectedItem() const OVERRIDE;
26 virtual bool IsDropdownOpen() const OVERRIDE;
27 virtual gfx::Size GetPreferredSize() OVERRIDE;
28 virtual View* GetView() OVERRIDE;
29 virtual void SetFocus() OVERRIDE;
30 virtual bool HandleKeyPressed(const views::KeyEvent& event) OVERRIDE;
31 virtual bool HandleKeyReleased(const views::KeyEvent& event) OVERRIDE;
32 virtual void HandleFocus() OVERRIDE;
33 virtual void HandleBlur() OVERRIDE;
34 virtual gfx::NativeView GetTestingHandle() const OVERRIDE;
35
36 protected:
37 // Overridden from NativeControlGtk:
38 virtual void CreateNativeControl() OVERRIDE;
39
40 private:
41 void SelectionChanged();
42 void FocusedMenuItemChanged();
43
44 CHROMEGTK_CALLBACK_0(NativeComboboxGtk, void, CallChanged);
45 CHROMEGTK_CALLBACK_0(NativeComboboxGtk, gboolean, CallPopUp);
46 CHROMEGTK_CALLBACK_1(NativeComboboxGtk, void, CallMenuMoveCurrent,
47 GtkMenuDirectionType);
48
49 // The combobox we are bound to.
50 Combobox* combobox_;
51
52 // The combo box's pop-up menu.
53 GtkMenu* menu_;
54
55 // The preferred size from the last size_request.
56 gfx::Size preferred_size_;
57
58 DISALLOW_COPY_AND_ASSIGN(NativeComboboxGtk);
59 };
60
61 } // namespace views
62
63 #endif // UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/combobox/native_combobox_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698