Replace XFA_HWIDGET with IXFA_Widget*
authorTom Sepez <tsepez@chromium.org>
Tue, 2 Jun 2015 17:35:27 +0000 (10:35 -0700)
committerTom Sepez <tsepez@chromium.org>
Tue, 2 Jun 2015 17:35:27 +0000 (10:35 -0700)
A second case of casting willy-nilly between unrelated structures
to provide information hiding.  Bad Idea.  Remove dozens of casts
in the process.

R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1155273002

29 files changed:
fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
fpdfsdk/include/fsdk_annothandler.h
fpdfsdk/include/fsdk_baseannot.h
fpdfsdk/include/fsdk_baseform.h
fpdfsdk/include/fsdk_mgr.h
fpdfsdk/src/fpdfformfill.cpp
fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
fpdfsdk/src/fsdk_annothandler.cpp
fpdfsdk/src/fsdk_baseform.cpp
fpdfsdk/src/fsdk_mgr.cpp
xfa/include/fxfa/fxfa.h
xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
xfa/src/fxfa/src/app/xfa_ffdocview.cpp
xfa/src/fxfa/src/app/xfa_ffdocview.h
xfa/src/fxfa/src/app/xfa_ffnotify.cpp
xfa/src/fxfa/src/app/xfa_ffnotify.h
xfa/src/fxfa/src/app/xfa_ffpageview.cpp
xfa/src/fxfa/src/app/xfa_ffpageview.h
xfa/src/fxfa/src/app/xfa_ffsignature.cpp
xfa/src/fxfa/src/app/xfa_fftextedit.cpp
xfa/src/fxfa/src/app/xfa_ffwidget.h
xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
xfa/src/fxfa/src/app/xfa_ffwidgethandler.h
xfa/src/fxfa/src/app/xfa_fwladapter.cpp
xfa/src/fxfa/src/app/xfa_rendercontext.h
xfa/src/fxfa/src/common/xfa_document.h
xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp
xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp

index dc15ec4..9158b82 100644 (file)
@@ -45,21 +45,21 @@ public:
        //used in dynamic xfa, dwFlags refer to XFA_INVALIDATE_XXX macros.\r
        virtual void            InvalidateRect(IXFA_PageView* pPageView, const CFX_RectF& rt, FX_DWORD dwFlags = 0);\r
        //used in static xfa, dwFlags refer to XFA_INVALIDATE_XXX macros.\r
-       virtual void            InvalidateRect(XFA_HWIDGET hWidget, FX_DWORD dwFlags = 0);\r
+       virtual void            InvalidateRect(IXFA_Widget* hWidget, FX_DWORD dwFlags = 0);\r
        //show or hide caret\r
-       virtual void            DisplayCaret(XFA_HWIDGET hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor);\r
+       virtual void            DisplayCaret(IXFA_Widget* hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor);\r
        //dwPos: (0:bottom 1:top)\r
-       virtual FX_BOOL         GetPopupPos(XFA_HWIDGET hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup, \r
+       virtual FX_BOOL         GetPopupPos(IXFA_Widget* hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup, \r
                                                        const CFX_RectF &rtAnchor, CFX_RectF &rtPopup);\r
-       virtual FX_BOOL         PopupMenu(XFA_HWIDGET hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude = NULL);\r
+       virtual FX_BOOL         PopupMenu(IXFA_Widget* hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude = NULL);\r
 \r
        //dwFlags XFA_PAGEVIEWEVENT_Added, XFA_PAGEVIEWEVENT_Removing\r
        virtual void            PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags);\r
        //dwEvent refer to XFA_WIDGETEVENT_XXX\r
-       virtual void            WidgetEvent(XFA_HWIDGET hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL);\r
+       virtual void            WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL);\r
        \r
        //return true if render it.\r
-       virtual FX_BOOL         RenderCustomWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI){return FALSE;}\r
+       virtual FX_BOOL         RenderCustomWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI){return FALSE;}\r
 \r
        //host method\r
        virtual FX_INT32        CountPages(IXFA_Doc* hDoc);\r
@@ -74,14 +74,14 @@ public:
        virtual void            GotoURL(IXFA_Doc* hDoc, FX_WSTR bsURL, FX_BOOL bAppend = TRUE);\r
        virtual FX_BOOL         IsValidationsEnabled(IXFA_Doc* hDoc);\r
        virtual void            SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled);\r
-       virtual void            SetFocusWidget(IXFA_Doc* hDoc, XFA_HWIDGET hWidget);\r
+       virtual void            SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget);\r
        virtual void            Print(IXFA_Doc* hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions);\r
 \r
        //LayoutPseudo method\r
        virtual FX_INT32                        AbsPageCountInBatch(IXFA_Doc* hDoc){return 0;}\r
-       virtual FX_INT32                        AbsPageInBatch(IXFA_Doc* hDoc, XFA_HWIDGET hWidget){return 0;}\r
+       virtual FX_INT32                        AbsPageInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget){return 0;}\r
        virtual FX_INT32                        SheetCountInBatch(IXFA_Doc* hDoc){return 0;}\r
-       virtual FX_INT32                        SheetInBatch(IXFA_Doc* hDoc, XFA_HWIDGET hWidget){return 0;}\r
+       virtual FX_INT32                        SheetInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget){return 0;}\r
 \r
        //SignaturePseudoModel method\r
        //TODO:\r
@@ -93,7 +93,7 @@ public:
        //Get document path\r
        virtual void            GetURL(IXFA_Doc* hDoc, CFX_WideString &wsDocURL);\r
        virtual FX_ARGB         GetHighlightColor(IXFA_Doc* hDoc);\r
