OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WRAPPER_H_ | 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ |
6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ | 6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
11 #include "views/views_api.h" | 11 #include "views/views_export.h" |
12 | 12 |
13 namespace gfx { | 13 namespace gfx { |
14 class Insets; | 14 class Insets; |
15 struct StyleRange; | 15 struct StyleRange; |
16 } // namespace gfx | 16 } // namespace gfx |
17 | 17 |
18 namespace ui { | 18 namespace ui { |
19 class Range; | 19 class Range; |
20 } // namespace ui | 20 } // namespace ui |
21 | 21 |
22 namespace views { | 22 namespace views { |
23 | 23 |
24 class KeyEvent; | 24 class KeyEvent; |
25 class Textfield; | 25 class Textfield; |
26 class TextInputClient; | 26 class TextInputClient; |
27 class View; | 27 class View; |
28 | 28 |
29 // An interface implemented by an object that provides a platform-native | 29 // An interface implemented by an object that provides a platform-native |
30 // text field. | 30 // text field. |
31 class VIEWS_API NativeTextfieldWrapper { | 31 class VIEWS_EXPORT NativeTextfieldWrapper { |
32 public: | 32 public: |
33 // The Textfield calls this when it is destroyed to clean up the wrapper | 33 // The Textfield calls this when it is destroyed to clean up the wrapper |
34 // object. | 34 // object. |
35 virtual ~NativeTextfieldWrapper() {} | 35 virtual ~NativeTextfieldWrapper() {} |
36 | 36 |
37 // Gets the text displayed in the wrapped native text field. | 37 // Gets the text displayed in the wrapped native text field. |
38 virtual string16 GetText() const = 0; | 38 virtual string16 GetText() const = 0; |
39 | 39 |
40 // Updates the text displayed with the text held by the Textfield. | 40 // Updates the text displayed with the text held by the Textfield. |
41 virtual void UpdateText() = 0; | 41 virtual void UpdateText() = 0; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // Clears Edit history. | 137 // Clears Edit history. |
138 virtual void ClearEditHistory() = 0; | 138 virtual void ClearEditHistory() = 0; |
139 | 139 |
140 // Creates an appropriate NativeTextfieldWrapper for the platform. | 140 // Creates an appropriate NativeTextfieldWrapper for the platform. |
141 static NativeTextfieldWrapper* CreateWrapper(Textfield* field); | 141 static NativeTextfieldWrapper* CreateWrapper(Textfield* field); |
142 }; | 142 }; |
143 | 143 |
144 } // namespace views | 144 } // namespace views |
145 | 145 |
146 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ | 146 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ |
OLD | NEW |