OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ |
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ | 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <atlbase.h> | 9 #include <atlbase.h> |
10 #include <atlapp.h> | 10 #include <atlapp.h> |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 explicit NativeTextfieldWin(Textfield* parent); | 50 explicit NativeTextfieldWin(Textfield* parent); |
51 ~NativeTextfieldWin(); | 51 ~NativeTextfieldWin(); |
52 | 52 |
53 // Returns true if the current point is close enough to the origin point in | 53 // Returns true if the current point is close enough to the origin point in |
54 // space and time that it would be considered a double click. | 54 // space and time that it would be considered a double click. |
55 VIEWS_EXPORT static bool IsDoubleClick(const POINT& origin, | 55 VIEWS_EXPORT static bool IsDoubleClick(const POINT& origin, |
56 const POINT& current, | 56 const POINT& current, |
57 DWORD elapsed_time); | 57 DWORD elapsed_time); |
58 | 58 |
59 // Returns true if the virtual key code is a digit coming from the numeric | |
60 // keypad (with or without NumLock on). |extended_key| should be set to the | |
61 // extended key flag specified in the WM_KEYDOWN/UP where the |key_code| | |
62 // originated. | |
63 VIEWS_EXPORT static bool IsNumPadDigit(int key_code, bool extended_key); | |
64 | |
65 // See the code in textfield.cc that calls this for why this is here. | 59 // See the code in textfield.cc that calls this for why this is here. |
66 void AttachHack(); | 60 void AttachHack(); |
67 | 61 |
68 // Overridden from NativeTextfieldWrapper: | 62 // Overridden from NativeTextfieldWrapper: |
69 virtual string16 GetText() const OVERRIDE; | 63 virtual string16 GetText() const OVERRIDE; |
70 virtual void UpdateText() OVERRIDE; | 64 virtual void UpdateText() OVERRIDE; |
71 virtual void AppendText(const string16& text) OVERRIDE; | 65 virtual void AppendText(const string16& text) OVERRIDE; |
72 virtual string16 GetSelectedText() const OVERRIDE; | 66 virtual string16 GetSelectedText() const OVERRIDE; |
73 virtual void SelectAll() OVERRIDE; | 67 virtual void SelectAll() OVERRIDE; |
74 virtual void ClearSelection() OVERRIDE; | 68 virtual void ClearSelection() OVERRIDE; |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 293 |
300 // The accessibility state of this object. | 294 // The accessibility state of this object. |
301 int accessibility_state_; | 295 int accessibility_state_; |
302 | 296 |
303 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldWin); | 297 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldWin); |
304 }; | 298 }; |
305 | 299 |
306 } // namespace views | 300 } // namespace views |
307 | 301 |
308 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ | 302 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ |
OLD | NEW |