| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef XFA_FWL_LIGHTWIDGET_CFWL_WIDGET_H_ | 7 #ifndef XFA_FWL_LIGHTWIDGET_CFWL_WIDGET_H_ |
| 8 #define XFA_FWL_LIGHTWIDGET_CFWL_WIDGET_H_ | 8 #define XFA_FWL_LIGHTWIDGET_CFWL_WIDGET_H_ |
| 9 | 9 |
| 10 #include "xfa/fwl/core/cfwl_event.h" | 10 #include "xfa/fwl/core/cfwl_event.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 FWL_ERR ModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved); | 39 FWL_ERR ModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved); |
| 40 uint32_t GetStates(); | 40 uint32_t GetStates(); |
| 41 FWL_ERR SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE); | 41 FWL_ERR SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE); |
| 42 FWL_ERR SetPrivateData(void* module_id, | 42 FWL_ERR SetPrivateData(void* module_id, |
| 43 void* pData, | 43 void* pData, |
| 44 PD_CALLBACK_FREEDATA callback); | 44 PD_CALLBACK_FREEDATA callback); |
| 45 void* GetPrivateData(void* module_id); | 45 void* GetPrivateData(void* module_id); |
| 46 FWL_ERR Update(); | 46 FWL_ERR Update(); |
| 47 FWL_ERR LockUpdate(); | 47 FWL_ERR LockUpdate(); |
| 48 FWL_ERR UnlockUpdate(); | 48 FWL_ERR UnlockUpdate(); |
| 49 uint32_t HitTest(FX_FLOAT fx, FX_FLOAT fy); | 49 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy); |
| 50 FWL_ERR TransformTo(CFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy); | 50 FWL_ERR TransformTo(CFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy); |
| 51 FWL_ERR TransformTo(CFWL_Widget* pWidget, CFX_RectF& rt); | 51 FWL_ERR TransformTo(CFWL_Widget* pWidget, CFX_RectF& rt); |
| 52 FWL_ERR GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE); | 52 FWL_ERR GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE); |
| 53 FWL_ERR SetMatrix(const CFX_Matrix& matrix); | 53 FWL_ERR SetMatrix(const CFX_Matrix& matrix); |
| 54 FWL_ERR DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix = NULL); | 54 FWL_ERR DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix = NULL); |
| 55 IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate); | 55 IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate); |
| 56 FWL_ERR Repaint(const CFX_RectF* pRect = NULL); | 56 FWL_ERR Repaint(const CFX_RectF* pRect = NULL); |
| 57 FWL_ERR SetFocus(FX_BOOL bFocus); | 57 FWL_ERR SetFocus(FX_BOOL bFocus); |
| 58 FWL_ERR SetGrab(FX_BOOL bSet); | 58 FWL_ERR SetGrab(FX_BOOL bSet); |
| 59 CFWL_Widget(); | 59 CFWL_Widget(); |
| 60 | 60 |
| 61 void RegisterEventTarget(CFWL_Widget* pEventSource = NULL, | 61 void RegisterEventTarget(CFWL_Widget* pEventSource = NULL, |
| 62 uint32_t dwFilter = FWL_EVENT_ALL_MASK); | 62 uint32_t dwFilter = FWL_EVENT_ALL_MASK); |
| 63 void DispatchEvent(CFWL_Event* pEvent); | 63 void DispatchEvent(CFWL_Event* pEvent); |
| 64 CFX_SizeF CalcTextSize(const CFX_WideString& wsText, | 64 CFX_SizeF CalcTextSize(const CFX_WideString& wsText, |
| 65 FX_BOOL bMultiLine = FALSE, | 65 FX_BOOL bMultiLine = FALSE, |
| 66 int32_t iLineWidth = -1); | 66 int32_t iLineWidth = -1); |
| 67 IFWL_Widget* m_pIface; | 67 IFWL_Widget* m_pIface; |
| 68 IFWL_WidgetDelegate* m_pDelegate; | 68 IFWL_WidgetDelegate* m_pDelegate; |
| 69 CFWL_WidgetMgr* m_pWidgetMgr; | 69 CFWL_WidgetMgr* m_pWidgetMgr; |
| 70 CFWL_WidgetProperties* m_pProperties; | 70 CFWL_WidgetProperties* m_pProperties; |
| 71 | 71 |
| 72 protected: | 72 protected: |
| 73 FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL); | 73 FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 #endif // XFA_FWL_LIGHTWIDGET_CFWL_WIDGET_H_ | 76 #endif // XFA_FWL_LIGHTWIDGET_CFWL_WIDGET_H_ |
| OLD | NEW |