7#include "xfa/fwl/cfwl_widget.h"
13#include "third_party/base/check.h"
14#include "v8/include/cppgc/visitor.h"
15#include "xfa/fde/cfde_textout.h"
16#include "xfa/fwl/cfwl_app.h"
17#include "xfa/fwl/cfwl_combobox.h"
18#include "xfa/fwl/cfwl_event.h"
19#include "xfa/fwl/cfwl_eventmouse.h"
20#include "xfa/fwl/cfwl_messagekey.h"
21#include "xfa/fwl/cfwl_messagekillfocus.h"
22#include "xfa/fwl/cfwl_messagemouse.h"
23#include "xfa/fwl/cfwl_messagemousewheel.h"
24#include "xfa/fwl/cfwl_messagesetfocus.h"
25#include "xfa/fwl/cfwl_notedriver.h"
26#include "xfa/fwl/cfwl_themebackground.h"
27#include "xfa/fwl/cfwl_themepart.h"
28#include "xfa/fwl/cfwl_themetext.h"
29#include "xfa/fwl/cfwl_widgetmgr.h"
30#include "xfa/fwl/ifwl_themeprovider.h"
34constexpr float kCalcHeight = 2048.0f;
35constexpr float kCalcWidth = 2048.0f;
36constexpr float kCalcMultiLineDefWidth = 120.0f;
47 m_pWidgetMgr->InsertWidget(m_pOuter,
this);
55 m_pWidgetMgr->RemoveWidget(
this);
59 visitor->Trace(m_pAdapterIface);
60 visitor->Trace(m_pFWLApp);
61 visitor->Trace(m_pWidgetMgr);
62 visitor->Trace(m_pDelegate);
63 visitor->Trace(m_pOuter);
95 uint32_t dwStylesRemoved) {
101 uint32_t dwStyleExtsRemoved) {
108 CFWL_NoteDriver* noteDriver) {
147 const CFX_PointF& point) {
149 if (IsParent(pWidget)) {
150 szOffset = GetOffsetFromParent(pWidget);
152 szOffset = pWidget->GetOffsetFromParent(
this);
153 szOffset.width = -szOffset.width;
154 szOffset.height = -szOffset.height;
156 return point + CFX_PointF(szOffset.width, szOffset.height);
161 std::vector<CFWL_Widget*> parents;
163 parents.push_back(parent);
164 parent = parent->GetParent();
168 for (size_t i = parents.size(); i >= 2; i--) {
169 CFX_RectF rect = parents[i - 2]->GetWidgetRect();
232 calPart.m_wsText = wsText;
239 float fWidth = bMultiLine ? kCalcMultiLineDefWidth : kCalcWidth;
250 calPart.m_wsText = wsText;
268 m_pOuter->GetDelegate()->OnProcessEvent(pEvent);
276 m_pWidgetMgr->RepaintWidget(
this, pRect);
282 CFWL_ThemeBackground param
(iPartBk
, this, pGraphics
);
291 CFWL_ThemeBackground param
(iPartBorder
, this, pGraphics
);
306 CFX_SizeF szRet(m_WidgetRect.left, m_WidgetRect.top);
309 while (pDstWidget && pDstWidget != pParent) {
311 szRet += CFX_SizeF(rtDst
.left, rtDst
.top);
320 if (pUpWidget == pParent)
322 pUpWidget = pUpWidget->GetParent();
334 CFWL_MessageMouse* pMsgMouse =
static_cast<CFWL_MessageMouse*>(pMessage);
348 widget_->LockUpdate();
352 widget_->UnlockUpdate();
CFWL_NoteDriver * GetNoteDriver() const
CFWL_WidgetMgr * GetWidgetMgr() const
IFWL_ThemeProvider * GetThemeProvider() const
CFWL_EventMouse(CFWL_Widget *pSrcTarget, CFWL_Widget *pDstTarget, CFWL_MessageMouse::MouseCommand cmd)
const MouseCommand m_dwCmd
CFWL_Widget * GetDstTarget() const
void NotifyTargetHide(CFWL_Widget *pNoteTarget)
void SendEvent(CFWL_Event *pNote)
void UnregisterEventTarget(CFWL_Widget *pListener)
void SetGrab(CFWL_Widget *pGrab)
void NotifyTargetDestroy(CFWL_Widget *pNoteTarget)
CFWL_ThemeBackground(Part iPart, CFWL_Widget *pWidget, CFGAS_GEGraphics *pGraphics)
FDE_TextStyle m_dwTTOStyles
CFWL_ThemeText(Part iPart, CFWL_Widget *pWidget, CFGAS_GEGraphics *pGraphics)
FDE_TextAlignment m_iTTOAlign
CFX_Matrix & operator=(const CFX_Matrix &other)=default
void TranslatePrepend(float x, float y)
constexpr CFX_RectF()=default
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 Deflate(float x, float y)
virtual void DrawBackground(const CFWL_ThemeBackground &pParams)=0
virtual float GetCXBorderSize() const =0
virtual float GetCYBorderSize() const =0
virtual void CalcTextRect(const CFWL_ThemeText &pParams, CFX_RectF *pRect)=0