7#ifndef XFA_FWL_CFWL_CHECKBOX_H_
8#define XFA_FWL_CFWL_CHECKBOX_H_
10#include "xfa/fwl/cfwl_event.h"
11#include "xfa/fwl/cfwl_widget.h"
13#define FWL_STYLEEXT_CKB_3State (1L
<< 6
)
14#define FWL_STYLEEXT_CKB_RadioButton (1L
<< 7
)
15#define FWL_STYLEEXT_CKB_SignShapeCheck 0
16#define FWL_STYLEEXT_CKB_SignShapeCircle (1L
<< 10
)
17#define FWL_STYLEEXT_CKB_SignShapeCross (2L
<< 10
)
18#define FWL_STYLEEXT_CKB_SignShapeDiamond (3L
<< 10
)
19#define FWL_STYLEEXT_CKB_SignShapeSquare (4L
<< 10
)
20#define FWL_STYLEEXT_CKB_SignShapeStar (5L
<< 10
)
21#define FWL_STYLEEXT_CKB_SignShapeMask (7L
<< 10
)
24#define FWL_STATE_CKB_Unchecked 0
30class CFWL_MessageMouse;
50 explicit CFWL_CheckBox(CFWL_App* pApp);
52 void SetCheckState(int32_t iCheck);
55 void UpdateTextOutStyles();
60 void OnLButtonUp(CFWL_MessageMouse* pMsg);
61 void OnMouseMove(CFWL_MessageMouse* pMsg);
63 void OnKeyDown(CFWL_MessageKey* pMsg);
71 bool m_bBtnDown =
false;
72 float m_fBoxHeight = 16.0f;
#define FWL_STATE_CKB_CheckMask
#define FWL_STATE_CKB_Hovered
#define FWL_STATE_CKB_Unchecked
#define FWL_STATE_CKB_Pressed
#define FWL_STATE_CKB_Neutral
#define FWL_STATE_CKB_Checked
#define FWL_STYLEEXT_CKB_3State
#define FWL_STYLEEXT_CKB_RadioButton
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
~CFWL_CheckBox() override
void SetBoxSize(float fHeight)
void DrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void OnProcessMessage(CFWL_Message *pMessage) override
FWL_Type GetClassID() const override
const uint32_t m_dwKeyCodeOrChar
const MouseCommand m_dwCmd
CFWL_Widget * GetDstTarget() const
FDE_TextStyle m_dwTTOStyles
FDE_TextAlignment m_iTTOAlign
CFX_Matrix & operator=(const CFX_Matrix &other)=default
void Inflate(float x, float y)
CFX_RectF & operator=(const CFX_RectF &other)=default
constexpr CFX_RectF(float dst_left, float dst_top, float dst_width, float dst_height)
virtual void DrawBackground(const CFWL_ThemeBackground &pParams)=0
virtual void DrawText(const CFWL_ThemeText &pParams)=0
int FXSYS_roundf(float f)
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED