diff options
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/include/fxfa/fxfa.h | 144 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp | 4 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffdocview.cpp | 28 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffdocview.h | 18 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffnotify.cpp | 18 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffnotify.h | 4 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffpageview.cpp | 52 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffpageview.h | 30 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffsignature.cpp | 2 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_fftextedit.cpp | 4 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffwidget.h | 6 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp | 4 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp | 206 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffwidgethandler.h | 88 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_fwladapter.cpp | 6 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_rendercontext.h | 2 | ||||
-rw-r--r-- | xfa/src/fxfa/src/common/xfa_document.h | 4 | ||||
-rw-r--r-- | xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp | 2 | ||||
-rw-r--r-- | xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp | 4 |
19 files changed, 318 insertions, 308 deletions
diff --git a/xfa/include/fxfa/fxfa.h b/xfa/include/fxfa/fxfa.h index 4d6a036622..da39113062 100644 --- a/xfa/include/fxfa/fxfa.h +++ b/xfa/include/fxfa/fxfa.h @@ -35,9 +35,15 @@ protected: IXFA_Doc() { }
};
-typedef struct _XFA_HWIDGET {
- FX_LPVOID pData;
-}* XFA_HWIDGET;
+ +class IXFA_Widget {
+public:
+ virtual ~IXFA_Widget() { }
+protected:
+ IXFA_Widget() { }
+};
+
+ #include "fxfa_basic.h"
#include "fxfa_widget.h"
#define XFA_MBICON_Error 0
@@ -284,24 +290,24 @@ class IXFA_MenuHandler public:
virtual ~IXFA_MenuHandler() { }
- virtual FX_BOOL CanCopy(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL CanCut(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL CanPaste(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL CanSelectAll(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL CanDelete(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL CanDeSelect(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL Copy(XFA_HWIDGET hWidget, CFX_WideString &wsText) = 0;
- virtual FX_BOOL Cut(XFA_HWIDGET hWidget, CFX_WideString &wsText) = 0;
- virtual FX_BOOL Paste(XFA_HWIDGET hWidget, const CFX_WideString &wsText) = 0;
- virtual FX_BOOL SelectAll(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL Delete(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL DeSelect(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL CanUndo(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL CanRedo(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL Undo(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL Redo(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL GetSuggestWords(XFA_HWIDGET hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest) = 0;
- virtual FX_BOOL ReplaceSpellCheckWord(XFA_HWIDGET hWidget, CFX_PointF pointf, FX_BSTR bsReplace) = 0;
+ virtual FX_BOOL CanCopy(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL CanCut(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL CanPaste(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL CanSelectAll(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL CanDelete(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL CanDeSelect(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL Copy(IXFA_Widget* hWidget, CFX_WideString &wsText) = 0;
+ virtual FX_BOOL Cut(IXFA_Widget* hWidget, CFX_WideString &wsText) = 0;
+ virtual FX_BOOL Paste(IXFA_Widget* hWidget, const CFX_WideString &wsText) = 0;
+ virtual FX_BOOL SelectAll(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL Delete(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL DeSelect(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL CanUndo(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL CanRedo(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL Undo(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL Redo(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL GetSuggestWords(IXFA_Widget* hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest) = 0;
+ virtual FX_BOOL ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, FX_BSTR bsReplace) = 0;
};
#define XFA_INVALIDATE_AllPages 0x00000000
#define XFA_INVALIDATE_CurrentPage 0x00000001
@@ -326,13 +332,13 @@ public: virtual void SetChangeMark(IXFA_Doc* hDoc) = 0;
virtual void InvalidateRect(IXFA_PageView* pPageView, const CFX_RectF& rt, FX_DWORD dwFlags = 0) = 0;
- virtual void DisplayCaret(XFA_HWIDGET hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor) = 0;
- virtual FX_BOOL GetPopupPos(XFA_HWIDGET hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup,
+ virtual void DisplayCaret(IXFA_Widget* hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor) = 0;
+ virtual FX_BOOL GetPopupPos(IXFA_Widget* hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup,
const CFX_RectF &rtAnchor, CFX_RectF &rtPopup) = 0;
- virtual FX_BOOL PopupMenu(XFA_HWIDGET hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude = NULL) = 0;
+ virtual FX_BOOL PopupMenu(IXFA_Widget* hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude = NULL) = 0;
virtual void PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags) = 0;
- virtual void WidgetEvent(XFA_HWIDGET hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL) = 0;
- virtual FX_BOOL RenderCustomWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI)
+ virtual void WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL) = 0;
+ virtual FX_BOOL RenderCustomWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI)
{
return FALSE;
}
@@ -348,12 +354,12 @@ public: virtual void GotoURL(IXFA_Doc* hDoc, FX_WSTR bsURL, FX_BOOL bAppend = TRUE) = 0;
virtual FX_BOOL IsValidationsEnabled(IXFA_Doc* hDoc) = 0;
virtual void SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled) = 0;
- virtual void SetFocusWidget(IXFA_Doc* hDoc, XFA_HWIDGET hWidget) = 0;
+ virtual void SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0;
virtual void Print(IXFA_Doc* hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions) = 0;
virtual FX_INT32 AbsPageCountInBatch(IXFA_Doc* hDoc) = 0;
- virtual FX_INT32 AbsPageInBatch(IXFA_Doc* hDoc, XFA_HWIDGET hWidget) = 0;
+ virtual FX_INT32 AbsPageInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0;
virtual FX_INT32 SheetCountInBatch(IXFA_Doc* hDoc) = 0;
- virtual FX_INT32 SheetInBatch(IXFA_Doc* hDoc, XFA_HWIDGET hWidget) = 0;
+ virtual FX_INT32 SheetInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0;
virtual FX_INT32 Verify(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bUsed = TRUE)
{
return 0;
@@ -372,7 +378,7 @@ public: }
virtual void GetURL(IXFA_Doc* hDoc, CFX_WideString &wsDocURL) = 0;
virtual FX_ARGB GetHighlightColor(IXFA_Doc* hDoc) = 0;
- virtual void AddDoRecord(XFA_HWIDGET hWidget) = 0;
+ virtual void AddDoRecord(IXFA_Widget* hWidget) = 0;
virtual FX_BOOL SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit) = 0;
virtual FX_BOOL CheckWord(IXFA_Doc* hDoc, FX_BSTR sWord) = 0;
@@ -531,16 +537,16 @@ public: virtual void UpdateDocView() = 0;
virtual FX_INT32 CountPageViews() = 0;
virtual IXFA_PageView* GetPageView(FX_INT32 nIndex) = 0;
- virtual XFA_HWIDGET GetWidgetByName(FX_WSTR wsName) = 0;
+ virtual IXFA_Widget* GetWidgetByName(FX_WSTR wsName) = 0;
virtual CXFA_WidgetAcc* GetWidgetAccByName(FX_WSTR wsName) = 0;
virtual void ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc = NULL) = 0;
virtual FX_INT32 ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc = NULL) = 0;
virtual IXFA_WidgetHandler* GetWidgetHandler() = 0;
virtual IXFA_WidgetIterator* CreateWidgetIterator() = 0;
virtual IXFA_WidgetAccIterator* CreateWidgetAccIterator(XFA_WIDGETORDER eOrder = XFA_WIDGETORDER_PreOrder) = 0;
- virtual XFA_HWIDGET GetFocusWidget() = 0;
+ virtual IXFA_Widget* GetFocusWidget() = 0;
virtual void KillFocus() = 0;
- virtual FX_BOOL SetFocus(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL SetFocus(IXFA_Widget* hWidget) = 0;
};
#define XFA_TRAVERSEWAY_Tranvalse 0x0001
#define XFA_TRAVERSEWAY_Form 0x0002
@@ -562,7 +568,7 @@ public: virtual FX_INT32 LoadPageView(IFX_Pause *pPause = NULL) = 0;
virtual void UnloadPageView() = 0;
- virtual XFA_HWIDGET GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual IXFA_Widget* GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy) = 0;
virtual IXFA_WidgetIterator* CreateWidgetIterator(FX_DWORD dwTraverseWay = XFA_TRAVERSEWAY_Form, FX_DWORD dwWidgetFilter = XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_Viewable | XFA_WIDGETFILTER_AllType) = 0;
};
class CXFA_RenderOptions
@@ -625,35 +631,35 @@ class IXFA_WidgetHandler public:
virtual ~IXFA_WidgetHandler() { }
- virtual XFA_HWIDGET CreateWidget(XFA_HWIDGET hParent, XFA_WIDGETTYPE eType, XFA_HWIDGET hBefore = NULL) = 0;
- virtual IXFA_PageView* GetPageView(XFA_HWIDGET hWidget) = 0;
- virtual void GetRect(XFA_HWIDGET hWidget, CFX_RectF &rt) = 0;
- virtual FX_DWORD GetStatus(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL GetBBox(XFA_HWIDGET hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus = FALSE) = 0;
- virtual CXFA_WidgetAcc* GetDataAcc(XFA_HWIDGET hWidget) = 0;
-
- virtual void GetName(XFA_HWIDGET hWidget, CFX_WideString &wsName, FX_INT32 iNameType = 0) = 0;
- virtual FX_BOOL GetToolTip(XFA_HWIDGET hWidget, CFX_WideString &wsToolTip) = 0;
- virtual void SetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback) = 0;
- virtual FX_LPVOID GetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id) = 0;
- virtual FX_BOOL OnMouseEnter(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL OnMouseExit(XFA_HWIDGET hWidget) = 0;
- virtual FX_BOOL OnLButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
- virtual FX_BOOL OnLButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
- virtual FX_BOOL OnLButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
- virtual FX_BOOL OnMouseMove(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
- virtual FX_BOOL OnMouseWheel(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy) = 0;
- virtual FX_BOOL OnRButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
- virtual FX_BOOL OnRButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
- virtual FX_BOOL OnRButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
-
- virtual FX_BOOL OnKeyDown(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags) = 0;
- virtual FX_BOOL OnKeyUp(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags) = 0;
- virtual FX_BOOL OnChar(XFA_HWIDGET hWidget, FX_DWORD dwChar, FX_DWORD dwFlags) = 0;
- virtual FX_DWORD OnHitTest(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;
- virtual FX_BOOL OnSetCursor(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;
-
- virtual void RenderWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_BOOL bHighlight = FALSE) = 0;
+ virtual IXFA_Widget* CreateWidget(IXFA_Widget* hParent, XFA_WIDGETTYPE eType, IXFA_Widget* hBefore = NULL) = 0;
+ virtual IXFA_PageView* GetPageView(IXFA_Widget* hWidget) = 0;
+ virtual void GetRect(IXFA_Widget* hWidget, CFX_RectF &rt) = 0;
+ virtual FX_DWORD GetStatus(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL GetBBox(IXFA_Widget* hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus = FALSE) = 0;
+ virtual CXFA_WidgetAcc* GetDataAcc(IXFA_Widget* hWidget) = 0;
+
+ virtual void GetName(IXFA_Widget* hWidget, CFX_WideString &wsName, FX_INT32 iNameType = 0) = 0;
+ virtual FX_BOOL GetToolTip(IXFA_Widget* hWidget, CFX_WideString &wsToolTip) = 0;
+ virtual void SetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback) = 0;
+ virtual FX_LPVOID GetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id) = 0;
+ virtual FX_BOOL OnMouseEnter(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL OnMouseExit(IXFA_Widget* hWidget) = 0;
+ virtual FX_BOOL OnLButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnLButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnLButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnMouseMove(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnMouseWheel(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnRButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnRButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnRButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+
+ virtual FX_BOOL OnKeyDown(IXFA_Widget* hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags) = 0;
+ virtual FX_BOOL OnKeyUp(IXFA_Widget* hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags) = 0;
+ virtual FX_BOOL OnChar(IXFA_Widget* hWidget, FX_DWORD dwChar, FX_DWORD dwFlags) = 0;
+ virtual FX_DWORD OnHitTest(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnSetCursor(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;
+
+ virtual void RenderWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_BOOL bHighlight = FALSE) = 0;
virtual FX_BOOL HasEvent(CXFA_WidgetAcc* pWidgetAcc, XFA_EVENTTYPE eEventType) = 0;
virtual FX_INT32 ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam) = 0;
};
@@ -662,12 +668,12 @@ class IXFA_WidgetIterator public:
virtual void Release() = 0;
virtual void Reset() = 0;
- virtual XFA_HWIDGET MoveToFirst() = 0;
- virtual XFA_HWIDGET MoveToLast() = 0;
- virtual XFA_HWIDGET MoveToNext() = 0;
- virtual XFA_HWIDGET MoveToPrevious() = 0;
- virtual XFA_HWIDGET GetCurrentWidget() = 0;
- virtual FX_BOOL SetCurrentWidget(XFA_HWIDGET hWidget) = 0;
+ virtual IXFA_Widget* MoveToFirst() = 0;
+ virtual IXFA_Widget* MoveToLast() = 0;
+ virtual IXFA_Widget* MoveToNext() = 0;
+ virtual IXFA_Widget* MoveToPrevious() = 0;
+ virtual IXFA_Widget* GetCurrentWidget() = 0;
+ virtual FX_BOOL SetCurrentWidget(IXFA_Widget* hWidget) = 0;
protected:
~IXFA_WidgetIterator() { }
};
diff --git a/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp b/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp index d7faedc45a..81b7ccb76f 100644 --- a/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp @@ -309,7 +309,7 @@ FX_BOOL CXFA_FFComboBox::OnRButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) }
CFX_PointF pt;
pt.Set(fx, fy);
- GetDoc()->GetDocProvider()->PopupMenu((XFA_HWIDGET)this, pt, NULL);
+ GetDoc()->GetDocProvider()->PopupMenu(this, pt, NULL);
return TRUE;
}
FX_BOOL CXFA_FFComboBox::OnKillFocus(CXFA_FFWidget* pNewWidget)
@@ -531,7 +531,7 @@ void CXFA_FFComboBox::OnPostOpen(IFWL_Widget *pWidget) }
void CXFA_FFComboBox::OnAddDoRecord(IFWL_Widget *pWidget)
{
- GetDoc()->GetDocProvider()->AddDoRecord((XFA_HWIDGET)this);
+ GetDoc()->GetDocProvider()->AddDoRecord(this);
}
FX_INT32 CXFA_FFComboBox::OnProcessMessage(CFWL_Message *pMessage)
{
diff --git a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp index 32d2789c7d..7f80c416b2 100644 --- a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp @@ -222,9 +222,9 @@ IXFA_PageView* CXFA_FFDocView::GetPageView(FX_INT32 nIndex) }
return (CXFA_FFPageView*)m_pXFADocLayout->GetPage(nIndex);
}
-XFA_HWIDGET CXFA_FFDocView::GetWidgetByName(FX_WSTR wsName)
+IXFA_Widget* CXFA_FFDocView::GetWidgetByName(FX_WSTR wsName)
{
- return (XFA_HWIDGET)GetWidgetByName(wsName, NULL);
+ return GetWidgetByName(wsName, NULL);
}
CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(FX_WSTR wsName)
{
@@ -353,9 +353,9 @@ IXFA_WidgetAccIterator* CXFA_FFDocView::CreateWidgetAccIterator(XFA_WIDGETORDER }
return FX_NEW CXFA_WidgetAccIterator(this, pFormRoot);
}
-XFA_HWIDGET CXFA_FFDocView::GetFocusWidget()
+IXFA_Widget* CXFA_FFDocView::GetFocusWidget()
{
- return (XFA_HWIDGET)m_pFocusWidget;
+ return m_pFocusWidget;
}
void CXFA_FFDocView::KillFocus()
{
@@ -366,7 +366,7 @@ void CXFA_FFDocView::KillFocus() m_pFocusWidget = NULL;
m_pOldFocusWidget = NULL;
}
-FX_BOOL CXFA_FFDocView::SetFocus(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFDocView::SetFocus(IXFA_Widget* hWidget)
{
CXFA_FFWidget* pNewFocus = (CXFA_FFWidget*)hWidget;
if (m_pOldFocusWidget == pNewFocus) {
@@ -416,10 +416,10 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetFocusWidgetAcc() void CXFA_FFDocView::SetFocusWidgetAcc(CXFA_WidgetAcc* pWidgetAcc)
{
CXFA_FFWidget* pNewFocus = pWidgetAcc ? pWidgetAcc->GetNextWidget(NULL) : NULL;
- if (SetFocus((XFA_HWIDGET)pNewFocus)) {
+ if (SetFocus(pNewFocus)) {
m_pFocusAcc = pWidgetAcc;
if (m_iStatus >= XFA_DOCVIEW_LAYOUTSTATUS_End) {
- m_pDoc->GetDocProvider()->SetFocusWidget(m_pDoc, (XFA_HWIDGET)m_pFocusWidget);
+ m_pDoc->GetDocProvider()->SetFocusWidget(m_pDoc, m_pFocusWidget);
}
}
}
@@ -865,15 +865,15 @@ void CXFA_FFDocWidgetIterator::Reset() m_ContentIterator.Reset();
m_pCurWidget = NULL;
}
-XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToFirst()
+IXFA_Widget* CXFA_FFDocWidgetIterator::MoveToFirst()
{
return NULL;
}
-XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToLast()
+IXFA_Widget* CXFA_FFDocWidgetIterator::MoveToLast()
{
return NULL;
}
-XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToNext()
+IXFA_Widget* CXFA_FFDocWidgetIterator::MoveToNext()
{
CXFA_Node* pItem = m_pCurWidget ? m_ContentIterator.MoveToNext() : m_ContentIterator.GetCurrent();
while (pItem) {
@@ -882,22 +882,22 @@ XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToNext() if (!m_pCurWidget->IsLoaded() && (m_pCurWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) {
m_pCurWidget->LoadWidget();
}
- return (XFA_HWIDGET)m_pCurWidget;
+ return m_pCurWidget;
}
}
pItem = m_ContentIterator.MoveToNext();
}
return NULL;
}
-XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToPrevious()
+IXFA_Widget* CXFA_FFDocWidgetIterator::MoveToPrevious()
{
return NULL;
}
-XFA_HWIDGET CXFA_FFDocWidgetIterator::GetCurrentWidget()
+IXFA_Widget* CXFA_FFDocWidgetIterator::GetCurrentWidget()
{
return NULL;
}
-FX_BOOL CXFA_FFDocWidgetIterator::SetCurrentWidget(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFDocWidgetIterator::SetCurrentWidget(IXFA_Widget* hWidget)
{
return FALSE;
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffdocview.h b/xfa/src/fxfa/src/app/xfa_ffdocview.h index 79a3008d70..e3f2d643e2 100644 --- a/xfa/src/fxfa/src/app/xfa_ffdocview.h +++ b/xfa/src/fxfa/src/app/xfa_ffdocview.h @@ -45,16 +45,16 @@ public: virtual void UpdateDocView();
virtual FX_INT32 CountPageViews();
virtual IXFA_PageView* GetPageView(FX_INT32 nIndex);
- virtual XFA_HWIDGET GetWidgetByName(FX_WSTR wsName);
+ virtual IXFA_Widget* GetWidgetByName(FX_WSTR wsName);
virtual CXFA_WidgetAcc* GetWidgetAccByName(FX_WSTR wsName);
virtual void ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc = NULL);
virtual FX_INT32 ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc = NULL);
virtual IXFA_WidgetHandler* GetWidgetHandler();
virtual IXFA_WidgetIterator* CreateWidgetIterator();
virtual IXFA_WidgetAccIterator* CreateWidgetAccIterator(XFA_WIDGETORDER eOrder = XFA_WIDGETORDER_PreOrder);
- virtual XFA_HWIDGET GetFocusWidget();
+ virtual IXFA_Widget* GetFocusWidget();
virtual void KillFocus();
- virtual FX_BOOL SetFocus(XFA_HWIDGET hWidget);
+ virtual FX_BOOL SetFocus(IXFA_Widget* hWidget);
CXFA_FFWidget* GetWidgetByName(FX_WSTR wsName, CXFA_FFWidget* pRefWidget = NULL);
CXFA_WidgetAcc* GetWidgetAccByName(FX_WSTR wsName, CXFA_WidgetAcc* pRefWidgetAcc = NULL);
IXFA_DocLayout* GetXFALayout() const;
@@ -129,12 +129,12 @@ public: }
virtual void Reset();
- virtual XFA_HWIDGET MoveToFirst();
- virtual XFA_HWIDGET MoveToLast();
- virtual XFA_HWIDGET MoveToNext();
- virtual XFA_HWIDGET MoveToPrevious();
- virtual XFA_HWIDGET GetCurrentWidget();
- virtual FX_BOOL SetCurrentWidget(XFA_HWIDGET hWidget);
+ virtual IXFA_Widget* MoveToFirst();
+ virtual IXFA_Widget* MoveToLast();
+ virtual IXFA_Widget* MoveToNext();
+ virtual IXFA_Widget* MoveToPrevious();
+ virtual IXFA_Widget* GetCurrentWidget();
+ virtual FX_BOOL SetCurrentWidget(IXFA_Widget* hWidget);
protected:
CXFA_ContainerIterator m_ContentIterator;
CXFA_FFDocView* m_pDocView;
diff --git a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp index 2d6cc75046..81119e6e47 100644 --- a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp @@ -84,7 +84,7 @@ void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent CXFA_FFWidget* pWidget = pWidgetAcc->GetNextWidget(NULL);
if (!pWidget) {
if (bStaticNotify) {
- pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent((XFA_HWIDGET)pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemAdded, pParam, pAdditional);
+ pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent(pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemAdded, pParam, pAdditional);
}
return;
}
@@ -97,7 +97,7 @@ void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent }
}
if (bStaticNotify) {
- pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent((XFA_HWIDGET)pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemAdded, pParam, pAdditional);
+ pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent(pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemAdded, pParam, pAdditional);
}
pWidget = pWidgetAcc->GetNextWidget(pWidget);
}
@@ -111,7 +111,7 @@ void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent CXFA_FFWidget* pWidget = pWidgetAcc->GetNextWidget(NULL);
if (!pWidget) {
if (bStaticNotify) {
- pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent((XFA_HWIDGET)pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemRemoved, pParam, pAdditional);
+ pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent(pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemRemoved, pParam, pAdditional);
}
return;
}
@@ -124,7 +124,7 @@ void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent }
}
if (bStaticNotify) {
- pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent((XFA_HWIDGET)pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemRemoved, pParam, pAdditional);
+ pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent(pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemRemoved, pParam, pAdditional);
}
pWidget = pWidgetAcc->GetNextWidget(pWidget);
}
@@ -315,11 +315,11 @@ IXFA_WidgetHandler* CXFA_FFNotify::GetWidgetHandler() CXFA_FFDocView* pDocView = m_pDoc->GetDocView();
return pDocView ? pDocView->GetWidgetHandler() : NULL;
}
-XFA_HWIDGET CXFA_FFNotify::GetHWidget(CXFA_LayoutItem* pLayoutItem)
+IXFA_Widget* CXFA_FFNotify::GetHWidget(CXFA_LayoutItem* pLayoutItem)
{
- return (XFA_HWIDGET)XFA_GetWidgetFromLayoutItem(pLayoutItem);
+ return XFA_GetWidgetFromLayoutItem(pLayoutItem);
}
-void CXFA_FFNotify::OpenDropDownList(XFA_HWIDGET hWidget)
+void CXFA_FFNotify::OpenDropDownList(IXFA_Widget* hWidget)
{
CXFA_FFWidget* pWidget = (CXFA_FFWidget*)hWidget;
if (pWidget->GetDataAcc()->GetUIType() != XFA_ELEMENT_ChoiceList) {
@@ -553,7 +553,7 @@ void CXFA_FFNotify::OnLayoutItemAdd(CXFA_FFDocView* pDocView, IXFA_DocLayout *pL IXFA_PageView* pPrePageView = pWidget->GetPageView();
if (pPrePageView != pNewPageView || (dwStatus & (XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable)) == (XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable)) {
pWidget->SetPageView(pNewPageView);
- m_pDoc->GetDocProvider()->WidgetEvent((XFA_HWIDGET)pWidget, pWidget->GetDataAcc(), XFA_WIDGETEVENT_PostAdded, pNewPageView, pPrePageView);
+ m_pDoc->GetDocProvider()->WidgetEvent(pWidget, pWidget->GetDataAcc(), XFA_WIDGETEVENT_PostAdded, pNewPageView, pPrePageView);
}
if ((dwStatus & XFA_WIDGETSTATUS_Visible) == 0) {
return;
@@ -580,7 +580,7 @@ void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_FFDocView* pDocView, IXFA_DocLayou if (pDocView->GetLayoutStatus() < XFA_DOCVIEW_LAYOUTSTATUS_End) {
return;
}
- m_pDoc->GetDocProvider()->WidgetEvent((XFA_HWIDGET)pWidget, pWidget->GetDataAcc(), XFA_WIDGETEVENT_PreRemoved, NULL, NULL);
+ m_pDoc->GetDocProvider()->WidgetEvent(pWidget, pWidget->GetDataAcc(), XFA_WIDGETEVENT_PreRemoved, NULL, NULL);
pWidget->AddInvalidateRect(NULL);
}
void CXFA_FFNotify::OnLayoutItemRectChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2)
diff --git a/xfa/src/fxfa/src/app/xfa_ffnotify.h b/xfa/src/fxfa/src/app/xfa_ffnotify.h index 739f25302f..383b0770cb 100644 --- a/xfa/src/fxfa/src/app/xfa_ffnotify.h +++ b/xfa/src/fxfa/src/app/xfa_ffnotify.h @@ -28,8 +28,8 @@ public: virtual IXFA_DocProvider* GetDocProvider();
virtual IXFA_AppProvider* GetAppProvider();
virtual IXFA_WidgetHandler* GetWidgetHandler();
- virtual XFA_HWIDGET GetHWidget(CXFA_LayoutItem* pLayoutItem);
- virtual void OpenDropDownList(XFA_HWIDGET hWidget);
+ virtual IXFA_Widget* GetHWidget(CXFA_LayoutItem* pLayoutItem);
+ virtual void OpenDropDownList(IXFA_Widget* hWidget);
virtual CFX_WideString GetCurrentDateTime();
virtual void ResetData(CXFA_WidgetData* pWidgetData = NULL);
virtual FX_INT32 GetLayoutStatus();
diff --git a/xfa/src/fxfa/src/app/xfa_ffpageview.cpp b/xfa/src/fxfa/src/app/xfa_ffpageview.cpp index ec591adb72..ef340859ea 100644 --- a/xfa/src/fxfa/src/app/xfa_ffpageview.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffpageview.cpp @@ -66,7 +66,7 @@ FX_BOOL CXFA_FFPageView::IsPageViewLoaded() {
return m_bLoaded;
}
-XFA_HWIDGET CXFA_FFPageView::GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy)
+IXFA_Widget* CXFA_FFPageView::GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy)
{
if (!m_bLoaded) {
return NULL;
@@ -87,7 +87,7 @@ XFA_HWIDGET CXFA_FFPageView::GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy) if (( FWL_WGTHITTEST_Client == dwFlag
|| FWL_WGTHITTEST_Transparent == dwFlag)) {
pIterator->Release();
- return (XFA_HWIDGET)pWidget;
+ return pWidget;
}
}
pIterator->Release();
@@ -135,52 +135,52 @@ void CXFA_FFPageWidgetIterator::Reset() {
m_sIterator.Reset();
}
-XFA_HWIDGET CXFA_FFPageWidgetIterator::MoveToFirst()
+IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToFirst()
{
m_sIterator.Reset();
for(CXFA_LayoutItem* pLayoutItem = m_sIterator.GetCurrent(); pLayoutItem; pLayoutItem = m_sIterator.MoveToNext()) {
- if (XFA_HWIDGET hWidget = GetWidget(pLayoutItem)) {
+ if (IXFA_Widget* hWidget = GetWidget(pLayoutItem)) {
return hWidget;
}
}
return NULL;
}
-XFA_HWIDGET CXFA_FFPageWidgetIterator::MoveToLast()
+IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToLast()
{
m_sIterator.SetCurrent(NULL);
return MoveToPrevious();
}
-XFA_HWIDGET CXFA_FFPageWidgetIterator::MoveToNext()
+IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToNext()
{
for(CXFA_LayoutItem* pLayoutItem = m_sIterator.MoveToNext(); pLayoutItem; pLayoutItem = m_sIterator.MoveToNext()) {
- if (XFA_HWIDGET hWidget = GetWidget(pLayoutItem)) {
+ if (IXFA_Widget* hWidget = GetWidget(pLayoutItem)) {
return hWidget;
}
}
return NULL;
}
-XFA_HWIDGET CXFA_FFPageWidgetIterator::MoveToPrevious()
+IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToPrevious()
{
for(CXFA_LayoutItem* pLayoutItem = m_sIterator.MoveToPrev(); pLayoutItem; pLayoutItem = m_sIterator.MoveToPrev()) {
- if (XFA_HWIDGET hWidget = GetWidget(pLayoutItem)) {
+ if (IXFA_Widget* hWidget = GetWidget(pLayoutItem)) {
return hWidget;
}
}
return NULL;
}
-XFA_HWIDGET CXFA_FFPageWidgetIterator::GetCurrentWidget()
+IXFA_Widget* CXFA_FFPageWidgetIterator::GetCurrentWidget()
{
CXFA_LayoutItem* pLayoutItem = m_sIterator.GetCurrent();
- return pLayoutItem ? (XFA_HWIDGET)XFA_GetWidgetFromLayoutItem(pLayoutItem) : NULL;
+ return pLayoutItem ? XFA_GetWidgetFromLayoutItem(pLayoutItem) : NULL;
}
-FX_BOOL CXFA_FFPageWidgetIterator::SetCurrentWidget(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFPageWidgetIterator::SetCurrentWidget(IXFA_Widget* hWidget)
{
if(hWidget && m_sIterator.SetCurrent(((CXFA_FFWidget*)hWidget)->GetLayoutItem())) {
return TRUE;
}
return FALSE;
}
-XFA_HWIDGET CXFA_FFPageWidgetIterator::GetWidget(CXFA_LayoutItem* pLayoutItem)
+IXFA_Widget* CXFA_FFPageWidgetIterator::GetWidget(CXFA_LayoutItem* pLayoutItem)
{
if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) {
if (!XFA_PageWidgetFilter(pWidget, m_dwFilter, FALSE, m_bIgnorerelevant)) {
@@ -189,7 +189,7 @@ XFA_HWIDGET CXFA_FFPageWidgetIterator::GetWidget(CXFA_LayoutItem* pLayoutItem) if (!pWidget->IsLoaded() && (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible) != 0) {
pWidget->LoadWidget();
}
- return (XFA_HWIDGET)pWidget;
+ return pWidget;
}
return NULL;
}
@@ -213,62 +213,62 @@ void CXFA_FFTabOrderPageWidgetIterator::Reset() CreateTabOrderWidgetArray();
m_iCurWidget = -1;
}
-XFA_HWIDGET CXFA_FFTabOrderPageWidgetIterator::MoveToFirst()
+IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToFirst()
{
if (m_TabOrderWidgetArray.GetSize() > 0) {
for (FX_INT32 i = 0; i < m_TabOrderWidgetArray.GetSize(); i++) {
if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, m_bIgnorerelevant)) {
m_iCurWidget = i;
- return (XFA_HWIDGET)m_TabOrderWidgetArray[m_iCurWidget];
+ return m_TabOrderWidgetArray[m_iCurWidget];
}
}
}
return NULL;
}
-XFA_HWIDGET CXFA_FFTabOrderPageWidgetIterator::MoveToLast()
+IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToLast()
{
if (m_TabOrderWidgetArray.GetSize() > 0) {
for (FX_INT32 i = m_TabOrderWidgetArray.GetSize() - 1; i >= 0; i--) {
if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, m_bIgnorerelevant)) {
m_iCurWidget = i;
- return (XFA_HWIDGET)m_TabOrderWidgetArray[m_iCurWidget];
+ return m_TabOrderWidgetArray[m_iCurWidget];
}
}
}
return NULL;
}
-XFA_HWIDGET CXFA_FFTabOrderPageWidgetIterator::MoveToNext()
+IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToNext()
{
for (FX_INT32 i = m_iCurWidget + 1; i < m_TabOrderWidgetArray.GetSize(); i++) {
if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, m_bIgnorerelevant)) {
m_iCurWidget = i;
- return (XFA_HWIDGET)m_TabOrderWidgetArray[m_iCurWidget];
+ return m_TabOrderWidgetArray[m_iCurWidget];
}
}
m_iCurWidget = -1;
return NULL;
}
-XFA_HWIDGET CXFA_FFTabOrderPageWidgetIterator::MoveToPrevious()
+IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToPrevious()
{
for (FX_INT32 i = m_iCurWidget - 1; i >= 0; i--) {
if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, m_bIgnorerelevant)) {
m_iCurWidget = i;
- return (XFA_HWIDGET)m_TabOrderWidgetArray[m_iCurWidget];
+ return m_TabOrderWidgetArray[m_iCurWidget];
}
}
m_iCurWidget = -1;
return NULL;
}
-XFA_HWIDGET CXFA_FFTabOrderPageWidgetIterator::GetCurrentWidget()
+IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::GetCurrentWidget()
{
if (m_iCurWidget >= 0) {
- return (XFA_HWIDGET)m_TabOrderWidgetArray[m_iCurWidget];
+ return m_TabOrderWidgetArray[m_iCurWidget];
}
return NULL;
}
-FX_BOOL CXFA_FFTabOrderPageWidgetIterator::SetCurrentWidget(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFTabOrderPageWidgetIterator::SetCurrentWidget(IXFA_Widget* hWidget)
{
- FX_INT32 iWidgetIndex = m_TabOrderWidgetArray.Find((CXFA_FFWidget*)hWidget);
+ FX_INT32 iWidgetIndex = m_TabOrderWidgetArray.Find(static_cast<CXFA_FFWidget*>(hWidget));
if (iWidgetIndex >= 0) {
m_iCurWidget = iWidgetIndex;
return TRUE;
diff --git a/xfa/src/fxfa/src/app/xfa_ffpageview.h b/xfa/src/fxfa/src/app/xfa_ffpageview.h index 019c324174..dd0a481ffb 100644 --- a/xfa/src/fxfa/src/app/xfa_ffpageview.h +++ b/xfa/src/fxfa/src/app/xfa_ffpageview.h @@ -21,7 +21,7 @@ public: virtual void UnloadPageView();
FX_BOOL IsPageViewLoaded();
- virtual XFA_HWIDGET GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy);
+ virtual IXFA_Widget* GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy);
virtual IXFA_WidgetIterator* CreateWidgetIterator(FX_DWORD dwTraverseWay = XFA_TRAVERSEWAY_Form,
FX_DWORD dwWidgetFilter = XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_Viewable | XFA_WIDGETFILTER_AllType);
IXFA_LayoutPage* GetLayoutPage()
@@ -44,16 +44,16 @@ public: }
virtual void Reset();
- virtual XFA_HWIDGET MoveToFirst();
- virtual XFA_HWIDGET MoveToLast();
- virtual XFA_HWIDGET MoveToNext();
- virtual XFA_HWIDGET MoveToPrevious();
- virtual XFA_HWIDGET GetCurrentWidget();
- virtual FX_BOOL SetCurrentWidget(XFA_HWIDGET hWidget);
+ virtual IXFA_Widget* MoveToFirst();
+ virtual IXFA_Widget* MoveToLast();
+ virtual IXFA_Widget* MoveToNext();
+ virtual IXFA_Widget* MoveToPrevious();
+ virtual IXFA_Widget* GetCurrentWidget();
+ virtual FX_BOOL SetCurrentWidget(IXFA_Widget* hWidget);
protected:
- XFA_HWIDGET GetWidget(CXFA_LayoutItem* pLayoutItem);
+ IXFA_Widget* GetWidget(CXFA_LayoutItem* pLayoutItem);
CXFA_FFPageView* m_pPageView;
- XFA_HWIDGET m_hCurWidget;
+ IXFA_Widget* m_hCurWidget;
FX_DWORD m_dwFilter;
FX_BOOL m_bIgnorerelevant;
CXFA_LayoutItemIterator m_sIterator;
@@ -77,12 +77,12 @@ public: virtual void Release();
virtual void Reset();
- virtual XFA_HWIDGET MoveToFirst();
- virtual XFA_HWIDGET MoveToLast();
- virtual XFA_HWIDGET MoveToNext();
- virtual XFA_HWIDGET MoveToPrevious();
- virtual XFA_HWIDGET GetCurrentWidget();
- virtual FX_BOOL SetCurrentWidget(XFA_HWIDGET hWidget);
+ virtual IXFA_Widget* MoveToFirst();
+ virtual IXFA_Widget* MoveToLast();
+ virtual IXFA_Widget* MoveToNext();
+ virtual IXFA_Widget* MoveToPrevious();
+ virtual IXFA_Widget* GetCurrentWidget();
+ virtual FX_BOOL SetCurrentWidget(IXFA_Widget* hWidget);
protected:
CXFA_WidgetArray m_TabOrderWidgetArray;
CXFA_FFPageView* m_pPageView;
diff --git a/xfa/src/fxfa/src/app/xfa_ffsignature.cpp b/xfa/src/fxfa/src/app/xfa_ffsignature.cpp index 42b75d60c6..a7f48c7033 100644 --- a/xfa/src/fxfa/src/app/xfa_ffsignature.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffsignature.cpp @@ -40,7 +40,7 @@ void CXFA_FFSignature::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_ CFX_RectF rtWidget = m_rtUI;
IXFA_DocProvider* pDocProvider = m_pDataAcc->GetDoc()->GetDocProvider();
FXSYS_assert(pDocProvider);
- pDocProvider->RenderCustomWidget((XFA_HWIDGET)this, pGS, &mtRotate, rtWidget);
+ pDocProvider->RenderCustomWidget(this, pGS, &mtRotate, rtWidget);
}
FX_BOOL CXFA_FFSignature::OnMouseEnter()
{
diff --git a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp index 417891094f..5d50c52e84 100644 --- a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp +++ b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp @@ -138,7 +138,7 @@ FX_BOOL CXFA_FFTextEdit::OnRButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) }
CFX_PointF pt;
pt.Set(fx, fy);
- GetDoc()->GetDocProvider()->PopupMenu((XFA_HWIDGET)this, pt, NULL);
+ GetDoc()->GetDocProvider()->PopupMenu(this, pt, NULL);
return TRUE;
}
FX_BOOL CXFA_FFTextEdit::OnSetFocus(CXFA_FFWidget* pOldWidget)
@@ -388,7 +388,7 @@ void CXFA_FFTextEdit::OnTextFull(IFWL_Widget *pWidget) }
void CXFA_FFTextEdit::OnAddDoRecord(IFWL_Widget *pWidget)
{
- GetDoc()->GetDocProvider()->AddDoRecord((XFA_HWIDGET)this);
+ GetDoc()->GetDocProvider()->AddDoRecord(this);
}
FX_BOOL CXFA_FFTextEdit::CheckWord(FX_BSTR sWord)
{
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.h b/xfa/src/fxfa/src/app/xfa_ffwidget.h index 2e757238e6..8f19e71a0e 100644 --- a/xfa/src/fxfa/src/app/xfa_ffwidget.h +++ b/xfa/src/fxfa/src/app/xfa_ffwidget.h @@ -6,11 +6,15 @@ #ifndef _FXFA_FORMFILLER_WIDGET_IMP_H
#define _FXFA_FORMFILLER_WIDGET_IMP_H
+
+#include "../../../../include/fxfa/fxfa.h"
+
class CXFA_FFPageView;
class CXFA_FFDocView;
class CXFA_FFDoc;
class CXFA_FFApp;
class CXFA_LayoutItem;
+
#define XFA_GOTO_POSITION_IF_FAIL(arg, pos) { if (!(arg)) goto pos; }
inline FX_FLOAT XFA_UnitPx2Pt(FX_FLOAT fPx, FX_FLOAT fDpi)
{
@@ -34,7 +38,7 @@ public: CFX_PtrArray m_Globals;
FX_INT32 m_iRefCount;
};
-class CXFA_FFWidget : public CFX_PrivateData, public CXFA_ContentLayoutItemImpl
+class CXFA_FFWidget : public IXFA_Widget, public CFX_PrivateData, public CXFA_ContentLayoutItemImpl
{
public:
CXFA_FFWidget(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp index d953e2bbe3..a154d76392 100644 --- a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp @@ -752,7 +752,7 @@ void CXFA_WidgetAcc::NotifyEvent(FX_DWORD dwEvent, CXFA_FFWidget* pWidget , FX_L {
IXFA_DocProvider* pDocProvider = GetDoc()->GetDocProvider();
if (pWidget) {
- pDocProvider->WidgetEvent((XFA_HWIDGET)pWidget, this, dwEvent, pParam, pAdditional);
+ pDocProvider->WidgetEvent(pWidget, this, dwEvent, pParam, pAdditional);
} else {
pWidget = GetNextWidget(pWidget);
if (pWidget == NULL) {
@@ -760,7 +760,7 @@ void CXFA_WidgetAcc::NotifyEvent(FX_DWORD dwEvent, CXFA_FFWidget* pWidget , FX_L return;
}
while (pWidget) {
- pDocProvider->WidgetEvent((XFA_HWIDGET)pWidget, this, dwEvent, pParam, pAdditional);
+ pDocProvider->WidgetEvent(pWidget, this, dwEvent, pParam, pAdditional);
pWidget = GetNextWidget(pWidget);
}
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp index 9790b4bb3a..856c0792bb 100644 --- a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp @@ -20,160 +20,160 @@ CXFA_FFWidgetHandler::CXFA_FFWidgetHandler(CXFA_FFDocView* pDocView) CXFA_FFWidgetHandler::~CXFA_FFWidgetHandler()
{
}
-IXFA_PageView* CXFA_FFWidgetHandler::GetPageView(XFA_HWIDGET hWidget)
+IXFA_PageView* CXFA_FFWidgetHandler::GetPageView(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->GetPageView();
+ return static_cast<CXFA_FFWidget*>(hWidget)->GetPageView();
}
-void CXFA_FFWidgetHandler::GetRect(XFA_HWIDGET hWidget, CFX_RectF &rt)
+void CXFA_FFWidgetHandler::GetRect(IXFA_Widget* hWidget, CFX_RectF &rt)
{
- ((CXFA_FFWidget*)hWidget)->GetWidgetRect(rt);
+ static_cast<CXFA_FFWidget*>(hWidget)->GetWidgetRect(rt);
}
-FX_DWORD CXFA_FFWidgetHandler::GetStatus(XFA_HWIDGET hWidget)
+FX_DWORD CXFA_FFWidgetHandler::GetStatus(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->GetStatus();
+ return static_cast<CXFA_FFWidget*>(hWidget)->GetStatus();
}
-FX_BOOL CXFA_FFWidgetHandler::GetBBox(XFA_HWIDGET hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus)
+FX_BOOL CXFA_FFWidgetHandler::GetBBox(IXFA_Widget* hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus)
{
- return ((CXFA_FFWidget*)hWidget)->GetBBox(rtBox, dwStatus, bDrawFocus);
+ return static_cast<CXFA_FFWidget*>(hWidget)->GetBBox(rtBox, dwStatus, bDrawFocus);
}
-CXFA_WidgetAcc* CXFA_FFWidgetHandler::GetDataAcc(XFA_HWIDGET hWidget)
+CXFA_WidgetAcc* CXFA_FFWidgetHandler::GetDataAcc(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->GetDataAcc();
+ return static_cast<CXFA_FFWidget*>(hWidget)->GetDataAcc();
}
-void CXFA_FFWidgetHandler::GetName(XFA_HWIDGET hWidget, CFX_WideString &wsName, FX_INT32 iNameType )
+void CXFA_FFWidgetHandler::GetName(IXFA_Widget* hWidget, CFX_WideString &wsName, FX_INT32 iNameType )
{
- ((CXFA_FFWidget*)hWidget)->GetDataAcc()->GetName(wsName, iNameType);
+ static_cast<CXFA_FFWidget*>(hWidget)->GetDataAcc()->GetName(wsName, iNameType);
}
-FX_BOOL CXFA_FFWidgetHandler::GetToolTip(XFA_HWIDGET hWidget, CFX_WideString &wsToolTip)
+FX_BOOL CXFA_FFWidgetHandler::GetToolTip(IXFA_Widget* hWidget, CFX_WideString &wsToolTip)
{
- return ((CXFA_FFWidget*)hWidget)->GetToolTip(wsToolTip);
+ return static_cast<CXFA_FFWidget*>(hWidget)->GetToolTip(wsToolTip);
}
-void CXFA_FFWidgetHandler::SetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback)
+void CXFA_FFWidgetHandler::SetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback)
{
- ((CXFA_FFWidget*)hWidget)->SetPrivateData(module_id, pData, callback);
+ static_cast<CXFA_FFWidget*>(hWidget)->SetPrivateData(module_id, pData, callback);
}
-FX_LPVOID CXFA_FFWidgetHandler::GetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id)
+FX_LPVOID CXFA_FFWidgetHandler::GetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id)
{
- return ((CXFA_FFWidget*)hWidget)->GetPrivateData(module_id);
+ return static_cast<CXFA_FFWidget*>(hWidget)->GetPrivateData(module_id);
}
-FX_BOOL CXFA_FFWidgetHandler::OnMouseEnter(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFWidgetHandler::OnMouseEnter(IXFA_Widget* hWidget)
{
m_pDocView->LockUpdate();
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnMouseEnter();
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnMouseEnter();
m_pDocView->UnlockUpdate();
m_pDocView->UpdateDocView();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnMouseExit(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFWidgetHandler::OnMouseExit(IXFA_Widget* hWidget)
{
m_pDocView->LockUpdate();
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnMouseExit();
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnMouseExit();
m_pDocView->UnlockUpdate();
m_pDocView->UpdateDocView();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnLButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFWidgetHandler::OnLButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
{
m_pDocView->LockUpdate();
- ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnLButtonDown(dwFlags, fx, fy);
+ static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnLButtonDown(dwFlags, fx, fy);
if (bRet && m_pDocView->SetFocus(hWidget)) {
- ((CXFA_FFDoc*)m_pDocView->GetDoc())->GetDocProvider()->SetFocusWidget(m_pDocView->GetDoc(), (XFA_HWIDGET)hWidget);
+ ((CXFA_FFDoc*)m_pDocView->GetDoc())->GetDocProvider()->SetFocusWidget(m_pDocView->GetDoc(), (IXFA_Widget*)hWidget);
}
m_pDocView->UnlockUpdate();
m_pDocView->UpdateDocView();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnLButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFWidgetHandler::OnLButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
{
m_pDocView->LockUpdate();
- ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);
+ static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);
m_pDocView->m_bLayoutEvent = TRUE;
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnLButtonUp(dwFlags, fx, fy);
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnLButtonUp(dwFlags, fx, fy);
m_pDocView->UnlockUpdate();
m_pDocView->UpdateDocView();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnLButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFWidgetHandler::OnLButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
{
- ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnLButtonDblClk(dwFlags, fx, fy);
+ static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnLButtonDblClk(dwFlags, fx, fy);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnMouseMove(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFWidgetHandler::OnMouseMove(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
{
- ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnMouseMove(dwFlags, fx, fy);
+ static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnMouseMove(dwFlags, fx, fy);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnMouseWheel(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFWidgetHandler::OnMouseWheel(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy)
{
- ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnMouseWheel(dwFlags, zDelta, fx, fy);
+ static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnMouseWheel(dwFlags, zDelta, fx, fy);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnRButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFWidgetHandler::OnRButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
{
- ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnRButtonDown(dwFlags, fx, fy);
+ static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnRButtonDown(dwFlags, fx, fy);
if (bRet && m_pDocView->SetFocus(hWidget)) {
- ((CXFA_FFDoc*)m_pDocView->GetDoc())->GetDocProvider()->SetFocusWidget(m_pDocView->GetDoc(), (XFA_HWIDGET)hWidget);
+ ((CXFA_FFDoc*)m_pDocView->GetDoc())->GetDocProvider()->SetFocusWidget(m_pDocView->GetDoc(), (IXFA_Widget*)hWidget);
}
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnRButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFWidgetHandler::OnRButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
{
- ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnRButtonUp(dwFlags, fx, fy);
+ static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnRButtonUp(dwFlags, fx, fy);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnRButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFWidgetHandler::OnRButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
{
- ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnRButtonDblClk(dwFlags, fx, fy);
+ static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnRButtonDblClk(dwFlags, fx, fy);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnKeyDown(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags)
+FX_BOOL CXFA_FFWidgetHandler::OnKeyDown(IXFA_Widget* hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags)
{
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnKeyDown(dwKeyCode, dwFlags);
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnKeyDown(dwKeyCode, dwFlags);
m_pDocView->RunInvalidate();
m_pDocView->UpdateDocView();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnKeyUp(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags)
+FX_BOOL CXFA_FFWidgetHandler::OnKeyUp(IXFA_Widget* hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags)
{
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnKeyUp(dwKeyCode, dwFlags);
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnKeyUp(dwKeyCode, dwFlags);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnChar(XFA_HWIDGET hWidget, FX_DWORD dwChar, FX_DWORD dwFlags)
+FX_BOOL CXFA_FFWidgetHandler::OnChar(IXFA_Widget* hWidget, FX_DWORD dwChar, FX_DWORD dwFlags)
{
- FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnChar(dwChar, dwFlags);
+ FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnChar(dwChar, dwFlags);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_DWORD CXFA_FFWidgetHandler::OnHitTest(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy)
+FX_DWORD CXFA_FFWidgetHandler::OnHitTest(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy)
{
- if (!(((CXFA_FFWidget*)hWidget)->GetStatus() & XFA_WIDGETSTATUS_Visible)) {
+ if (!(static_cast<CXFA_FFWidget*>(hWidget)->GetStatus() & XFA_WIDGETSTATUS_Visible)) {
return FWL_WGTHITTEST_Unknown;
}
- ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);
- return ((CXFA_FFWidget*)hWidget)->OnHitTest(fx, fy);
+ static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);
+ return static_cast<CXFA_FFWidget*>(hWidget)->OnHitTest(fx, fy);
}
-FX_BOOL CXFA_FFWidgetHandler::OnSetCursor(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFWidgetHandler::OnSetCursor(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy)
{
- ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);
- return ((CXFA_FFWidget*)hWidget)->OnSetCursor(fx, fy);
+ static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);
+ return static_cast<CXFA_FFWidget*>(hWidget)->OnSetCursor(fx, fy);
}
-void CXFA_FFWidgetHandler::RenderWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_BOOL bHighlight)
+void CXFA_FFWidgetHandler::RenderWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_BOOL bHighlight)
{
- ((CXFA_FFWidget*)hWidget)->RenderWidget(pGS, pMatrix, bHighlight ? XFA_WIDGETSTATUS_Highlight : 0, 0);
+ static_cast<CXFA_FFWidget*>(hWidget)->RenderWidget(pGS, pMatrix, bHighlight ? XFA_WIDGETSTATUS_Highlight : 0, 0);
}
FX_BOOL CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc, XFA_EVENTTYPE eEventType)
{
@@ -243,10 +243,10 @@ FX_INT32 CXFA_FFWidgetHandler::ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_Eve FX_INT32 iRet = pWidgetAcc->ProcessEvent(gs_EventActivity[pParam->m_eType], pParam);
return iRet;
}
-XFA_HWIDGET CXFA_FFWidgetHandler::CreateWidget(XFA_HWIDGET hParent, XFA_WIDGETTYPE eType, XFA_HWIDGET hBefore )
+IXFA_Widget* CXFA_FFWidgetHandler::CreateWidget(IXFA_Widget* hParent, XFA_WIDGETTYPE eType, IXFA_Widget* hBefore )
{
- CXFA_Node* pParentFormItem = hParent ? ((CXFA_FFWidget*)hParent)->GetDataAcc()->GetNode() : NULL;
- CXFA_Node* pBeforeFormItem = hBefore ? ((CXFA_FFWidget*)hBefore)->GetDataAcc()->GetNode() : NULL;
+ CXFA_Node* pParentFormItem = hParent ? static_cast<CXFA_FFWidget*>(hParent)->GetDataAcc()->GetNode() : NULL;
+ CXFA_Node* pBeforeFormItem = hBefore ? static_cast<CXFA_FFWidget*>(hBefore)->GetDataAcc()->GetNode() : NULL;
CXFA_Node* pNewFormItem = CreateWidgetFormItem(eType, pParentFormItem, pBeforeFormItem);
if (pNewFormItem == NULL) {
return NULL;
@@ -255,7 +255,7 @@ XFA_HWIDGET CXFA_FFWidgetHandler::CreateWidget(XFA_HWIDGET hParent, XFA_WIDGETTY pNewFormItem->SetFlag(XFA_NODEFLAG_Initialized);
m_pDocView->RunLayout();
CXFA_LayoutItem* pLayout = m_pDocView->GetXFALayout()->GetLayoutItem(pNewFormItem);
- return (XFA_HWIDGET)pLayout;
+ return (IXFA_Widget*)pLayout;
}
CXFA_Node* CXFA_FFWidgetHandler::CreateWidgetFormItem(XFA_WIDGETTYPE eType, CXFA_Node* pParent, CXFA_Node* pBefore) const
{
@@ -516,76 +516,76 @@ CXFA_FFMenuHandler::CXFA_FFMenuHandler() CXFA_FFMenuHandler::~CXFA_FFMenuHandler()
{
}
-FX_BOOL CXFA_FFMenuHandler::CanCopy(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::CanCopy(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->CanCopy();
+ return static_cast<CXFA_FFWidget*>(hWidget)->CanCopy();
}
-FX_BOOL CXFA_FFMenuHandler::CanCut(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::CanCut(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->CanCut();
+ return static_cast<CXFA_FFWidget*>(hWidget)->CanCut();
}
-FX_BOOL CXFA_FFMenuHandler::CanPaste(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::CanPaste(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->CanPaste();
+ return static_cast<CXFA_FFWidget*>(hWidget)->CanPaste();
}
-FX_BOOL CXFA_FFMenuHandler::CanSelectAll(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::CanSelectAll(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->CanSelectAll();
+ return static_cast<CXFA_FFWidget*>(hWidget)->CanSelectAll();
}
-FX_BOOL CXFA_FFMenuHandler::CanDelete(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::CanDelete(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->CanDelete();
+ return static_cast<CXFA_FFWidget*>(hWidget)->CanDelete();
}
-FX_BOOL CXFA_FFMenuHandler::CanDeSelect(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::CanDeSelect(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->CanDeSelect();
+ return static_cast<CXFA_FFWidget*>(hWidget)->CanDeSelect();
}
-FX_BOOL CXFA_FFMenuHandler::Copy(XFA_HWIDGET hWidget, CFX_WideString &wsText)
+FX_BOOL CXFA_FFMenuHandler::Copy(IXFA_Widget* hWidget, CFX_WideString &wsText)
{
- return ((CXFA_FFWidget*)hWidget)->Copy(wsText);
+ return static_cast<CXFA_FFWidget*>(hWidget)->Copy(wsText);
}
-FX_BOOL CXFA_FFMenuHandler::Cut(XFA_HWIDGET hWidget, CFX_WideString &wsText)
+FX_BOOL CXFA_FFMenuHandler::Cut(IXFA_Widget* hWidget, CFX_WideString &wsText)
{
- return ((CXFA_FFWidget*)hWidget)->Cut(wsText);
+ return static_cast<CXFA_FFWidget*>(hWidget)->Cut(wsText);
}
-FX_BOOL CXFA_FFMenuHandler::Paste(XFA_HWIDGET hWidget, const CFX_WideString &wsText)
+FX_BOOL CXFA_FFMenuHandler::Paste(IXFA_Widget* hWidget, const CFX_WideString &wsText)
{
- return ((CXFA_FFWidget*)hWidget)->Paste(wsText);
+ return static_cast<CXFA_FFWidget*>(hWidget)->Paste(wsText);
}
-FX_BOOL CXFA_FFMenuHandler::SelectAll(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::SelectAll(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->SelectAll();
+ return static_cast<CXFA_FFWidget*>(hWidget)->SelectAll();
}
-FX_BOOL CXFA_FFMenuHandler::Delete(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::Delete(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->Delete();
+ return static_cast<CXFA_FFWidget*>(hWidget)->Delete();
}
-FX_BOOL CXFA_FFMenuHandler::DeSelect(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::DeSelect(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->DeSelect();
+ return static_cast<CXFA_FFWidget*>(hWidget)->DeSelect();
}
-FX_BOOL CXFA_FFMenuHandler::CanUndo(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::CanUndo(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->CanUndo();
+ return static_cast<CXFA_FFWidget*>(hWidget)->CanUndo();
}
-FX_BOOL CXFA_FFMenuHandler::CanRedo(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::CanRedo(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->CanRedo();
+ return static_cast<CXFA_FFWidget*>(hWidget)->CanRedo();
}
-FX_BOOL CXFA_FFMenuHandler::Undo(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::Undo(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->Undo();
+ return static_cast<CXFA_FFWidget*>(hWidget)->Undo();
}
-FX_BOOL CXFA_FFMenuHandler::Redo(XFA_HWIDGET hWidget)
+FX_BOOL CXFA_FFMenuHandler::Redo(IXFA_Widget* hWidget)
{
- return ((CXFA_FFWidget*)hWidget)->Redo();
+ return static_cast<CXFA_FFWidget*>(hWidget)->Redo();
}
#define FX_EDIT_ISLATINWORD(u) (u == 0x2D || (u <= 0x005A && u >= 0x0041) || (u <= 0x007A && u >= 0x0061) || (u <= 0x02AF && u >= 0x00C0) || u == 0x0027)
-FX_BOOL CXFA_FFMenuHandler::GetSuggestWords(XFA_HWIDGET hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest)
+FX_BOOL CXFA_FFMenuHandler::GetSuggestWords(IXFA_Widget* hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest)
{
- return ((CXFA_FFWidget*)hWidget)->GetSuggestWords(pointf, sSuggest);
+ return static_cast<CXFA_FFWidget*>(hWidget)->GetSuggestWords(pointf, sSuggest);
}
-FX_BOOL CXFA_FFMenuHandler::ReplaceSpellCheckWord(XFA_HWIDGET hWidget, CFX_PointF pointf, FX_BSTR bsReplace)
+FX_BOOL CXFA_FFMenuHandler::ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, FX_BSTR bsReplace)
{
- return ((CXFA_FFWidget*)hWidget)->ReplaceSpellCheckWord(pointf, bsReplace);
+ return static_cast<CXFA_FFWidget*>(hWidget)->ReplaceSpellCheckWord(pointf, bsReplace);
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h index 286770a0ad..28c6c84651 100644 --- a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h +++ b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h @@ -12,33 +12,33 @@ class CXFA_FFWidgetHandler : public IXFA_WidgetHandler public:
CXFA_FFWidgetHandler(CXFA_FFDocView* pDocView);
~CXFA_FFWidgetHandler();
- virtual XFA_HWIDGET CreateWidget(XFA_HWIDGET hParent, XFA_WIDGETTYPE eType, XFA_HWIDGET hBefore = NULL);
- virtual IXFA_PageView* GetPageView(XFA_HWIDGET hWidget);
- virtual void GetRect(XFA_HWIDGET hWidget, CFX_RectF &rt);
- virtual FX_DWORD GetStatus(XFA_HWIDGET hWidget);
- virtual FX_BOOL GetBBox(XFA_HWIDGET hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus = FALSE);
- virtual CXFA_WidgetAcc* GetDataAcc(XFA_HWIDGET hWidget);
- virtual void GetName(XFA_HWIDGET hWidget, CFX_WideString &wsName, FX_INT32 iNameType = 0);
- virtual FX_BOOL GetToolTip(XFA_HWIDGET hWidget, CFX_WideString &wsToolTip);
- virtual void SetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);
- virtual FX_LPVOID GetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id);
- virtual FX_BOOL OnMouseEnter(XFA_HWIDGET hWidget);
- virtual FX_BOOL OnMouseExit(XFA_HWIDGET hWidget);
- virtual FX_BOOL OnLButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnLButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnLButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnMouseMove(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnMouseWheel(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnRButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnRButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnRButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual IXFA_Widget* CreateWidget(IXFA_Widget* hParent, XFA_WIDGETTYPE eType, IXFA_Widget* hBefore = NULL);
+ virtual IXFA_PageView* GetPageView(IXFA_Widget* hWidget);
+ virtual void GetRect(IXFA_Widget* hWidget, CFX_RectF &rt);
+ virtual FX_DWORD GetStatus(IXFA_Widget* hWidget);
+ virtual FX_BOOL GetBBox(IXFA_Widget* hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus = FALSE);
+ virtual CXFA_WidgetAcc* GetDataAcc(IXFA_Widget* hWidget);
+ virtual void GetName(IXFA_Widget* hWidget, CFX_WideString &wsName, FX_INT32 iNameType = 0);
+ virtual FX_BOOL GetToolTip(IXFA_Widget* hWidget, CFX_WideString &wsToolTip);
+ virtual void SetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);
+ virtual FX_LPVOID GetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id);
+ virtual FX_BOOL OnMouseEnter(IXFA_Widget* hWidget);
+ virtual FX_BOOL OnMouseExit(IXFA_Widget* hWidget);
+ virtual FX_BOOL OnLButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FX_BOOL OnLButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FX_BOOL OnLButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FX_BOOL OnMouseMove(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FX_BOOL OnMouseWheel(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FX_BOOL OnRButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FX_BOOL OnRButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FX_BOOL OnRButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnKeyDown(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags);
- virtual FX_BOOL OnKeyUp(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags);
- virtual FX_BOOL OnChar(XFA_HWIDGET hWidget, FX_DWORD dwChar, FX_DWORD dwFlags);
- virtual FX_DWORD OnHitTest(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnSetCursor(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy);
- virtual void RenderWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_BOOL bHighlight = FALSE);
+ virtual FX_BOOL OnKeyDown(IXFA_Widget* hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags);
+ virtual FX_BOOL OnKeyUp(IXFA_Widget* hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags);
+ virtual FX_BOOL OnChar(IXFA_Widget* hWidget, FX_DWORD dwChar, FX_DWORD dwFlags);
+ virtual FX_DWORD OnHitTest(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FX_BOOL OnSetCursor(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy);
+ virtual void RenderWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_BOOL bHighlight = FALSE);
virtual FX_BOOL HasEvent(CXFA_WidgetAcc* pWidgetAcc, XFA_EVENTTYPE eEventType);
virtual FX_INT32 ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam);
protected:
@@ -82,23 +82,23 @@ class CXFA_FFMenuHandler : public IXFA_MenuHandler public:
CXFA_FFMenuHandler();
~CXFA_FFMenuHandler();
- virtual FX_BOOL CanCopy(XFA_HWIDGET hWidget);
- virtual FX_BOOL CanCut(XFA_HWIDGET hWidget);
- virtual FX_BOOL CanPaste(XFA_HWIDGET hWidget);
- virtual FX_BOOL CanSelectAll(XFA_HWIDGET hWidget);
- virtual FX_BOOL CanDelete(XFA_HWIDGET hWidget);
- virtual FX_BOOL CanDeSelect(XFA_HWIDGET hWidget);
- virtual FX_BOOL Copy(XFA_HWIDGET hWidget, CFX_WideString &wsText);
- virtual FX_BOOL Cut(XFA_HWIDGET hWidget, CFX_WideString &wsText);
- virtual FX_BOOL Paste(XFA_HWIDGET hWidget, const CFX_WideString &wsText);
- virtual FX_BOOL SelectAll(XFA_HWIDGET hWidget);
- virtual FX_BOOL Delete(XFA_HWIDGET hWidget);
- virtual FX_BOOL DeSelect(XFA_HWIDGET hWidget);
- virtual FX_BOOL CanUndo(XFA_HWIDGET hWidget);
- virtual FX_BOOL CanRedo(XFA_HWIDGET hWidget);
- virtual FX_BOOL Undo(XFA_HWIDGET hWidget);
- virtual FX_BOOL Redo(XFA_HWIDGET hWidget);
- virtual FX_BOOL GetSuggestWords(XFA_HWIDGET hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest);
- virtual FX_BOOL ReplaceSpellCheckWord(XFA_HWIDGET hWidget, CFX_PointF pointf, FX_BSTR bsReplace);
+ virtual FX_BOOL CanCopy(IXFA_Widget* hWidget);
+ virtual FX_BOOL CanCut(IXFA_Widget* hWidget);
+ virtual FX_BOOL CanPaste(IXFA_Widget* hWidget);
+ virtual FX_BOOL CanSelectAll(IXFA_Widget* hWidget);
+ virtual FX_BOOL CanDelete(IXFA_Widget* hWidget);
+ virtual FX_BOOL CanDeSelect(IXFA_Widget* hWidget);
+ virtual FX_BOOL Copy(IXFA_Widget* hWidget, CFX_WideString &wsText);
+ virtual FX_BOOL Cut(IXFA_Widget* hWidget, CFX_WideString &wsText);
+ virtual FX_BOOL Paste(IXFA_Widget* hWidget, const CFX_WideString &wsText);
+ virtual FX_BOOL SelectAll(IXFA_Widget* hWidget);
+ virtual FX_BOOL Delete(IXFA_Widget* hWidget);
+ virtual FX_BOOL DeSelect(IXFA_Widget* hWidget);
+ virtual FX_BOOL CanUndo(IXFA_Widget* hWidget);
+ virtual FX_BOOL CanRedo(IXFA_Widget* hWidget);
+ virtual FX_BOOL Undo(IXFA_Widget* hWidget);
+ virtual FX_BOOL Redo(IXFA_Widget* hWidget);
+ virtual FX_BOOL GetSuggestWords(IXFA_Widget* hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest);
+ virtual FX_BOOL ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, FX_BSTR bsReplace);
};
#endif
diff --git a/xfa/src/fxfa/src/app/xfa_fwladapter.cpp b/xfa/src/fxfa/src/app/xfa_fwladapter.cpp index 035fa02310..4b97415310 100644 --- a/xfa/src/fxfa/src/app/xfa_fwladapter.cpp +++ b/xfa/src/fxfa/src/app/xfa_fwladapter.cpp @@ -39,10 +39,10 @@ FX_BOOL FWL_ShowCaret(IFWL_Widget *pWidget, FX_BOOL bVisible, const CFX_RectF *p pXFAWidget->GetRotateMatrix(mt);
CFX_RectF rt(*pRtAnchor);
mt.TransformRect(rt);
- pDocProvider->DisplayCaret((XFA_HWIDGET)pXFAWidget, bVisible, &rt);
+ pDocProvider->DisplayCaret(pXFAWidget, bVisible, &rt);
return TRUE;
}
- pDocProvider->DisplayCaret((XFA_HWIDGET)pXFAWidget, bVisible, pRtAnchor);
+ pDocProvider->DisplayCaret(pXFAWidget, bVisible, pRtAnchor);
return TRUE;
}
FWL_ERR CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget *pWidget, const CFX_RectF *pRect)
@@ -75,6 +75,6 @@ FX_BOOL CXFA_FWLAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget, FX_FLOAT fMi pFFWidget->GetRotateMatrix(mt);
CFX_RectF rtRotateAnchor(rtAnchor);
mt.TransformRect(rtRotateAnchor);
- pFFWidget->GetDoc()->GetDocProvider()->GetPopupPos((XFA_HWIDGET)pFFWidget, fMinHeight, fMaxHeight, rtRotateAnchor, rtPopup);
+ pFFWidget->GetDoc()->GetDocProvider()->GetPopupPos(pFFWidget, fMinHeight, fMaxHeight, rtRotateAnchor, rtPopup);
return TRUE;
}
diff --git a/xfa/src/fxfa/src/app/xfa_rendercontext.h b/xfa/src/fxfa/src/app/xfa_rendercontext.h index 974f0a3492..cb514c5cdf 100644 --- a/xfa/src/fxfa/src/app/xfa_rendercontext.h +++ b/xfa/src/fxfa/src/app/xfa_rendercontext.h @@ -20,7 +20,7 @@ public: virtual void StopRender();
protected:
IXFA_WidgetIterator* m_pWidgetIterator;
- XFA_HWIDGET m_pWidget;
+ IXFA_Widget* m_pWidget;
IXFA_PageView* m_pPageView;
CFX_Graphics* m_pGS;
CFX_Matrix m_matrix;
diff --git a/xfa/src/fxfa/src/common/xfa_document.h b/xfa/src/fxfa/src/common/xfa_document.h index 9e985e2155..e082321f22 100644 --- a/xfa/src/fxfa/src/common/xfa_document.h +++ b/xfa/src/fxfa/src/common/xfa_document.h @@ -80,8 +80,8 @@ public: virtual IXFA_DocProvider* GetDocProvider() = 0;
virtual IXFA_AppProvider* GetAppProvider() = 0;
virtual IXFA_WidgetHandler* GetWidgetHandler() = 0;
- virtual XFA_HWIDGET GetHWidget(CXFA_LayoutItem* pLayoutItem) = 0;
- virtual void OpenDropDownList(XFA_HWIDGET hWidget) = 0;
+ virtual IXFA_Widget* GetHWidget(CXFA_LayoutItem* pLayoutItem) = 0;
+ virtual void OpenDropDownList(IXFA_Widget* hWidget) = 0;
virtual CFX_WideString GetCurrentDateTime() = 0;
virtual void ResetData(CXFA_WidgetData* pWidgetData = NULL) = 0;
virtual FX_INT32 GetLayoutStatus() = 0;
diff --git a/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp index 0189e5e464..f4254f0bbc 100644 --- a/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp +++ b/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp @@ -306,7 +306,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(CFXJSE_Arguments* if (!pDocLayout) {
return;
}
- XFA_HWIDGET hWidget = pNotify->GetHWidget(pDocLayout->GetLayoutItem(pNode));
+ IXFA_Widget* hWidget = pNotify->GetHWidget(pDocLayout->GetLayoutItem(pNode));
if (!hWidget) {
return;
}
diff --git a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp index b2354b6f14..25efee719d 100644 --- a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp +++ b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp @@ -427,7 +427,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageInBatch(CFXJSE_A if (!pDocLayout) {
return;
}
- XFA_HWIDGET hWidget = pNotify->GetHWidget(pDocLayout->GetLayoutItem(pNode));
+ IXFA_Widget* hWidget = pNotify->GetHWidget(pDocLayout->GetLayoutItem(pNode));
if (!hWidget) {
return;
}
@@ -460,7 +460,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetInBatch(CFXJSE_Arg if (!pDocLayout) {
return;
}
- XFA_HWIDGET hWidget = pNotify->GetHWidget(pDocLayout->GetLayoutItem(pNode));
+ IXFA_Widget* hWidget = pNotify->GetHWidget(pDocLayout->GetLayoutItem(pNode));
if (!hWidget) {
return;
}
|