Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1768)

Unified Diff: xfa/fwl/core/ifwl_form.cpp

Issue 2432423002: Merge the CFWL_*Imp classes into the IFWL_* classes. (Closed)
Patch Set: Review feedback Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_form.h ('k') | xfa/fwl/core/ifwl_formproxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_form.cpp
diff --git a/xfa/fwl/core/fwl_formimp.cpp b/xfa/fwl/core/ifwl_form.cpp
similarity index 84%
rename from xfa/fwl/core/fwl_formimp.cpp
rename to xfa/fwl/core/ifwl_form.cpp
index 0f4b89a774d5ea27869cd48e8969d5122577fd7c..ad78f98cb39c3b0eb61d910c6a1a55c41a7b243b 100644
--- a/xfa/fwl/core/fwl_formimp.cpp
+++ b/xfa/fwl/core/ifwl_form.cpp
@@ -4,18 +4,17 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/fwl/core/fwl_formimp.h"
+#include "xfa/fwl/core/ifwl_form.h"
#include "xfa/fde/tto/fde_textout.h"
-#include "xfa/fwl/basewidget/fwl_formproxyimp.h"
#include "xfa/fwl/core/cfwl_message.h"
#include "xfa/fwl/core/cfwl_themebackground.h"
#include "xfa/fwl/core/cfwl_themepart.h"
#include "xfa/fwl/core/cfwl_themetext.h"
#include "xfa/fwl/core/cfwl_widgetmgr.h"
#include "xfa/fwl/core/fwl_noteimp.h"
-#include "xfa/fwl/core/fwl_widgetimp.h"
#include "xfa/fwl/core/ifwl_app.h"
+#include "xfa/fwl/core/ifwl_formproxy.h"
#include "xfa/fwl/core/ifwl_themeprovider.h"
#include "xfa/fwl/theme/cfwl_widgettp.h"
@@ -33,43 +32,13 @@ const uint8_t kCornerEnlarge = 10;
} // namespace
-// static
-IFWL_Form* IFWL_Form::CreateFormProxy(CFWL_WidgetImpProperties& properties,
- CFX_WideString* classname,
- IFWL_Widget* pOuter) {
- IFWL_Form* pForm = new IFWL_Form;
- CFWL_FormProxyImp* pFormProxyImpl = new CFWL_FormProxyImp(properties, pOuter);
- pForm->SetImpl(pFormProxyImpl);
- pFormProxyImpl->SetInterface(pForm);
- return pForm;
-}
-IFWL_Form::IFWL_Form() {}
-FWL_FORMSIZE IFWL_Form::GetFormSize() {
- return static_cast<CFWL_FormImp*>(GetImpl())->GetFormSize();
-}
-FWL_Error IFWL_Form::SetFormSize(FWL_FORMSIZE eFormSize) {
- return static_cast<CFWL_FormImp*>(GetImpl())->SetFormSize(eFormSize);
-}
-IFWL_Widget* IFWL_Form::DoModal() {
- return static_cast<CFWL_FormImp*>(GetImpl())->DoModal();
-}
-IFWL_Widget* IFWL_Form::DoModal(uint32_t& dwCommandID) {
- return static_cast<CFWL_FormImp*>(GetImpl())->DoModal(dwCommandID);
-}
-FWL_Error IFWL_Form::EndDoModal() {
- return static_cast<CFWL_FormImp*>(GetImpl())->EndDoModal();
-}
-FWL_Error IFWL_Form::SetBorderRegion(CFX_Path* pPath) {
- return static_cast<CFWL_FormImp*>(GetImpl())->SetBorderRegion(pPath);
-}
-
-RestoreResizeInfo::RestoreResizeInfo() {}
+RestoreInfo::RestoreInfo() {}
-RestoreResizeInfo::~RestoreResizeInfo() {}
+RestoreInfo::~RestoreInfo() {}
-CFWL_FormImp::CFWL_FormImp(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
- : CFWL_WidgetImp(properties, pOuter),
+IFWL_Form::IFWL_Form(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter)
+ : IFWL_Widget(properties, pOuter),
m_pCloseBox(nullptr),
m_pMinBox(nullptr),
m_pMaxBox(nullptr),
@@ -96,41 +65,41 @@ CFWL_FormImp::CFWL_FormImp(const CFWL_WidgetImpProperties& properties,
m_rtIcon.Reset();
}
-CFWL_FormImp::~CFWL_FormImp() {
+IFWL_Form::~IFWL_Form() {
RemoveSysButtons();
}
-FWL_Error CFWL_FormImp::GetClassName(CFX_WideString& wsClass) const {
+FWL_Error IFWL_Form::GetClassName(CFX_WideString& wsClass) const {
wsClass = FWL_CLASS_Form;
return FWL_Error::Succeeded;
}
-FWL_Type CFWL_FormImp::GetClassID() const {
+FWL_Type IFWL_Form::GetClassID() const {
return FWL_Type::Form;
}
-FX_BOOL CFWL_FormImp::IsInstance(const CFX_WideStringC& wsClass) const {
+FX_BOOL IFWL_Form::IsInstance(const CFX_WideStringC& wsClass) const {
if (wsClass == CFX_WideStringC(FWL_CLASS_Form))
return TRUE;
- return CFWL_WidgetImp::IsInstance(wsClass);
+ return IFWL_Widget::IsInstance(wsClass);
}
-FWL_Error CFWL_FormImp::Initialize() {
- if (CFWL_WidgetImp::Initialize() != FWL_Error::Succeeded)
+FWL_Error IFWL_Form::Initialize() {
+ if (IFWL_Widget::Initialize() != FWL_Error::Succeeded)
return FWL_Error::Indefinite;
RegisterForm();
RegisterEventTarget();
m_pDelegate = new CFWL_FormImpDelegate(this);
return FWL_Error::Succeeded;
}
-FWL_Error CFWL_FormImp::Finalize() {
+FWL_Error IFWL_Form::Finalize() {
delete m_pDelegate;
m_pDelegate = nullptr;
UnregisterEventTarget();
UnRegisterForm();
- return CFWL_WidgetImp::Finalize();
+ return IFWL_Widget::Finalize();
}
-FWL_Error CFWL_FormImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
+FWL_Error IFWL_Form::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
if (bAutoSize) {
rect.Reset();
FX_FLOAT fCapHeight = GetCaptionHeight();
@@ -144,7 +113,7 @@ FWL_Error CFWL_FormImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
}
return FWL_Error::Succeeded;
}
-FWL_Error CFWL_FormImp::GetClientRect(CFX_RectF& rect) {
+FWL_Error IFWL_Form::GetClientRect(CFX_RectF& rect) {
if ((m_pProperties->m_dwStyles & FWL_WGTSTYLE_Caption) == 0) {
rect = m_pProperties->m_rtWidget;
rect.Offset(-rect.left, -rect.top);
@@ -166,7 +135,7 @@ FWL_Error CFWL_FormImp::GetClientRect(CFX_RectF& rect) {
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
if (pTheme) {
CFWL_ThemePart part;
- part.m_pWidget = m_pInterface;
+ part.m_pWidget = this;
x = *static_cast<FX_FLOAT*>(
pTheme->GetCapacity(&part, CFWL_WidgetCapacity::CXBorder));
y = *static_cast<FX_FLOAT*>(
@@ -180,7 +149,7 @@ FWL_Error CFWL_FormImp::GetClientRect(CFX_RectF& rect) {
return FWL_Error::Succeeded;
#endif
}
-FWL_Error CFWL_FormImp::Update() {
+FWL_Error IFWL_Form::Update() {
if (m_iLock > 0) {
return FWL_Error::Succeeded;
}
@@ -198,7 +167,7 @@ FWL_Error CFWL_FormImp::Update() {
Layout();
return FWL_Error::Succeeded;
}
-FWL_WidgetHit CFWL_FormImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
+FWL_WidgetHit IFWL_Form::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
GetAvailableTheme();
if (m_pCloseBox && m_pCloseBox->m_rtBtn.Contains(fx, fy))
return FWL_WidgetHit::CloseBox;
@@ -250,8 +219,8 @@ FWL_WidgetHit CFWL_FormImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
}
return FWL_WidgetHit::Client;
}
-FWL_Error CFWL_FormImp::DrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+FWL_Error IFWL_Form::DrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix) {
if (!pGraphics)
return FWL_Error::Indefinite;
if (!m_pProperties->m_pThemeProvider)
@@ -266,7 +235,7 @@ FWL_Error CFWL_FormImp::DrawWidget(CFX_Graphics* pGraphics,
return FWL_Error::Succeeded;
#endif
CFWL_ThemeBackground param;
- param.m_pWidget = m_pInterface;
+ param.m_pWidget = this;
param.m_dwStates = iState;
param.m_pGraphics = pGraphics;
param.m_rtPart = m_rtRelative;
@@ -369,16 +338,16 @@ FWL_Error CFWL_FormImp::DrawWidget(CFX_Graphics* pGraphics,
return FWL_Error::Succeeded;
}
-FWL_FORMSIZE CFWL_FormImp::GetFormSize() {
+FWL_FORMSIZE IFWL_Form::GetFormSize() {
return m_eFormSize;
}
-FWL_Error CFWL_FormImp::SetFormSize(FWL_FORMSIZE eFormSize) {
+FWL_Error IFWL_Form::SetFormSize(FWL_FORMSIZE eFormSize) {
m_eFormSize = eFormSize;
return FWL_Error::Succeeded;
}
-IFWL_Widget* CFWL_FormImp::DoModal() {
+IFWL_Widget* IFWL_Form::DoModal() {
IFWL_App* pApp = GetOwnerApp();
if (!pApp)
return nullptr;
@@ -400,11 +369,11 @@ IFWL_Widget* CFWL_FormImp::DoModal() {
return nullptr;
}
-IFWL_Widget* CFWL_FormImp::DoModal(uint32_t& dwCommandID) {
+IFWL_Widget* IFWL_Form::DoModal(uint32_t& dwCommandID) {
return DoModal();
}
-FWL_Error CFWL_FormImp::EndDoModal() {
+FWL_Error IFWL_Form::EndDoModal() {
if (!m_pNoteLoop)
return FWL_Error::Indefinite;
m_bDoModalFlag = FALSE;
@@ -428,13 +397,13 @@ FWL_Error CFWL_FormImp::EndDoModal() {
#endif
}
-FWL_Error CFWL_FormImp::SetBorderRegion(CFX_Path* pPath) {
+FWL_Error IFWL_Form::SetBorderRegion(CFX_Path* pPath) {
return FWL_Error::Succeeded;
}
-void CFWL_FormImp::DrawBackground(CFX_Graphics* pGraphics,
- IFWL_ThemeProvider* pTheme) {
+void IFWL_Form::DrawBackground(CFX_Graphics* pGraphics,
+ IFWL_ThemeProvider* pTheme) {
CFWL_ThemeBackground param;
- param.m_pWidget = m_pInterface;
+ param.m_pWidget = this;
param.m_iPart = CFWL_Part::Background;
param.m_pGraphics = pGraphics;
param.m_rtPart = m_rtRelative;
@@ -442,14 +411,14 @@ void CFWL_FormImp::DrawBackground(CFX_Graphics* pGraphics,
m_fCXBorder);
pTheme->DrawBackground(&param);
}
-CFWL_WidgetImp* CFWL_FormImp::GetSubFocus() {
+IFWL_Widget* IFWL_Form::GetSubFocus() {
return m_pSubFocus;
}
-void CFWL_FormImp::SetSubFocus(CFWL_WidgetImp* pWidget) {
+void IFWL_Form::SetSubFocus(IFWL_Widget* pWidget) {
m_pSubFocus = pWidget;
}
-void CFWL_FormImp::ShowChildWidget(IFWL_Widget* pParent) {
+void IFWL_Form::ShowChildWidget(IFWL_Widget* pParent) {
IFWL_App* pApp = FWL_GetApp();
if (!pApp)
return;
@@ -465,7 +434,7 @@ void CFWL_FormImp::ShowChildWidget(IFWL_Widget* pParent) {
}
}
-void CFWL_FormImp::RemoveSysButtons() {
+void IFWL_Form::RemoveSysButtons() {
m_rtCaption.Reset();
delete m_pCloseBox;
m_pCloseBox = nullptr;
@@ -477,7 +446,7 @@ void CFWL_FormImp::RemoveSysButtons() {
m_pCaptionBox = nullptr;
}
-void CFWL_FormImp::CalcContentRect(CFX_RectF& rtContent) {
+void IFWL_Form::CalcContentRect(CFX_RectF& rtContent) {
#ifdef FWL_UseMacSystemBorder
rtContent = m_rtRelative;
#else
@@ -488,7 +457,7 @@ void CFWL_FormImp::CalcContentRect(CFX_RectF& rtContent) {
}
#endif
}
-CFWL_SysBtn* CFWL_FormImp::GetSysBtnAtPoint(FX_FLOAT fx, FX_FLOAT fy) {
+CFWL_SysBtn* IFWL_Form::GetSysBtnAtPoint(FX_FLOAT fx, FX_FLOAT fy) {
if (m_pCloseBox && m_pCloseBox->m_rtBtn.Contains(fx, fy)) {
return m_pCloseBox;
}
@@ -503,7 +472,7 @@ CFWL_SysBtn* CFWL_FormImp::GetSysBtnAtPoint(FX_FLOAT fx, FX_FLOAT fy) {
}
return nullptr;
}
-CFWL_SysBtn* CFWL_FormImp::GetSysBtnByState(uint32_t dwState) {
+CFWL_SysBtn* IFWL_Form::GetSysBtnByState(uint32_t dwState) {
if (m_pCloseBox && (m_pCloseBox->m_dwState & dwState)) {
return m_pCloseBox;
}
@@ -518,7 +487,7 @@ CFWL_SysBtn* CFWL_FormImp::GetSysBtnByState(uint32_t dwState) {
}
return nullptr;
}
-CFWL_SysBtn* CFWL_FormImp::GetSysBtnByIndex(int32_t nIndex) {
+CFWL_SysBtn* IFWL_Form::GetSysBtnByIndex(int32_t nIndex) {
if (nIndex < 0)
return nullptr;
@@ -534,7 +503,7 @@ CFWL_SysBtn* CFWL_FormImp::GetSysBtnByIndex(int32_t nIndex) {
return arrBtn[nIndex];
}
-int32_t CFWL_FormImp::GetSysBtnIndex(CFWL_SysBtn* pBtn) {
+int32_t IFWL_Form::GetSysBtnIndex(CFWL_SysBtn* pBtn) {
CFX_ArrayTemplate<CFWL_SysBtn*> arrBtn;
if (m_pMinBox)
arrBtn.Add(m_pMinBox);
@@ -547,7 +516,7 @@ int32_t CFWL_FormImp::GetSysBtnIndex(CFWL_SysBtn* pBtn) {
return arrBtn.Find(pBtn);
}
-FX_FLOAT CFWL_FormImp::GetCaptionHeight() {
+FX_FLOAT IFWL_Form::GetCaptionHeight() {
CFWL_WidgetCapacity dwCapacity = CFWL_WidgetCapacity::None;
if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_Caption) {
@@ -562,17 +531,17 @@ FX_FLOAT CFWL_FormImp::GetCaptionHeight() {
}
return 0;
}
-void CFWL_FormImp::DrawCaptionText(CFX_Graphics* pGs,
- IFWL_ThemeProvider* pTheme,
- const CFX_Matrix* pMatrix) {
+void IFWL_Form::DrawCaptionText(CFX_Graphics* pGs,
+ IFWL_ThemeProvider* pTheme,
+ const CFX_Matrix* pMatrix) {
CFX_WideString wsText;
IFWL_DataProvider* pData = m_pProperties->m_pDataProvider;
- pData->GetCaption(m_pInterface, wsText);
+ pData->GetCaption(this, wsText);
if (wsText.IsEmpty()) {
return;
}
CFWL_ThemeText textParam;
- textParam.m_pWidget = m_pInterface;
+ textParam.m_pWidget = this;
textParam.m_iPart = CFWL_Part::Caption;
textParam.m_dwStates = CFWL_PartState_Normal;
textParam.m_pGraphics = pGs;
@@ -596,23 +565,23 @@ void CFWL_FormImp::DrawCaptionText(CFX_Graphics* pGs,
: FDE_TTOALIGNMENT_CenterLeft;
pTheme->DrawText(&textParam);
}
-void CFWL_FormImp::DrawIconImage(CFX_Graphics* pGs,
- IFWL_ThemeProvider* pTheme,
- const CFX_Matrix* pMatrix) {
+void IFWL_Form::DrawIconImage(CFX_Graphics* pGs,
+ IFWL_ThemeProvider* pTheme,
+ const CFX_Matrix* pMatrix) {
IFWL_FormDP* pData =
static_cast<IFWL_FormDP*>(m_pProperties->m_pDataProvider);
CFWL_ThemeBackground param;
- param.m_pWidget = m_pInterface;
+ param.m_pWidget = this;
param.m_iPart = CFWL_Part::Icon;
param.m_pGraphics = pGs;
- param.m_pImage = pData->GetIcon(m_pInterface, FALSE);
+ param.m_pImage = pData->GetIcon(this, FALSE);
param.m_rtPart = m_rtIcon;
if (pMatrix) {
param.m_matrix.Concat(*pMatrix);
}
pTheme->DrawBackground(&param);
}
-void CFWL_FormImp::GetEdgeRect(CFX_RectF& rtEdge) {
+void IFWL_Form::GetEdgeRect(CFX_RectF& rtEdge) {
rtEdge = m_rtRelative;
if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_Border) {
FX_FLOAT fCX = GetBorderSize();
@@ -620,7 +589,7 @@ void CFWL_FormImp::GetEdgeRect(CFX_RectF& rtEdge) {
rtEdge.Deflate(fCX, m_rtCaption.Height(), fCX, fCY);
}
}
-void CFWL_FormImp::SetWorkAreaRect() {
+void IFWL_Form::SetWorkAreaRect() {
m_rtRestore = m_pProperties->m_rtWidget;
CFWL_WidgetMgr* pWidgetMgr = CFWL_WidgetMgr::GetInstance();
if (!pWidgetMgr)
@@ -628,21 +597,21 @@ void CFWL_FormImp::SetWorkAreaRect() {
m_bSetMaximize = TRUE;
Repaint(&m_rtRelative);
}
-void CFWL_FormImp::SetCursor(FX_FLOAT fx, FX_FLOAT fy) {}
-void CFWL_FormImp::Layout() {
+void IFWL_Form::SetCursor(FX_FLOAT fx, FX_FLOAT fy) {}
+void IFWL_Form::Layout() {
GetRelativeRect(m_rtRelative);
#ifndef FWL_UseMacSystemBorder
ReSetSysBtn();
#endif
}
-void CFWL_FormImp::ReSetSysBtn() {
+void IFWL_Form::ReSetSysBtn() {
m_fCXBorder =
*static_cast<FX_FLOAT*>(GetThemeCapacity(CFWL_WidgetCapacity::CXBorder));
m_fCYBorder =
*static_cast<FX_FLOAT*>(GetThemeCapacity(CFWL_WidgetCapacity::CYBorder));
RemoveSysButtons();
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
- m_bCustomizeLayout = pTheme->IsCustomizedLayout(m_pInterface);
+ m_bCustomizeLayout = pTheme->IsCustomizedLayout(this);
FX_FLOAT fCapHeight = GetCaptionHeight();
if (fCapHeight > 0) {
m_rtCaption = m_rtRelative;
@@ -695,14 +664,14 @@ void CFWL_FormImp::ReSetSysBtn() {
IFWL_FormDP* pData =
static_cast<IFWL_FormDP*>(m_pProperties->m_pDataProvider);
if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_Icon &&
- pData->GetIcon(m_pInterface, FALSE)) {
+ pData->GetIcon(this, FALSE)) {
if (!m_bCustomizeLayout) {
m_rtIcon.Set(5, (m_rtCaption.height - m_fSmallIconSz) / 2, m_fSmallIconSz,
m_fSmallIconSz);
}
}
}
-void CFWL_FormImp::RegisterForm() {
+void IFWL_Form::RegisterForm() {
IFWL_App* pApp = GetOwnerApp();
if (!pApp)
return;
@@ -714,7 +683,7 @@ void CFWL_FormImp::RegisterForm() {
pDriver->RegisterForm(this);
}
-void CFWL_FormImp::UnRegisterForm() {
+void IFWL_Form::UnRegisterForm() {
IFWL_App* pApp = GetOwnerApp();
if (!pApp)
return;
@@ -726,34 +695,34 @@ void CFWL_FormImp::UnRegisterForm() {
pDriver->UnRegisterForm(this);
}
-FX_BOOL CFWL_FormImp::IsDoModal() {
+FX_BOOL IFWL_Form::IsDoModal() {
return m_bDoModalFlag;
}
-void CFWL_FormImp::SetThemeData() {
+void IFWL_Form::SetThemeData() {
m_fSmallIconSz =
*static_cast<FX_FLOAT*>(GetThemeCapacity(CFWL_WidgetCapacity::SmallIcon));
m_fBigIconSz =
*static_cast<FX_FLOAT*>(GetThemeCapacity(CFWL_WidgetCapacity::BigIcon));
}
-FX_BOOL CFWL_FormImp::HasIcon() {
+FX_BOOL IFWL_Form::HasIcon() {
IFWL_FormDP* pData =
static_cast<IFWL_FormDP*>(m_pProperties->m_pDataProvider);
- return !!pData->GetIcon(m_pInterface, FALSE);
+ return !!pData->GetIcon(this, FALSE);
}
-void CFWL_FormImp::UpdateIcon() {
+void IFWL_Form::UpdateIcon() {
CFWL_WidgetMgr* pWidgetMgr = CFWL_WidgetMgr::GetInstance();
if (!pWidgetMgr)
return;
IFWL_FormDP* pData =
static_cast<IFWL_FormDP*>(m_pProperties->m_pDataProvider);
- CFX_DIBitmap* pBigIcon = pData->GetIcon(m_pInterface, TRUE);
- CFX_DIBitmap* pSmallIcon = pData->GetIcon(m_pInterface, FALSE);
+ CFX_DIBitmap* pBigIcon = pData->GetIcon(this, TRUE);
+ CFX_DIBitmap* pSmallIcon = pData->GetIcon(this, FALSE);
if (pBigIcon)
m_pBigIcon = pBigIcon;
if (pSmallIcon)
m_pSmallIcon = pSmallIcon;
}
-void CFWL_FormImp::UpdateCaption() {
+void IFWL_Form::UpdateCaption() {
CFWL_WidgetMgr* pWidgetMgr = CFWL_WidgetMgr::GetInstance();
if (!pWidgetMgr)
return;
@@ -761,15 +730,15 @@ void CFWL_FormImp::UpdateCaption() {
if (!pData)
return;
CFX_WideString text;
- pData->GetCaption(m_pInterface, text);
-}
-void CFWL_FormImp::DoWidthLimit(FX_FLOAT& fLeft,
- FX_FLOAT& fWidth,
- FX_FLOAT fCurX,
- FX_FLOAT fSpace,
- FX_FLOAT fLimitMin,
- FX_FLOAT fLimitMax,
- FX_BOOL bLeft) {
+ pData->GetCaption(this, text);
+}
+void IFWL_Form::DoWidthLimit(FX_FLOAT& fLeft,
+ FX_FLOAT& fWidth,
+ FX_FLOAT fCurX,
+ FX_FLOAT fSpace,
+ FX_FLOAT fLimitMin,
+ FX_FLOAT fLimitMax,
+ FX_BOOL bLeft) {
FX_FLOAT fx = fCurX;
FX_FLOAT fy = 0;
TransformTo(nullptr, fx, fy);
@@ -788,13 +757,13 @@ void CFWL_FormImp::DoWidthLimit(FX_FLOAT& fLeft,
}
}
}
-void CFWL_FormImp::DoHeightLimit(FX_FLOAT& fTop,
- FX_FLOAT& fHeight,
- FX_FLOAT fCurY,
- FX_FLOAT fSpace,
- FX_FLOAT fLimitMin,
- FX_FLOAT fLimitMax,
- FX_BOOL bTop) {
+void IFWL_Form::DoHeightLimit(FX_FLOAT& fTop,
+ FX_FLOAT& fHeight,
+ FX_FLOAT fCurY,
+ FX_FLOAT fSpace,
+ FX_FLOAT fLimitMin,
+ FX_FLOAT fLimitMax,
+ FX_BOOL bTop) {
FX_FLOAT fx = 0;
FX_FLOAT fy = fCurY;
TransformTo(nullptr, fx, fy);
@@ -813,7 +782,7 @@ void CFWL_FormImp::DoHeightLimit(FX_FLOAT& fTop,
}
}
-CFWL_FormImpDelegate::CFWL_FormImpDelegate(CFWL_FormImp* pOwner)
+CFWL_FormImpDelegate::CFWL_FormImpDelegate(IFWL_Form* pOwner)
: m_pOwner(pOwner) {}
#ifdef FWL_UseMacSystemBorder
@@ -847,9 +816,7 @@ void CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
IFWL_App* pApp = m_pOwner->GetOwnerApp();
CFWL_NoteDriver* pDriver =
static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver());
- CFWL_WidgetImp* pSubFocusImp = m_pOwner->GetSubFocus();
- IFWL_Widget* pSubFocus =
- pSubFocusImp ? pSubFocusImp->GetInterface() : nullptr;
+ IFWL_Widget* pSubFocus = m_pOwner->GetSubFocus();
if (pSubFocus && pSubFocus != pDriver->GetFocus())
pDriver->SetFocus(pSubFocus);
@@ -861,9 +828,7 @@ void CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
IFWL_App* pApp = m_pOwner->GetOwnerApp();
CFWL_NoteDriver* pDriver =
static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver());
- CFWL_WidgetImp* pSubFocusImp = m_pOwner->GetSubFocus();
- IFWL_Widget* pSubFocus =
- pSubFocusImp ? pSubFocusImp->GetInterface() : nullptr;
+ IFWL_Widget* pSubFocus = m_pOwner->GetSubFocus();
if (pSubFocus) {
if (pSubFocus == pDriver->GetFocus()) {
pDriver->SetFocus(nullptr);
@@ -914,7 +879,7 @@ void CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
if (!pWidgetMgr)
return;
- pWidgetMgr->AddRedrawCounts(m_pOwner->m_pInterface);
+ pWidgetMgr->AddRedrawCounts(m_pOwner);
if (!m_pOwner->m_bSetMaximize)
break;
@@ -935,9 +900,7 @@ void CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
OnClose(static_cast<CFWL_MsgClose*>(pMessage));
break;
}
- default: {
- break;
- }
+ default: { break; }
}
}
#endif // FWL_UseMacSystemBorder
@@ -1002,7 +965,7 @@ void CFWL_FormImpDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) {
m_pOwner->m_bMaximized = !m_pOwner->m_bMaximized;
} else if (pPressedBtn != m_pOwner->m_pMinBox) {
CFWL_EvtClose eClose;
- eClose.m_pSrcTarget = m_pOwner->m_pInterface;
+ eClose.m_pSrcTarget = m_pOwner;
m_pOwner->DispatchEvent(&eClose);
}
}
@@ -1100,7 +1063,7 @@ void CFWL_FormImpDelegate::OnWindowMove(CFWL_MsgWindowMove* pMsg) {
}
void CFWL_FormImpDelegate::OnClose(CFWL_MsgClose* pMsg) {
CFWL_EvtClose eClose;
- eClose.m_pSrcTarget = m_pOwner->m_pInterface;
+ eClose.m_pSrcTarget = m_pOwner;
m_pOwner->DispatchEvent(&eClose);
}
« no previous file with comments | « xfa/fwl/core/ifwl_form.h ('k') | xfa/fwl/core/ifwl_formproxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698