OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ | 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ |
6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ | 6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlapp.h> | 9 #include <atlapp.h> |
10 #include <atlcrack.h> | 10 #include <atlcrack.h> |
11 #include <atlctrls.h> | 11 #include <atlctrls.h> |
12 #include <atlmisc.h> | 12 #include <atlmisc.h> |
13 #include <tom.h> // For ITextDocument, a COM interface to CRichEditCtrl | 13 #include <tom.h> // For ITextDocument, a COM interface to CRichEditCtrl |
14 #include <vsstyle.h> | 14 #include <vsstyle.h> |
15 | 15 |
16 #include "views/controls/textfield/native_textfield_wrapper.h" | 16 #include "views/controls/textfield/native_textfield_wrapper.h" |
17 | 17 |
18 namespace views { | 18 namespace views { |
19 | 19 |
20 class HWNDView; | 20 class NativeViewHost; |
21 class Textfield; | 21 class Textfield; |
22 | 22 |
23 static const int kDefaultEditStyle = WS_CHILD | WS_VISIBLE; | 23 static const int kDefaultEditStyle = WS_CHILD | WS_VISIBLE; |
24 | 24 |
25 // TODO(beng): make a subclass of NativeControlWin instead. | 25 // TODO(beng): make a subclass of NativeControlWin instead. |
26 class NativeTextfieldWin | 26 class NativeTextfieldWin |
27 : public CWindowImpl<NativeTextfieldWin, CRichEditCtrl, | 27 : public CWindowImpl<NativeTextfieldWin, CRichEditCtrl, |
28 CWinTraits<kDefaultEditStyle> >, | 28 CWinTraits<kDefaultEditStyle> >, |
29 public CRichEditCommands<NativeTextfieldWin>, | 29 public CRichEditCommands<NativeTextfieldWin>, |
30 public NativeTextfieldWrapper, | 30 public NativeTextfieldWrapper, |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 mutable CComQIPtr<ITextDocument> text_object_model_; | 185 mutable CComQIPtr<ITextDocument> text_object_model_; |
186 | 186 |
187 // The position and the length of the ongoing composition string. | 187 // The position and the length of the ongoing composition string. |
188 // These values are used for removing a composition string from a search | 188 // These values are used for removing a composition string from a search |
189 // text to emulate Firefox. | 189 // text to emulate Firefox. |
190 bool ime_discard_composition_; | 190 bool ime_discard_composition_; |
191 int ime_composition_start_; | 191 int ime_composition_start_; |
192 int ime_composition_length_; | 192 int ime_composition_length_; |
193 | 193 |
194 // TODO(beng): remove this when we are a subclass of NativeControlWin. | 194 // TODO(beng): remove this when we are a subclass of NativeControlWin. |
195 HWNDView* container_view_; | 195 NativeViewHost* container_view_; |
196 | 196 |
197 COLORREF bg_color_; | 197 COLORREF bg_color_; |
198 | 198 |
199 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldWin); | 199 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldWin); |
200 }; | 200 }; |
201 | 201 |
202 } // namespace views | 202 } // namespace views |
203 | 203 |
204 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ | 204 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ |
OLD | NEW |