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 "xfa/fwl/basewidget/fwl_editimp.h" | 7 #include "xfa/fwl/basewidget/fwl_editimp.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 } | 921 } |
922 void CFWL_EditImp::SetScrollOffset(FX_FLOAT fScrollOffset) { | 922 void CFWL_EditImp::SetScrollOffset(FX_FLOAT fScrollOffset) { |
923 m_fScrollOffsetY = fScrollOffset; | 923 m_fScrollOffsetY = fScrollOffset; |
924 } | 924 } |
925 void CFWL_EditImp::DrawTextBk(CFX_Graphics* pGraphics, | 925 void CFWL_EditImp::DrawTextBk(CFX_Graphics* pGraphics, |
926 IFWL_ThemeProvider* pTheme, | 926 IFWL_ThemeProvider* pTheme, |
927 const CFX_Matrix* pMatrix) { | 927 const CFX_Matrix* pMatrix) { |
928 CFWL_ThemeBackground param; | 928 CFWL_ThemeBackground param; |
929 param.m_pWidget = m_pInterface; | 929 param.m_pWidget = m_pInterface; |
930 param.m_iPart = CFWL_Part::Background; | 930 param.m_iPart = CFWL_Part::Background; |
931 param.m_dwData = FWL_PARTDATA_EDT_Background; | 931 param.m_bStaticBackground = false; |
932 param.m_dwStates = m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_ReadOnly | 932 param.m_dwStates = m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_ReadOnly |
933 ? CFWL_PartState_ReadOnly | 933 ? CFWL_PartState_ReadOnly |
934 : CFWL_PartState_Normal; | 934 : CFWL_PartState_Normal; |
935 uint32_t dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled); | 935 uint32_t dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled); |
936 if (dwStates) { | 936 if (dwStates) { |
937 param.m_dwStates = CFWL_PartState_Disabled; | 937 param.m_dwStates = CFWL_PartState_Disabled; |
938 } | 938 } |
939 param.m_pGraphics = pGraphics; | 939 param.m_pGraphics = pGraphics; |
940 param.m_matrix = *pMatrix; | 940 param.m_matrix = *pMatrix; |
941 param.m_rtPart = m_rtClient; | 941 param.m_rtPart = m_rtClient; |
942 pTheme->DrawBackground(¶m); | 942 pTheme->DrawBackground(¶m); |
943 if (!IsShowScrollBar(TRUE) || !IsShowScrollBar(FALSE)) { | 943 if (!IsShowScrollBar(TRUE) || !IsShowScrollBar(FALSE)) { |
944 return; | 944 return; |
945 } | 945 } |
946 CFX_RectF rtScorll; | 946 CFX_RectF rtScorll; |
947 m_pHorzScrollBar->GetWidgetRect(rtScorll); | 947 m_pHorzScrollBar->GetWidgetRect(rtScorll); |
948 CFX_RectF rtStatic; | 948 CFX_RectF rtStatic; |
949 rtStatic.Set(m_rtClient.right() - rtScorll.height, | 949 rtStatic.Set(m_rtClient.right() - rtScorll.height, |
950 m_rtClient.bottom() - rtScorll.height, rtScorll.height, | 950 m_rtClient.bottom() - rtScorll.height, rtScorll.height, |
951 rtScorll.height); | 951 rtScorll.height); |
952 param.m_dwData = FWL_PARTDATA_EDT_StaticBackground; | 952 param.m_bStaticBackground = true; |
| 953 param.m_bMaximize = true; |
953 param.m_rtPart = rtStatic; | 954 param.m_rtPart = rtStatic; |
954 pTheme->DrawBackground(¶m); | 955 pTheme->DrawBackground(¶m); |
955 } | 956 } |
956 void CFWL_EditImp::DrawContent(CFX_Graphics* pGraphics, | 957 void CFWL_EditImp::DrawContent(CFX_Graphics* pGraphics, |
957 IFWL_ThemeProvider* pTheme, | 958 IFWL_ThemeProvider* pTheme, |
958 const CFX_Matrix* pMatrix) { | 959 const CFX_Matrix* pMatrix) { |
959 if (!m_pEdtEngine) | 960 if (!m_pEdtEngine) |
960 return; | 961 return; |
961 IFDE_TxtEdtPage* pPage = m_pEdtEngine->GetPage(0); | 962 IFDE_TxtEdtPage* pPage = m_pEdtEngine->GetPage(0); |
962 if (!pPage) | 963 if (!pPage) |
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2153 } | 2154 } |
2154 CFX_RectF rect; | 2155 CFX_RectF rect; |
2155 m_pOwner->GetWidgetRect(rect); | 2156 m_pOwner->GetWidgetRect(rect); |
2156 CFX_RectF rtInvalidate; | 2157 CFX_RectF rtInvalidate; |
2157 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); | 2158 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); |
2158 m_pOwner->Repaint(&rtInvalidate); | 2159 m_pOwner->Repaint(&rtInvalidate); |
2159 } | 2160 } |
2160 return TRUE; | 2161 return TRUE; |
2161 } | 2162 } |
2162 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} | 2163 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} |
OLD | NEW |