-       virtual void            AddDoRecord(XFA_HWIDGET hWidget);\r
+       virtual void            AddDoRecord(IXFA_Widget* hWidget);\r
        /** \r
         *Submit data to email, http, ftp.      \r
         * @param[in] hDoc The document handler.\r
index fa73cd1..be7b465 100644 (file)
@@ -36,7 +36,7 @@ public:
 
        virtual CPDFSDK_Annot*          NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) = 0;
 
-       virtual CPDFSDK_Annot*          NewAnnot(XFA_HWIDGET hWidget, CPDFSDK_PageView* pPage) = 0;
+       virtual CPDFSDK_Annot*          NewAnnot(IXFA_Widget* hWidget, CPDFSDK_PageView* pPage) = 0;
 
        virtual void                            ReleaseAnnot(CPDFSDK_Annot* pAnnot) = 0;
 
@@ -110,7 +110,7 @@ public:
 
        virtual CPDFSDK_Annot*          NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage);
 
-       virtual CPDFSDK_Annot*          NewAnnot(XFA_HWIDGET hWidget, CPDFSDK_PageView* pPage);
+       virtual CPDFSDK_Annot*          NewAnnot(IXFA_Widget* hWidget, CPDFSDK_PageView* pPage);
 
        virtual void                            ReleaseAnnot(CPDFSDK_Annot* pAnnot)  ;
 
@@ -189,7 +189,7 @@ public:
 
        virtual CPDFSDK_Annot*          NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) { return NULL; }
 
-       virtual CPDFSDK_Annot*          NewAnnot(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPage);
+       virtual CPDFSDK_Annot*          NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPage);
 
        virtual void                            ReleaseAnnot(CPDFSDK_Annot* pAnnot);
 
@@ -266,7 +266,7 @@ public:
        void                                            UnRegisterAnnotHandler(IPDFSDK_AnnotHandler* pAnnotHandler);
 
        virtual CPDFSDK_Annot*          NewAnnot(CPDF_Annot * pAnnot, CPDFSDK_PageView *pPageView);
-       virtual CPDFSDK_Annot*          NewAnnot(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPageView);
+       virtual CPDFSDK_Annot*          NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPageView);
        virtual void                            ReleaseAnnot(CPDFSDK_Annot * pAnnot);
        
        virtual void                            Annot_OnCreate(CPDFSDK_Annot* pAnnot);
index 250ce7f..d2ce977 100644 (file)
@@ -83,7 +83,7 @@ public:
        virtual int                                     GetLayoutOrder() const { return 5; }
 
        virtual CPDF_Annot*                     GetPDFAnnot() { return NULL; }
-       virtual XFA_HWIDGET                     GetXFAWidget() { return NULL; }
+       virtual IXFA_Widget*            GetXFAWidget() { return NULL; }
        
        virtual CFX_ByteString          GetType() const { return ""; }
        virtual CFX_ByteString          GetSubType() const { return ""; }
index 333bb30..67c67fc 100644 (file)
@@ -67,8 +67,8 @@ typedef struct _PDFSDK_FieldAction
 class CPDFSDK_Widget:public CPDFSDK_BAAnnot
 {
 public:
-       XFA_HWIDGET                                             GetMixXFAWidget();
-       XFA_HWIDGET                                             GetGroupMixXFAWidget();
+       IXFA_Widget*                                            GetMixXFAWidget();
+       IXFA_Widget*                                            GetGroupMixXFAWidget();
        IXFA_WidgetHandler*                             GetXFAWidgetHandler();
 
        FX_BOOL                                                 HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT);
@@ -78,9 +78,9 @@ public:
        void                                                    SynchronizeXFAValue();
        void                                                    SynchronizeXFAItems();
 
-       static void                                             SynchronizeXFAValue(IXFA_DocView* pXFADocView, XFA_HWIDGET hWidget, 
+       static void                                             SynchronizeXFAValue(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget, 
                CPDF_FormField* pFormField, CPDF_FormControl* pFormControl);
-       static void                                             SynchronizeXFAItems(IXFA_DocView* pXFADocView, XFA_HWIDGET hWidget, 
+       static void                                             SynchronizeXFAItems(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget, 
                CPDF_FormField* pFormField, CPDF_FormControl* pFormControl);
 
 public:
@@ -192,19 +192,19 @@ private:
        FX_INT32                                                m_nAppAge;
        FX_INT32                                                m_nValueAge;
 
-       XFA_HWIDGET                                             m_hMixXFAWidget;
+       IXFA_Widget*                                            m_hMixXFAWidget;
        IXFA_WidgetHandler*                             m_pWidgetHandler;
 };
 
 class CPDFSDK_XFAWidget : public CPDFSDK_Annot
 {
 public:
-       CPDFSDK_XFAWidget(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPageView, CPDFSDK_InterForm* pInterForm);
+       CPDFSDK_XFAWidget(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPageView, CPDFSDK_InterForm* pInterForm);
        virtual ~CPDFSDK_XFAWidget(){}
 
 public:
        virtual FX_BOOL                         IsXFAField();
-       virtual XFA_HWIDGET                     GetXFAWidget() { return m_hXFAWidget; }
+       virtual IXFA_Widget*                    GetXFAWidget() { return m_hXFAWidget; }
 
        virtual CFX_ByteString          GetType() const ;
        virtual CFX_ByteString          GetSubType() const { return ""; }
@@ -216,11 +216,11 @@ public:
 
 private:
        CPDFSDK_InterForm*                              m_pInterForm;
-       XFA_HWIDGET                                             m_hXFAWidget;
+       IXFA_Widget*                                            m_hXFAWidget;
 };
 
 #define CPDFSDK_WidgetMap                              CFX_MapPtrTemplate<CPDF_FormControl*, CPDFSDK_Widget*>
-#define CPDFSDK_XFAWidgetMap                   CFX_MapPtrTemplate<XFA_HWIDGET, CPDFSDK_XFAWidget*>
+#define CPDFSDK_XFAWidgetMap                   CFX_MapPtrTemplate<IXFA_Widget*, CPDFSDK_XFAWidget*>
 #define CPDFSDK_FieldSynchronizeMap            CFX_MapPtrTemplate<CPDF_FormField*, int>
 
 class CPDFSDK_InterForm : public CPDF_FormNotify
@@ -244,9 +244,9 @@ public:
        void                                                    AddMap(CPDF_FormControl* pControl, CPDFSDK_Widget* pWidget);
        void                                                    RemoveMap(CPDF_FormControl* pControl);
        
-       void                                                    AddXFAMap(XFA_HWIDGET hWidget, CPDFSDK_XFAWidget* pWidget);
-       void                                                    RemoveXFAMap(XFA_HWIDGET hWidget);
-       CPDFSDK_XFAWidget*                              GetXFAWidget(XFA_HWIDGET hWidget);
+       void                                                    AddXFAMap(IXFA_Widget* hWidget, CPDFSDK_XFAWidget* pWidget);
+       void                                                    RemoveXFAMap(IXFA_Widget* hWidget);
+       CPDFSDK_XFAWidget*                              GetXFAWidget(IXFA_Widget* hWidget);
        
        void                                                    EnableCalculate(FX_BOOL bEnabled);
        FX_BOOL                                                 IsCalculateEnabled() const;
index abcb24d..7f68dd9 100644 (file)
@@ -782,13 +782,13 @@ public:
        CPDFSDK_Annot*                                  AddAnnot(CPDF_Dictionary * pDict);
        CPDFSDK_Annot*                                  AddAnnot(FX_LPCSTR lpSubType,CPDF_Dictionary * pDict);
        CPDFSDK_Annot*                                  AddAnnot(CPDF_Annot * pPDFAnnot);
-       CPDFSDK_Annot*                                  AddAnnot(XFA_HWIDGET pPDFAnnot);
+       CPDFSDK_Annot*                                  AddAnnot(IXFA_Widget* pPDFAnnot);
        FX_BOOL                                                 DeleteAnnot(CPDFSDK_Annot* pAnnot);
 
        int                                                             CountAnnots();
        CPDFSDK_Annot*                                  GetAnnot(int nIndex);
        CPDFSDK_Annot*                              GetAnnotByDict(CPDF_Dictionary * pDict);
-       CPDFSDK_Annot*                                  GetAnnotByXFAWidget(XFA_HWIDGET hWidget);
+       CPDFSDK_Annot*                                  GetAnnotByXFAWidget(IXFA_Widget* hWidget);
        CPDFXFA_Page*                                   GetPDFXFAPage(){return m_page;}
        CPDF_Page*                                              GetPDFPage();
        CPDF_Document*                                  GetPDFDocument();
index 8cb0de0..0ae2237 100644 (file)
@@ -57,7 +57,7 @@ DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle, FPDF_
                if (!pWidgetHandler)
                        return -1;
 
-               XFA_HWIDGET pXFAAnnot = NULL;
+               IXFA_Widget* pXFAAnnot = NULL;
                IXFA_WidgetIterator* pWidgetIterator = pPageView->CreateWidgetIterator(XFA_TRAVERSEWAY_Form, XFA_WIDGETFILTER_Viewable|XFA_WIDGETFILTER_AllType);
                if (!pWidgetIterator)
                        return -1;
@@ -352,7 +352,7 @@ DLLEXPORT void STDCALL FPDF_Widget_Undo(FPDF_DOCUMENT document, FPDF_WIDGET hWid
        if (pXFAMenuHander == NULL)
                return;
 
-       pXFAMenuHander->Undo((XFA_HWIDGET)hWidget);
+       pXFAMenuHander->Undo((IXFA_Widget*)hWidget);
 
 }
 DLLEXPORT void STDCALL FPDF_Widget_Redo(FPDF_DOCUMENT document, FPDF_WIDGET hWidget)
@@ -368,7 +368,7 @@ DLLEXPORT void STDCALL FPDF_Widget_Redo(FPDF_DOCUMENT document, FPDF_WIDGET hWid
        if (pXFAMenuHander == NULL)
                return;
 
-       pXFAMenuHander->Redo((XFA_HWIDGET)hWidget);
+       pXFAMenuHander->Redo((IXFA_Widget*)hWidget);
 }
 
 DLLEXPORT void STDCALL FPDF_Widget_SelectAll(FPDF_DOCUMENT document, FPDF_WIDGET hWidget)
@@ -384,7 +384,7 @@ DLLEXPORT void STDCALL FPDF_Widget_SelectAll(FPDF_DOCUMENT document, FPDF_WIDGET
        if (pXFAMenuHander == NULL)
                return;
 
-       pXFAMenuHander->SelectAll((XFA_HWIDGET)hWidget);
+       pXFAMenuHander->SelectAll((IXFA_Widget*)hWidget);
 }
 DLLEXPORT void STDCALL FPDF_Widget_Copy(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, FPDF_WIDESTRING wsText, FPDF_DWORD* size)
 {
@@ -400,7 +400,7 @@ DLLEXPORT void STDCALL FPDF_Widget_Copy(FPDF_DOCUMENT document, FPDF_WIDGET hWid
                return;
 
        CFX_WideString wsCpText;
-       pXFAMenuHander->Copy((XFA_HWIDGET)hWidget, wsCpText);
+       pXFAMenuHander->Copy((IXFA_Widget*)hWidget, wsCpText);
 
        CFX_ByteString bsCpText = wsCpText.UTF16LE_Encode();
        int len = bsCpText.GetLength()/sizeof(unsigned short);
@@ -430,7 +430,7 @@ DLLEXPORT void STDCALL FPDF_Widget_Cut(FPDF_DOCUMENT document, FPDF_WIDGET hWidg
                return;
 
        CFX_WideString wsCpText;
-       pXFAMenuHander->Cut((XFA_HWIDGET)hWidget, wsCpText);
+       pXFAMenuHander->Cut((IXFA_Widget*)hWidget, wsCpText);
 
        CFX_ByteString bsCpText = wsCpText.UTF16LE_Encode();
        int len = bsCpText.GetLength()/sizeof(unsigned short);
@@ -461,7 +461,7 @@ DLLEXPORT void STDCALL FPDF_Widget_Paste(FPDF_DOCUMENT document, FPDF_WIDGET hWi
                return;
 
        CFX_WideString wstr = CFX_WideString::FromUTF16LE(wsText, size);
-       pXFAMenuHander->Paste((XFA_HWIDGET)hWidget, wstr);
+       pXFAMenuHander->Paste((IXFA_Widget*)hWidget, wstr);
 
 }
 DLLEXPORT void STDCALL FPDF_Widget_ReplaceSpellCheckWord(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, float x, float y, FPDF_BYTESTRING bsText)
@@ -481,7 +481,7 @@ DLLEXPORT void STDCALL FPDF_Widget_ReplaceSpellCheckWord(FPDF_DOCUMENT document,
        ptPopup.x = x;
        ptPopup.y = y;
        CFX_ByteStringC bs(bsText);
-       pXFAMenuHander->ReplaceSpellCheckWord((XFA_HWIDGET)hWidget,ptPopup,bs);
+       pXFAMenuHander->ReplaceSpellCheckWord((IXFA_Widget*)hWidget,ptPopup,bs);
 
 }
 DLLEXPORT void STDCALL FPDF_Widget_GetSpellCheckWords(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, float x, float y, FPDF_STRINGHANDLE* stringHandle)
@@ -501,7 +501,7 @@ DLLEXPORT void STDCALL FPDF_Widget_GetSpellCheckWords(FPDF_DOCUMENT document, FP
        CFX_PointF ptPopup;
        ptPopup.x = x;
        ptPopup.y = y;
-       pXFAMenuHander->GetSuggestWords((XFA_HWIDGET)hWidget, ptPopup, *sSuggestWords);
+       pXFAMenuHander->GetSuggestWords((IXFA_Widget*)hWidget, ptPopup, *sSuggestWords);
        *stringHandle = (FPDF_STRINGHANDLE)sSuggestWords;
 }
 DLLEXPORT int STDCALL FPDF_StringHandleCounts(FPDF_STRINGHANDLE stringHandle)
index 9ef8d53..e64bde1 100644 (file)
@@ -290,7 +290,7 @@ void CPDFXFA_Document::InvalidateRect(IXFA_PageView* pPageView, const CFX_RectF&
        pEnv->FFI_Invalidate((FPDF_PAGE)pPage, rcPage.left, rcPage.bottom, rcPage.right, rcPage.top);\r
 }\r
 \r
-void CPDFXFA_Document::InvalidateRect(XFA_HWIDGET hWidget, FX_DWORD dwFlags /* = 0 */)\r
+void CPDFXFA_Document::InvalidateRect(IXFA_Widget* hWidget, FX_DWORD dwFlags /* = 0 */)\r
 {\r
        if (!hWidget)\r
                return;\r
@@ -314,7 +314,7 @@ void CPDFXFA_Document::InvalidateRect(XFA_HWIDGET hWidget, FX_DWORD dwFlags /* =
        InvalidateRect(pPageView, rect, dwFlags);\r
 }\r
 \r
-void CPDFXFA_Document::DisplayCaret(XFA_HWIDGET hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor)\r
+void CPDFXFA_Document::DisplayCaret(IXFA_Widget* hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor)\r
 {\r
        if (!hWidget || pRtAnchor == NULL) \r
                return;\r
@@ -349,7 +349,7 @@ void CPDFXFA_Document::DisplayCaret(XFA_HWIDGET hWidget, FX_BOOL bVisible, const
 \r
 }\r
 \r
-FX_BOOL CPDFXFA_Document::GetPopupPos(XFA_HWIDGET hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup, const CFX_RectF &rtAnchor, CFX_RectF &rtPopup)\r
+FX_BOOL CPDFXFA_Document::GetPopupPos(IXFA_Widget* hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup, const CFX_RectF &rtAnchor, CFX_RectF &rtPopup)\r
 {\r
        if (NULL == hWidget)\r
        {\r
@@ -510,7 +510,7 @@ FX_BOOL CPDFXFA_Document::GetPopupPos(XFA_HWIDGET hWidget, FX_FLOAT fMinPopup, F
        return TRUE;\r
 }\r
 \r
-FX_BOOL        CPDFXFA_Document::PopupMenu(XFA_HWIDGET hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude)\r
+FX_BOOL        CPDFXFA_Document::PopupMenu(IXFA_Widget* hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude)\r
 {\r
        if (NULL == hWidget)\r
        {\r
@@ -573,7 +573,7 @@ void CPDFXFA_Document::PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags)
        }\r
 }\r
 \r
-void CPDFXFA_Document::WidgetEvent(XFA_HWIDGET hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam, FX_LPVOID pAdditional)\r
+void CPDFXFA_Document::WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam, FX_LPVOID pAdditional)\r
 {\r
        if (m_iDocType != DOCTYPE_DYNIMIC_XFA || NULL == hWidget)\r
                return;\r
@@ -873,7 +873,7 @@ void CPDFXFA_Document::SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled)
        if (m_pSDKDoc->GetInterForm())\r
                m_pSDKDoc->GetInterForm()->XfaSetValidationsEnabled(bEnabled);\r
 }\r
-void  CPDFXFA_Document::SetFocusWidget(IXFA_Doc* hDoc, XFA_HWIDGET hWidget)\r
+void  CPDFXFA_Document::SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget)\r
 {\r
        if (hDoc != m_pXFADoc)\r
                return;\r
@@ -943,7 +943,7 @@ FX_ARGB     CPDFXFA_Document::GetHighlightColor(IXFA_Doc* hDoc)
        return 0;\r
 }\r
 \r
-void CPDFXFA_Document::AddDoRecord(XFA_HWIDGET hWidget)\r
+void CPDFXFA_Document::AddDoRecord(IXFA_Widget* hWidget)\r
 {\r
        CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();\r
        if (pEnv == NULL)\r
index a9e2121..6b7c60d 100644 (file)
@@ -74,7 +74,7 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(CPDF_Annot * pAnnot, CPDFSDK_Pa
        return new CPDFSDK_BAAnnot(pAnnot, pPageView);
 }
 
-CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPageView)
+CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPageView)
 {
        ASSERT(pAnnot != NULL);
        ASSERT(pPageView != NULL);
@@ -398,7 +398,7 @@ CPDFSDK_Annot*      CPDFSDK_AnnotHandlerMgr::GetNextAnnot(CPDFSDK_Annot* pSDKAnnot,FX
                return  NULL;
        if (pWidgetIterator->GetCurrentWidget() != pSDKAnnot->GetXFAWidget())   
                pWidgetIterator->SetCurrentWidget(pSDKAnnot->GetXFAWidget());
-       XFA_HWIDGET hNextFocus = NULL;
+       IXFA_Widget* hNextFocus = NULL;
        hNextFocus = bNext?pWidgetIterator->MoveToNext():pWidgetIterator->MoveToPrevious();
        if (hNextFocus == NULL && pSDKAnnot != NULL)
                hNextFocus = pWidgetIterator->MoveToFirst();
@@ -466,7 +466,7 @@ CPDFSDK_Annot*              CPDFSDK_BFAnnotHandler::NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_Pag
        return pWidget;
 }
 
-CPDFSDK_Annot*         CPDFSDK_BFAnnotHandler::NewAnnot(XFA_HWIDGET hWidget, CPDFSDK_PageView* pPage)
+CPDFSDK_Annot*         CPDFSDK_BFAnnotHandler::NewAnnot(IXFA_Widget* hWidget, CPDFSDK_PageView* pPage)
 {
        return NULL;
 }
@@ -837,7 +837,7 @@ CPDFSDK_XFAAnnotHandler::CPDFSDK_XFAAnnotHandler(CPDFDoc_Environment* pApp) :
 
 }
 
-CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPage)
+CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPage)
 {
        ASSERT(pPage != NULL);
        ASSERT(pAnnot != NULL);
@@ -879,7 +879,7 @@ void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot*
        CFX_Matrix mt;
        mt = *(CFX_Matrix*)pUser2Device;
 
-       XFA_HWIDGET hWidget = pAnnot->GetXFAWidget();
+       IXFA_Widget* hWidget = pAnnot->GetXFAWidget();
        ASSERT(hWidget != NULL);
 
        FX_BOOL bIsHighlight = FALSE;
@@ -1149,10 +1149,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, CPD
 
        if (pWidgetHandler)
        {
-               FX_BOOL bRet = TRUE; /*pWidgetHandler->OnFocusChange(pNewAnnot ? pNewAnnot->GetXFAWidget() : NULL,
-                       pOldAnnot ? pOldAnnot->GetXFAWidget() : NULL); */
-
-               XFA_HWIDGET hWidget = pNewAnnot ? pNewAnnot->GetXFAWidget() : NULL;
+               FX_BOOL bRet = TRUE;
+               IXFA_Widget* hWidget = pNewAnnot ? pNewAnnot->GetXFAWidget() : NULL;
                if (hWidget)
                {
                        IXFA_PageView* pXFAPageView = pWidgetHandler->GetPageView(hWidget);
index afbafb8..6fcdeac 100644 (file)
@@ -41,7 +41,7 @@ CPDFSDK_Widget::~CPDFSDK_Widget()
 
 }
 
-XFA_HWIDGET    CPDFSDK_Widget::GetMixXFAWidget()
+IXFA_Widget*   CPDFSDK_Widget::GetMixXFAWidget()
 {
        ASSERT(m_pPageView != NULL);
 
@@ -77,7 +77,7 @@ XFA_HWIDGET   CPDFSDK_Widget::GetMixXFAWidget()
        return NULL;
 }
 
-XFA_HWIDGET    CPDFSDK_Widget::GetGroupMixXFAWidget()
+IXFA_Widget*   CPDFSDK_Widget::GetGroupMixXFAWidget()
 {
        ASSERT(m_pPageView != NULL);
 
@@ -207,7 +207,7 @@ static XFA_EVENTTYPE GetXFAEventType(CPDF_AAction::AActionType eAAT, FX_BOOL bWi
 
 FX_BOOL CPDFSDK_Widget::HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT)
 {
-       if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+       if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
        {
                if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
                {
@@ -217,7 +217,7 @@ FX_BOOL CPDFSDK_Widget::HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT)
                                eEventType == XFA_EVENT_Change) && 
                                GetFieldType() == FIELDTYPE_RADIOBUTTON)
                        {
-                               if (XFA_HWIDGET hGroupWidget = GetGroupMixXFAWidget())
+                               if (IXFA_Widget* hGroupWidget = GetGroupMixXFAWidget())
                                {
                                        CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hGroupWidget);
                                        if (pXFAWidgetHandler->HasEvent(pAcc, eEventType))
@@ -245,7 +245,7 @@ FX_BOOL     CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, PDFSDK_Field
        CPDFXFA_Document* pDoc = pSDKDoc->GetDocument();
        ASSERT(pDoc != NULL);
 
-       if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+       if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
        {
                XFA_EVENTTYPE eEventType = GetXFAEventType(eXFAAAT);
 
@@ -274,7 +274,7 @@ FX_BOOL     CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, PDFSDK_Field
                                        eEventType == XFA_EVENT_Change) && 
                                        GetFieldType() == FIELDTYPE_RADIOBUTTON)
                                {
-                                       if (XFA_HWIDGET hGroupWidget = GetGroupMixXFAWidget())
+                                       if (IXFA_Widget* hGroupWidget = GetGroupMixXFAWidget())
                                        {
                                                CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hGroupWidget);
                                                param.m_pTarget = pAcc;
@@ -309,7 +309,7 @@ FX_BOOL     CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, PDFSDK_Field
 
 void CPDFSDK_Widget::Synchronize(FX_BOOL bSynchronizeElse)
 {
-       if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+       if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
        {
                if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
                {
@@ -381,7 +381,7 @@ void CPDFSDK_Widget::SynchronizeXFAValue()
        IXFA_DocView* pXFADocView = pDoc->GetXFADocView();
        if (!pXFADocView) return;
 
-       if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+       if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
        {
                if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
                {
@@ -409,7 +409,7 @@ void CPDFSDK_Widget::SynchronizeXFAItems()
        IXFA_DocView* pXFADocView = pDoc->GetXFADocView();
        if (!pXFADocView) return;
 
-       if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+       if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
        {
                if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
                {
@@ -421,7 +421,7 @@ void CPDFSDK_Widget::SynchronizeXFAItems()
        }
 }
 
-void CPDFSDK_Widget::SynchronizeXFAValue(IXFA_DocView* pXFADocView, XFA_HWIDGET hWidget, 
+void CPDFSDK_Widget::SynchronizeXFAValue(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget, 
        CPDF_FormField* pFormField, CPDF_FormControl* pFormControl)
 {
        ASSERT(pXFADocView != NULL);
@@ -510,7 +510,7 @@ void CPDFSDK_Widget::SynchronizeXFAValue(IXFA_DocView* pXFADocView, XFA_HWIDGET
        }
 }
 
-void CPDFSDK_Widget::SynchronizeXFAItems(IXFA_DocView* pXFADocView, XFA_HWIDGET hWidget, 
+void CPDFSDK_Widget::SynchronizeXFAItems(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget, 
        CPDF_FormField* pFormField, CPDF_FormControl* pFormControl)
 {
        ASSERT(pXFADocView != NULL);
@@ -769,7 +769,7 @@ FX_FLOAT CPDFSDK_Widget::GetFontSize() const
 
 int    CPDFSDK_Widget::GetSelectedIndex(int nIndex)
 {
-       if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+       if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
        {
                if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
                {
@@ -789,7 +789,7 @@ int CPDFSDK_Widget::GetSelectedIndex(int nIndex)
 
 CFX_WideString CPDFSDK_Widget::GetValue(FX_BOOL bDisplay)
 {
-       if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+       if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
        {
                if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
                {
@@ -834,7 +834,7 @@ int CPDFSDK_Widget::CountOptions() const
 
 FX_BOOL        CPDFSDK_Widget::IsOptionSelected(int nIndex)
 {
-       if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+       if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
        {
                if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
                {
@@ -866,7 +866,7 @@ FX_BOOL     CPDFSDK_Widget::IsChecked()
 {
        if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
        {
-               if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+               if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
                {
                        if (CXFA_WidgetAcc* pWidgetAcc = pXFAWidgetHandler->GetDataAcc(hWidget))
                        {
@@ -2243,7 +2243,7 @@ FX_BOOL CPDFSDK_Widget::OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldAc
        CPDFDoc_Environment* pEnv = pDocument->GetEnv();
        ASSERT(pEnv != NULL);
 
-       if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+       if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
        {
                XFA_EVENTTYPE eEventType = GetXFAEventType(type, data.bWillCommit);
  
@@ -2368,7 +2368,7 @@ FX_BOOL   CPDFSDK_Widget::HitTest(FX_FLOAT pageX, FX_FLOAT pageY)
 }
 
 //CPDFSDK_XFAWidget
-CPDFSDK_XFAWidget::CPDFSDK_XFAWidget(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPageView, CPDFSDK_InterForm* pInterForm) :
+CPDFSDK_XFAWidget::CPDFSDK_XFAWidget(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPageView, CPDFSDK_InterForm* pInterForm) :
        CPDFSDK_Annot(pPageView),
        m_hXFAWidget(pAnnot),
        m_pInterForm(pInterForm)
@@ -2575,17 +2575,17 @@ void CPDFSDK_InterForm::RemoveMap(CPDF_FormControl* pControl)
        m_Map.RemoveKey(pControl);
 }
 
-void CPDFSDK_InterForm::AddXFAMap(XFA_HWIDGET hWidget, CPDFSDK_XFAWidget* pWidget)
+void CPDFSDK_InterForm::AddXFAMap(IXFA_Widget* hWidget, CPDFSDK_XFAWidget* pWidget)
 {
        m_XFAMap.SetAt(hWidget, pWidget);
 }
 
-void CPDFSDK_InterForm::RemoveXFAMap(XFA_HWIDGET hWidget)
+void CPDFSDK_InterForm::RemoveXFAMap(IXFA_Widget* hWidget)
 {
        m_XFAMap.RemoveKey(hWidget);
 }
 
-CPDFSDK_XFAWidget* CPDFSDK_InterForm::GetXFAWidget(XFA_HWIDGET hWidget)
+CPDFSDK_XFAWidget* CPDFSDK_InterForm::GetXFAWidget(IXFA_Widget* hWidget)
 {
        CPDFSDK_XFAWidget* pWidget = NULL;
        m_XFAMap.Lookup(hWidget, pWidget);
index ccb1ab6..a1d9453 100644 (file)
@@ -805,7 +805,7 @@ CPDFSDK_Annot*      CPDFSDK_PageView::AddAnnot(CPDF_Annot * pPDFAnnot)
         return pSDKAnnot;
 }
 
-CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(XFA_HWIDGET pPDFAnnot)
+CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(IXFA_Widget* pPDFAnnot)
 {
        if (!pPDFAnnot) return NULL;
 
@@ -905,7 +905,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByDict(CPDF_Dictionary * pDict)
        }
        return NULL;
 }
-CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByXFAWidget(XFA_HWIDGET hWidget)
+CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByXFAWidget(IXFA_Widget* hWidget)
 {
        if (hWidget == NULL)
                return NULL;
@@ -1118,7 +1118,6 @@ void CPDFSDK_PageView::LoadFXAnnots()
                pageView = m_page->GetXFAPageView();
                ASSERT(pageView != NULL);
 
-               XFA_HWIDGET pXFAAnnot = NULL;
                IXFA_WidgetIterator* pWidgetHander = pageView->CreateWidgetIterator(XFA_TRAVERSEWAY_Form, XFA_WIDGETFILTER_Visible|XFA_WIDGETFILTER_Viewable|XFA_WIDGETFILTER_AllType);
                if (!pWidgetHander)
                {
@@ -1127,7 +1126,7 @@ void CPDFSDK_PageView::LoadFXAnnots()
                        return;
                }
 
-               pXFAAnnot = pWidgetHander->MoveToNext();
+        IXFA_Widget* pXFAAnnot = pWidgetHander->MoveToNext();
                while (pXFAAnnot) {
                        CPDFSDK_Annot* pAnnot = pAnnotHandlerMgr->NewAnnot(pXFAAnnot, this);
                        if(!pAnnot) {
index 4d6a036..da39113 100644 (file)
@@ -35,9 +35,15 @@ protected:
     IXFA_Doc() { }\r
 };\r
 \r
-typedef struct _XFA_HWIDGET {\r
-    FX_LPVOID pData;\r
-}* XFA_HWIDGET;\r
+
+class IXFA_Widget {\r
+public:\r
+    virtual ~IXFA_Widget() { }\r
+protected:\r
+    IXFA_Widget() { }\r
+};\r
+\r
+
 #include "fxfa_basic.h"\r
 #include "fxfa_widget.h"\r
 #define XFA_MBICON_Error       0\r
@@ -284,24 +290,24 @@ class IXFA_MenuHandler
 public:\r
     virtual ~IXFA_MenuHandler() { }\r
 \r
-    virtual FX_BOOL            CanCopy(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            CanCut(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            CanPaste(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            CanSelectAll(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            CanDelete(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            CanDeSelect(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            Copy(XFA_HWIDGET hWidget, CFX_WideString &wsText) = 0;\r
-    virtual FX_BOOL            Cut(XFA_HWIDGET hWidget, CFX_WideString &wsText) = 0;\r
-    virtual FX_BOOL            Paste(XFA_HWIDGET hWidget, const CFX_WideString &wsText) = 0;\r
-    virtual FX_BOOL            SelectAll(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            Delete(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            DeSelect(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            CanUndo(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            CanRedo(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            Undo(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            Redo(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL            GetSuggestWords(XFA_HWIDGET hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest) = 0;\r
-    virtual FX_BOOL            ReplaceSpellCheckWord(XFA_HWIDGET hWidget, CFX_PointF pointf, FX_BSTR bsReplace) = 0;\r
+    virtual FX_BOOL            CanCopy(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            CanCut(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            CanPaste(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            CanSelectAll(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            CanDelete(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            CanDeSelect(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            Copy(IXFA_Widget* hWidget, CFX_WideString &wsText) = 0;\r
+    virtual FX_BOOL            Cut(IXFA_Widget* hWidget, CFX_WideString &wsText) = 0;\r
+    virtual FX_BOOL            Paste(IXFA_Widget* hWidget, const CFX_WideString &wsText) = 0;\r
+    virtual FX_BOOL            SelectAll(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            Delete(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            DeSelect(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            CanUndo(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            CanRedo(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            Undo(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            Redo(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL            GetSuggestWords(IXFA_Widget* hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest) = 0;\r
+    virtual FX_BOOL            ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, FX_BSTR bsReplace) = 0;\r
 };\r
 #define XFA_INVALIDATE_AllPages                0x00000000\r
 #define XFA_INVALIDATE_CurrentPage     0x00000001\r
@@ -326,13 +332,13 @@ public:
 \r
     virtual void               SetChangeMark(IXFA_Doc* hDoc) = 0;\r
     virtual void               InvalidateRect(IXFA_PageView* pPageView, const CFX_RectF& rt, FX_DWORD dwFlags = 0) = 0;\r
-    virtual void               DisplayCaret(XFA_HWIDGET hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor) = 0;\r
-    virtual FX_BOOL            GetPopupPos(XFA_HWIDGET hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup,\r
+    virtual void               DisplayCaret(IXFA_Widget* hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor) = 0;\r
+    virtual FX_BOOL            GetPopupPos(IXFA_Widget* hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup,\r
                                     const CFX_RectF &rtAnchor, CFX_RectF &rtPopup) = 0;\r
-    virtual FX_BOOL            PopupMenu(XFA_HWIDGET hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude = NULL) = 0;\r
+    virtual FX_BOOL            PopupMenu(IXFA_Widget* hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude = NULL) = 0;\r
     virtual void               PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags) = 0;\r
-    virtual void               WidgetEvent(XFA_HWIDGET hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL) = 0;\r
-    virtual FX_BOOL            RenderCustomWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI)\r
+    virtual void               WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL) = 0;\r
+    virtual FX_BOOL            RenderCustomWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI)\r
     {\r
         return FALSE;\r
     }\r
@@ -348,12 +354,12 @@ public:
     virtual void               GotoURL(IXFA_Doc* hDoc, FX_WSTR bsURL, FX_BOOL bAppend = TRUE) = 0;\r
     virtual FX_BOOL            IsValidationsEnabled(IXFA_Doc* hDoc) = 0;\r
     virtual void               SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled) = 0;\r
-    virtual void               SetFocusWidget(IXFA_Doc* hDoc, XFA_HWIDGET hWidget) = 0;\r
+    virtual void               SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0;\r
     virtual void               Print(IXFA_Doc* hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions) = 0;\r
     virtual FX_INT32                   AbsPageCountInBatch(IXFA_Doc* hDoc) = 0;\r
-    virtual FX_INT32                   AbsPageInBatch(IXFA_Doc* hDoc, XFA_HWIDGET hWidget) = 0;\r
+    virtual FX_INT32                   AbsPageInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0;\r
     virtual FX_INT32                   SheetCountInBatch(IXFA_Doc* hDoc) = 0;\r
-    virtual FX_INT32                   SheetInBatch(IXFA_Doc* hDoc, XFA_HWIDGET hWidget) = 0;\r
+    virtual FX_INT32                   SheetInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0;\r
     virtual FX_INT32                   Verify(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bUsed = TRUE)\r
     {\r
         return 0;\r
@@ -372,7 +378,7 @@ public:
     }\r
     virtual void               GetURL(IXFA_Doc* hDoc, CFX_WideString &wsDocURL) = 0;\r
     virtual FX_ARGB            GetHighlightColor(IXFA_Doc* hDoc) = 0;\r
-    virtual void               AddDoRecord(XFA_HWIDGET hWidget) = 0;\r
+    virtual void               AddDoRecord(IXFA_Widget* hWidget) = 0;\r
 \r
     virtual FX_BOOL            SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit) = 0;\r
     virtual FX_BOOL            CheckWord(IXFA_Doc* hDoc, FX_BSTR sWord) = 0;\r
@@ -531,16 +537,16 @@ public:
     virtual    void                            UpdateDocView() = 0;\r
     virtual FX_INT32                   CountPageViews() = 0;\r
     virtual IXFA_PageView*             GetPageView(FX_INT32 nIndex) = 0;\r
-    virtual XFA_HWIDGET                        GetWidgetByName(FX_WSTR wsName) = 0;\r
+    virtual IXFA_Widget*                       GetWidgetByName(FX_WSTR wsName) = 0;\r
     virtual CXFA_WidgetAcc*            GetWidgetAccByName(FX_WSTR wsName) = 0;\r
     virtual void                               ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc = NULL) = 0;\r
     virtual FX_INT32                   ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc = NULL) = 0;\r
     virtual IXFA_WidgetHandler*        GetWidgetHandler() = 0;\r
     virtual IXFA_WidgetIterator*       CreateWidgetIterator() = 0;\r
     virtual IXFA_WidgetAccIterator* CreateWidgetAccIterator(XFA_WIDGETORDER eOrder = XFA_WIDGETORDER_PreOrder) = 0;\r
-    virtual XFA_HWIDGET                        GetFocusWidget() = 0;\r
+    virtual IXFA_Widget*                       GetFocusWidget() = 0;\r
     virtual void                               KillFocus() = 0;\r
-    virtual FX_BOOL                            SetFocus(XFA_HWIDGET hWidget) = 0;\r
+    virtual FX_BOOL                            SetFocus(IXFA_Widget* hWidget) = 0;\r
 };\r
 #define XFA_TRAVERSEWAY_Tranvalse              0x0001\r
 #define XFA_TRAVERSEWAY_Form                   0x0002\r
@@ -562,7 +568,7 @@ public:
 \r
     virtual FX_INT32           LoadPageView(IFX_Pause *pPause = NULL) = 0;\r
     virtual void                       UnloadPageView() = 0;\r
-    virtual XFA_HWIDGET                GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy) = 0;\r
+    virtual IXFA_Widget*               GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy) = 0;\r
     virtual IXFA_WidgetIterator* CreateWidgetIterator(FX_DWORD dwTraverseWay = XFA_TRAVERSEWAY_Form, FX_DWORD dwWidgetFilter = XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_Viewable | XFA_WIDGETFILTER_AllType) = 0;\r
 };\r
 class CXFA_RenderOptions\r
@@ -625,35 +631,35 @@ class IXFA_WidgetHandler
 public:\r
     virtual ~IXFA_WidgetHandler() { }\r
 \r
-    virtual XFA_HWIDGET                CreateWidget(XFA_HWIDGET hParent, XFA_WIDGETTYPE eType, XFA_HWIDGET hBefore = NULL) = 0;\r
-    virtual IXFA_PageView*     GetPageView(XFA_HWIDGET hWidget) = 0;\r
-    virtual void                       GetRect(XFA_HWIDGET hWidget, CFX_RectF &rt) = 0;\r
-    virtual FX_DWORD           GetStatus(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL                    GetBBox(XFA_HWIDGET hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus = FALSE) = 0;\r
-    virtual CXFA_WidgetAcc*    GetDataAcc(XFA_HWIDGET hWidget) = 0;\r
-\r
-    virtual void                       GetName(XFA_HWIDGET hWidget, CFX_WideString &wsName, FX_INT32 iNameType = 0) = 0;\r
-    virtual    FX_BOOL                 GetToolTip(XFA_HWIDGET hWidget, CFX_WideString &wsToolTip) = 0;\r
-    virtual    void                    SetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback) = 0;\r
-    virtual    FX_LPVOID               GetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id) = 0;\r
-    virtual FX_BOOL                    OnMouseEnter(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL                    OnMouseExit(XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_BOOL                    OnLButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
-    virtual FX_BOOL                    OnLButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
-    virtual FX_BOOL                    OnLButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
-    virtual FX_BOOL                    OnMouseMove(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
-    virtual FX_BOOL                    OnMouseWheel(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
-    virtual FX_BOOL                    OnRButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
-    virtual FX_BOOL                    OnRButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
-    virtual FX_BOOL                    OnRButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
-\r
-    virtual FX_BOOL                    OnKeyDown(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags) = 0;\r
-    virtual FX_BOOL                    OnKeyUp(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags) = 0;\r
-    virtual FX_BOOL                    OnChar(XFA_HWIDGET hWidget, FX_DWORD dwChar, FX_DWORD dwFlags) = 0;\r
-    virtual    FX_DWORD                OnHitTest(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
-    virtual FX_BOOL                    OnSetCursor(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
-\r
-    virtual void                       RenderWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_BOOL bHighlight = FALSE) = 0;\r
+    virtual IXFA_Widget*               CreateWidget(IXFA_Widget* hParent, XFA_WIDGETTYPE eType, IXFA_Widget* hBefore = NULL) = 0;\r
+    virtual IXFA_PageView*     GetPageView(IXFA_Widget* hWidget) = 0;\r
+    virtual void                       GetRect(IXFA_Widget* hWidget, CFX_RectF &rt) = 0;\r
+    virtual FX_DWORD           GetStatus(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL                    GetBBox(IXFA_Widget* hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus = FALSE) = 0;\r
+    virtual CXFA_WidgetAcc*    GetDataAcc(IXFA_Widget* hWidget) = 0;\r
+\r
+    virtual void                       GetName(IXFA_Widget* hWidget, CFX_WideString &wsName, FX_INT32 iNameType = 0) = 0;\r
+    virtual    FX_BOOL                 GetToolTip(IXFA_Widget* hWidget, CFX_WideString &wsToolTip) = 0;\r
+    virtual    void                    SetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback) = 0;\r
+    virtual    FX_LPVOID               GetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id) = 0;\r
+    virtual FX_BOOL                    OnMouseEnter(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL                    OnMouseExit(IXFA_Widget* hWidget) = 0;\r
+    virtual FX_BOOL                    OnLButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
+    virtual FX_BOOL                    OnLButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
+    virtual FX_BOOL                    OnLButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
+    virtual FX_BOOL                    OnMouseMove(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
+    virtual FX_BOOL                    OnMouseWheel(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
+    virtual FX_BOOL                    OnRButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
+    virtual FX_BOOL                    OnRButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
+    virtual FX_BOOL                    OnRButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
+\r
+    virtual FX_BOOL                    OnKeyDown(IXFA_Widget* hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags) = 0;\r
+    virtual FX_BOOL                    OnKeyUp(IXFA_Widget* hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags) = 0;\r
+    virtual FX_BOOL                    OnChar(IXFA_Widget* hWidget, FX_DWORD dwChar, FX_DWORD dwFlags) = 0;\r
+    virtual    FX_DWORD                OnHitTest(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
+    virtual FX_BOOL                    OnSetCursor(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;\r
+\r
+    virtual void                       RenderWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_BOOL bHighlight = FALSE) = 0;\r
     virtual FX_BOOL                    HasEvent(CXFA_WidgetAcc* pWidgetAcc, XFA_EVENTTYPE eEventType) = 0;\r
     virtual FX_INT32           ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam) = 0;\r
 };\r
@@ -662,12 +668,12 @@ class IXFA_WidgetIterator
 public:\r
     virtual void                               Release() = 0;\r
     virtual void                               Reset() = 0;\r
-    virtual XFA_HWIDGET                        MoveToFirst() = 0;\r
-    virtual XFA_HWIDGET                        MoveToLast() = 0;\r
-    virtual    XFA_HWIDGET                     MoveToNext() = 0;\r
-    virtual XFA_HWIDGET                        MoveToPrevious() = 0;\r
-    virtual    XFA_HWIDGET                     GetCurrentWidget() = 0;\r
-    virtual    FX_BOOL                         SetCurrentWidget(XFA_HWIDGET hWidget)  = 0;\r
+    virtual IXFA_Widget*                       MoveToFirst() = 0;\r
+    virtual IXFA_Widget*                       MoveToLast() = 0;\r
+    virtual    IXFA_Widget*                    MoveToNext() = 0;\r
+    virtual IXFA_Widget*                       MoveToPrevious() = 0;\r
+    virtual    IXFA_Widget*                    GetCurrentWidget() = 0;\r
+    virtual    FX_BOOL                         SetCurrentWidget(IXFA_Widget* hWidget)  = 0;\r
 protected:\r
     ~IXFA_WidgetIterator() { }\r
 };\r
index d7faedc..81b7ccb 100644 (file)
@@ -309,7 +309,7 @@ FX_BOOL CXFA_FFComboBox::OnRButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
     }\r
     CFX_PointF pt;\r
     pt.Set(fx, fy);\r
-    GetDoc()->GetDocProvider()->PopupMenu((XFA_HWIDGET)this, pt, NULL);\r
+    GetDoc()->GetDocProvider()->PopupMenu(this, pt, NULL);\r
     return TRUE;\r
 }\r
 FX_BOOL CXFA_FFComboBox::OnKillFocus(CXFA_FFWidget* pNewWidget)\r
@@ -531,7 +531,7 @@ void CXFA_FFComboBox::OnPostOpen(IFWL_Widget *pWidget)
 }\r
 void CXFA_FFComboBox::OnAddDoRecord(IFWL_Widget *pWidget)\r
 {\r
-    GetDoc()->GetDocProvider()->AddDoRecord((XFA_HWIDGET)this);\r
+    GetDoc()->GetDocProvider()->AddDoRecord(this);\r
 }\r
 FX_INT32 CXFA_FFComboBox::OnProcessMessage(CFWL_Message *pMessage)\r
 {\r
index 32d2789..7f80c41 100644 (file)
@@ -222,9 +222,9 @@ IXFA_PageView* CXFA_FFDocView::GetPageView(FX_INT32 nIndex)
     }\r
     return (CXFA_FFPageView*)m_pXFADocLayout->GetPage(nIndex);\r
 }\r
-XFA_HWIDGET CXFA_FFDocView::GetWidgetByName(FX_WSTR wsName)\r
+IXFA_Widget* CXFA_FFDocView::GetWidgetByName(FX_WSTR wsName)\r
 {\r
-    return (XFA_HWIDGET)GetWidgetByName(wsName, NULL);\r
+    return GetWidgetByName(wsName, NULL);\r
 }\r
 CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(FX_WSTR wsName)\r
 {\r
@@ -353,9 +353,9 @@ IXFA_WidgetAccIterator* CXFA_FFDocView::CreateWidgetAccIterator(XFA_WIDGETORDER
     }\r
     return FX_NEW CXFA_WidgetAccIterator(this, pFormRoot);\r
 }\r
-XFA_HWIDGET CXFA_FFDocView::GetFocusWidget()\r
+IXFA_Widget* CXFA_FFDocView::GetFocusWidget()\r
 {\r
-    return (XFA_HWIDGET)m_pFocusWidget;\r
+    return m_pFocusWidget;\r
 }\r
 void CXFA_FFDocView::KillFocus()\r
 {\r
@@ -366,7 +366,7 @@ void CXFA_FFDocView::KillFocus()
     m_pFocusWidget = NULL;\r
     m_pOldFocusWidget = NULL;\r
 }\r
-FX_BOOL CXFA_FFDocView::SetFocus(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFDocView::SetFocus(IXFA_Widget* hWidget)\r
 {\r
     CXFA_FFWidget* pNewFocus = (CXFA_FFWidget*)hWidget;\r
     if (m_pOldFocusWidget == pNewFocus) {\r
@@ -416,10 +416,10 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetFocusWidgetAcc()
 void CXFA_FFDocView::SetFocusWidgetAcc(CXFA_WidgetAcc* pWidgetAcc)\r
 {\r
     CXFA_FFWidget* pNewFocus = pWidgetAcc ? pWidgetAcc->GetNextWidget(NULL) : NULL;\r
-    if (SetFocus((XFA_HWIDGET)pNewFocus)) {\r
+    if (SetFocus(pNewFocus)) {\r
         m_pFocusAcc = pWidgetAcc;\r
         if (m_iStatus >= XFA_DOCVIEW_LAYOUTSTATUS_End) {\r
-            m_pDoc->GetDocProvider()->SetFocusWidget(m_pDoc, (XFA_HWIDGET)m_pFocusWidget);\r
+            m_pDoc->GetDocProvider()->SetFocusWidget(m_pDoc, m_pFocusWidget);\r
         }\r
     }\r
 }\r
@@ -865,15 +865,15 @@ void CXFA_FFDocWidgetIterator::Reset()
     m_ContentIterator.Reset();\r
     m_pCurWidget = NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToFirst()\r
+IXFA_Widget* CXFA_FFDocWidgetIterator::MoveToFirst()\r
 {\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToLast()\r
+IXFA_Widget* CXFA_FFDocWidgetIterator::MoveToLast()\r
 {\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToNext()\r
+IXFA_Widget* CXFA_FFDocWidgetIterator::MoveToNext()\r
 {\r
     CXFA_Node* pItem = m_pCurWidget ? m_ContentIterator.MoveToNext() : m_ContentIterator.GetCurrent();\r
     while (pItem) {\r
@@ -882,22 +882,22 @@ XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToNext()
                 if (!m_pCurWidget->IsLoaded() && (m_pCurWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) {\r
                     m_pCurWidget->LoadWidget();\r
                 }\r
-                return (XFA_HWIDGET)m_pCurWidget;\r
+                return m_pCurWidget;\r
             }\r
         }\r
         pItem = m_ContentIterator.MoveToNext();\r
     }\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToPrevious()\r
+IXFA_Widget* CXFA_FFDocWidgetIterator::MoveToPrevious()\r
 {\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFDocWidgetIterator::GetCurrentWidget()\r
+IXFA_Widget* CXFA_FFDocWidgetIterator::GetCurrentWidget()\r
 {\r
     return NULL;\r
 }\r
-FX_BOOL CXFA_FFDocWidgetIterator::SetCurrentWidget(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFDocWidgetIterator::SetCurrentWidget(IXFA_Widget* hWidget)\r
 {\r
     return FALSE;\r
 }\r
index 79a3008..e3f2d64 100644 (file)
@@ -45,16 +45,16 @@ public:
     virtual    void                    UpdateDocView();\r
     virtual FX_INT32           CountPageViews();\r
     virtual IXFA_PageView*     GetPageView(FX_INT32 nIndex);\r
-    virtual XFA_HWIDGET                GetWidgetByName(FX_WSTR wsName);\r
+    virtual IXFA_Widget*               GetWidgetByName(FX_WSTR wsName);\r
     virtual CXFA_WidgetAcc* GetWidgetAccByName(FX_WSTR wsName);\r
     virtual void                       ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc = NULL);\r
     virtual FX_INT32           ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc = NULL);\r
     virtual IXFA_WidgetHandler*                        GetWidgetHandler();\r
     virtual IXFA_WidgetIterator*               CreateWidgetIterator();\r
     virtual IXFA_WidgetAccIterator*            CreateWidgetAccIterator(XFA_WIDGETORDER eOrder = XFA_WIDGETORDER_PreOrder);\r
-    virtual XFA_HWIDGET                GetFocusWidget();\r
+    virtual IXFA_Widget*               GetFocusWidget();\r
     virtual void                       KillFocus();\r
-    virtual FX_BOOL                    SetFocus(XFA_HWIDGET hWidget);\r
+    virtual FX_BOOL                    SetFocus(IXFA_Widget* hWidget);\r
     CXFA_FFWidget*             GetWidgetByName(FX_WSTR wsName, CXFA_FFWidget* pRefWidget = NULL);\r
     CXFA_WidgetAcc*            GetWidgetAccByName(FX_WSTR wsName, CXFA_WidgetAcc* pRefWidgetAcc = NULL);\r
     IXFA_DocLayout*            GetXFALayout() const;\r
@@ -129,12 +129,12 @@ public:
     }\r
 \r
     virtual void                               Reset();\r
-    virtual XFA_HWIDGET                        MoveToFirst();\r
-    virtual XFA_HWIDGET                        MoveToLast();\r
-    virtual XFA_HWIDGET                        MoveToNext();\r
-    virtual XFA_HWIDGET                        MoveToPrevious();\r
-    virtual XFA_HWIDGET                        GetCurrentWidget();\r
-    virtual FX_BOOL                            SetCurrentWidget(XFA_HWIDGET hWidget);\r
+    virtual IXFA_Widget*                       MoveToFirst();\r
+    virtual IXFA_Widget*                       MoveToLast();\r
+    virtual IXFA_Widget*                       MoveToNext();\r
+    virtual IXFA_Widget*                       MoveToPrevious();\r
+    virtual IXFA_Widget*                       GetCurrentWidget();\r
+    virtual FX_BOOL                            SetCurrentWidget(IXFA_Widget* hWidget);\r
 protected:\r
     CXFA_ContainerIterator             m_ContentIterator;\r
     CXFA_FFDocView*                            m_pDocView;\r
index 2d6cc75..81119e6 100644 (file)
@@ -84,7 +84,7 @@ void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent
                 CXFA_FFWidget* pWidget = pWidgetAcc->GetNextWidget(NULL);\r
                 if (!pWidget) {\r
                     if (bStaticNotify) {\r
-                        pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent((XFA_HWIDGET)pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemAdded, pParam, pAdditional);\r
+                        pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent(pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemAdded, pParam, pAdditional);\r
                     }\r
                     return;\r
                 }\r
@@ -97,7 +97,7 @@ void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent
                         }\r
                     }\r
                     if (bStaticNotify) {\r
-                        pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent((XFA_HWIDGET)pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemAdded, pParam, pAdditional);\r
+                        pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent(pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemAdded, pParam, pAdditional);\r
                     }\r
                     pWidget = pWidgetAcc->GetNextWidget(pWidget);\r
                 }\r
@@ -111,7 +111,7 @@ void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent
                 CXFA_FFWidget* pWidget = pWidgetAcc->GetNextWidget(NULL);\r
                 if (!pWidget) {\r
                     if (bStaticNotify) {\r
-                        pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent((XFA_HWIDGET)pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemRemoved, pParam, pAdditional);\r
+                        pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent(pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemRemoved, pParam, pAdditional);\r
                     }\r
                     return;\r
                 }\r
@@ -124,7 +124,7 @@ void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent
                         }\r
                     }\r
                     if (bStaticNotify) {\r
-                        pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent((XFA_HWIDGET)pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemRemoved, pParam, pAdditional);\r
+                        pWidgetAcc->GetDoc()->GetDocProvider()->WidgetEvent(pWidget, pWidgetAcc, XFA_WIDGETEVENT_ListItemRemoved, pParam, pAdditional);\r
                     }\r
                     pWidget = pWidgetAcc->GetNextWidget(pWidget);\r
                 }\r
@@ -315,11 +315,11 @@ IXFA_WidgetHandler* CXFA_FFNotify::GetWidgetHandler()
     CXFA_FFDocView* pDocView = m_pDoc->GetDocView();\r
     return pDocView ? pDocView->GetWidgetHandler() : NULL;\r
 }\r
-XFA_HWIDGET    CXFA_FFNotify::GetHWidget(CXFA_LayoutItem* pLayoutItem)\r
+IXFA_Widget* CXFA_FFNotify::GetHWidget(CXFA_LayoutItem* pLayoutItem)\r
 {\r
-    return (XFA_HWIDGET)XFA_GetWidgetFromLayoutItem(pLayoutItem);\r
+    return XFA_GetWidgetFromLayoutItem(pLayoutItem);\r
 }\r
-void CXFA_FFNotify::OpenDropDownList(XFA_HWIDGET hWidget)\r
+void CXFA_FFNotify::OpenDropDownList(IXFA_Widget* hWidget)\r
 {\r
     CXFA_FFWidget* pWidget = (CXFA_FFWidget*)hWidget;\r
     if (pWidget->GetDataAcc()->GetUIType() != XFA_ELEMENT_ChoiceList) {\r
@@ -553,7 +553,7 @@ void CXFA_FFNotify::OnLayoutItemAdd(CXFA_FFDocView* pDocView, IXFA_DocLayout *pL
         IXFA_PageView* pPrePageView = pWidget->GetPageView();\r
         if (pPrePageView != pNewPageView || (dwStatus & (XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable)) == (XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable)) {\r
             pWidget->SetPageView(pNewPageView);\r
-            m_pDoc->GetDocProvider()->WidgetEvent((XFA_HWIDGET)pWidget, pWidget->GetDataAcc(), XFA_WIDGETEVENT_PostAdded, pNewPageView, pPrePageView);\r
+            m_pDoc->GetDocProvider()->WidgetEvent(pWidget, pWidget->GetDataAcc(), XFA_WIDGETEVENT_PostAdded, pNewPageView, pPrePageView);\r
         }\r
         if ((dwStatus & XFA_WIDGETSTATUS_Visible) == 0) {\r
             return;\r
@@ -580,7 +580,7 @@ void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_FFDocView* pDocView, IXFA_DocLayou
     if (pDocView->GetLayoutStatus() < XFA_DOCVIEW_LAYOUTSTATUS_End) {\r
         return;\r
     }\r
-    m_pDoc->GetDocProvider()->WidgetEvent((XFA_HWIDGET)pWidget, pWidget->GetDataAcc(), XFA_WIDGETEVENT_PreRemoved, NULL, NULL);\r
+    m_pDoc->GetDocProvider()->WidgetEvent(pWidget, pWidget->GetDataAcc(), XFA_WIDGETEVENT_PreRemoved, NULL, NULL);\r
     pWidget->AddInvalidateRect(NULL);\r
 }\r
 void CXFA_FFNotify::OnLayoutItemRectChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2)\r
index 739f253..383b077 100644 (file)
@@ -28,8 +28,8 @@ public:
     virtual IXFA_DocProvider*  GetDocProvider();\r
     virtual IXFA_AppProvider*  GetAppProvider();\r
     virtual IXFA_WidgetHandler*        GetWidgetHandler();\r
-    virtual XFA_HWIDGET                        GetHWidget(CXFA_LayoutItem* pLayoutItem);\r
-    virtual void                               OpenDropDownList(XFA_HWIDGET hWidget);\r
+    virtual IXFA_Widget*                       GetHWidget(CXFA_LayoutItem* pLayoutItem);\r
+    virtual void                               OpenDropDownList(IXFA_Widget* hWidget);\r
     virtual CFX_WideString             GetCurrentDateTime();\r
     virtual void                               ResetData(CXFA_WidgetData* pWidgetData = NULL);\r
     virtual FX_INT32                   GetLayoutStatus();\r
index ec591ad..ef34085 100644 (file)
@@ -66,7 +66,7 @@ FX_BOOL CXFA_FFPageView::IsPageViewLoaded()
 {\r
     return m_bLoaded;\r
 }\r
-XFA_HWIDGET CXFA_FFPageView::GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy)\r
+IXFA_Widget* CXFA_FFPageView::GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy)\r
 {\r
     if (!m_bLoaded) {\r
         return NULL;\r
@@ -87,7 +87,7 @@ XFA_HWIDGET CXFA_FFPageView::GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy)
         if (( FWL_WGTHITTEST_Client == dwFlag\r
                 ||  FWL_WGTHITTEST_Transparent == dwFlag)) {\r
             pIterator->Release();\r
-            return (XFA_HWIDGET)pWidget;\r
+            return pWidget;\r
         }\r
     }\r
     pIterator->Release();\r
@@ -135,52 +135,52 @@ void CXFA_FFPageWidgetIterator::Reset()
 {\r
     m_sIterator.Reset();\r
 }\r
-XFA_HWIDGET CXFA_FFPageWidgetIterator::MoveToFirst()\r
+IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToFirst()\r
 {\r
     m_sIterator.Reset();\r
     for(CXFA_LayoutItem* pLayoutItem = m_sIterator.GetCurrent(); pLayoutItem; pLayoutItem = m_sIterator.MoveToNext()) {\r
-        if (XFA_HWIDGET hWidget = GetWidget(pLayoutItem)) {\r
+        if (IXFA_Widget* hWidget = GetWidget(pLayoutItem)) {\r
             return hWidget;\r
         }\r
     }\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFPageWidgetIterator::MoveToLast()\r
+IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToLast()\r
 {\r
     m_sIterator.SetCurrent(NULL);\r
     return MoveToPrevious();\r
 }\r
-XFA_HWIDGET CXFA_FFPageWidgetIterator::MoveToNext()\r
+IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToNext()\r
 {\r
     for(CXFA_LayoutItem* pLayoutItem = m_sIterator.MoveToNext(); pLayoutItem; pLayoutItem = m_sIterator.MoveToNext()) {\r
-        if (XFA_HWIDGET hWidget = GetWidget(pLayoutItem)) {\r
+        if (IXFA_Widget* hWidget = GetWidget(pLayoutItem)) {\r
             return hWidget;\r
         }\r
     }\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFPageWidgetIterator::MoveToPrevious()\r
+IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToPrevious()\r
 {\r
     for(CXFA_LayoutItem* pLayoutItem = m_sIterator.MoveToPrev(); pLayoutItem; pLayoutItem = m_sIterator.MoveToPrev()) {\r
-        if (XFA_HWIDGET hWidget = GetWidget(pLayoutItem)) {\r
+        if (IXFA_Widget* hWidget = GetWidget(pLayoutItem)) {\r
             return hWidget;\r
         }\r
     }\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFPageWidgetIterator::GetCurrentWidget()\r
+IXFA_Widget* CXFA_FFPageWidgetIterator::GetCurrentWidget()\r
 {\r
     CXFA_LayoutItem* pLayoutItem = m_sIterator.GetCurrent();\r
-    return pLayoutItem ? (XFA_HWIDGET)XFA_GetWidgetFromLayoutItem(pLayoutItem) : NULL;\r
+    return pLayoutItem ? XFA_GetWidgetFromLayoutItem(pLayoutItem) : NULL;\r
 }\r
-FX_BOOL CXFA_FFPageWidgetIterator::SetCurrentWidget(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFPageWidgetIterator::SetCurrentWidget(IXFA_Widget* hWidget)\r
 {\r
     if(hWidget && m_sIterator.SetCurrent(((CXFA_FFWidget*)hWidget)->GetLayoutItem())) {\r
         return TRUE;\r
     }\r
     return FALSE;\r
 }\r
-XFA_HWIDGET CXFA_FFPageWidgetIterator::GetWidget(CXFA_LayoutItem* pLayoutItem)\r
+IXFA_Widget* CXFA_FFPageWidgetIterator::GetWidget(CXFA_LayoutItem* pLayoutItem)\r
 {\r
     if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) {\r
         if (!XFA_PageWidgetFilter(pWidget, m_dwFilter, FALSE, m_bIgnorerelevant)) {\r
@@ -189,7 +189,7 @@ XFA_HWIDGET CXFA_FFPageWidgetIterator::GetWidget(CXFA_LayoutItem* pLayoutItem)
         if (!pWidget->IsLoaded() && (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible) != 0) {\r
             pWidget->LoadWidget();\r
         }\r
-        return (XFA_HWIDGET)pWidget;\r
+        return pWidget;\r
     }\r
     return NULL;\r
 }\r
@@ -213,62 +213,62 @@ void CXFA_FFTabOrderPageWidgetIterator::Reset()
     CreateTabOrderWidgetArray();\r
     m_iCurWidget = -1;\r
 }\r
-XFA_HWIDGET CXFA_FFTabOrderPageWidgetIterator::MoveToFirst()\r
+IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToFirst()\r
 {\r
     if (m_TabOrderWidgetArray.GetSize() > 0) {\r
         for (FX_INT32 i = 0; i < m_TabOrderWidgetArray.GetSize(); i++) {\r
             if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, m_bIgnorerelevant)) {\r
                 m_iCurWidget = i;\r
-                return (XFA_HWIDGET)m_TabOrderWidgetArray[m_iCurWidget];\r
+                return m_TabOrderWidgetArray[m_iCurWidget];\r
             }\r
         }\r
     }\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFTabOrderPageWidgetIterator::MoveToLast()\r
+IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToLast()\r
 {\r
     if (m_TabOrderWidgetArray.GetSize() > 0) {\r
         for (FX_INT32 i = m_TabOrderWidgetArray.GetSize() - 1; i >= 0; i--) {\r
             if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, m_bIgnorerelevant)) {\r
                 m_iCurWidget = i;\r
-                return (XFA_HWIDGET)m_TabOrderWidgetArray[m_iCurWidget];\r
+                return m_TabOrderWidgetArray[m_iCurWidget];\r
             }\r
         }\r
     }\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFTabOrderPageWidgetIterator::MoveToNext()\r
+IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToNext()\r
 {\r
     for (FX_INT32 i = m_iCurWidget + 1; i < m_TabOrderWidgetArray.GetSize(); i++) {\r
         if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, m_bIgnorerelevant)) {\r
             m_iCurWidget = i;\r
-            return (XFA_HWIDGET)m_TabOrderWidgetArray[m_iCurWidget];\r
+            return m_TabOrderWidgetArray[m_iCurWidget];\r
         }\r
     }\r
     m_iCurWidget = -1;\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFTabOrderPageWidgetIterator::MoveToPrevious()\r
+IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToPrevious()\r
 {\r
     for (FX_INT32 i = m_iCurWidget - 1; i >= 0; i--) {\r
         if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, m_bIgnorerelevant)) {\r
             m_iCurWidget = i;\r
-            return (XFA_HWIDGET)m_TabOrderWidgetArray[m_iCurWidget];\r
+            return m_TabOrderWidgetArray[m_iCurWidget];\r
         }\r
     }\r
     m_iCurWidget = -1;\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFTabOrderPageWidgetIterator::GetCurrentWidget()\r
+IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::GetCurrentWidget()\r
 {\r
     if (m_iCurWidget >= 0) {\r
-        return (XFA_HWIDGET)m_TabOrderWidgetArray[m_iCurWidget];\r
+        return m_TabOrderWidgetArray[m_iCurWidget];\r
     }\r
     return NULL;\r
 }\r
-FX_BOOL CXFA_FFTabOrderPageWidgetIterator::SetCurrentWidget(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFTabOrderPageWidgetIterator::SetCurrentWidget(IXFA_Widget* hWidget)\r
 {\r
-    FX_INT32 iWidgetIndex = m_TabOrderWidgetArray.Find((CXFA_FFWidget*)hWidget);\r
+    FX_INT32 iWidgetIndex = m_TabOrderWidgetArray.Find(static_cast<CXFA_FFWidget*>(hWidget));\r
     if (iWidgetIndex >= 0) {\r
         m_iCurWidget = iWidgetIndex;\r
         return TRUE;\r
index 019c324..dd0a481 100644 (file)
@@ -21,7 +21,7 @@ public:
     virtual void                       UnloadPageView();\r
     FX_BOOL                                    IsPageViewLoaded();\r
 \r
-    virtual XFA_HWIDGET                GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy);\r
+    virtual IXFA_Widget*               GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy);\r
     virtual IXFA_WidgetIterator* CreateWidgetIterator(FX_DWORD dwTraverseWay = XFA_TRAVERSEWAY_Form,\r
             FX_DWORD dwWidgetFilter = XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_Viewable | XFA_WIDGETFILTER_AllType);\r
     IXFA_LayoutPage*           GetLayoutPage()\r
@@ -44,16 +44,16 @@ public:
     }\r
 \r
     virtual void                               Reset();\r
-    virtual XFA_HWIDGET                        MoveToFirst();\r
-    virtual XFA_HWIDGET                        MoveToLast();\r
-    virtual XFA_HWIDGET                        MoveToNext();\r
-    virtual XFA_HWIDGET                        MoveToPrevious();\r
-    virtual XFA_HWIDGET                        GetCurrentWidget();\r
-    virtual FX_BOOL                            SetCurrentWidget(XFA_HWIDGET hWidget);\r
+    virtual IXFA_Widget*                       MoveToFirst();\r
+    virtual IXFA_Widget*                       MoveToLast();\r
+    virtual IXFA_Widget*                       MoveToNext();\r
+    virtual IXFA_Widget*                       MoveToPrevious();\r
+    virtual IXFA_Widget*                       GetCurrentWidget();\r
+    virtual FX_BOOL                            SetCurrentWidget(IXFA_Widget* hWidget);\r
 protected:\r
-    XFA_HWIDGET                                        GetWidget(CXFA_LayoutItem* pLayoutItem);\r
+    IXFA_Widget*                                       GetWidget(CXFA_LayoutItem* pLayoutItem);\r
     CXFA_FFPageView*                   m_pPageView;\r
-    XFA_HWIDGET                                        m_hCurWidget;\r
+    IXFA_Widget*                                       m_hCurWidget;\r
     FX_DWORD                                   m_dwFilter;\r
     FX_BOOL                                            m_bIgnorerelevant;\r
     CXFA_LayoutItemIterator            m_sIterator;\r
@@ -77,12 +77,12 @@ public:
     virtual void Release();\r
 \r
     virtual void Reset();\r
-    virtual XFA_HWIDGET MoveToFirst();\r
-    virtual XFA_HWIDGET MoveToLast();\r
-    virtual XFA_HWIDGET MoveToNext();\r
-    virtual XFA_HWIDGET MoveToPrevious();\r
-    virtual XFA_HWIDGET GetCurrentWidget();\r
-    virtual FX_BOOL            SetCurrentWidget(XFA_HWIDGET hWidget);\r
+    virtual IXFA_Widget* MoveToFirst();\r
+    virtual IXFA_Widget* MoveToLast();\r
+    virtual IXFA_Widget* MoveToNext();\r
+    virtual IXFA_Widget* MoveToPrevious();\r
+    virtual IXFA_Widget* GetCurrentWidget();\r
+    virtual FX_BOOL            SetCurrentWidget(IXFA_Widget* hWidget);\r
 protected:\r
     CXFA_WidgetArray                                           m_TabOrderWidgetArray;\r
     CXFA_FFPageView*                                   m_pPageView;\r
index 42b75d6..a7f48c7 100644 (file)
@@ -40,7 +40,7 @@ void CXFA_FFSignature::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_
     CFX_RectF rtWidget = m_rtUI;\r
     IXFA_DocProvider* pDocProvider =  m_pDataAcc->GetDoc()->GetDocProvider();\r
     FXSYS_assert(pDocProvider);\r
-    pDocProvider->RenderCustomWidget((XFA_HWIDGET)this, pGS, &mtRotate, rtWidget);\r
+    pDocProvider->RenderCustomWidget(this, pGS, &mtRotate, rtWidget);\r
 }\r
 FX_BOOL CXFA_FFSignature::OnMouseEnter()\r
 {\r
index 4178910..5d50c52 100644 (file)
@@ -138,7 +138,7 @@ FX_BOOL CXFA_FFTextEdit::OnRButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
     }\r
     CFX_PointF pt;\r
     pt.Set(fx, fy);\r
-    GetDoc()->GetDocProvider()->PopupMenu((XFA_HWIDGET)this, pt, NULL);\r
+    GetDoc()->GetDocProvider()->PopupMenu(this, pt, NULL);\r
     return TRUE;\r
 }\r
 FX_BOOL CXFA_FFTextEdit::OnSetFocus(CXFA_FFWidget* pOldWidget)\r
@@ -388,7 +388,7 @@ void CXFA_FFTextEdit::OnTextFull(IFWL_Widget *pWidget)
 }\r
 void CXFA_FFTextEdit::OnAddDoRecord(IFWL_Widget *pWidget)\r
 {\r
-    GetDoc()->GetDocProvider()->AddDoRecord((XFA_HWIDGET)this);\r
+    GetDoc()->GetDocProvider()->AddDoRecord(this);\r
 }\r
 FX_BOOL CXFA_FFTextEdit::CheckWord(FX_BSTR sWord)\r
 {\r
index 2e75723..8f19e71 100644 (file)
@@ -6,11 +6,15 @@
 \r
 #ifndef _FXFA_FORMFILLER_WIDGET_IMP_H\r
 #define _FXFA_FORMFILLER_WIDGET_IMP_H\r
+\r
+#include "../../../../include/fxfa/fxfa.h"\r
+\r
 class CXFA_FFPageView;\r
 class CXFA_FFDocView;\r
 class CXFA_FFDoc;\r
 class CXFA_FFApp;\r
 class CXFA_LayoutItem;\r
+\r
 #define XFA_GOTO_POSITION_IF_FAIL(arg, pos) { if (!(arg)) goto pos; }\r
 inline FX_FLOAT XFA_UnitPx2Pt(FX_FLOAT fPx, FX_FLOAT fDpi)\r
 {\r
@@ -34,7 +38,7 @@ public:
     CFX_PtrArray                               m_Globals;\r
     FX_INT32                                   m_iRefCount;\r
 };\r
-class CXFA_FFWidget : public CFX_PrivateData, public CXFA_ContentLayoutItemImpl\r
+class CXFA_FFWidget : public IXFA_Widget, public CFX_PrivateData, public CXFA_ContentLayoutItemImpl\r
 {\r
 public:\r
     CXFA_FFWidget(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);\r
index d953e2b..a154d76 100644 (file)
@@ -752,7 +752,7 @@ void CXFA_WidgetAcc::NotifyEvent(FX_DWORD dwEvent, CXFA_FFWidget* pWidget , FX_L
 {\r
     IXFA_DocProvider* pDocProvider = GetDoc()->GetDocProvider();\r
     if (pWidget) {\r
-        pDocProvider->WidgetEvent((XFA_HWIDGET)pWidget, this, dwEvent, pParam, pAdditional);\r
+        pDocProvider->WidgetEvent(pWidget, this, dwEvent, pParam, pAdditional);\r
     } else {\r
         pWidget = GetNextWidget(pWidget);\r
         if (pWidget == NULL) {\r
@@ -760,7 +760,7 @@ void CXFA_WidgetAcc::NotifyEvent(FX_DWORD dwEvent, CXFA_FFWidget* pWidget , FX_L
             return;\r
         }\r
         while (pWidget) {\r
-            pDocProvider->WidgetEvent((XFA_HWIDGET)pWidget, this, dwEvent, pParam, pAdditional);\r
+            pDocProvider->WidgetEvent(pWidget, this, dwEvent, pParam, pAdditional);\r
             pWidget = GetNextWidget(pWidget);\r
         }\r
     }\r
index 9790b4b..856c079 100644 (file)
@@ -20,160 +20,160 @@ CXFA_FFWidgetHandler::CXFA_FFWidgetHandler(CXFA_FFDocView* pDocView)
 CXFA_FFWidgetHandler::~CXFA_FFWidgetHandler()\r
 {\r
 }\r
-IXFA_PageView* CXFA_FFWidgetHandler::GetPageView(XFA_HWIDGET hWidget)\r
+IXFA_PageView* CXFA_FFWidgetHandler::GetPageView(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->GetPageView();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->GetPageView();\r
 }\r
-void CXFA_FFWidgetHandler::GetRect(XFA_HWIDGET hWidget, CFX_RectF &rt)\r
+void CXFA_FFWidgetHandler::GetRect(IXFA_Widget* hWidget, CFX_RectF &rt)\r
 {\r
-    ((CXFA_FFWidget*)hWidget)->GetWidgetRect(rt);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->GetWidgetRect(rt);\r
 }\r
-FX_DWORD CXFA_FFWidgetHandler::GetStatus(XFA_HWIDGET hWidget)\r
+FX_DWORD CXFA_FFWidgetHandler::GetStatus(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->GetStatus();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->GetStatus();\r
 }\r
-FX_BOOL CXFA_FFWidgetHandler::GetBBox(XFA_HWIDGET hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus)\r
+FX_BOOL CXFA_FFWidgetHandler::GetBBox(IXFA_Widget* hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->GetBBox(rtBox, dwStatus, bDrawFocus);\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->GetBBox(rtBox, dwStatus, bDrawFocus);\r
 }\r
-CXFA_WidgetAcc* CXFA_FFWidgetHandler::GetDataAcc(XFA_HWIDGET hWidget)\r
+CXFA_WidgetAcc* CXFA_FFWidgetHandler::GetDataAcc(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->GetDataAcc();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->GetDataAcc();\r
 }\r
-void CXFA_FFWidgetHandler::GetName(XFA_HWIDGET hWidget, CFX_WideString &wsName, FX_INT32 iNameType )\r
+void CXFA_FFWidgetHandler::GetName(IXFA_Widget* hWidget, CFX_WideString &wsName, FX_INT32 iNameType )\r
 {\r
-    ((CXFA_FFWidget*)hWidget)->GetDataAcc()->GetName(wsName, iNameType);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->GetDataAcc()->GetName(wsName, iNameType);\r
 }\r
-FX_BOOL CXFA_FFWidgetHandler::GetToolTip(XFA_HWIDGET hWidget, CFX_WideString &wsToolTip)\r
+FX_BOOL CXFA_FFWidgetHandler::GetToolTip(IXFA_Widget* hWidget, CFX_WideString &wsToolTip)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->GetToolTip(wsToolTip);\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->GetToolTip(wsToolTip);\r
 }\r
-void CXFA_FFWidgetHandler::SetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback)\r
+void CXFA_FFWidgetHandler::SetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback)\r
 {\r
-    ((CXFA_FFWidget*)hWidget)->SetPrivateData(module_id, pData, callback);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->SetPrivateData(module_id, pData, callback);\r
 }\r
-FX_LPVOID CXFA_FFWidgetHandler::GetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id)\r
+FX_LPVOID CXFA_FFWidgetHandler::GetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->GetPrivateData(module_id);\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->GetPrivateData(module_id);\r
 }\r
-FX_BOOL CXFA_FFWidgetHandler::OnMouseEnter(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFWidgetHandler::OnMouseEnter(IXFA_Widget* hWidget)\r
 {\r
     m_pDocView->LockUpdate();\r
-    FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnMouseEnter();\r
+    FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnMouseEnter();\r
     m_pDocView->UnlockUpdate();\r
     m_pDocView->UpdateDocView();\r
     return bRet;\r
 }\r
-FX_BOOL        CXFA_FFWidgetHandler::OnMouseExit(XFA_HWIDGET hWidget)\r
+FX_BOOL        CXFA_FFWidgetHandler::OnMouseExit(IXFA_Widget* hWidget)\r
 {\r
     m_pDocView->LockUpdate();\r
-    FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnMouseExit();\r
+    FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnMouseExit();\r
     m_pDocView->UnlockUpdate();\r
     m_pDocView->UpdateDocView();\r
     return bRet;\r
 }\r
-FX_BOOL        CXFA_FFWidgetHandler::OnLButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
+FX_BOOL        CXFA_FFWidgetHandler::OnLButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
 {\r
     m_pDocView->LockUpdate();\r
-    ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);\r
-    FX_BOOL bRet =  ((CXFA_FFWidget*)hWidget)->OnLButtonDown(dwFlags, fx, fy);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);\r
+    FX_BOOL bRet =  static_cast<CXFA_FFWidget*>(hWidget)->OnLButtonDown(dwFlags, fx, fy);\r
     if (bRet && m_pDocView->SetFocus(hWidget)) {\r
-        ((CXFA_FFDoc*)m_pDocView->GetDoc())->GetDocProvider()->SetFocusWidget(m_pDocView->GetDoc(), (XFA_HWIDGET)hWidget);\r
+        ((CXFA_FFDoc*)m_pDocView->GetDoc())->GetDocProvider()->SetFocusWidget(m_pDocView->GetDoc(), (IXFA_Widget*)hWidget);\r
     }\r
     m_pDocView->UnlockUpdate();\r
     m_pDocView->UpdateDocView();\r
     return bRet;\r
 }\r
-FX_BOOL        CXFA_FFWidgetHandler::OnLButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
+FX_BOOL        CXFA_FFWidgetHandler::OnLButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
 {\r
     m_pDocView->LockUpdate();\r
-    ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);\r
     m_pDocView->m_bLayoutEvent = TRUE;\r
-    FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnLButtonUp(dwFlags, fx, fy);\r
+    FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnLButtonUp(dwFlags, fx, fy);\r
     m_pDocView->UnlockUpdate();\r
     m_pDocView->UpdateDocView();\r
     return bRet;\r
 }\r
-FX_BOOL        CXFA_FFWidgetHandler::OnLButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
+FX_BOOL        CXFA_FFWidgetHandler::OnLButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
 {\r
-    ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);\r
-    FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnLButtonDblClk(dwFlags, fx, fy);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);\r
+    FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnLButtonDblClk(dwFlags, fx, fy);\r
     m_pDocView->RunInvalidate();\r
     return bRet;\r
 }\r
-FX_BOOL        CXFA_FFWidgetHandler::OnMouseMove(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
+FX_BOOL        CXFA_FFWidgetHandler::OnMouseMove(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
 {\r
-    ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);\r
-    FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnMouseMove(dwFlags, fx, fy);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);\r
+    FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnMouseMove(dwFlags, fx, fy);\r
     m_pDocView->RunInvalidate();\r
     return bRet;\r
 }\r
-FX_BOOL        CXFA_FFWidgetHandler::OnMouseWheel(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy)\r
+FX_BOOL        CXFA_FFWidgetHandler::OnMouseWheel(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy)\r
 {\r
-    ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);\r
-    FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnMouseWheel(dwFlags, zDelta, fx, fy);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);\r
+    FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnMouseWheel(dwFlags, zDelta, fx, fy);\r
     m_pDocView->RunInvalidate();\r
     return bRet;\r
 }\r
-FX_BOOL        CXFA_FFWidgetHandler::OnRButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
+FX_BOOL        CXFA_FFWidgetHandler::OnRButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
 {\r
-    ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);\r
-    FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnRButtonDown(dwFlags, fx, fy);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);\r
+    FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnRButtonDown(dwFlags, fx, fy);\r
     if (bRet && m_pDocView->SetFocus(hWidget)) {\r
-        ((CXFA_FFDoc*)m_pDocView->GetDoc())->GetDocProvider()->SetFocusWidget(m_pDocView->GetDoc(), (XFA_HWIDGET)hWidget);\r
+        ((CXFA_FFDoc*)m_pDocView->GetDoc())->GetDocProvider()->SetFocusWidget(m_pDocView->GetDoc(), (IXFA_Widget*)hWidget);\r
     }\r
     m_pDocView->RunInvalidate();\r
     return bRet;\r
 }\r
-FX_BOOL CXFA_FFWidgetHandler::OnRButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
+FX_BOOL CXFA_FFWidgetHandler::OnRButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
 {\r
-    ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);\r
-    FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnRButtonUp(dwFlags, fx, fy);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);\r
+    FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnRButtonUp(dwFlags, fx, fy);\r
     m_pDocView->RunInvalidate();\r
     return bRet;\r
 }\r
-FX_BOOL CXFA_FFWidgetHandler::OnRButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
+FX_BOOL CXFA_FFWidgetHandler::OnRButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)\r
 {\r
-    ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);\r
-    FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnRButtonDblClk(dwFlags, fx, fy);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);\r
+    FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnRButtonDblClk(dwFlags, fx, fy);\r
     m_pDocView->RunInvalidate();\r
     return bRet;\r
 }\r
-FX_BOOL        CXFA_FFWidgetHandler::OnKeyDown(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags)\r
+FX_BOOL        CXFA_FFWidgetHandler::OnKeyDown(IXFA_Widget* hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags)\r
 {\r
-    FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnKeyDown(dwKeyCode, dwFlags);\r
+    FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnKeyDown(dwKeyCode, dwFlags);\r
     m_pDocView->RunInvalidate();\r
     m_pDocView->UpdateDocView();\r
     return bRet;\r
 }\r
-FX_BOOL        CXFA_FFWidgetHandler::OnKeyUp(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags)\r
+FX_BOOL        CXFA_FFWidgetHandler::OnKeyUp(IXFA_Widget* hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags)\r
 {\r
-    FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnKeyUp(dwKeyCode, dwFlags);\r
+    FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnKeyUp(dwKeyCode, dwFlags);\r
     m_pDocView->RunInvalidate();\r
     return bRet;\r
 }\r
-FX_BOOL        CXFA_FFWidgetHandler::OnChar(XFA_HWIDGET hWidget, FX_DWORD dwChar, FX_DWORD dwFlags)\r
+FX_BOOL        CXFA_FFWidgetHandler::OnChar(IXFA_Widget* hWidget, FX_DWORD dwChar, FX_DWORD dwFlags)\r
 {\r
-    FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnChar(dwChar, dwFlags);\r
+    FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnChar(dwChar, dwFlags);\r
     m_pDocView->RunInvalidate();\r
     return bRet;\r
 }\r
-FX_DWORD CXFA_FFWidgetHandler::OnHitTest(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy)\r
+FX_DWORD CXFA_FFWidgetHandler::OnHitTest(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy)\r
 {\r
-    if (!(((CXFA_FFWidget*)hWidget)->GetStatus() & XFA_WIDGETSTATUS_Visible)) {\r
+    if (!(static_cast<CXFA_FFWidget*>(hWidget)->GetStatus() & XFA_WIDGETSTATUS_Visible)) {\r
         return FWL_WGTHITTEST_Unknown;\r
     }\r
-    ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);\r
-    return ((CXFA_FFWidget*)hWidget)->OnHitTest(fx, fy);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->OnHitTest(fx, fy);\r
 }\r
-FX_BOOL        CXFA_FFWidgetHandler::OnSetCursor(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy)\r
+FX_BOOL        CXFA_FFWidgetHandler::OnSetCursor(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy)\r
 {\r
-    ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);\r
-    return ((CXFA_FFWidget*)hWidget)->OnSetCursor(fx, fy);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->OnSetCursor(fx, fy);\r
 }\r
-void CXFA_FFWidgetHandler::RenderWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_BOOL bHighlight)\r
+void CXFA_FFWidgetHandler::RenderWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_BOOL bHighlight)\r
 {\r
-    ((CXFA_FFWidget*)hWidget)->RenderWidget(pGS, pMatrix, bHighlight ? XFA_WIDGETSTATUS_Highlight : 0, 0);\r
+    static_cast<CXFA_FFWidget*>(hWidget)->RenderWidget(pGS, pMatrix, bHighlight ? XFA_WIDGETSTATUS_Highlight : 0, 0);\r
 }\r
 FX_BOOL CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc, XFA_EVENTTYPE eEventType)\r
 {\r
@@ -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);\r
     return iRet;\r
 }\r
-XFA_HWIDGET CXFA_FFWidgetHandler::CreateWidget(XFA_HWIDGET hParent, XFA_WIDGETTYPE eType, XFA_HWIDGET hBefore )\r
+IXFA_Widget* CXFA_FFWidgetHandler::CreateWidget(IXFA_Widget* hParent, XFA_WIDGETTYPE eType, IXFA_Widget* hBefore )\r
 {\r
-    CXFA_Node* pParentFormItem = hParent ? ((CXFA_FFWidget*)hParent)->GetDataAcc()->GetNode() : NULL;\r
-    CXFA_Node* pBeforeFormItem = hBefore ? ((CXFA_FFWidget*)hBefore)->GetDataAcc()->GetNode() : NULL;\r
+    CXFA_Node* pParentFormItem = hParent ? static_cast<CXFA_FFWidget*>(hParent)->GetDataAcc()->GetNode() : NULL;\r
+    CXFA_Node* pBeforeFormItem = hBefore ? static_cast<CXFA_FFWidget*>(hBefore)->GetDataAcc()->GetNode() : NULL;\r
     CXFA_Node* pNewFormItem = CreateWidgetFormItem(eType, pParentFormItem, pBeforeFormItem);\r
     if (pNewFormItem == NULL)  {\r
         return NULL;\r
@@ -255,7 +255,7 @@ XFA_HWIDGET CXFA_FFWidgetHandler::CreateWidget(XFA_HWIDGET hParent, XFA_WIDGETTY
     pNewFormItem->SetFlag(XFA_NODEFLAG_Initialized);\r
     m_pDocView->RunLayout();\r
     CXFA_LayoutItem* pLayout = m_pDocView->GetXFALayout()->GetLayoutItem(pNewFormItem);\r
-    return (XFA_HWIDGET)pLayout;\r
+    return (IXFA_Widget*)pLayout;\r
 }\r
 CXFA_Node* CXFA_FFWidgetHandler::CreateWidgetFormItem(XFA_WIDGETTYPE eType, CXFA_Node* pParent, CXFA_Node* pBefore) const\r
 {\r
@@ -516,76 +516,76 @@ CXFA_FFMenuHandler::CXFA_FFMenuHandler()
 CXFA_FFMenuHandler::~CXFA_FFMenuHandler()\r
 {\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::CanCopy(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFMenuHandler::CanCopy(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->CanCopy();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->CanCopy();\r
 }\r
-FX_BOOL        CXFA_FFMenuHandler::CanCut(XFA_HWIDGET hWidget)\r
+FX_BOOL        CXFA_FFMenuHandler::CanCut(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->CanCut();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->CanCut();\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::CanPaste(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFMenuHandler::CanPaste(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->CanPaste();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->CanPaste();\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::CanSelectAll(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFMenuHandler::CanSelectAll(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->CanSelectAll();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->CanSelectAll();\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::CanDelete(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFMenuHandler::CanDelete(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->CanDelete();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->CanDelete();\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::CanDeSelect(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFMenuHandler::CanDeSelect(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->CanDeSelect();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->CanDeSelect();\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::Copy(XFA_HWIDGET hWidget, CFX_WideString &wsText)\r
+FX_BOOL CXFA_FFMenuHandler::Copy(IXFA_Widget* hWidget, CFX_WideString &wsText)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->Copy(wsText);\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->Copy(wsText);\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::Cut(XFA_HWIDGET hWidget, CFX_WideString &wsText)\r
+FX_BOOL CXFA_FFMenuHandler::Cut(IXFA_Widget* hWidget, CFX_WideString &wsText)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->Cut(wsText);\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->Cut(wsText);\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::Paste(XFA_HWIDGET hWidget, const CFX_WideString &wsText)\r
+FX_BOOL CXFA_FFMenuHandler::Paste(IXFA_Widget* hWidget, const CFX_WideString &wsText)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->Paste(wsText);\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->Paste(wsText);\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::SelectAll(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFMenuHandler::SelectAll(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->SelectAll();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->SelectAll();\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::Delete(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFMenuHandler::Delete(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->Delete();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->Delete();\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::DeSelect(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFMenuHandler::DeSelect(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->DeSelect();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->DeSelect();\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::CanUndo(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFMenuHandler::CanUndo(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->CanUndo();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->CanUndo();\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::CanRedo(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFMenuHandler::CanRedo(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->CanRedo();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->CanRedo();\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::Undo(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFMenuHandler::Undo(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->Undo();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->Undo();\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::Redo(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFMenuHandler::Redo(IXFA_Widget* hWidget)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->Redo();\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->Redo();\r
 }\r
 #define FX_EDIT_ISLATINWORD(u) (u == 0x2D || (u <= 0x005A && u >= 0x0041) || (u <= 0x007A && u >= 0x0061) || (u <= 0x02AF && u >= 0x00C0) || u == 0x0027)\r
-FX_BOOL CXFA_FFMenuHandler::GetSuggestWords(XFA_HWIDGET hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest)\r
+FX_BOOL CXFA_FFMenuHandler::GetSuggestWords(IXFA_Widget* hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->GetSuggestWords(pointf, sSuggest);\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->GetSuggestWords(pointf, sSuggest);\r
 }\r
-FX_BOOL CXFA_FFMenuHandler::ReplaceSpellCheckWord(XFA_HWIDGET hWidget, CFX_PointF pointf, FX_BSTR bsReplace)\r
+FX_BOOL CXFA_FFMenuHandler::ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, FX_BSTR bsReplace)\r
 {\r
-    return ((CXFA_FFWidget*)hWidget)->ReplaceSpellCheckWord(pointf, bsReplace);\r
+    return static_cast<CXFA_FFWidget*>(hWidget)->ReplaceSpellCheckWord(pointf, bsReplace);\r
 }\r
index 286770a..28c6c84 100644 (file)
@@ -12,33 +12,33 @@ class CXFA_FFWidgetHandler : public IXFA_WidgetHandler
 public:\r
     CXFA_FFWidgetHandler(CXFA_FFDocView* pDocView);\r
     ~CXFA_FFWidgetHandler();\r
-    virtual XFA_HWIDGET                CreateWidget(XFA_HWIDGET hParent, XFA_WIDGETTYPE eType, XFA_HWIDGET hBefore = NULL);\r
-    virtual IXFA_PageView*     GetPageView(XFA_HWIDGET hWidget);\r
-    virtual void                       GetRect(XFA_HWIDGET hWidget, CFX_RectF &rt);\r
-    virtual FX_DWORD           GetStatus(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL                    GetBBox(XFA_HWIDGET hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus = FALSE);\r
-    virtual CXFA_WidgetAcc*    GetDataAcc(XFA_HWIDGET hWidget);\r
-    virtual void                       GetName(XFA_HWIDGET hWidget, CFX_WideString &wsName, FX_INT32 iNameType = 0);\r
-    virtual    FX_BOOL                 GetToolTip(XFA_HWIDGET hWidget, CFX_WideString &wsToolTip);\r
-    virtual    void                    SetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);\r
-    virtual    FX_LPVOID               GetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id);\r
-    virtual FX_BOOL            OnMouseEnter(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            OnMouseExit(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            OnLButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
-    virtual FX_BOOL            OnLButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
-    virtual FX_BOOL            OnLButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
-    virtual FX_BOOL            OnMouseMove(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
-    virtual FX_BOOL            OnMouseWheel(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy);\r
-    virtual FX_BOOL            OnRButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
-    virtual FX_BOOL            OnRButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
-    virtual FX_BOOL            OnRButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
+    virtual IXFA_Widget*               CreateWidget(IXFA_Widget* hParent, XFA_WIDGETTYPE eType, IXFA_Widget* hBefore = NULL);\r
+    virtual IXFA_PageView*     GetPageView(IXFA_Widget* hWidget);\r
+    virtual void                       GetRect(IXFA_Widget* hWidget, CFX_RectF &rt);\r
+    virtual FX_DWORD           GetStatus(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL                    GetBBox(IXFA_Widget* hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus = FALSE);\r
+    virtual CXFA_WidgetAcc*    GetDataAcc(IXFA_Widget* hWidget);\r
+    virtual void                       GetName(IXFA_Widget* hWidget, CFX_WideString &wsName, FX_INT32 iNameType = 0);\r
+    virtual    FX_BOOL                 GetToolTip(IXFA_Widget* hWidget, CFX_WideString &wsToolTip);\r
+    virtual    void                    SetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);\r
+    virtual    FX_LPVOID               GetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id);\r
+    virtual FX_BOOL            OnMouseEnter(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            OnMouseExit(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            OnLButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
+    virtual FX_BOOL            OnLButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
+    virtual FX_BOOL            OnLButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
+    virtual FX_BOOL            OnMouseMove(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
+    virtual FX_BOOL            OnMouseWheel(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy);\r
+    virtual FX_BOOL            OnRButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
+    virtual FX_BOOL            OnRButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
+    virtual FX_BOOL            OnRButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);\r
 \r
-    virtual FX_BOOL            OnKeyDown(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags);\r
-    virtual FX_BOOL            OnKeyUp(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags);\r
-    virtual FX_BOOL            OnChar(XFA_HWIDGET hWidget, FX_DWORD dwChar, FX_DWORD dwFlags);\r
-    virtual    FX_DWORD        OnHitTest(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy);\r
-    virtual FX_BOOL            OnSetCursor(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy);\r
-    virtual void               RenderWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_BOOL bHighlight = FALSE);\r
+    virtual FX_BOOL            OnKeyDown(IXFA_Widget* hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags);\r
+    virtual FX_BOOL            OnKeyUp(IXFA_Widget* hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags);\r
+    virtual FX_BOOL            OnChar(IXFA_Widget* hWidget, FX_DWORD dwChar, FX_DWORD dwFlags);\r
+    virtual    FX_DWORD        OnHitTest(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy);\r
+    virtual FX_BOOL            OnSetCursor(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy);\r
+    virtual void               RenderWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_BOOL bHighlight = FALSE);\r
     virtual FX_BOOL            HasEvent(CXFA_WidgetAcc* pWidgetAcc, XFA_EVENTTYPE eEventType);\r
     virtual FX_INT32   ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam);\r
 protected:\r
@@ -82,23 +82,23 @@ class CXFA_FFMenuHandler : public IXFA_MenuHandler
 public:\r
     CXFA_FFMenuHandler();\r
     ~CXFA_FFMenuHandler();\r
-    virtual FX_BOOL            CanCopy(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            CanCut(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            CanPaste(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            CanSelectAll(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            CanDelete(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            CanDeSelect(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            Copy(XFA_HWIDGET hWidget, CFX_WideString &wsText);\r
-    virtual FX_BOOL            Cut(XFA_HWIDGET hWidget, CFX_WideString &wsText);\r
-    virtual FX_BOOL            Paste(XFA_HWIDGET hWidget, const CFX_WideString &wsText);\r
-    virtual FX_BOOL            SelectAll(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            Delete(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            DeSelect(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            CanUndo(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            CanRedo(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            Undo(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            Redo(XFA_HWIDGET hWidget);\r
-    virtual FX_BOOL            GetSuggestWords(XFA_HWIDGET hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest);\r
-    virtual FX_BOOL            ReplaceSpellCheckWord(XFA_HWIDGET hWidget, CFX_PointF pointf, FX_BSTR bsReplace);\r
+    virtual FX_BOOL            CanCopy(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            CanCut(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            CanPaste(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            CanSelectAll(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            CanDelete(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            CanDeSelect(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            Copy(IXFA_Widget* hWidget, CFX_WideString &wsText);\r
+    virtual FX_BOOL            Cut(IXFA_Widget* hWidget, CFX_WideString &wsText);\r
+    virtual FX_BOOL            Paste(IXFA_Widget* hWidget, const CFX_WideString &wsText);\r
+    virtual FX_BOOL            SelectAll(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            Delete(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            DeSelect(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            CanUndo(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            CanRedo(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            Undo(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            Redo(IXFA_Widget* hWidget);\r
+    virtual FX_BOOL            GetSuggestWords(IXFA_Widget* hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest);\r
+    virtual FX_BOOL            ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, FX_BSTR bsReplace);\r
 };\r
 #endif\r
index 035fa02..4b97415 100644 (file)
@@ -39,10 +39,10 @@ FX_BOOL     FWL_ShowCaret(IFWL_Widget *pWidget, FX_BOOL bVisible, const CFX_RectF *p
         pXFAWidget->GetRotateMatrix(mt);\r
         CFX_RectF rt(*pRtAnchor);\r
         mt.TransformRect(rt);\r
-        pDocProvider->DisplayCaret((XFA_HWIDGET)pXFAWidget, bVisible, &rt);\r
+        pDocProvider->DisplayCaret(pXFAWidget, bVisible, &rt);\r
         return TRUE;\r
     }\r
-    pDocProvider->DisplayCaret((XFA_HWIDGET)pXFAWidget, bVisible, pRtAnchor);\r
+    pDocProvider->DisplayCaret(pXFAWidget, bVisible, pRtAnchor);\r
     return TRUE;\r
 }\r
 FWL_ERR CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget *pWidget, const CFX_RectF *pRect)\r
@@ -75,6 +75,6 @@ FX_BOOL       CXFA_FWLAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget, FX_FLOAT fMi
     pFFWidget->GetRotateMatrix(mt);\r
     CFX_RectF rtRotateAnchor(rtAnchor);\r
     mt.TransformRect(rtRotateAnchor);\r
-    pFFWidget->GetDoc()->GetDocProvider()->GetPopupPos((XFA_HWIDGET)pFFWidget, fMinHeight, fMaxHeight, rtRotateAnchor, rtPopup);\r
+    pFFWidget->GetDoc()->GetDocProvider()->GetPopupPos(pFFWidget, fMinHeight, fMaxHeight, rtRotateAnchor, rtPopup);\r
     return TRUE;\r
 }\r
index 974f0a3..cb514c5 100644 (file)
@@ -20,7 +20,7 @@ public:
     virtual    void            StopRender();\r
 protected:\r
     IXFA_WidgetIterator* m_pWidgetIterator;\r
-    XFA_HWIDGET                         m_pWidget;\r
+    IXFA_Widget*                m_pWidget;\r
     IXFA_PageView*              m_pPageView;\r
     CFX_Graphics*               m_pGS;\r
     CFX_Matrix                  m_matrix;\r
index 9e985e2..e082321 100644 (file)
@@ -80,8 +80,8 @@ public:
     virtual IXFA_DocProvider*  GetDocProvider() = 0;\r
     virtual IXFA_AppProvider*  GetAppProvider() = 0;\r
     virtual IXFA_WidgetHandler*        GetWidgetHandler() = 0;\r
-    virtual XFA_HWIDGET                        GetHWidget(CXFA_LayoutItem* pLayoutItem) = 0;\r
-    virtual void                               OpenDropDownList(XFA_HWIDGET hWidget) = 0;\r
+    virtual IXFA_Widget*               GetHWidget(CXFA_LayoutItem* pLayoutItem) = 0;\r
+    virtual void                               OpenDropDownList(IXFA_Widget* hWidget) = 0;\r
     virtual CFX_WideString             GetCurrentDateTime() = 0;\r
     virtual void                               ResetData(CXFA_WidgetData* pWidgetData = NULL) = 0;\r
     virtual FX_INT32                   GetLayoutStatus() = 0;\r
index 0189e5e..f4254f0 100644 (file)
@@ -306,7 +306,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(CFXJSE_Arguments*
     if (!pDocLayout) {\r
         return;\r
     }\r
-    XFA_HWIDGET hWidget = pNotify->GetHWidget(pDocLayout->GetLayoutItem(pNode));\r
+    IXFA_Widget* hWidget = pNotify->GetHWidget(pDocLayout->GetLayoutItem(pNode));\r
     if (!hWidget) {\r
         return;\r
     }\r
index b2354b6..25efee7 100644 (file)
@@ -427,7 +427,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageInBatch(CFXJSE_A
     if (!pDocLayout) {\r
         return;\r
     }\r
-    XFA_HWIDGET hWidget = pNotify->GetHWidget(pDocLayout->GetLayoutItem(pNode));\r
+    IXFA_Widget* hWidget = pNotify->GetHWidget(pDocLayout->GetLayoutItem(pNode));\r
     if (!hWidget) {\r
         return;\r
     }\r
@@ -460,7 +460,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetInBatch(CFXJSE_Arg
     if (!pDocLayout) {\r
         return;\r
     }\r
-    XFA_HWIDGET hWidget = pNotify->GetHWidget(pDocLayout->GetLayoutItem(pNode));\r
+    IXFA_Widget* hWidget = pNotify->GetHWidget(pDocLayout->GetLayoutItem(pNode));\r
     if (!hWidget) {\r
         return;\r
     }\r