blob: 5c0086ae2175da589792f2a7ced69c4f582a1d93 [file] [log] [blame]
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001// Copyright 2014 PDFium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
Lei Zhanga6d9f0e2015-06-13 00:48:38 -07004
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07005// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "../../include/fxedit/fxet_stub.h"
8#include "../../include/fxedit/fxet_edit.h"
9#include "../../include/fxedit/fxet_list.h"
10
11/* ---------------------- IFX_Edit ---------------------- */
12
Nico Weber9d8ec5a2015-08-04 13:00:21 -070013IFX_Edit* IFX_Edit::NewEdit() {
14 if (IPDF_VariableText* pVT = IPDF_VariableText::NewVariableText()) {
15 return new CFX_Edit(pVT);
16 }
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070017
Nico Weber9d8ec5a2015-08-04 13:00:21 -070018 return NULL;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070019}
20
Nico Weber9d8ec5a2015-08-04 13:00:21 -070021void IFX_Edit::DelEdit(IFX_Edit* pEdit) {
22 ASSERT(pEdit != NULL);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070023
Nico Weber9d8ec5a2015-08-04 13:00:21 -070024 IPDF_VariableText::DelVariableText(pEdit->GetVariableText());
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070025
Nico Weber9d8ec5a2015-08-04 13:00:21 -070026 delete (CFX_Edit*)pEdit;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070027}
28
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070029/* ---------------------- IFX_List ---------------------- */
30
Nico Weber9d8ec5a2015-08-04 13:00:21 -070031IFX_List* IFX_List::NewList() {
32 return new CFX_ListCtrl();
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070033}
34
Nico Weber9d8ec5a2015-08-04 13:00:21 -070035void IFX_List::DelList(IFX_List* pList) {
36 ASSERT(pList != NULL);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070037
Nico Weber9d8ec5a2015-08-04 13:00:21 -070038 delete (CFX_ListCtrl*)pList;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070039}