| OLD | NEW | 
|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 
| 6 | 6 | 
| 7 #include "../../include/pdfwindow/PDFWindow.h" | 7 #include "../../include/pdfwindow/PDFWindow.h" | 
| 8 #include "../../include/pdfwindow/PWL_Wnd.h" | 8 #include "../../include/pdfwindow/PWL_Wnd.h" | 
| 9 #include "../../include/pdfwindow/PWL_Button.h" | 9 #include "../../include/pdfwindow/PWL_Button.h" | 
| 10 #include "../../include/pdfwindow/PWL_SpecialButton.h" | 10 #include "../../include/pdfwindow/PWL_SpecialButton.h" | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 48 void CPWL_CheckBox::SetCheck(FX_BOOL bCheck) | 48 void CPWL_CheckBox::SetCheck(FX_BOOL bCheck) | 
| 49 { | 49 { | 
| 50         m_bChecked = bCheck; | 50         m_bChecked = bCheck; | 
| 51 } | 51 } | 
| 52 | 52 | 
| 53 FX_BOOL CPWL_CheckBox::IsChecked() const | 53 FX_BOOL CPWL_CheckBox::IsChecked() const | 
| 54 { | 54 { | 
| 55         return m_bChecked; | 55         return m_bChecked; | 
| 56 } | 56 } | 
| 57 | 57 | 
| 58 FX_BOOL CPWL_CheckBox::OnLButtonUp(const CPDF_Point & point) | 58 FX_BOOL CPWL_CheckBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag) | 
| 59 { | 59 { | 
| 60         if (IsReadOnly()) return FALSE; | 60         if (IsReadOnly()) return FALSE; | 
| 61 | 61 | 
| 62         SetCheck(!IsChecked()); | 62         SetCheck(!IsChecked()); | 
| 63         return TRUE; | 63         return TRUE; | 
| 64 } | 64 } | 
| 65 | 65 | 
| 66 FX_BOOL CPWL_CheckBox::OnChar(FX_WORD nChar) | 66 FX_BOOL CPWL_CheckBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) | 
| 67 { | 67 { | 
| 68         SetCheck(!IsChecked()); | 68         SetCheck(!IsChecked()); | 
| 69         return TRUE; | 69         return TRUE; | 
| 70 } | 70 } | 
| 71 | 71 | 
| 72 /* --------------------------- CPWL_RadioButton ---------------------------- */ | 72 /* --------------------------- CPWL_RadioButton ---------------------------- */ | 
| 73 | 73 | 
| 74 CPWL_RadioButton::CPWL_RadioButton() : m_bChecked(FALSE) | 74 CPWL_RadioButton::CPWL_RadioButton() : m_bChecked(FALSE) | 
| 75 { | 75 { | 
| 76 } | 76 } | 
| 77 | 77 | 
| 78 CPWL_RadioButton::~CPWL_RadioButton() | 78 CPWL_RadioButton::~CPWL_RadioButton() | 
| 79 { | 79 { | 
| 80 } | 80 } | 
| 81 | 81 | 
| 82 CFX_ByteString CPWL_RadioButton::GetClassName() const | 82 CFX_ByteString CPWL_RadioButton::GetClassName() const | 
| 83 { | 83 { | 
| 84         return "CPWL_RadioButton"; | 84         return "CPWL_RadioButton"; | 
| 85 } | 85 } | 
| 86 | 86 | 
| 87 FX_BOOL»CPWL_RadioButton::OnLButtonUp(const CPDF_Point & point) | 87 FX_BOOL»CPWL_RadioButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag) | 
| 88 { | 88 { | 
| 89         if (IsReadOnly()) return FALSE; | 89         if (IsReadOnly()) return FALSE; | 
| 90 | 90 | 
| 91         SetCheck(TRUE); | 91         SetCheck(TRUE); | 
| 92         return TRUE; | 92         return TRUE; | 
| 93 } | 93 } | 
| 94 | 94 | 
| 95 void CPWL_RadioButton::SetCheck(FX_BOOL bCheck) | 95 void CPWL_RadioButton::SetCheck(FX_BOOL bCheck) | 
| 96 { | 96 { | 
| 97         m_bChecked = bCheck; | 97         m_bChecked = bCheck; | 
| 98 } | 98 } | 
| 99 | 99 | 
| 100 FX_BOOL CPWL_RadioButton::IsChecked() const | 100 FX_BOOL CPWL_RadioButton::IsChecked() const | 
| 101 { | 101 { | 
| 102         return m_bChecked; | 102         return m_bChecked; | 
| 103 } | 103 } | 
| 104 | 104 | 
| 105 FX_BOOL CPWL_RadioButton::OnChar(FX_WORD nChar) | 105 FX_BOOL CPWL_RadioButton::OnChar(FX_WORD nChar, FX_DWORD nFlag) | 
| 106 { | 106 { | 
| 107         SetCheck(TRUE); | 107         SetCheck(TRUE); | 
| 108         return TRUE; | 108         return TRUE; | 
| 109 } | 109 } | 
| 110 | 110 | 
| OLD | NEW | 
|---|