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> |
11 | 11 |
| 12 #include "xfa/fde/fde_gedevice.h" |
12 #include "xfa/fde/fde_render.h" | 13 #include "xfa/fde/fde_render.h" |
13 #include "xfa/fde/fde_renderdevice.h" | |
14 #include "xfa/fee/ifde_txtedtpage.h" | 14 #include "xfa/fee/ifde_txtedtpage.h" |
15 #include "xfa/fwl/basewidget/fwl_caretimp.h" | 15 #include "xfa/fwl/basewidget/fwl_caretimp.h" |
16 #include "xfa/fwl/basewidget/fwl_comboboximp.h" | 16 #include "xfa/fwl/basewidget/fwl_comboboximp.h" |
17 #include "xfa/fwl/basewidget/fwl_scrollbarimp.h" | 17 #include "xfa/fwl/basewidget/fwl_scrollbarimp.h" |
18 #include "xfa/fwl/basewidget/ifwl_caret.h" | 18 #include "xfa/fwl/basewidget/ifwl_caret.h" |
19 #include "xfa/fwl/basewidget/ifwl_datetimepicker.h" | 19 #include "xfa/fwl/basewidget/ifwl_datetimepicker.h" |
20 #include "xfa/fwl/core/cfwl_message.h" | 20 #include "xfa/fwl/core/cfwl_message.h" |
21 #include "xfa/fwl/core/cfwl_themebackground.h" | 21 #include "xfa/fwl/core/cfwl_themebackground.h" |
22 #include "xfa/fwl/core/cfwl_themepart.h" | 22 #include "xfa/fwl/core/cfwl_themepart.h" |
23 #include "xfa/fwl/core/fwl_appimp.h" | 23 #include "xfa/fwl/core/fwl_appimp.h" |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 param.m_pGraphics = pGraphics; | 1032 param.m_pGraphics = pGraphics; |
1033 param.m_matrix = *pMatrix; | 1033 param.m_matrix = *pMatrix; |
1034 param.m_pWidget = m_pInterface; | 1034 param.m_pWidget = m_pInterface; |
1035 param.m_iPart = CFWL_Part::Background; | 1035 param.m_iPart = CFWL_Part::Background; |
1036 param.m_pPath = &path; | 1036 param.m_pPath = &path; |
1037 pTheme->DrawBackground(¶m); | 1037 pTheme->DrawBackground(¶m); |
1038 } | 1038 } |
1039 CFX_RenderDevice* pRenderDev = pGraphics->GetRenderDevice(); | 1039 CFX_RenderDevice* pRenderDev = pGraphics->GetRenderDevice(); |
1040 if (!pRenderDev) | 1040 if (!pRenderDev) |
1041 return; | 1041 return; |
1042 IFDE_RenderDevice* pRenderDevice = IFDE_RenderDevice::Create(pRenderDev); | 1042 CFDE_RenderDevice* pRenderDevice = new CFDE_RenderDevice(pRenderDev, FALSE); |
1043 if (!pRenderDevice) | 1043 CFDE_RenderContext* pRenderContext = new CFDE_RenderContext; |
1044 return; | |
1045 IFDE_RenderContext* pRenderContext = IFDE_RenderContext::Create(); | |
1046 if (!pRenderContext) | |
1047 return; | |
1048 pRenderDevice->SetClipRect(rtClip); | 1044 pRenderDevice->SetClipRect(rtClip); |
1049 pRenderContext->StartRender(pRenderDevice, pPage, mt); | 1045 pRenderContext->StartRender(pRenderDevice, pPage, mt); |
1050 pRenderContext->DoRender(NULL); | 1046 pRenderContext->DoRender(NULL); |
1051 pRenderContext->Release(); | 1047 pRenderContext->Release(); |
1052 pRenderDevice->Release(); | 1048 pRenderDevice->Release(); |
1053 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_CombText) { | 1049 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_CombText) { |
1054 pGraphics->RestoreGraphState(); | 1050 pGraphics->RestoreGraphState(); |
1055 CFX_Path path; | 1051 CFX_Path path; |
1056 path.Create(); | 1052 path.Create(); |
1057 int32_t iLimit = m_nLimit > 0 ? m_nLimit : 1; | 1053 int32_t iLimit = m_nLimit > 0 ? m_nLimit : 1; |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2170 } | 2166 } |
2171 CFX_RectF rect; | 2167 CFX_RectF rect; |
2172 m_pOwner->GetWidgetRect(rect); | 2168 m_pOwner->GetWidgetRect(rect); |
2173 CFX_RectF rtInvalidate; | 2169 CFX_RectF rtInvalidate; |
2174 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); | 2170 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); |
2175 m_pOwner->Repaint(&rtInvalidate); | 2171 m_pOwner->Repaint(&rtInvalidate); |
2176 } | 2172 } |
2177 return TRUE; | 2173 return TRUE; |
2178 } | 2174 } |
2179 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} | 2175 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} |
OLD | NEW |