[GME-commit] GMESRC/GME/Gme ScrollZoomView.h,1.3,1.4 ScrollZoomView.cpp,1.6,1.7 resource.h,1.52,1.53

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Thu Mar 25 10:44:51 CST 2004


Update of /var/lib/gme/GMESRC/GME/Gme
In directory braindrain:/tmp/cvs-serv10456

Modified Files:
	ScrollZoomView.h ScrollZoomView.cpp resource.h 
Log Message:
Panning Window embedded

CVS User: bogyom

Index: ScrollZoomView.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/ScrollZoomView.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ScrollZoomView.h	11 Mar 2004 18:04:27 -0000	1.3
--- ScrollZoomView.h	25 Mar 2004 16:44:49 -0000	1.4
***************
*** 52,55 ****
--- 52,58 ----
  	BOOL DoMouseWheel(UINT fFlags, short zDelta, CPoint point);
  
+ private:
+ 	void notifyPanning(CPoint pt);
+ 
  // Implementation
  protected:

Index: ScrollZoomView.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/ScrollZoomView.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ScrollZoomView.cpp	11 Mar 2004 21:17:23 -0000	1.6
--- ScrollZoomView.cpp	25 Mar 2004 16:44:49 -0000	1.7
***************
*** 8,11 ****
--- 8,24 ----
  #include <afxpriv.h>
  
+ //
+ #include "GMEstd.h"
+ 
+ #include "GMEAppi.h"
+ #include "GuiMeta.h"
+ #include "GMEDoc.h"
+ #include "PendingObjectPosRequest.h"
+ #include "GMEView.h"
+ #include "ChildFrm.h"
+ #include "ModelGrid.h"
+ #include "Mainfrm.h"
+ //
+ 
  #ifdef _DEBUG
  #define new DEBUG_NEW
***************
*** 266,270 ****
  	if (m_hWnd != NULL)
  	{
! 		// terge // set scroll position after zoom
  		// window has been created, invalidate now
  		UpdateBars();
--- 279,283 ----
  	if (m_hWnd != NULL)
  	{
! 		// set scroll position after zoom
  		// window has been created, invalidate now
  		UpdateBars();
***************
*** 365,368 ****
--- 378,398 ----
  }
  
+ void CScrollZoomView::notifyPanning(CPoint pt)
+ {
+ 	CRect client;
+ 	GetClientRect(&client);
+ 	CWindowDC dc(NULL);
+ 	dc.SetMapMode(MM_ISOTROPIC);
+ 	dc.SetWindowExt(100,100);
+ 	dc.SetViewportExt(m_scalePercent, m_scalePercent);
+ 	dc.DPtoLP((LPPOINT)&pt);
+ 	dc.DPtoLP(&client);
+ 	CRect pannw(pt.x, pt.y, pt.x+client.Width(), pt.y+client.Height());
+ 	pannw.NormalizeRect();
+ 
+ 	CMainFrame* main = (CMainFrame*)AfxGetMainWnd();
+ 	main->m_pannWin.SetViewRect(pannw);
+ }
+ 
  void CScrollZoomView::ScrollToDevicePosition(POINT ptDev)
  {
***************
*** 372,376 ****
--- 402,409 ----
  	int maxv = GetScrollLimit(SB_VERT);
  	if (maxh == 0  &&  maxv == 0)
+ 	{
+ 		notifyPanning(ptDev);
  		return;
+ 	}
  
  	// Note: ScrollToDevicePosition can and is used to scroll out-of-range
***************
*** 385,388 ****
--- 418,422 ----
  	ptDev.x = min(maxh, ptDev.x);
  	ptDev.y = min(maxv, ptDev.y);
+ 	notifyPanning(ptDev);
  //	ScrollWindow(xOrig - ptDev.x, yOrig - ptDev.y);
  	ScrollWindow((ptDev.x -xOrig), (ptDev.y -yOrig) );
***************
*** 674,677 ****
--- 708,712 ----
  			}
  			m_bInsideUpdate = FALSE;
+ 			notifyPanning(CPoint(0,0)); // ??
  			return;
  		}
***************
*** 1019,1022 ****
--- 1054,1061 ----
  			SetScrollPos(SB_VERT, y);
  	}
+ 
+ 	// terge
+ 	notifyPanning(GetDeviceScrollPosition());
+ 
  	return TRUE;
  }

Index: resource.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/resource.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** resource.h	11 Mar 2004 18:04:27 -0000	1.52
--- resource.h	25 Mar 2004 16:44:49 -0000	1.53
***************
*** 69,72 ****
--- 69,74 ----
  #define IDD_PRNSETUPDLGORD              203
  #define IDD_DIALOG1                     205
+ #define ID_PANNWIN                      206
+ #define IDD_PANNWINDLG                  207
  #define IDC_NAME                        1000
  #define IDC_TYPENAME                    1001
***************
*** 292,295 ****
--- 294,298 ----
  #define IDC_PRINT_METAFILE              32956
  #define ID_PRINT_METAFILE               32957
+ #define ID_VIEW_PANNWIN                 32958
  #define IDC_BTNSELECT                   33000
  #define IDC_BTNDESELECT                 33001
***************
*** 310,316 ****
  #ifndef APSTUDIO_READONLY_SYMBOLS
  #define _APS_3D_CONTROLS                     1
! #define _APS_NEXT_RESOURCE_VALUE        207
! #define _APS_NEXT_COMMAND_VALUE         32958
! #define _APS_NEXT_CONTROL_VALUE         1090
  #define _APS_NEXT_SYMED_VALUE           114
  #endif
--- 313,319 ----
  #ifndef APSTUDIO_READONLY_SYMBOLS
  #define _APS_3D_CONTROLS                     1
! #define _APS_NEXT_RESOURCE_VALUE        208
! #define _APS_NEXT_COMMAND_VALUE         32959
! #define _APS_NEXT_CONTROL_VALUE         1091
  #define _APS_NEXT_SYMED_VALUE           114
  #endif



More information about the GME-commit mailing list