7#ifndef XFA_FWL_CFWL_COMBOBOX_H_
8#define XFA_FWL_CFWL_COMBOBOX_H_
10#include "xfa/fgas/graphics/cfgas_gegraphics.h"
11#include "xfa/fwl/cfwl_comboedit.h"
12#include "xfa/fwl/cfwl_combolist.h"
13#include "xfa/fwl/cfwl_listbox.h"
14#include "xfa/fwl/cfwl_widget.h"
18#define FWL_STYLEEXT_CMB_DropDown (1L
<< 0
)
19#define FWL_STYLEEXT_CMB_Sort (1L
<< 1
)
20#define FWL_STYLEEXT_CMB_OwnerDraw (1L
<< 3
)
21#define FWL_STYLEEXT_CMB_EditHNear 0
22#define FWL_STYLEEXT_CMB_EditHCenter (1L
<< 4
)
23#define FWL_STYLEEXT_CMB_EditVNear 0
24#define FWL_STYLEEXT_CMB_EditVCenter (1L
<< 6
)
25#define FWL_STYLEEXT_CMB_EditVFar (2L
<< 6
)
26#define FWL_STYLEEXT_CMB_EditJustified (1L
<< 8
)
27#define FWL_STYLEEXT_CMB_EditHAlignMask (3L
<< 4
)
28#define FWL_STYLEEXT_CMB_EditVAlignMask (3L
<< 6
)
29#define FWL_STYLEEXT_CMB_ListItemLeftAlign 0
30#define FWL_STYLEEXT_CMB_ListItemCenterAlign (1L
<< 10
)
31#define FWL_STYLEEXT_CMB_ListItemAlignMask (3L
<< 10
)
32#define FWL_STYLEEXT_CMB_ReadOnly (1L
<< 13
)
40 void Trace(cppgc::Visitor* visitor)
const override;
43 uint32_t dwStyleExtsRemoved)
override;
44 void SetStates(uint32_t dwStates)
override;
86 uint32_t dwStyleExtsRemoved);
96 explicit CFWL_ComboBox(CFWL_App* pApp);
98 bool IsDropDownStyle()
const {
101 void MatchEditText();
102 void SyncEditText(int32_t iListItem);
104 void ResetEditAlignment();
105 void ResetListItemAlignment();
106 void GetPopupPos(
float fMinHeight,
110 void OnLButtonUp(CFWL_MessageMouse* pMsg);
111 bool IsDropListVisible()
const {
return m_pListBox->IsVisible(); }
112 void OnLButtonDown(CFWL_MessageMouse* pMsg);
113 void OnFocusGained();
115 void OnKey(CFWL_MessageKey* pMsg);
116 void RepaintInflatedListBoxRect();
121 cppgc::Member<CFWL_ComboEdit>
const m_pEdit;
122 cppgc::Member<CFWL_ComboList>
const m_pListBox;
123 int32_t m_iCurSel = -1;
130using pdfium::CFWL_ComboBox;
#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
#define FWL_STYLEEXT_EDT_HAlignModeMask
#define FWL_STYLEEXT_EDT_HAlignMask
#define FWL_STYLEEXT_EDT_VNear
#define FWL_STYLEEXT_EDT_VCenter
#define FWL_STYLEEXT_EDT_ReadOnly
#define FWL_STYLEEXT_EDT_VFar
#define FWL_STYLEEXT_EDT_HNear
#define FWL_STYLEEXT_EDT_Justified
#define FWL_STYLEEXT_EDT_HCenter
#define FWL_STYLEEXT_LTB_CenterAlign
#define FWL_STYLEEXT_LTB_LeftAlign
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
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
void ProcessSelChanged(bool bLButtonUp)
void Trace(cppgc::Visitor *visitor) const override
std::optional< WideString > EditCut()
bool EditCanSelectAll() const
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
std::optional< WideString > EditCopy() const
bool EditPaste(const WideString &wsPaste)
CFX_RectF GetBBox() const
~CFWL_ComboBox() override
FWL_Type GetClassID() const override
void AddString(const WideString &wsText)
WideString GetEditText() const
int32_t GetCurSel() const
int32_t GetCurrentSelection() const
void RemoveStates(uint32_t dwStates) override
void EditModifyStyleExts(uint32_t dwStyleExtsAdded, uint32_t dwStyleExtsRemoved)
CFWL_ComboEdit * GetComboEdit() const
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)
CFWL_Widget * GetSrcTarget() const
WideString GetText() const
int32_t CountItems(const CFWL_Widget *pWidget) const
const uint32_t m_dwKeyCodeOrChar
CFWL_MessageKillFocus(CFWL_Widget *pDstTarget)
const MouseCommand m_dwCmd
CFWL_Widget * GetDstTarget() const
virtual float GetScrollBarWidth() const =0
virtual CFX_RectF GetUIMargin(const CFWL_ThemePart &pThemePart) const =0
CFX_PTemplate< float > CFX_PointF
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
fxcrt::WideString WideString