1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
|
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "xfa/fxfa/app/xfa_ffchoicelist.h"
#include <algorithm>
#include <utility>
#include <vector>
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
#include "xfa/fwl/cfwl_app.h"
#include "xfa/fwl/cfwl_combobox.h"
#include "xfa/fwl/cfwl_edit.h"
#include "xfa/fwl/cfwl_eventselectchanged.h"
#include "xfa/fwl/cfwl_listbox.h"
#include "xfa/fwl/cfwl_notedriver.h"
#include "xfa/fwl/cfwl_widgetproperties.h"
#include "xfa/fxfa/app/xfa_fffield.h"
#include "xfa/fxfa/app/xfa_fwladapter.h"
#include "xfa/fxfa/cxfa_eventparam.h"
#include "xfa/fxfa/cxfa_ffdoc.h"
#include "xfa/fxfa/cxfa_ffdocview.h"
#include "xfa/fxfa/cxfa_ffpageview.h"
#include "xfa/fxfa/cxfa_ffwidget.h"
namespace {
CFWL_ListBox* ToListBox(CFWL_Widget* widget) {
return static_cast<CFWL_ListBox*>(widget);
}
CFWL_ComboBox* ToComboBox(CFWL_Widget* widget) {
return static_cast<CFWL_ComboBox*>(widget);
}
} // namespace
CXFA_FFListBox::CXFA_FFListBox(CXFA_WidgetAcc* pDataAcc)
: CXFA_FFField(pDataAcc), m_pOldDelegate(nullptr) {}
CXFA_FFListBox::~CXFA_FFListBox() {
if (!m_pNormalWidget)
return;
CFWL_NoteDriver* pNoteDriver =
m_pNormalWidget->GetOwnerApp()->GetNoteDriver();
pNoteDriver->UnregisterEventTarget(m_pNormalWidget.get());
}
bool CXFA_FFListBox::LoadWidget() {
auto pNew = pdfium::MakeUnique<CFWL_ListBox>(
GetFWLApp(), pdfium::MakeUnique<CFWL_WidgetProperties>(), nullptr);
CFWL_ListBox* pListBox = pNew.get();
pListBox->ModifyStyles(FWL_WGTSTYLE_VScroll | FWL_WGTSTYLE_NoBackground,
0xFFFFFFFF);
m_pNormalWidget = std::move(pNew);
m_pNormalWidget->SetLayoutItem(this);
CFWL_NoteDriver* pNoteDriver =
m_pNormalWidget->GetOwnerApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(m_pNormalWidget.get(),
m_pNormalWidget.get());
m_pOldDelegate = m_pNormalWidget->GetDelegate();
m_pNormalWidget->SetDelegate(this);
m_pNormalWidget->LockUpdate();
for (const auto& label : m_pDataAcc->GetChoiceListItems(false))
pListBox->AddString(label.AsStringC());
uint32_t dwExtendedStyle = FWL_STYLEEXT_LTB_ShowScrollBarFocus;
if (m_pDataAcc->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect)
dwExtendedStyle |= FWL_STYLEEXT_LTB_MultiSelection;
dwExtendedStyle |= GetAlignment();
m_pNormalWidget->ModifyStylesEx(dwExtendedStyle, 0xFFFFFFFF);
for (int32_t selected : m_pDataAcc->GetSelectedItems())
pListBox->SetSelItem(pListBox->GetItem(nullptr, selected), true);
m_pNormalWidget->UnlockUpdate();
return CXFA_FFField::LoadWidget();
}
bool CXFA_FFListBox::OnKillFocus(CXFA_FFWidget* pNewFocus) {
if (!ProcessCommittedData())
UpdateFWLData();
CXFA_FFField::OnKillFocus(pNewFocus);
return true;
}
bool CXFA_FFListBox::CommitData() {
auto* pListBox = ToListBox(m_pNormalWidget.get());
std::vector<int32_t> iSelArray;
int32_t iSels = pListBox->CountSelItems();
for (int32_t i = 0; i < iSels; ++i)
iSelArray.push_back(pListBox->GetSelIndex(i));
m_pDataAcc->SetSelectedItems(iSelArray, true, false, true);
return true;
}
bool CXFA_FFListBox::IsDataChanged() {
std::vector<int32_t> iSelArray = m_pDataAcc->GetSelectedItems();
int32_t iOldSels = pdfium::CollectionSize<int32_t>(iSelArray);
auto* pListBox = ToListBox(m_pNormalWidget.get());
int32_t iSels = pListBox->CountSelItems();
if (iOldSels != iSels)
return true;
for (int32_t i = 0; i < iSels; ++i) {
CFWL_ListItem* hlistItem = pListBox->GetItem(nullptr, iSelArray[i]);
if (!(hlistItem->GetStates() & FWL_ITEMSTATE_LTB_Selected))
return true;
}
return false;
}
uint32_t CXFA_FFListBox::GetAlignment() {
CXFA_Para para = m_pDataAcc->GetPara();
if (!para)
return 0;
uint32_t dwExtendedStyle = 0;
switch (para.GetHorizontalAlign()) {
case XFA_ATTRIBUTEENUM_Center:
dwExtendedStyle |= FWL_STYLEEXT_LTB_CenterAlign;
break;
case XFA_ATTRIBUTEENUM_Justify:
break;
case XFA_ATTRIBUTEENUM_JustifyAll:
break;
case XFA_ATTRIBUTEENUM_Radix:
break;
case XFA_ATTRIBUTEENUM_Right:
dwExtendedStyle |= FWL_STYLEEXT_LTB_RightAlign;
break;
default:
dwExtendedStyle |= FWL_STYLEEXT_LTB_LeftAlign;
break;
}
return dwExtendedStyle;
}
bool CXFA_FFListBox::UpdateFWLData() {
if (!m_pNormalWidget)
return false;
auto* pListBox = ToListBox(m_pNormalWidget.get());
std::vector<int32_t> iSelArray = m_pDataAcc->GetSelectedItems();
std::vector<CFWL_ListItem*> selItemArray(iSelArray.size());
std::transform(iSelArray.begin(), iSelArray.end(), selItemArray.begin(),
[pListBox](int32_t val) { return pListBox->GetSelItem(val); });
pListBox->SetSelItem(pListBox->GetSelItem(-1), false);
for (CFWL_ListItem* pItem : selItemArray)
pListBox->SetSelItem(pItem, true);
m_pNormalWidget->Update();
return true;
}
void CXFA_FFListBox::OnSelectChanged(CFWL_Widget* pWidget) {
CXFA_EventParam eParam;
eParam.m_eType = XFA_EVENT_Change;
eParam.m_pTarget = m_pDataAcc;
m_pDataAcc->GetValue(eParam.m_wsPrevText, XFA_VALUEPICTURE_Raw);
auto* pListBox = ToListBox(m_pNormalWidget.get());
int32_t iSels = pListBox->CountSelItems();
if (iSels > 0) {
CFWL_ListItem* item = pListBox->GetSelItem(0);
eParam.m_wsNewText = item ? item->GetText() : L"";
}
m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam);
}
void CXFA_FFListBox::SetItemState(int32_t nIndex, bool bSelected) {
auto* pListBox = ToListBox(m_pNormalWidget.get());
pListBox->SetSelItem(pListBox->GetSelItem(nIndex), bSelected);
m_pNormalWidget->Update();
AddInvalidateRect();
}
void CXFA_FFListBox::InsertItem(const CFX_WideStringC& wsLabel,
int32_t nIndex) {
CFX_WideString wsTemp(wsLabel);
ToListBox(m_pNormalWidget.get())->AddString(wsTemp.AsStringC());
m_pNormalWidget->Update();
AddInvalidateRect();
}
void CXFA_FFListBox::DeleteItem(int32_t nIndex) {
auto* pListBox = ToListBox(m_pNormalWidget.get());
if (nIndex < 0)
pListBox->DeleteAll();
else
pListBox->DeleteString(pListBox->GetItem(nullptr, nIndex));
pListBox->Update();
AddInvalidateRect();
}
void CXFA_FFListBox::OnProcessMessage(CFWL_Message* pMessage) {
m_pOldDelegate->OnProcessMessage(pMessage);
}
void CXFA_FFListBox::OnProcessEvent(CFWL_Event* pEvent) {
CXFA_FFField::OnProcessEvent(pEvent);
switch (pEvent->GetType()) {
case CFWL_Event::Type::SelectChanged:
OnSelectChanged(m_pNormalWidget.get());
break;
default:
break;
}
m_pOldDelegate->OnProcessEvent(pEvent);
}
void CXFA_FFListBox::OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) {
m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix);
}
CXFA_FFComboBox::CXFA_FFComboBox(CXFA_WidgetAcc* pDataAcc)
: CXFA_FFField(pDataAcc), m_pOldDelegate(nullptr) {}
CXFA_FFComboBox::~CXFA_FFComboBox() {}
CFX_RectF CXFA_FFComboBox::GetBBox(uint32_t dwStatus, bool bDrawFocus) {
return bDrawFocus ? CFX_RectF() : CXFA_FFWidget::GetBBox(dwStatus);
}
bool CXFA_FFComboBox::PtInActiveRect(const CFX_PointF& point) {
auto* pComboBox = ToComboBox(m_pNormalWidget.get());
return pComboBox && pComboBox->GetBBox().Contains(point);
}
bool CXFA_FFComboBox::LoadWidget() {
auto pNew = pdfium::MakeUnique<CFWL_ComboBox>(GetFWLApp());
CFWL_ComboBox* pComboBox = pNew.get();
m_pNormalWidget = std::move(pNew);
m_pNormalWidget->SetLayoutItem(this);
CFWL_NoteDriver* pNoteDriver =
m_pNormalWidget->GetOwnerApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(m_pNormalWidget.get(),
m_pNormalWidget.get());
m_pOldDelegate = m_pNormalWidget->GetDelegate();
m_pNormalWidget->SetDelegate(this);
m_pNormalWidget->LockUpdate();
for (const auto& label : m_pDataAcc->GetChoiceListItems(false))
pComboBox->AddString(label.AsStringC());
std::vector<int32_t> iSelArray = m_pDataAcc->GetSelectedItems();
if (!iSelArray.empty()) {
pComboBox->SetCurSel(iSelArray.front());
} else {
CFX_WideString wsText;
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Raw);
pComboBox->SetEditText(wsText);
}
UpdateWidgetProperty();
m_pNormalWidget->UnlockUpdate();
return CXFA_FFField::LoadWidget();
}
void CXFA_FFComboBox::UpdateWidgetProperty() {
auto* pComboBox = ToComboBox(m_pNormalWidget.get());
if (!pComboBox)
return;
uint32_t dwExtendedStyle = 0;
uint32_t dwEditStyles =
FWL_STYLEEXT_EDT_ReadOnly | FWL_STYLEEXT_EDT_LastLineHeight;
dwExtendedStyle |= UpdateUIProperty();
if (m_pDataAcc->IsChoiceListAllowTextEntry()) {
dwEditStyles &= ~FWL_STYLEEXT_EDT_ReadOnly;
dwExtendedStyle |= FWL_STYLEEXT_CMB_DropDown;
}
if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open ||
!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) {
dwEditStyles |= FWL_STYLEEXT_EDT_ReadOnly;
dwExtendedStyle |= FWL_STYLEEXT_CMB_ReadOnly;
}
dwExtendedStyle |= GetAlignment();
m_pNormalWidget->ModifyStylesEx(dwExtendedStyle, 0xFFFFFFFF);
if (m_pDataAcc->GetHorizontalScrollPolicy() != XFA_ATTRIBUTEENUM_Off)
dwEditStyles |= FWL_STYLEEXT_EDT_AutoHScroll;
pComboBox->EditModifyStylesEx(dwEditStyles, 0xFFFFFFFF);
}
bool CXFA_FFComboBox::OnRButtonUp(uint32_t dwFlags, const CFX_PointF& point) {
if (!CXFA_FFField::OnRButtonUp(dwFlags, point))
return false;
GetDoc()->GetDocEnvironment()->PopupMenu(this, point);
return true;
}
bool CXFA_FFComboBox::OnKillFocus(CXFA_FFWidget* pNewWidget) {
if (!ProcessCommittedData())
UpdateFWLData();
CXFA_FFField::OnKillFocus(pNewWidget);
return true;
}
void CXFA_FFComboBox::OpenDropDownList() {
ToComboBox(m_pNormalWidget.get())->OpenDropDownList(true);
}
bool CXFA_FFComboBox::CommitData() {
return m_pDataAcc->SetValue(m_wsNewValue, XFA_VALUEPICTURE_Raw);
}
bool CXFA_FFComboBox::IsDataChanged() {
auto* pFWLcombobox = ToComboBox(m_pNormalWidget.get());
CFX_WideString wsText = pFWLcombobox->GetEditText();
int32_t iCursel = pFWLcombobox->GetCurSel();
if (iCursel >= 0) {
CFX_WideString wsSel = pFWLcombobox->GetTextByIndex(iCursel);
if (wsSel == wsText)
m_pDataAcc->GetChoiceListItem(wsText, iCursel, true);
}
CFX_WideString wsOldValue;
m_pDataAcc->GetValue(wsOldValue, XFA_VALUEPICTURE_Raw);
if (wsOldValue == wsText)
return false;
m_wsNewValue = wsText;
return true;
}
void CXFA_FFComboBox::FWLEventSelChange(CXFA_EventParam* pParam) {
pParam->m_eType = XFA_EVENT_Change;
pParam->m_pTarget = m_pDataAcc;
pParam->m_wsNewText = ToComboBox(m_pNormalWidget.get())->GetEditText();
m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, pParam);
}
uint32_t CXFA_FFComboBox::GetAlignment() {
CXFA_Para para = m_pDataAcc->GetPara();
if (!para)
return 0;
uint32_t dwExtendedStyle = 0;
switch (para.GetHorizontalAlign()) {
case XFA_ATTRIBUTEENUM_Center:
dwExtendedStyle |=
FWL_STYLEEXT_CMB_EditHCenter | FWL_STYLEEXT_CMB_ListItemCenterAlign;
break;
case XFA_ATTRIBUTEENUM_Justify:
dwExtendedStyle |= FWL_STYLEEXT_CMB_EditJustified;
break;
case XFA_ATTRIBUTEENUM_JustifyAll:
break;
case XFA_ATTRIBUTEENUM_Radix:
break;
case XFA_ATTRIBUTEENUM_Right:
break;
default:
dwExtendedStyle |=
FWL_STYLEEXT_CMB_EditHNear | FWL_STYLEEXT_CMB_ListItemLeftAlign;
break;
}
switch (para.GetVerticalAlign()) {
case XFA_ATTRIBUTEENUM_Middle:
dwExtendedStyle |= FWL_STYLEEXT_CMB_EditVCenter;
break;
case XFA_ATTRIBUTEENUM_Bottom:
dwExtendedStyle |= FWL_STYLEEXT_CMB_EditVFar;
break;
default:
dwExtendedStyle |= FWL_STYLEEXT_CMB_EditVNear;
break;
}
return dwExtendedStyle;
}
bool CXFA_FFComboBox::UpdateFWLData() {
auto* pComboBox = ToComboBox(m_pNormalWidget.get());
if (!pComboBox)
return false;
std::vector<int32_t> iSelArray = m_pDataAcc->GetSelectedItems();
if (!iSelArray.empty()) {
pComboBox->SetCurSel(iSelArray.front());
} else {
CFX_WideString wsText;
pComboBox->SetCurSel(-1);
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Raw);
pComboBox->SetEditText(wsText);
}
pComboBox->Update();
return true;
}
bool CXFA_FFComboBox::CanUndo() {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
ToComboBox(m_pNormalWidget.get())->EditCanUndo();
}
bool CXFA_FFComboBox::CanRedo() {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
ToComboBox(m_pNormalWidget.get())->EditCanRedo();
}
bool CXFA_FFComboBox::Undo() {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
ToComboBox(m_pNormalWidget.get())->EditUndo();
}
bool CXFA_FFComboBox::Redo() {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
ToComboBox(m_pNormalWidget.get())->EditRedo();
}
bool CXFA_FFComboBox::CanCopy() {
return ToComboBox(m_pNormalWidget.get())->EditCanCopy();
}
bool CXFA_FFComboBox::CanCut() {
return m_pDataAcc->GetAccess() == XFA_ATTRIBUTEENUM_Open &&
m_pDataAcc->IsChoiceListAllowTextEntry() &&
ToComboBox(m_pNormalWidget.get())->EditCanCut();
}
bool CXFA_FFComboBox::CanPaste() {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
m_pDataAcc->GetAccess() == XFA_ATTRIBUTEENUM_Open;
}
bool CXFA_FFComboBox::CanSelectAll() {
return ToComboBox(m_pNormalWidget.get())->EditCanSelectAll();
}
bool CXFA_FFComboBox::Copy(CFX_WideString& wsCopy) {
return ToComboBox(m_pNormalWidget.get())->EditCopy(wsCopy);
}
bool CXFA_FFComboBox::Cut(CFX_WideString& wsCut) {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
ToComboBox(m_pNormalWidget.get())->EditCut(wsCut);
}
bool CXFA_FFComboBox::Paste(const CFX_WideString& wsPaste) {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
ToComboBox(m_pNormalWidget.get())->EditPaste(wsPaste);
}
void CXFA_FFComboBox::SelectAll() {
ToComboBox(m_pNormalWidget.get())->EditSelectAll();
}
void CXFA_FFComboBox::Delete() {
ToComboBox(m_pNormalWidget.get())->EditDelete();
}
void CXFA_FFComboBox::DeSelect() {
ToComboBox(m_pNormalWidget.get())->EditDeSelect();
}
void CXFA_FFComboBox::SetItemState(int32_t nIndex, bool bSelected) {
ToComboBox(m_pNormalWidget.get())->SetCurSel(bSelected ? nIndex : -1);
m_pNormalWidget->Update();
AddInvalidateRect();
}
void CXFA_FFComboBox::InsertItem(const CFX_WideStringC& wsLabel,
int32_t nIndex) {
ToComboBox(m_pNormalWidget.get())->AddString(wsLabel);
m_pNormalWidget->Update();
AddInvalidateRect();
}
void CXFA_FFComboBox::DeleteItem(int32_t nIndex) {
if (nIndex < 0)
ToComboBox(m_pNormalWidget.get())->RemoveAll();
else
ToComboBox(m_pNormalWidget.get())->RemoveAt(nIndex);
m_pNormalWidget->Update();
AddInvalidateRect();
}
void CXFA_FFComboBox::OnTextChanged(CFWL_Widget* pWidget,
const CFX_WideString& wsChanged) {
CXFA_EventParam eParam;
m_pDataAcc->GetValue(eParam.m_wsPrevText, XFA_VALUEPICTURE_Raw);
eParam.m_wsChange = wsChanged;
FWLEventSelChange(&eParam);
}
void CXFA_FFComboBox::OnSelectChanged(CFWL_Widget* pWidget, bool bLButtonUp) {
CXFA_EventParam eParam;
m_pDataAcc->GetValue(eParam.m_wsPrevText, XFA_VALUEPICTURE_Raw);
FWLEventSelChange(&eParam);
if (m_pDataAcc->GetChoiceListCommitOn() == XFA_ATTRIBUTEENUM_Select &&
bLButtonUp) {
m_pDocView->SetFocusWidgetAcc(nullptr);
}
}
void CXFA_FFComboBox::OnPreOpen(CFWL_Widget* pWidget) {
CXFA_EventParam eParam;
eParam.m_eType = XFA_EVENT_PreOpen;
eParam.m_pTarget = m_pDataAcc;
m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_PreOpen, &eParam);
}
void CXFA_FFComboBox::OnPostOpen(CFWL_Widget* pWidget) {
CXFA_EventParam eParam;
eParam.m_eType = XFA_EVENT_PostOpen;
eParam.m_pTarget = m_pDataAcc;
m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_PostOpen, &eParam);
}
void CXFA_FFComboBox::OnProcessMessage(CFWL_Message* pMessage) {
m_pOldDelegate->OnProcessMessage(pMessage);
}
void CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) {
CXFA_FFField::OnProcessEvent(pEvent);
switch (pEvent->GetType()) {
case CFWL_Event::Type::SelectChanged: {
auto* postEvent = static_cast<CFWL_EventSelectChanged*>(pEvent);
OnSelectChanged(m_pNormalWidget.get(), postEvent->bLButtonUp);
break;
}
case CFWL_Event::Type::EditChanged: {
CFX_WideString wsChanged;
OnTextChanged(m_pNormalWidget.get(), wsChanged);
break;
}
case CFWL_Event::Type::PreDropDown: {
OnPreOpen(m_pNormalWidget.get());
break;
}
case CFWL_Event::Type::PostDropDown: {
OnPostOpen(m_pNormalWidget.get());
break;
}
default:
break;
}
m_pOldDelegate->OnProcessEvent(pEvent);
}
void CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) {
m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix);
}
|