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/pdfwindow/PWL_ScrollBar.h" | 7 #include "fpdfsdk/pdfwindow/PWL_ScrollBar.h" |
8 | 8 |
9 #include "core/fxge/include/fx_ge.h" | 9 #include "core/fxge/include/fx_ge.h" |
10 #include "fpdfsdk/pdfwindow/PWL_Utils.h" | 10 #include "fpdfsdk/pdfwindow/PWL_Utils.h" |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 | 664 |
665 void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { | 665 void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { |
666 CFX_FloatRect rectWnd = GetWindowRect(); | 666 CFX_FloatRect rectWnd = GetWindowRect(); |
667 | 667 |
668 if (IsVisible() && !rectWnd.IsEmpty()) { | 668 if (IsVisible() && !rectWnd.IsEmpty()) { |
669 CFX_ByteTextBuf sButton; | 669 CFX_ByteTextBuf sButton; |
670 | 670 |
671 sButton << "q\n"; | 671 sButton << "q\n"; |
672 sButton << "0 w\n" | 672 sButton << "0 w\n" |
673 << CPWL_Utils::GetColorAppStream(GetBackgroundColor(), TRUE) | 673 << CPWL_Utils::GetColorAppStream(GetBackgroundColor(), TRUE) |
674 .AsByteStringC(); | 674 .AsStringC(); |
675 sButton << rectWnd.left << " " << rectWnd.bottom << " " | 675 sButton << rectWnd.left << " " << rectWnd.bottom << " " |
676 << rectWnd.right - rectWnd.left << " " | 676 << rectWnd.right - rectWnd.left << " " |
677 << rectWnd.top - rectWnd.bottom << " re b Q\n"; | 677 << rectWnd.top - rectWnd.bottom << " re b Q\n"; |
678 | 678 |
679 sAppStream << sButton; | 679 sAppStream << sButton; |
680 } | 680 } |
681 } | 681 } |
682 | 682 |
683 void CPWL_ScrollBar::DrawThisAppearance(CFX_RenderDevice* pDevice, | 683 void CPWL_ScrollBar::DrawThisAppearance(CFX_RenderDevice* pDevice, |
684 CFX_Matrix* pUser2Device) { | 684 CFX_Matrix* pUser2Device) { |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 if (m_bMinOrMax) | 1191 if (m_bMinOrMax) |
1192 m_sData.SubSmall(); | 1192 m_sData.SubSmall(); |
1193 else | 1193 else |
1194 m_sData.AddSmall(); | 1194 m_sData.AddSmall(); |
1195 | 1195 |
1196 if (FXSYS_memcmp(&m_sData, &sTemp, sizeof(PWL_SCROLL_PRIVATEDATA)) != 0) { | 1196 if (FXSYS_memcmp(&m_sData, &sTemp, sizeof(PWL_SCROLL_PRIVATEDATA)) != 0) { |
1197 MovePosButton(TRUE); | 1197 MovePosButton(TRUE); |
1198 NotifyScrollWindow(); | 1198 NotifyScrollWindow(); |
1199 } | 1199 } |
1200 } | 1200 } |
OLD | NEW |