| 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/button/native_button_win.h" | 5 #include "views/controls/button/native_button_win.h" |
| 6 | 6 |
| 7 #include <commctrl.h> | 7 #include <commctrl.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/win_util.h" | 10 #include "base/win_util.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 Button_SetElevationRequiredState(native_view(), | 42 Button_SetElevationRequiredState(native_view(), |
| 43 native_button_->need_elevation()); | 43 native_button_->need_elevation()); |
| 44 } | 44 } |
| 45 | 45 |
| 46 SetWindowText(native_view(), native_button_->label().c_str()); | 46 SetWindowText(native_view(), native_button_->label().c_str()); |
| 47 button_size_valid_ = false; | 47 button_size_valid_ = false; |
| 48 } | 48 } |
| 49 | 49 |
| 50 void NativeButtonWin::UpdateFont() { | 50 void NativeButtonWin::UpdateFont() { |
| 51 SendMessage(native_view(), WM_SETFONT, | 51 SendMessage(native_view(), WM_SETFONT, |
| 52 reinterpret_cast<WPARAM>(native_button_->font().hfont()), | 52 reinterpret_cast<WPARAM>(native_button_->font().GetNativeFont()), |
| 53 FALSE); | 53 FALSE); |
| 54 button_size_valid_ = false; | 54 button_size_valid_ = false; |
| 55 } | 55 } |
| 56 | 56 |
| 57 void NativeButtonWin::UpdateEnabled() { | 57 void NativeButtonWin::UpdateEnabled() { |
| 58 SetEnabled(native_button_->IsEnabled()); | 58 SetEnabled(native_button_->IsEnabled()); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void NativeButtonWin::UpdateDefault() { | 61 void NativeButtonWin::UpdateDefault() { |
| 62 if (!IsCheckbox()) { | 62 if (!IsCheckbox()) { |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 return new NativeCheckboxWin(checkbox); | 255 return new NativeCheckboxWin(checkbox); |
| 256 } | 256 } |
| 257 | 257 |
| 258 // static | 258 // static |
| 259 NativeButtonWrapper* NativeButtonWrapper::CreateRadioButtonWrapper( | 259 NativeButtonWrapper* NativeButtonWrapper::CreateRadioButtonWrapper( |
| 260 RadioButton* radio_button) { | 260 RadioButton* radio_button) { |
| 261 return new NativeRadioButtonWin(radio_button); | 261 return new NativeRadioButtonWin(radio_button); |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace views | 264 } // namespace views |
| OLD | NEW |