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 "../../../foxitlib.h" | 7 #include "../../../foxitlib.h" |
8 #include "../core/include/fwl_threadimp.h" | 8 #include "../core/include/fwl_threadimp.h" |
9 #include "../core/include/fwl_appimp.h" | 9 #include "../core/include/fwl_appimp.h" |
10 #include "../core/include/fwl_targetimp.h" | 10 #include "../core/include/fwl_targetimp.h" |
11 #include "../core/include/fwl_noteimp.h" | 11 #include "../core/include/fwl_noteimp.h" |
12 #include "../core/include/fwl_widgetimp.h" | 12 #include "../core/include/fwl_widgetimp.h" |
13 #include "../core/include/fwl_widgetmgrimp.h" | 13 #include "../core/include/fwl_widgetmgrimp.h" |
14 #include "include/fwl_scrollbarimp.h" | 14 #include "include/fwl_scrollbarimp.h" |
15 #include "include/fwl_editimp.h" | 15 #include "include/fwl_editimp.h" |
16 #include "include/fwl_caretimp.h" | 16 #include "include/fwl_caretimp.h" |
17 IFWL_Edit* IFWL_Edit::Create() { | 17 IFWL_Edit* IFWL_Edit::Create() { |
18 return new IFWL_Edit; | 18 return new IFWL_Edit; |
19 } | 19 } |
20 IFWL_Edit::IFWL_Edit() { | 20 IFWL_Edit::IFWL_Edit() { |
21 } | 21 } |
22 FWL_ERR IFWL_Edit::Initialize(IFWL_Widget* pOuter) { | |
23 CFWL_EditImp* pEditImpl = new CFWL_EditImp(pOuter); | |
24 SetImpl(pEditImpl); | |
25 pEditImpl->SetInterface(this); | |
26 return pEditImpl->Initialize(); | |
27 } | |
28 FWL_ERR IFWL_Edit::Initialize(const CFWL_WidgetImpProperties& properties, | 22 FWL_ERR IFWL_Edit::Initialize(const CFWL_WidgetImpProperties& properties, |
29 IFWL_Widget* pOuter) { | 23 IFWL_Widget* pOuter) { |
30 CFWL_EditImp* pEditImpl = new CFWL_EditImp(properties, pOuter); | 24 CFWL_EditImp* pEditImpl = new CFWL_EditImp(properties, pOuter); |
31 SetImpl(pEditImpl); | 25 SetImpl(pEditImpl); |
32 pEditImpl->SetInterface(this); | 26 pEditImpl->SetInterface(this); |
33 return pEditImpl->Initialize(); | 27 return pEditImpl->Initialize(); |
34 } | 28 } |
35 FWL_ERR IFWL_Edit::SetText(const CFX_WideString& wsText) { | 29 FWL_ERR IFWL_Edit::SetText(const CFX_WideString& wsText) { |
36 return static_cast<CFWL_EditImp*>(GetImpl())->SetText(wsText); | 30 return static_cast<CFWL_EditImp*>(GetImpl())->SetText(wsText); |
37 } | 31 } |
(...skipping 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2194 IFWL_AdapterNative* pNative = FWL_GetAdapterNative(); | 2188 IFWL_AdapterNative* pNative = FWL_GetAdapterNative(); |
2195 IFWL_AdapterCursorMgr* pCursorMgr = pNative->GetCursorMgr(); | 2189 IFWL_AdapterCursorMgr* pCursorMgr = pNative->GetCursorMgr(); |
2196 if (NULL != pCursorMgr) { | 2190 if (NULL != pCursorMgr) { |
2197 FWL_HCURSOR hCursor = | 2191 FWL_HCURSOR hCursor = |
2198 pCursorMgr->GetSystemCursor(FWL_CURSORTYPE_InputBeam); | 2192 pCursorMgr->GetSystemCursor(FWL_CURSORTYPE_InputBeam); |
2199 pCursorMgr->SetCursor(hCursor); | 2193 pCursorMgr->SetCursor(hCursor); |
2200 pCursorMgr->ShowCursor(TRUE); | 2194 pCursorMgr->ShowCursor(TRUE); |
2201 } | 2195 } |
2202 } | 2196 } |
2203 } | 2197 } |
OLD | NEW |