summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_tooltip.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_tooltip.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_tooltip.h')
-rw-r--r--xfa/fwl/core/ifwl_tooltip.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/xfa/fwl/core/ifwl_tooltip.h b/xfa/fwl/core/ifwl_tooltip.h
index 63708a7f5a..0293759165 100644
--- a/xfa/fwl/core/ifwl_tooltip.h
+++ b/xfa/fwl/core/ifwl_tooltip.h
@@ -47,14 +47,14 @@ class IFWL_ToolTip : public IFWL_Form {
const CFX_Matrix* pMatrix = nullptr) override;
void SetStates(uint32_t dwStates, FX_BOOL bSet) override;
FWL_Error GetClientRect(CFX_RectF& rect) override;
+ void OnDrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix) override;
void SetAnchor(const CFX_RectF& rtAnchor);
void Show();
void Hide();
protected:
- friend class CFWL_ToolTipImpDelegate;
-
class Timer : public IFWL_Timer {
public:
explicit Timer(IFWL_ToolTip* pToolTip);
@@ -83,24 +83,14 @@ class IFWL_ToolTip : public IFWL_Form {
IFWL_TimerInfo* m_pTimerInfoHide;
IFWL_ToolTip::Timer m_TimerShow;
IFWL_ToolTip::Timer m_TimerHide;
-};
-class CFWL_ToolTipImpDelegate : public CFWL_WidgetImpDelegate {
- public:
- CFWL_ToolTipImpDelegate(IFWL_ToolTip* 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:
- void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE);
+ private:
+ void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet);
void OnLButtonDown(CFWL_MsgMouse* pMsg);
void OnLButtonUp(CFWL_MsgMouse* pMsg);
void OnMouseMove(CFWL_MsgMouse* pMsg);
void OnMouseLeave(CFWL_MsgMouse* pMsg);
void OnKeyDown(CFWL_MsgKey* pMsg);
- IFWL_ToolTip* m_pOwner;
};
#endif // XFA_FWL_CORE_IFWL_TOOLTIP_H_