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

Side by Side Diff: views/controls/listbox/native_listbox_win.h

Issue 2815034: Win: Add listbox view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
« no previous file with comments | « views/controls/listbox/listbox.cc ('k') | views/controls/listbox/native_listbox_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) 2010 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_LISTBOX_NATIVE_LISTBOX_WIN_H_
6 #define VIEWS_CONTROLS_LISTBOX_NATIVE_LISTBOX_WIN_H_
7
8 #include <windows.h>
9
10 #include "base/string16.h"
11 #include "views/controls/listbox/native_listbox_wrapper.h"
12 #include "views/controls/native_control_win.h"
13
14 namespace views {
15
16 // A View that hosts a native Windows listbox.
17 class NativeListboxWin : public NativeControlWin, public NativeListboxWrapper {
18 public:
19 NativeListboxWin(Listbox* listbox,
20 const std::vector<string16>& strings,
21 Listbox::Listener* listener);
22 virtual ~NativeListboxWin();
23
24 // NativeListboxWrapper implementation:
25 virtual int GetRowCount() const;
26 virtual int SelectedRow() const;
27 virtual void SelectRow(int row);
28 virtual View* GetView();
29
30 // Overridden from View:
31 virtual gfx::Size GetPreferredSize();
32
33 // Overridden from NativeControlWin:
34 virtual bool ProcessMessage(UINT message,
35 WPARAM w_param,
36 LPARAM l_param,
37 LRESULT* result);
38
39 protected:
40 virtual void CreateNativeControl();
41
42 private:
43 // The listbox we are bound to.
44 Listbox* listbox_;
45
46 // The strings shown in the listbox.
47 std::vector<string16> strings_;
48
49 // Listens to selection changes.
50 Listbox::Listener* listener_;
51
52 DISALLOW_COPY_AND_ASSIGN(NativeListboxWin);
53 };
54
55 } // namespace views
56
57 #endif // VIEWS_CONTROLS_LISTBOX_NATIVE_LISTBOX_WIN_H_
OLDNEW
« no previous file with comments | « views/controls/listbox/listbox.cc ('k') | views/controls/listbox/native_listbox_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698