diff options
Diffstat (limited to 'xfa/fwl/core')
-rw-r--r-- | xfa/fwl/core/fwl_formimp.h | 2 | ||||
-rw-r--r-- | xfa/fwl/core/fwl_noteimp.cpp | 56 | ||||
-rw-r--r-- | xfa/fwl/core/fwl_widgetmgrimp.cpp | 9 | ||||
-rw-r--r-- | xfa/fwl/core/fwl_widgetmgrimp.h | 4 |
4 files changed, 27 insertions, 44 deletions
diff --git a/xfa/fwl/core/fwl_formimp.h b/xfa/fwl/core/fwl_formimp.h index 4ee3e0ddae..d8bc80522e 100644 --- a/xfa/fwl/core/fwl_formimp.h +++ b/xfa/fwl/core/fwl_formimp.h @@ -32,7 +32,7 @@ class CFWL_SysBtn { m_dwState = 0; } - FX_BOOL IsDisabled() { return m_dwState & FWL_SYSBUTTONSTATE_Disabled; } + bool IsDisabled() { return !!(m_dwState & FWL_SYSBUTTONSTATE_Disabled); } void SetNormal() { m_dwState &= 0xFFF0; } void SetPressed() { diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp index 39afa783c0..41e749fc9a 100644 --- a/xfa/fwl/core/fwl_noteimp.cpp +++ b/xfa/fwl/core/fwl_noteimp.cpp @@ -810,47 +810,27 @@ FX_BOOL CFWL_EventTarget::IsFilterEvent(CFWL_Event* pEvent, uint32_t dwFilter) { if (dwFilter == FWL_EVENT_ALL_MASK) return TRUE; - FX_BOOL bRet = FALSE; switch (pEvent->GetClassID()) { - case CFWL_EventType::Mouse: { - bRet = dwFilter & FWL_EVENT_MOUSE_MASK; - break; - } - case CFWL_EventType::MouseWheel: { - bRet = dwFilter & FWL_EVENT_MOUSEWHEEL_MASK; - break; - } - case CFWL_EventType::Key: { - bRet = dwFilter & FWL_EVENT_KEY_MASK; - break; - } + case CFWL_EventType::Mouse: + return !!(dwFilter & FWL_EVENT_MOUSE_MASK); + case CFWL_EventType::MouseWheel: + return !!(dwFilter & FWL_EVENT_MOUSEWHEEL_MASK); + case CFWL_EventType::Key: + return !!(dwFilter & FWL_EVENT_KEY_MASK); case CFWL_EventType::SetFocus: - case CFWL_EventType::KillFocus: { - bRet = dwFilter & FWL_EVENT_FOCUSCHANGED_MASK; - break; - } - case CFWL_EventType::Draw: { - bRet = dwFilter & FWL_EVENT_DRAW_MASK; - break; - } - case CFWL_EventType::Close: { - bRet = dwFilter & FWL_EVENT_CLOSE_MASK; - break; - } - case CFWL_EventType::SizeChanged: { - bRet = dwFilter & FWL_EVENT_SIZECHANGED_MASK; - break; - } - case CFWL_EventType::Idle: { - bRet = dwFilter & FWL_EVENT_IDLE_MASK; - break; - } - default: { - bRet = dwFilter & FWL_EVENT_CONTROL_MASK; - break; - } + case CFWL_EventType::KillFocus: + return !!(dwFilter & FWL_EVENT_FOCUSCHANGED_MASK); + case CFWL_EventType::Draw: + return !!(dwFilter & FWL_EVENT_DRAW_MASK); + case CFWL_EventType::Close: + return !!(dwFilter & FWL_EVENT_CLOSE_MASK); + case CFWL_EventType::SizeChanged: + return !!(dwFilter & FWL_EVENT_SIZECHANGED_MASK); + case CFWL_EventType::Idle: + return !!(dwFilter & FWL_EVENT_IDLE_MASK); + default: + return !!(dwFilter & FWL_EVENT_CONTROL_MASK); } - return bRet; } CFWL_ToolTipContainer* CFWL_ToolTipContainer::s_pInstance = NULL; diff --git a/xfa/fwl/core/fwl_widgetmgrimp.cpp b/xfa/fwl/core/fwl_widgetmgrimp.cpp index 02b63862e5..1985cbdeaf 100644 --- a/xfa/fwl/core/fwl_widgetmgrimp.cpp +++ b/xfa/fwl/core/fwl_widgetmgrimp.cpp @@ -667,12 +667,15 @@ FX_BOOL CFWL_WidgetMgr::IsAbleNative(IFWL_Widget* pWidget) { FWL_WGTSTYLE_OverLapper) || (dwStyles & FWL_WGTSTYLE_Popup); } -FX_BOOL CFWL_WidgetMgr::IsThreadEnabled() { + +bool CFWL_WidgetMgr::IsThreadEnabled() { return !(m_dwCapability & FWL_WGTMGR_DisableThread); } -FX_BOOL CFWL_WidgetMgr::IsFormDisabled() { - return m_dwCapability & FWL_WGTMGR_DisableForm; + +bool CFWL_WidgetMgr::IsFormDisabled() { + return !!(m_dwCapability & FWL_WGTMGR_DisableForm); } + FX_BOOL CFWL_WidgetMgr::GetAdapterPopupPos(IFWL_Widget* pWidget, FX_FLOAT fMinHeight, FX_FLOAT fMaxHeight, diff --git a/xfa/fwl/core/fwl_widgetmgrimp.h b/xfa/fwl/core/fwl_widgetmgrimp.h index 0b4e2bf79d..0fcd057aeb 100644 --- a/xfa/fwl/core/fwl_widgetmgrimp.h +++ b/xfa/fwl/core/fwl_widgetmgrimp.h @@ -120,8 +120,8 @@ class CFWL_WidgetMgr : public IFWL_WidgetMgr { IFWL_AdapterWidgetMgr* GetAdapterWidgetMgr() { return m_pAdapter; } CFWL_WidgetMgrDelegate* GetDelegate() { return m_pDelegate; } CFWL_WidgetMgrItem* GetWidgetMgrItem(IFWL_Widget* pWidget); - FX_BOOL IsThreadEnabled(); - FX_BOOL IsFormDisabled(); + bool IsThreadEnabled(); + bool IsFormDisabled(); FX_BOOL GetAdapterPopupPos(IFWL_Widget* pWidget, FX_FLOAT fMinHeight, FX_FLOAT fMaxHeight, |