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 "fpdfsdk/include/pdfwindow/PDFWindow.h" | 7 #include "fpdfsdk/include/pdfwindow/PDFWindow.h" |
8 #include "fpdfsdk/include/pdfwindow/PWL_Label.h" | 8 #include "fpdfsdk/include/pdfwindow/PWL_Label.h" |
9 #include "fpdfsdk/include/pdfwindow/PWL_Utils.h" | 9 #include "fpdfsdk/include/pdfwindow/PWL_Utils.h" |
10 #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" | 10 #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 m_pEdit->SetPasswordChar('*'); | 79 m_pEdit->SetPasswordChar('*'); |
80 } | 80 } |
81 | 81 |
82 m_pEdit->SetMultiLine(HasFlag(PES_MULTILINE)); | 82 m_pEdit->SetMultiLine(HasFlag(PES_MULTILINE)); |
83 m_pEdit->SetAutoReturn(HasFlag(PES_AUTORETURN)); | 83 m_pEdit->SetAutoReturn(HasFlag(PES_AUTORETURN)); |
84 m_pEdit->SetAutoFontSize(HasFlag(PWS_AUTOFONTSIZE)); | 84 m_pEdit->SetAutoFontSize(HasFlag(PWS_AUTOFONTSIZE)); |
85 m_pEdit->SetAutoScroll(HasFlag(PES_AUTOSCROLL)); | 85 m_pEdit->SetAutoScroll(HasFlag(PES_AUTOSCROLL)); |
86 } | 86 } |
87 | 87 |
88 void CPWL_Label::DrawThisAppearance(CFX_RenderDevice* pDevice, | 88 void CPWL_Label::DrawThisAppearance(CFX_RenderDevice* pDevice, |
89 CPDF_Matrix* pUser2Device) { | 89 CFX_Matrix* pUser2Device) { |
90 CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device); | 90 CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device); |
91 | 91 |
92 GetClientRect(); | 92 GetClientRect(); |
93 | 93 |
94 CPDF_Rect rcClip; | 94 CPDF_Rect rcClip; |
95 CPVT_WordRange wrRange = m_pEdit->GetVisibleWordRange(); | 95 CPVT_WordRange wrRange = m_pEdit->GetVisibleWordRange(); |
96 CPVT_WordRange* pRange = NULL; | 96 CPVT_WordRange* pRange = NULL; |
97 | 97 |
98 if (!HasFlag(PES_TEXTOVERFLOW)) { | 98 if (!HasFlag(PES_TEXTOVERFLOW)) { |
99 rcClip = GetClientRect(); | 99 rcClip = GetClientRect(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 void CPWL_Label::SetLimitChar(int32_t nLimitChar) { | 145 void CPWL_Label::SetLimitChar(int32_t nLimitChar) { |
146 m_pEdit->SetLimitChar(nLimitChar); | 146 m_pEdit->SetLimitChar(nLimitChar); |
147 } | 147 } |
148 | 148 |
149 int32_t CPWL_Label::GetTotalWords() { | 149 int32_t CPWL_Label::GetTotalWords() { |
150 if (m_pEdit) | 150 if (m_pEdit) |
151 return m_pEdit->GetTotalWords(); | 151 return m_pEdit->GetTotalWords(); |
152 | 152 |
153 return 0; | 153 return 0; |
154 } | 154 } |
OLD | NEW |