| 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_ScrollBar.h" | 8 #include "fpdfsdk/include/pdfwindow/PWL_ScrollBar.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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 } | 237 } |
| 238 break; | 238 break; |
| 239 default: | 239 default: |
| 240 break; | 240 break; |
| 241 } | 241 } |
| 242 | 242 |
| 243 sAppStream << "Q\n"; | 243 sAppStream << "Q\n"; |
| 244 } | 244 } |
| 245 | 245 |
| 246 void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, | 246 void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, |
| 247 CPDF_Matrix* pUser2Device) { | 247 CFX_Matrix* pUser2Device) { |
| 248 if (!IsVisible()) | 248 if (!IsVisible()) |
| 249 return; | 249 return; |
| 250 | 250 |
| 251 CPDF_Rect rectWnd = GetWindowRect(); | 251 CPDF_Rect rectWnd = GetWindowRect(); |
| 252 if (rectWnd.IsEmpty()) | 252 if (rectWnd.IsEmpty()) |
| 253 return; | 253 return; |
| 254 | 254 |
| 255 CPDF_Point ptCenter = GetCenterPoint(); | 255 CPDF_Point ptCenter = GetCenterPoint(); |
| 256 int32_t nTransparancy = GetTransparency(); | 256 int32_t nTransparancy = GetTransparency(); |
| 257 | 257 |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 << CPWL_Utils::GetColorAppStream(GetBackgroundColor(), TRUE); | 689 << CPWL_Utils::GetColorAppStream(GetBackgroundColor(), TRUE); |
| 690 sButton << rectWnd.left << " " << rectWnd.bottom << " " | 690 sButton << rectWnd.left << " " << rectWnd.bottom << " " |
| 691 << rectWnd.right - rectWnd.left << " " | 691 << rectWnd.right - rectWnd.left << " " |
| 692 << rectWnd.top - rectWnd.bottom << " re b Q\n"; | 692 << rectWnd.top - rectWnd.bottom << " re b Q\n"; |
| 693 | 693 |
| 694 sAppStream << sButton; | 694 sAppStream << sButton; |
| 695 } | 695 } |
| 696 } | 696 } |
| 697 | 697 |
| 698 void CPWL_ScrollBar::DrawThisAppearance(CFX_RenderDevice* pDevice, | 698 void CPWL_ScrollBar::DrawThisAppearance(CFX_RenderDevice* pDevice, |
| 699 CPDF_Matrix* pUser2Device) { | 699 CFX_Matrix* pUser2Device) { |
| 700 CPDF_Rect rectWnd = GetWindowRect(); | 700 CPDF_Rect rectWnd = GetWindowRect(); |
| 701 | 701 |
| 702 if (IsVisible() && !rectWnd.IsEmpty()) { | 702 if (IsVisible() && !rectWnd.IsEmpty()) { |
| 703 CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rectWnd, | 703 CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rectWnd, |
| 704 GetBackgroundColor(), GetTransparency()); | 704 GetBackgroundColor(), GetTransparency()); |
| 705 | 705 |
| 706 CPWL_Utils::DrawStrokeLine( | 706 CPWL_Utils::DrawStrokeLine( |
| 707 pDevice, pUser2Device, | 707 pDevice, pUser2Device, |
| 708 CPDF_Point(rectWnd.left + 2.0f, rectWnd.top - 2.0f), | 708 CPDF_Point(rectWnd.left + 2.0f, rectWnd.top - 2.0f), |
| 709 CPDF_Point(rectWnd.left + 2.0f, rectWnd.bottom + 2.0f), | 709 CPDF_Point(rectWnd.left + 2.0f, rectWnd.bottom + 2.0f), |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 if (m_bMinOrMax) | 1200 if (m_bMinOrMax) |
| 1201 m_sData.SubSmall(); | 1201 m_sData.SubSmall(); |
| 1202 else | 1202 else |
| 1203 m_sData.AddSmall(); | 1203 m_sData.AddSmall(); |
| 1204 | 1204 |
| 1205 if (FXSYS_memcmp(&m_sData, &sTemp, sizeof(PWL_SCROLL_PRIVATEDATA)) != 0) { | 1205 if (FXSYS_memcmp(&m_sData, &sTemp, sizeof(PWL_SCROLL_PRIVATEDATA)) != 0) { |
| 1206 MovePosButton(TRUE); | 1206 MovePosButton(TRUE); |
| 1207 NotifyScrollWindow(); | 1207 NotifyScrollWindow(); |
| 1208 } | 1208 } |
| 1209 } | 1209 } |
| OLD | NEW |