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

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

Issue 3083022: Rework gfx::Font by moving platform-specific code into inner classes.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « views/controls/textfield/native_textfield_gtk.cc ('k') | views/controls/textfield/textfield.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) 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
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
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
OLDNEW
« no previous file with comments | « views/controls/textfield/native_textfield_gtk.cc ('k') | views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698