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

Side by Side Diff: views/controls/textfield/native_textfield_win.h

Issue 6386009: Remove app/win/win_util.h,cc etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with NSApp changes in r73581 Created 9 years, 10 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 | « ui/base/x/x11_util.cc ('k') | views/controls/textfield/native_textfield_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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 #pragma once 7 #pragma once
8 8
9 #include <atlbase.h> 9 #include <atlbase.h>
10 #include <atlapp.h> 10 #include <atlapp.h>
(...skipping 25 matching lines...) Expand all
36 CWinTraits<kDefaultEditStyle> >, 36 CWinTraits<kDefaultEditStyle> >,
37 public CRichEditCommands<NativeTextfieldWin>, 37 public CRichEditCommands<NativeTextfieldWin>,
38 public NativeTextfieldWrapper, 38 public NativeTextfieldWrapper,
39 public ui::SimpleMenuModel::Delegate { 39 public ui::SimpleMenuModel::Delegate {
40 public: 40 public:
41 DECLARE_WND_CLASS(L"ViewsTextfieldEdit"); 41 DECLARE_WND_CLASS(L"ViewsTextfieldEdit");
42 42
43 explicit NativeTextfieldWin(Textfield* parent); 43 explicit NativeTextfieldWin(Textfield* parent);
44 ~NativeTextfieldWin(); 44 ~NativeTextfieldWin();
45 45
46 // Returns true if the current point is close enough to the origin point in
47 // space and time that it would be considered a double click.
48 static bool IsDoubleClick(const POINT& origin,
49 const POINT& current,
50 DWORD elapsed_time);
51
52 // Returns true if the virtual key code is a digit coming from the numeric
53 // keypad (with or without NumLock on). |extended_key| should be set to the
54 // extended key flag specified in the WM_KEYDOWN/UP where the |key_code|
55 // originated.
56 static bool IsNumPadDigit(int key_code, bool extended_key);
57
46 // See the code in textfield.cc that calls this for why this is here. 58 // See the code in textfield.cc that calls this for why this is here.
47 void AttachHack(); 59 void AttachHack();
48 60
49 // Overridden from NativeTextfieldWrapper: 61 // Overridden from NativeTextfieldWrapper:
50 virtual string16 GetText() const; 62 virtual string16 GetText() const;
51 virtual void UpdateText(); 63 virtual void UpdateText();
52 virtual void AppendText(const string16& text); 64 virtual void AppendText(const string16& text);
53 virtual string16 GetSelectedText() const; 65 virtual string16 GetSelectedText() const;
54 virtual void SelectAll(); 66 virtual void SelectAll();
55 virtual void ClearSelection(); 67 virtual void ClearSelection();
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 273
262 // The accessibility state of this object. 274 // The accessibility state of this object.
263 int accessibility_state_; 275 int accessibility_state_;
264 276
265 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldWin); 277 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldWin);
266 }; 278 };
267 279
268 } // namespace views 280 } // namespace views
269 281
270 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ 282 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_
OLDNEW
« no previous file with comments | « ui/base/x/x11_util.cc ('k') | views/controls/textfield/native_textfield_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698