Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfwl_combobox.cpp
Go to the documentation of this file.
1// Copyright 2014 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "xfa/fwl/cfwl_combobox.h"
8
9#include "v8/include/cppgc/visitor.h"
10#include "xfa/fde/cfde_texteditengine.h"
11#include "xfa/fde/cfde_textout.h"
12#include "xfa/fwl/cfwl_app.h"
13#include "xfa/fwl/cfwl_event.h"
14#include "xfa/fwl/cfwl_eventselectchanged.h"
15#include "xfa/fwl/cfwl_listbox.h"
16#include "xfa/fwl/cfwl_messagekey.h"
17#include "xfa/fwl/cfwl_messagekillfocus.h"
18#include "xfa/fwl/cfwl_messagemouse.h"
19#include "xfa/fwl/cfwl_messagesetfocus.h"
20#include "xfa/fwl/cfwl_notedriver.h"
21#include "xfa/fwl/cfwl_themebackground.h"
22#include "xfa/fwl/cfwl_themepart.h"
23#include "xfa/fwl/cfwl_themetext.h"
24#include "xfa/fwl/cfwl_widgetmgr.h"
25#include "xfa/fwl/fwl_widgetdef.h"
26#include "xfa/fwl/ifwl_themeprovider.h"
27
28namespace pdfium {
29
30CFWL_ComboBox::CFWL_ComboBox(CFWL_App* app)
31 : CFWL_Widget(app, Properties(), nullptr),
32 m_pEdit(cppgc::MakeGarbageCollected<CFWL_ComboEdit>(
33 app->GetHeap()->GetAllocationHandle(),
34 app,
35 Properties(),
36 this)),
37 m_pListBox(cppgc::MakeGarbageCollected<CFWL_ComboList>(
38 app->GetHeap()->GetAllocationHandle(),
39 app,
42 this)) {}
43
44CFWL_ComboBox::~CFWL_ComboBox() = default;
45
46void CFWL_ComboBox::Trace(cppgc::Visitor* visitor) const {
47 CFWL_Widget::Trace(visitor);
48 visitor->Trace(m_pEdit);
49 visitor->Trace(m_pListBox);
50}
51
52FWL_Type CFWL_ComboBox::GetClassID() const {
53 return FWL_Type::ComboBox;
54}
55
56void CFWL_ComboBox::AddString(const WideString& wsText) {
57 m_pListBox->AddString(wsText);
58}
59
60void CFWL_ComboBox::RemoveAt(int32_t iIndex) {
61 m_pListBox->RemoveAt(iIndex);
62}
63
64void CFWL_ComboBox::RemoveAll() {
65 m_pListBox->DeleteAll();
66}
67
68void CFWL_ComboBox::ModifyStyleExts(uint32_t dwStyleExtsAdded,
69 uint32_t dwStyleExtsRemoved) {
70 bool bAddDropDown = !!(dwStyleExtsAdded & FWL_STYLEEXT_CMB_DropDown);
71 bool bDelDropDown = !!(dwStyleExtsRemoved & FWL_STYLEEXT_CMB_DropDown);
72 dwStyleExtsRemoved &= ~FWL_STYLEEXT_CMB_DropDown;
74 if (bAddDropDown)
75 m_pEdit->ModifyStyleExts(0, FWL_STYLEEXT_EDT_ReadOnly);
76 else if (bDelDropDown)
77 m_pEdit->ModifyStyleExts(FWL_STYLEEXT_EDT_ReadOnly, 0);
78
79 CFWL_Widget::ModifyStyleExts(dwStyleExtsAdded, dwStyleExtsRemoved);
80}
81
82void CFWL_ComboBox::Update() {
83 if (IsLocked())
84 return;
85
86 if (m_pEdit)
87 ResetEditAlignment();
88 Layout();
89}
90
91FWL_WidgetHit CFWL_ComboBox::HitTest(const CFX_PointF& point) {
92 CFX_RectF rect(0, 0, m_WidgetRect.width - m_BtnRect.width,
94 if (rect.Contains(point))
96 if (m_BtnRect.Contains(point))
98 if (IsDropListVisible()) {
99 rect = m_pListBox->GetWidgetRect();
100 if (rect.Contains(point))
102 }
104}
105
106void CFWL_ComboBox::DrawWidget(CFGAS_GEGraphics* pGraphics,
107 const CFX_Matrix& matrix) {
108 if (!m_BtnRect.IsEmpty(0.1f)) {
109 CFGAS_GEGraphics::StateRestorer restorer(pGraphics);
110 pGraphics->ConcatMatrix(matrix);
111 CFWL_ThemeBackground param(CFWL_ThemePart::Part::kDropDownButton, this,
112 pGraphics);
113 param.m_dwStates = m_iBtnState;
114 param.m_PartRect = m_BtnRect;
115 GetThemeProvider()->DrawBackground(param);
116 }
117 if (m_pEdit) {
118 CFX_RectF rtEdit = m_pEdit->GetWidgetRect();
119 CFX_Matrix mt(1, 0, 0, 1, rtEdit.left, rtEdit.top);
120 mt.Concat(matrix);
121 m_pEdit->DrawWidget(pGraphics, mt);
122 }
123 if (m_pListBox && IsDropListVisible()) {
124 CFX_RectF rtList = m_pListBox->GetWidgetRect();
125 CFX_Matrix mt(1, 0, 0, 1, rtList.left, rtList.top);
126 mt.Concat(matrix);
127 m_pListBox->DrawWidget(pGraphics, mt);
128 }
129}
130
131WideString CFWL_ComboBox::GetTextByIndex(int32_t iIndex) const {
132 CFWL_ListBox::Item* pItem = m_pListBox->GetItem(m_pListBox, iIndex);
133 return pItem ? pItem->GetText() : WideString();
134}
135
136void CFWL_ComboBox::SetCurSel(int32_t iSel) {
137 int32_t iCount = m_pListBox->CountItems(nullptr);
138 bool bClearSel = iSel < 0 || iSel >= iCount;
139 if (IsDropDownStyle() && m_pEdit) {
140 if (bClearSel) {
141 m_pEdit->SetText(WideString());
142 } else {
143 CFWL_ListBox::Item* hItem = m_pListBox->GetItem(this, iSel);
144 m_pEdit->SetText(hItem ? hItem->GetText() : WideString());
145 }
146 m_pEdit->Update();
147 }
148 m_iCurSel = bClearSel ? -1 : iSel;
149}
150
151void CFWL_ComboBox::SetStates(uint32_t dwStates) {
152 if (IsDropDownStyle() && m_pEdit)
153 m_pEdit->SetStates(dwStates);
154 if (m_pListBox)
155 m_pListBox->SetStates(dwStates);
156 CFWL_Widget::SetStates(dwStates);
157}
158
159void CFWL_ComboBox::RemoveStates(uint32_t dwStates) {
160 if (IsDropDownStyle() && m_pEdit)
161 m_pEdit->RemoveStates(dwStates);
162 if (m_pListBox)
163 m_pListBox->RemoveStates(dwStates);
165}
166
167void CFWL_ComboBox::SetEditText(const WideString& wsText) {
168 if (!m_pEdit)
169 return;
170
171 m_pEdit->SetText(wsText);
172 m_pEdit->Update();
173}
174
175WideString CFWL_ComboBox::GetEditText() const {
176 if (m_pEdit)
177 return m_pEdit->GetText();
178 if (!m_pListBox)
179 return WideString();
180
181 CFWL_ListBox::Item* hItem = m_pListBox->GetItem(this, m_iCurSel);
182 return hItem ? hItem->GetText() : WideString();
183}
184
185CFX_RectF CFWL_ComboBox::GetBBox() const {
186 CFX_RectF rect = m_WidgetRect;
187 if (!m_pListBox || !IsDropListVisible())
188 return rect;
189
190 CFX_RectF rtList = m_pListBox->GetWidgetRect();
191 rtList.Offset(rect.left, rect.top);
192 rect.Union(rtList);
193 return rect;
194}
195
196void CFWL_ComboBox::EditModifyStyleExts(uint32_t dwStyleExtsAdded,
197 uint32_t dwStyleExtsRemoved) {
198 if (m_pEdit)
199 m_pEdit->ModifyStyleExts(dwStyleExtsAdded, dwStyleExtsRemoved);
200}
201
202void CFWL_ComboBox::ShowDropDownList() {
203 if (IsDropListVisible())
204 return;
205
207 DispatchEvent(&preEvent);
208 if (!preEvent.GetSrcTarget())
209 return;
210
211 CFWL_ComboList* pComboList = m_pListBox;
212 int32_t iItems = pComboList->CountItems(nullptr);
213 if (iItems < 1)
214 return;
215
216 ResetListItemAlignment();
217 pComboList->ChangeSelected(m_iCurSel);
218
219 float fItemHeight = pComboList->CalcItemHeight();
220 float fBorder = GetCXBorderSize();
221 float fPopupMin = 0.0f;
222 if (iItems > 3)
223 fPopupMin = fItemHeight * 3 + fBorder * 2;
224
225 float fPopupMax = fItemHeight * iItems + fBorder * 2;
226 CFX_RectF rtList(m_ClientRect.left, 0, m_WidgetRect.width, 0);
227 GetPopupPos(fPopupMin, fPopupMax, m_WidgetRect, &rtList);
228 m_pListBox->SetWidgetRect(rtList);
229 m_pListBox->Update();
230 m_pListBox->RemoveStates(FWL_STATE_WGT_Invisible);
231
233 DispatchEvent(&postEvent);
234 RepaintInflatedListBoxRect();
235}
236
237void CFWL_ComboBox::HideDropDownList() {
238 if (!IsDropListVisible())
239 return;
240
241 m_pListBox->SetStates(FWL_STATE_WGT_Invisible);
242 RepaintInflatedListBoxRect();
243}
244
245void CFWL_ComboBox::RepaintInflatedListBoxRect() {
246 CFX_RectF rect = m_pListBox->GetWidgetRect();
247 rect.Inflate(2, 2);
248 RepaintRect(rect);
249}
250
251void CFWL_ComboBox::MatchEditText() {
252 WideString wsText = m_pEdit->GetText();
253 int32_t iMatch = m_pListBox->MatchItem(wsText.AsStringView());
254 if (iMatch != m_iCurSel) {
255 m_pListBox->ChangeSelected(iMatch);
256 if (iMatch >= 0)
257 SyncEditText(iMatch);
258 } else if (iMatch >= 0) {
259 m_pEdit->SetSelected();
260 }
261 m_iCurSel = iMatch;
262}
263
264void CFWL_ComboBox::SyncEditText(int32_t iListItem) {
265 CFWL_ListBox::Item* hItem = m_pListBox->GetItem(this, iListItem);
266 m_pEdit->SetText(hItem ? hItem->GetText() : WideString());
267 m_pEdit->Update();
268 m_pEdit->SetSelected();
269}
270
271void CFWL_ComboBox::Layout() {
272 m_ClientRect = GetClientRect();
273 m_ContentRect = m_ClientRect;
274
276 float borderWidth = 1;
277 float fBtn = theme->GetScrollBarWidth();
279 m_BtnRect =
280 CFX_RectF(m_ClientRect.right() - fBtn, m_ClientRect.top + borderWidth,
281 fBtn - borderWidth, m_ClientRect.height - 2 * borderWidth);
282 }
283
285 CFX_RectF pUIMargin = theme->GetUIMargin(part);
286 m_ContentRect.Deflate(pUIMargin.left, pUIMargin.top, pUIMargin.width,
287 pUIMargin.height);
288
289 if (!IsDropDownStyle() || !m_pEdit)
290 return;
291
292 CFX_RectF rtEdit(m_ContentRect.left, m_ContentRect.top,
293 m_ContentRect.width - fBtn, m_ContentRect.height);
294 m_pEdit->SetWidgetRect(rtEdit);
295
296 if (m_iCurSel >= 0) {
297 CFWL_ListBox::Item* hItem = m_pListBox->GetItem(this, m_iCurSel);
298 ScopedUpdateLock update_lock(m_pEdit);
299 m_pEdit->SetText(hItem ? hItem->GetText() : WideString());
300 }
301 m_pEdit->Update();
302}
303
304void CFWL_ComboBox::ResetEditAlignment() {
305 if (!m_pEdit)
306 return;
307
308 uint32_t dwAdd = 0;
312 break;
313 }
314 default: {
315 dwAdd |= FWL_STYLEEXT_EDT_HNear;
316 break;
317 }
318 }
322 break;
323 }
325 dwAdd |= FWL_STYLEEXT_EDT_VFar;
326 break;
327 }
328 default: {
329 dwAdd |= FWL_STYLEEXT_EDT_VNear;
330 break;
331 }
332 }
335
336 m_pEdit->ModifyStyleExts(dwAdd, FWL_STYLEEXT_EDT_HAlignMask |
339}
340
341void CFWL_ComboBox::ResetListItemAlignment() {
342 if (!m_pListBox)
343 return;
344
345 uint32_t dwAdd = 0;
349 break;
350 }
351 default: {
353 break;
354 }
355 }
356 m_pListBox->ModifyStyleExts(dwAdd, FWL_STYLEEXT_CMB_ListItemAlignMask);
357}
358
359void CFWL_ComboBox::ProcessSelChanged(bool bLButtonUp) {
360 m_iCurSel = m_pListBox->GetItemIndex(this, m_pListBox->GetSelItem(0));
361 if (!IsDropDownStyle()) {
362 RepaintRect(m_ClientRect);
363 return;
364 }
365 CFWL_ListBox::Item* hItem = m_pListBox->GetItem(this, m_iCurSel);
366 if (!hItem)
367 return;
368
369 if (m_pEdit) {
370 m_pEdit->SetText(hItem->GetText());
371 m_pEdit->Update();
372 m_pEdit->SetSelected();
373 }
374 CFWL_EventSelectChanged ev(this, bLButtonUp);
375 DispatchEvent(&ev);
376}
377
378void CFWL_ComboBox::OnProcessMessage(CFWL_Message* pMessage) {
379 bool backDefault = true;
380 switch (pMessage->GetType()) {
382 backDefault = false;
383 OnFocusGained();
384 break;
385 }
387 backDefault = false;
388 OnFocusLost();
389 break;
390 }
392 backDefault = false;
393 CFWL_MessageMouse* pMsg = static_cast<CFWL_MessageMouse*>(pMessage);
394 switch (pMsg->m_dwCmd) {
395 case CFWL_MessageMouse::MouseCommand::kLeftButtonDown:
396 OnLButtonDown(pMsg);
397 break;
398 case CFWL_MessageMouse::MouseCommand::kLeftButtonUp:
399 OnLButtonUp(pMsg);
400 break;
401 default:
402 break;
403 }
404 break;
405 }
407 backDefault = false;
408 CFWL_MessageKey* pKey = static_cast<CFWL_MessageKey*>(pMessage);
409 if (IsDropListVisible() &&
410 pKey->m_dwCmd == CFWL_MessageKey::KeyCommand::kKeyDown) {
411 bool bListKey = pKey->m_dwKeyCodeOrChar == XFA_FWL_VKEY_Up ||
415 if (bListKey) {
416 m_pListBox->GetDelegate()->OnProcessMessage(pMessage);
417 break;
418 }
419 }
420 OnKey(pKey);
421 break;
422 }
423 default:
424 break;
425 }
426 // Dst target could be |this|, continue only if not destroyed by above.
427 if (backDefault && pMessage->GetDstTarget())
429}
430
431void CFWL_ComboBox::OnProcessEvent(CFWL_Event* pEvent) {
432 CFWL_Event::Type type = pEvent->GetType();
433 if (type == CFWL_Event::Type::Scroll) {
434 CFWL_EventScroll* pScrollEvent = static_cast<CFWL_EventScroll*>(pEvent);
435 CFWL_EventScroll pScrollEv(this, pScrollEvent->GetScrollCode(),
436 pScrollEvent->GetPos());
437 DispatchEvent(&pScrollEv);
438 } else if (type == CFWL_Event::Type::TextWillChange) {
440 DispatchEvent(&pTemp);
441 }
442}
443
444void CFWL_ComboBox::OnDrawWidget(CFGAS_GEGraphics* pGraphics,
445 const CFX_Matrix& matrix) {
446 DrawWidget(pGraphics, matrix);
447}
448
449void CFWL_ComboBox::OnLButtonUp(CFWL_MessageMouse* pMsg) {
450 if (m_BtnRect.Contains(pMsg->m_pos))
451 m_iBtnState = CFWL_PartState::kHovered;
452 else
453 m_iBtnState = CFWL_PartState::kNormal;
454
455 RepaintRect(m_BtnRect);
456}
457
458void CFWL_ComboBox::OnLButtonDown(CFWL_MessageMouse* pMsg) {
459 if (IsDropListVisible()) {
460 if (m_BtnRect.Contains(pMsg->m_pos))
462 return;
463 }
464 if (!m_ClientRect.Contains(pMsg->m_pos))
465 return;
466
467 if (m_pEdit)
468 MatchEditText();
470}
471
472void CFWL_ComboBox::OnFocusGained() {
474 if ((m_pEdit->GetStates() & FWL_STATE_WGT_Focused) == 0) {
475 CFWL_MessageSetFocus msg(m_pEdit);
476 m_pEdit->GetDelegate()->OnProcessMessage(&msg);
477 }
478}
479
480void CFWL_ComboBox::OnFocusLost() {
483 CFWL_MessageKillFocus msg(nullptr);
484 m_pEdit->GetDelegate()->OnProcessMessage(&msg);
485}
486
487void CFWL_ComboBox::OnKey(CFWL_MessageKey* pMsg) {
488 uint32_t dwKeyCode = pMsg->m_dwKeyCodeOrChar;
489 const bool bUp = dwKeyCode == XFA_FWL_VKEY_Up;
490 const bool bDown = dwKeyCode == XFA_FWL_VKEY_Down;
491 if (bUp || bDown) {
492 CFWL_ComboList* pComboList = m_pListBox;
493 int32_t iCount = pComboList->CountItems(nullptr);
494 if (iCount < 1)
495 return;
496
497 bool bMatchEqual = false;
498 int32_t iCurSel = m_iCurSel;
499 if (m_pEdit) {
500 WideString wsText = m_pEdit->GetText();
501 iCurSel = pComboList->MatchItem(wsText.AsStringView());
502 if (iCurSel >= 0) {
503 CFWL_ListBox::Item* item = m_pListBox->GetSelItem(iCurSel);
504 bMatchEqual = wsText == (item ? item->GetText() : WideString());
505 }
506 }
507 if (iCurSel < 0) {
508 iCurSel = 0;
509 } else if (bMatchEqual) {
510 if ((bUp && iCurSel == 0) || (bDown && iCurSel == iCount - 1))
511 return;
512 if (bUp)
513 iCurSel--;
514 else
515 iCurSel++;
516 }
517 m_iCurSel = iCurSel;
518 SyncEditText(m_iCurSel);
519 return;
520 }
521 if (m_pEdit)
522 m_pEdit->GetDelegate()->OnProcessMessage(pMsg);
523}
524
525void CFWL_ComboBox::GetPopupPos(float fMinHeight,
526 float fMaxHeight,
527 const CFX_RectF& rtAnchor,
528 CFX_RectF* pPopupRect) {
529 GetWidgetMgr()->GetAdapterPopupPos(this, fMinHeight, fMaxHeight, rtAnchor,
530 pPopupRect);
531}
532
533} // namespace pdfium
#define FWL_STYLEEXT_CMB_ListItemAlignMask
#define FWL_STYLEEXT_CMB_EditHAlignMask
#define FWL_STYLEEXT_CMB_EditVCenter
#define FWL_STYLEEXT_CMB_EditVFar
#define FWL_STYLEEXT_CMB_DropDown
#define FWL_STYLEEXT_CMB_ListItemCenterAlign
#define FWL_STYLEEXT_CMB_EditHCenter
#define FWL_STYLEEXT_CMB_EditVAlignMask
#define FWL_STYLEEXT_CMB_ReadOnly
#define FWL_STYLEEXT_CMB_EditJustified
#define FWL_STYLEEXT_EDT_VAlignMask
Definition cfwl_edit.h:40
#define FWL_STYLEEXT_EDT_HAlignModeMask
Definition cfwl_edit.h:41
#define FWL_STYLEEXT_EDT_HAlignMask
Definition cfwl_edit.h:39
#define FWL_STYLEEXT_EDT_VNear
Definition cfwl_edit.h:35
#define FWL_STYLEEXT_EDT_VCenter
Definition cfwl_edit.h:36
#define FWL_STYLEEXT_EDT_ReadOnly
Definition cfwl_edit.h:23
#define FWL_STYLEEXT_EDT_VFar
Definition cfwl_edit.h:37
#define FWL_STYLEEXT_EDT_HNear
Definition cfwl_edit.h:32
#define FWL_STYLEEXT_EDT_Justified
Definition cfwl_edit.h:38
#define FWL_STYLEEXT_EDT_HCenter
Definition cfwl_edit.h:33
#define FWL_STYLEEXT_LTB_CenterAlign
#define FWL_STYLEEXT_LTB_LeftAlign
#define FWL_STATE_WGT_Invisible
Definition cfwl_widget.h:45
#define FWL_STYLE_WGT_VScroll
Definition cfwl_widget.h:39
#define FWL_STATE_WGT_Focused
Definition cfwl_widget.h:44
#define FWL_STYLE_WGT_Border
Definition cfwl_widget.h:38
StateRestorer(CFGAS_GEGraphics *graphics)
void ConcatMatrix(const CFX_Matrix &matrix)
constexpr CFX_Matrix(float a1, float b1, float c1, float d1, float e1, float f1)
void Concat(const CFX_Matrix &right)
void Offset(float dx, float dy)
bool IsEmpty(float fEpsilon) const
void Deflate(float off_left, float off_top, float off_right, float off_bottom)
void Inflate(float x, float y)
CFX_RectF & operator=(const CFX_RectF &other)=default
bool Contains(const PointType &p) const
float right() const
constexpr CFX_RectF(float dst_left, float dst_top, float dst_width, float dst_height)
void Union(const CFX_RectF &rt)
bool operator==(const WideString &other) const
WideString()=default
void ProcessSelChanged(bool bLButtonUp)
void Trace(cppgc::Visitor *visitor) const override
void SetCurSel(int32_t iSel)
void SetEditText(const WideString &wsText)
void SetStates(uint32_t dwStates) override
void OnProcessEvent(CFWL_Event *pEvent) override
void RemoveAt(int32_t iIndex)
void ModifyStyleExts(uint32_t dwStyleExtsAdded, uint32_t dwStyleExtsRemoved) override
WideString GetTextByIndex(int32_t iIndex) const
CFX_RectF GetBBox() const
void Update() override
~CFWL_ComboBox() override
FWL_Type GetClassID() const override
void AddString(const WideString &wsText)
WideString GetEditText() const
void RemoveStates(uint32_t dwStates) override
void EditModifyStyleExts(uint32_t dwStyleExtsAdded, uint32_t dwStyleExtsRemoved)
void DrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void OnProcessMessage(CFWL_Message *pMessage) override
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
FWL_WidgetHit HitTest(const CFX_PointF &point) override
int32_t MatchItem(WideStringView wsMatch)
void ChangeSelected(int32_t iSel)
Type GetType() const
Definition cfwl_event.h:41
CFWL_Widget * GetSrcTarget() const
Definition cfwl_event.h:42
WideString GetText() const
int32_t CountItems(const CFWL_Widget *pWidget) const
const uint32_t m_dwKeyCodeOrChar
const KeyCommand m_dwCmd
CFWL_MessageKillFocus(CFWL_Widget *pDstTarget)
Type GetType() const
CFWL_Widget * GetDstTarget() const
void OnProcessMessage(CFWL_Message *pMessage) override
void RepaintRect(const CFX_RectF &pRect)
virtual void RemoveStates(uint32_t dwStates)
void DispatchEvent(CFWL_Event *pEvent)
CFWL_Widget(CFWL_App *app, const Properties &properties, CFWL_Widget *pOuter)
float GetCXBorderSize() const
virtual void ModifyStyleExts(uint32_t dwStyleExtsAdded, uint32_t dwStyleExtsRemoved)
virtual CFX_RectF GetClientRect()
uint32_t GetStyleExts() const
IFWL_ThemeProvider * GetThemeProvider() const
bool IsLocked() const
CFWL_WidgetMgr * GetWidgetMgr() const
Properties m_Properties
virtual void SetStates(uint32_t dwStates)
virtual float GetScrollBarWidth() const =0
virtual CFX_RectF GetUIMargin(const CFWL_ThemePart &pThemePart) const =0
CFX_PTemplate< float > CFX_PointF
@ XFA_FWL_VKEY_Up
@ XFA_FWL_VKEY_Return
@ XFA_FWL_VKEY_Escape
@ XFA_FWL_VKEY_Down
fxcrt::WideString WideString
Definition widestring.h:207