OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 #include "views/controls/textfield/native_textfield_win.h" | 5 #include "views/controls/textfield/native_textfield_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/clipboard/clipboard.h" | 9 #include "app/clipboard/clipboard.h" |
10 #include "app/clipboard/scoped_clipboard_writer.h" | 10 #include "app/clipboard/scoped_clipboard_writer.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 CRichEditCtrl::SetBackgroundColor(bg_color_); | 219 CRichEditCtrl::SetBackgroundColor(bg_color_); |
220 } | 220 } |
221 | 221 |
222 void NativeTextfieldWin::UpdateReadOnly() { | 222 void NativeTextfieldWin::UpdateReadOnly() { |
223 SendMessage(m_hWnd, EM_SETREADONLY, textfield_->read_only(), 0); | 223 SendMessage(m_hWnd, EM_SETREADONLY, textfield_->read_only(), 0); |
224 UpdateAccessibleState(STATE_SYSTEM_READONLY, textfield_->read_only()); | 224 UpdateAccessibleState(STATE_SYSTEM_READONLY, textfield_->read_only()); |
225 } | 225 } |
226 | 226 |
227 void NativeTextfieldWin::UpdateFont() { | 227 void NativeTextfieldWin::UpdateFont() { |
228 SendMessage(m_hWnd, WM_SETFONT, | 228 SendMessage(m_hWnd, WM_SETFONT, |
229 reinterpret_cast<WPARAM>(textfield_->font().hfont()), TRUE); | 229 reinterpret_cast<WPARAM>(textfield_->font().GetNativeFont()), |
| 230 TRUE); |
230 // Setting the font blows away any text color we've set, so reset it. | 231 // Setting the font blows away any text color we've set, so reset it. |
231 UpdateTextColor(); | 232 UpdateTextColor(); |
232 } | 233 } |
233 | 234 |
234 void NativeTextfieldWin::UpdateIsPassword() { | 235 void NativeTextfieldWin::UpdateIsPassword() { |
235 // TODO: Need to implement for Windows. | 236 // TODO: Need to implement for Windows. |
236 UpdateAccessibleState(STATE_SYSTEM_PROTECTED, textfield_->IsPassword()); | 237 UpdateAccessibleState(STATE_SYSTEM_PROTECTED, textfield_->IsPassword()); |
237 } | 238 } |
238 | 239 |
239 void NativeTextfieldWin::UpdateEnabled() { | 240 void NativeTextfieldWin::UpdateEnabled() { |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 //////////////////////////////////////////////////////////////////////////////// | 1057 //////////////////////////////////////////////////////////////////////////////// |
1057 // NativeTextfieldWrapper, public: | 1058 // NativeTextfieldWrapper, public: |
1058 | 1059 |
1059 // static | 1060 // static |
1060 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( | 1061 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( |
1061 Textfield* field) { | 1062 Textfield* field) { |
1062 return new NativeTextfieldWin(field); | 1063 return new NativeTextfieldWin(field); |
1063 } | 1064 } |
1064 | 1065 |
1065 } // namespace views | 1066 } // namespace views |
OLD | NEW |