summaryrefslogtreecommitdiff
path: root/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-21 06:22:11 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-21 06:22:11 -0700
commitf87058d19a3448face48202c7040ee4d95ba39c1 (patch)
treedca273099a27add24bcfbc6a2ce5e46cf262dbc5 /xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
parentb4e8708ce506be308fefc3eb85a427206ef320d8 (diff)
downloadpdfium-f87058d19a3448face48202c7040ee4d95ba39c1.tar.xz
Convert some FWL defines to enums.
This CL converts FWL_WGTCAPACITY_* defines to the CFWL_WidgetCapacity enum class. The FWL_PART_* defines to the FWL_Part enum class and the FWL_PartState_* defines to an enum. Review URL: https://codereview.chromium.org/1898713003
Diffstat (limited to 'xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp')
-rw-r--r--xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp b/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
index 3f5fccd0e9..36751b637d 100644
--- a/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
+++ b/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
@@ -17,6 +17,7 @@
#include "xfa/fwl/core/fwl_widgetimp.h"
#include "xfa/fwl/core/ifwl_themeprovider.h"
#include "xfa/fwl/core/ifwl_tooltiptarget.h"
+#include "xfa/fwl/theme/cfwl_widgettp.h"
// static
IFWL_ToolTip* IFWL_ToolTip::Create(const CFWL_WidgetImpProperties& properties,
@@ -94,8 +95,8 @@ FWL_ERR CFWL_ToolTipImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
if (iLen > 0) {
CFX_SizeF sz = CalcTextSize(wsCaption, m_pProperties->m_pThemeProvider);
rect.Set(0, 0, sz.x, sz.y);
- rect.width += FWL_WGTCAPACITY_CXBorder * 25;
- rect.height += FWL_WGTCAPACITY_CYBorder * 8;
+ rect.width += 25;
+ rect.height += 16;
}
CFWL_WidgetImp::GetWidgetRect(rect, TRUE);
} else {
@@ -124,9 +125,9 @@ FWL_ERR CFWL_ToolTipImp::GetClientRect(CFX_RectF& rect) {
CFWL_ThemePart part;
part.m_pWidget = m_pInterface;
x = *static_cast<FX_FLOAT*>(
- pTheme->GetCapacity(&part, FWL_WGTCAPACITY_CXBorder));
+ pTheme->GetCapacity(&part, CFWL_WidgetCapacity::CXBorder));
y = *static_cast<FX_FLOAT*>(
- pTheme->GetCapacity(&part, FWL_WGTCAPACITY_CYBorder));
+ pTheme->GetCapacity(&part, CFWL_WidgetCapacity::CYBorder));
}
rect = m_pProperties->m_rtWidget;
rect.Offset(-rect.left, -rect.top);
@@ -154,7 +155,7 @@ void CFWL_ToolTipImp::DrawBkground(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) {
CFWL_ThemeBackground param;
param.m_pWidget = m_pInterface;
- param.m_iPart = FWL_PART_TTP_Background;
+ param.m_iPart = CFWL_Part::Background;
param.m_dwStates = m_pProperties->m_dwStates;
param.m_pGraphics = pGraphics;
if (pMatrix) {
@@ -178,7 +179,7 @@ void CFWL_ToolTipImp::DrawText(CFX_Graphics* pGraphics,
}
CFWL_ThemeText param;
param.m_pWidget = m_pInterface;
- param.m_iPart = FWL_PART_TTP_Caption;
+ param.m_iPart = CFWL_Part::Caption;
param.m_dwStates = m_pProperties->m_dwStates;
param.m_pGraphics = pGraphics;
if (pMatrix) {