Index: abi/src/af/xap/unix/Makefile =================================================================== RCS file: /cvsroot/abi/src/af/xap/unix/Makefile,v retrieving revision 1.37 diff -u -r1.37 Makefile --- abi/src/af/xap/unix/Makefile 2000/11/30 06:02:20 1.37 +++ abi/src/af/xap/unix/Makefile 2001/01/17 00:10:28 @@ -50,12 +50,7 @@ xap_UnixEncodingManager.cpp TARGETS= $(OBJS) -INCLUDES= -I/usr/X11R6/include \ - -I$(ABI_ROOT)/src/text/fmt/xp \ - -I$(ABI_ROOT)/src/text/ptbl/xp \ - -I$(ABI_ROOT)/src/wp/impexp/xp \ - -I$(ABI_ROOT)/src/wp/ap/xp - +INCLUDES= -I/usr/X11R6/include include $(ABI_ROOT)/src/config/abi_rules.mk Index: abi/src/af/xap/unix/xap_UnixFrame.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/unix/xap_UnixFrame.cpp,v retrieving revision 1.93 diff -u -r1.93 xap_UnixFrame.cpp --- abi/src/af/xap/unix/xap_UnixFrame.cpp 2000/12/07 12:46:49 1.93 +++ abi/src/af/xap/unix/xap_UnixFrame.cpp 2001/01/17 00:10:32 @@ -39,10 +39,7 @@ #include "xav_View.h" #include "xad_Document.h" -/* This is required for dynamic zoom implimentation */ -#include "fv_View.h" - /*****************************************************************/ #define ENSUREP(p) do { UT_ASSERT(p); if (!p) goto Cleanup; } while (0) @@ -232,26 +229,12 @@ XAP_UnixFrame * pUnixFrame = (XAP_UnixFrame *)gtk_object_get_user_data(GTK_OBJECT(w)); AV_View * pView = pUnixFrame->getCurrentView(); - FV_View * pfView = static_cast(pView); if (pView) pView->setWindowSize(e->width, e->height); // Dynamic Zoom Implimentation - UT_uint32 newZoom = 100; - switch(pUnixFrame->getZoomType()) - { - case XAP_Frame::z_PAGEWIDTH: - newZoom = pfView->calculateZoomPercentForPageWidth(); - pUnixFrame->setZoomPercentage(newZoom); - break; - case XAP_Frame::z_WHOLEPAGE: - newZoom = pfView->calculateZoomPercentForWholePage(); - pUnixFrame->setZoomPercentage(newZoom); - break; - default: - ; - } + pUnixFrame->updateZoom(); return 1; } Index: abi/src/af/xap/win/Makefile =================================================================== RCS file: /cvsroot/abi/src/af/xap/win/Makefile,v retrieving revision 1.27 diff -u -r1.27 Makefile --- abi/src/af/xap/win/Makefile 2000/11/30 06:02:21 1.27 +++ abi/src/af/xap/win/Makefile 2001/01/17 00:10:33 @@ -43,8 +43,4 @@ include $(ABI_ROOT)/src/config/abi_rules.mk -INCLUDES= -I$(ABI_XX_ROOT)/src/text/fmt/xp \ - -I$(ABI_XX_ROOT)/src/text/ptbl/xp \ - -I$(ABI_XX_ROOT)/src/wp/impexp/xp \ - -I$(ABI_XX_ROOT)/src/wp/ap/xp build:: $(TARGETS) Index: abi/src/af/xap/win/xap_Win32Frame.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/win/xap_Win32Frame.cpp,v retrieving revision 1.66 diff -u -r1.66 xap_Win32Frame.cpp --- abi/src/af/xap/win/xap_Win32Frame.cpp 2000/12/08 17:45:08 1.66 +++ abi/src/af/xap/win/xap_Win32Frame.cpp 2001/01/17 00:10:36 @@ -36,8 +36,6 @@ #include "xav_View.h" #include "xad_Document.h" -#include "fv_View.h" - #pragma warning(disable:4355) /*****************************************************************/ @@ -355,8 +353,6 @@ pView = f->m_pView; - FV_View* pfView = static_cast(pView); - if(iMsg == f->m_mouseWheelMessage) { wParam = MAKEWPARAM(0, (short)(int)wParam); @@ -547,26 +543,10 @@ f->m_iSizeWidth = nWidth; f->m_iSizeHeight = nHeight; - - UT_uint32 newZoom = 0; - - switch(f->getZoomType()) - { -// // special cases - case XAP_Frame::z_PAGEWIDTH: - newZoom = pfView->calculateZoomPercentForPageWidth(); - f->setZoomPercentage(newZoom); + // If Dynamic Zoom recalculate zoom setting + f->updateZoom(); - break; - case XAP_Frame::z_WHOLEPAGE: - newZoom = pfView->calculateZoomPercentForWholePage(); - f->setZoomPercentage(newZoom); - break; - default: - ; - } - return 0; } Index: abi/src/af/xap/xp/xap_Frame.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/xp/xap_Frame.cpp,v retrieving revision 1.54 diff -u -r1.54 xap_Frame.cpp --- abi/src/af/xap/xp/xap_Frame.cpp 2001/01/15 11:33:38 1.54 +++ abi/src/af/xap/xp/xap_Frame.cpp 2001/01/17 00:10:44 @@ -595,6 +595,22 @@ return error; } +void XAP_Frame::updateZoom(void) +{ + switch( getZoomType() ) + { + case z_PAGEWIDTH: + setZoomPercentage( m_pView->calculateZoomPercentForPageWidth() ); + break; + case z_WHOLEPAGE: + setZoomPercentage( m_pView->calculateZoomPercentForWholePage() ); + break; + default: + ; + } +} + + ////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// Index: abi/src/af/xap/xp/xap_Frame.h =================================================================== RCS file: /cvsroot/abi/src/af/xap/xp/xap_Frame.h,v retrieving revision 1.43 diff -u -r1.43 xap_Frame.h --- abi/src/af/xap/xp/xap_Frame.h 2000/11/06 05:07:00 1.43 +++ abi/src/af/xap/xp/xap_Frame.h 2001/01/17 00:10:45 @@ -127,8 +127,7 @@ virtual UT_uint32 getZoomPercentage(void); void setZoomType(XAP_Frame::tZoomType z_Type){ m_zoomType = z_Type; } XAP_Frame::tZoomType getZoomType(void) { return m_zoomType; } - - + void updateZoom(void); virtual void setStatusMessage(const char * szMsg) = 0; Index: abi/src/af/xap/xp/xav_View.h =================================================================== RCS file: /cvsroot/abi/src/af/xap/xp/xav_View.h,v retrieving revision 1.28 diff -u -r1.28 xav_View.h --- abi/src/af/xap/xp/xav_View.h 2000/09/15 06:51:58 1.28 +++ abi/src/af/xap/xp/xav_View.h 2001/01/17 00:10:46 @@ -111,6 +111,10 @@ virtual EV_EditMouseContext getMouseContext(UT_sint32 xPos, UT_sint32 yPos) = 0; virtual UT_Bool isSelectionEmpty(void) const = 0; virtual void cmdUnselectSelection(void) = 0; + + virtual UT_uint32 calculateZoomPercentForPageWidth() = 0; + virtual UT_uint32 calculateZoomPercentForPageHeight() = 0; + virtual UT_uint32 calculateZoomPercentForWholePage() = 0; protected: XAP_App * m_pApp;