7#include "xfa/fwl/cfwl_widget.h"
13#include "core/fxcrt/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"
36constexpr float kCalcHeight = 2048.0f;
37constexpr float kCalcWidth = 2048.0f;
38constexpr float kCalcMultiLineDefWidth = 120.0f;
49 m_pWidgetMgr->InsertWidget(m_pOuter,
this);
57 m_pWidgetMgr->RemoveWidget(
this);
61 visitor->Trace(m_pAdapterIface);
62 visitor->Trace(m_pFWLApp);
63 visitor->Trace(m_pWidgetMgr);
64 visitor->Trace(m_pDelegate);
65 visitor->Trace(m_pOuter);
97 uint32_t dwStylesRemoved) {
103 uint32_t dwStyleExtsRemoved) {
110 CFWL_NoteDriver* noteDriver) {
151 if (IsParent(pWidget)) {
152 szOffset = GetOffsetFromParent(pWidget);
154 szOffset = pWidget->GetOffsetFromParent(
this);
155 szOffset.width = -szOffset.width;
156 szOffset.height = -szOffset.height;
158 return point +
CFX_PointF(szOffset.width, szOffset.height);
163 std::vector<CFWL_Widget*> parents;
165 parents.push_back(parent);
166 parent = parent->GetParent();
170 for (size_t i = parents.size(); i >= 2; i--) {
171 CFX_RectF rect = parents[i - 2]->GetWidgetRect();
234 calPart.m_wsText = wsText;
241 float fWidth = bMultiLine ? kCalcMultiLineDefWidth : kCalcWidth;
252 calPart.m_wsText = wsText;
270 m_pOuter->GetDelegate()->OnProcessEvent(pEvent);
278 m_pWidgetMgr->RepaintWidget(
this, pRect);
284 CFWL_ThemeBackground param
(iPartBk
, this, pGraphics
);
293 CFWL_ThemeBackground param
(iPartBorder
, this, pGraphics
);
308 CFX_SizeF szRet(m_WidgetRect.left, m_WidgetRect.top);
311 while (pDstWidget && pDstWidget != pParent) {
313 szRet += CFX_SizeF(rtDst
.left, rtDst
.top);
322 if (pUpWidget == pParent)
324 pUpWidget = pUpWidget->GetParent();
336 CFWL_MessageMouse* pMsgMouse =
static_cast<CFWL_MessageMouse*>(pMessage);
350 widget_->LockUpdate();
354 widget_->UnlockUpdate();
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)
CFWL_NoteDriver * GetNoteDriver() const
IFWL_ThemeProvider * GetThemeProvider() const
CFWL_WidgetMgr * GetWidgetMgr() const
CFWL_EventMouse(CFWL_Widget *pSrcTarget, CFWL_Widget *pDstTarget, CFWL_MessageMouse::MouseCommand cmd)
const MouseCommand m_dwCmd
CFWL_Widget * GetDstTarget() const
void SendEvent(CFWL_Event *pNote)
void NotifyTargetDestroy(CFWL_Widget *pNoteTarget)
void UnregisterEventTarget(CFWL_Widget *pListener)
void NotifyTargetHide(CFWL_Widget *pNoteTarget)
void SetGrab(CFWL_Widget *pGrab)
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
virtual float GetCYBorderSize() const =0
virtual void CalcTextRect(const CFWL_ThemeText &pParams, CFX_RectF *pRect)=0
virtual void DrawBackground(const CFWL_ThemeBackground &pParams)=0
virtual float GetCXBorderSize() const =0
CFX_PTemplate< float > CFX_PointF
CFX_STemplate< float > CFX_SizeF
static void NotifyHideChildWidget(CFWL_WidgetMgr *widgetMgr, CFWL_Widget *widget, CFWL_NoteDriver *noteDriver)
fxcrt::WideString WideString