summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_form.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-02 14:51:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 14:51:25 -0700
commit3b3ce1a242f8445848d3f23d6c35ba01d7c645f4 (patch)
tree365d9ee7f8eec1103fb9fce0986e23d9f548ecae /xfa/fwl/core/ifwl_form.h
parent4cf551577856f89103e162edc761def44ffb96fc (diff)
downloadpdfium-3b3ce1a242f8445848d3f23d6c35ba01d7c645f4.tar.xz
Merge delegates into IFWL_* classes.
This Cl removes ownership of the delgates from IFWL_Widget and puts it in the hand of the creating classes. In doing so, merge the delegates back into the IFWL_* classes to simplify logic. Review-Url: https://codereview.chromium.org/2467993003
Diffstat (limited to 'xfa/fwl/core/ifwl_form.h')
-rw-r--r--xfa/fwl/core/ifwl_form.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/xfa/fwl/core/ifwl_form.h b/xfa/fwl/core/ifwl_form.h
index c6158c60e1..76634ab513 100644
--- a/xfa/fwl/core/ifwl_form.h
+++ b/xfa/fwl/core/ifwl_form.h
@@ -76,7 +76,6 @@ class CFWL_WidgetImpProperties;
class IFWL_Widget;
class IFWL_ThemeProvider;
class CFWL_SysBtn;
-class CFWL_FormImpDelegate;
class IFWL_FormDP : public IFWL_DataProvider {
public:
@@ -99,6 +98,9 @@ class IFWL_Form : public IFWL_Widget {
FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override;
FWL_Error DrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix = nullptr) override;
+ void OnProcessMessage(CFWL_Message* pMessage) override;
+ void OnDrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix) override;
FWL_FORMSIZE GetFormSize();
FWL_Error SetFormSize(FWL_FORMSIZE eFormSize);
@@ -182,17 +184,8 @@ class IFWL_Form : public IFWL_Widget {
CFX_DIBitmap* m_pBigIcon;
CFX_DIBitmap* m_pSmallIcon;
FX_BOOL m_bMouseIn;
-};
-
-class CFWL_FormImpDelegate : public CFWL_WidgetImpDelegate {
- public:
- CFWL_FormImpDelegate(IFWL_Form* pOwner);
- void OnProcessMessage(CFWL_Message* pMessage) override;
- void OnProcessEvent(CFWL_Event* pEvent) override;
- void OnDrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix = nullptr) override;
- protected:
+ private:
void OnLButtonDown(CFWL_MsgMouse* pMsg);
void OnLButtonUp(CFWL_MsgMouse* pMsg);
void OnMouseMove(CFWL_MsgMouse* pMsg);
@@ -201,7 +194,6 @@ class CFWL_FormImpDelegate : public CFWL_WidgetImpDelegate {
void OnLButtonDblClk(CFWL_MsgMouse* pMsg);
void OnWindowMove(CFWL_MsgWindowMove* pMsg);
void OnClose(CFWL_MsgClose* pMsg);
- IFWL_Form* m_pOwner;
};
#endif // XFA_FWL_CORE_IFWL_FORM_H_