[GME-commit]
GMESRC/GME/Gme ScrollZoomView.h,1.2,1.3 ScrollZoomView.cpp,1.4,1.5
resource.h,1.51,1.52
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Thu Mar 11 12:04:37 CST 2004
Update of /var/lib/gme/GMESRC/GME/Gme
In directory braindrain:/tmp/cvs-serv8473
Modified Files:
ScrollZoomView.h ScrollZoomView.cpp resource.h
Log Message:
zoom problem solved and enhanced
CVS User: bogyom
Index: ScrollZoomView.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/ScrollZoomView.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ScrollZoomView.h 29 Jul 2001 17:21:00 -0000 1.2
--- ScrollZoomView.h 11 Mar 2004 18:04:27 -0000 1.3
***************
*** 54,57 ****
--- 54,60 ----
// Implementation
protected:
+ bool m_zoomScroll;
+ CPoint m_zoomP;
+
int m_nMapMode;
CSize m_totalLog; // total size in logical units (no rounding)
Index: ScrollZoomView.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/ScrollZoomView.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ScrollZoomView.cpp 7 Feb 2003 15:22:47 -0000 1.4
--- ScrollZoomView.cpp 11 Mar 2004 18:04:27 -0000 1.5
***************
*** 106,109 ****
--- 106,111 ----
m_nMapMode = MM_NONE;
+ m_zoomP.x = m_zoomP.y = 0;
+ m_zoomScroll = false;
}
***************
*** 172,176 ****
}
}
! pDC->SetViewportOrg(ptVpOrg);
CView::OnPrepareDC(pDC, pInfo); // For default Printing behavior
--- 174,178 ----
}
}
! pDC->SetViewportOrg(ptVpOrg);
CView::OnPrepareDC(pDC, pInfo); // For default Printing behavior
***************
*** 195,198 ****
--- 197,202 ----
SetScrollPos(SB_VERT, 0);
EnableScrollBarCtrl(SB_BOTH, FALSE);
+ SetScrollRange(SB_HORZ, 0, 0, TRUE);
+ SetScrollRange(SB_VERT, 0, 0, TRUE);
ASSERT((GetStyle() & (WS_HSCROLL|WS_VSCROLL)) == 0);
}
***************
*** 262,265 ****
--- 266,270 ----
if (m_hWnd != NULL)
{
+ // terge // set scroll position after zoom
// window has been created, invalidate now
UpdateBars();
***************
*** 374,378 ****
int yOrig = GetScrollPos(SB_VERT);
SetScrollPos(SB_VERT, ptDev.y);
! ScrollWindow(xOrig - ptDev.x, yOrig - ptDev.y);
}
--- 379,388 ----
int yOrig = GetScrollPos(SB_VERT);
SetScrollPos(SB_VERT, ptDev.y);
! int maxh = GetScrollLimit(SB_HORZ);
! int maxv = GetScrollLimit(SB_VERT);
! ptDev.x = min(maxh, ptDev.x);
! ptDev.y = min(maxv, ptDev.y);
! // ScrollWindow(xOrig - ptDev.x, yOrig - ptDev.y);
! ScrollWindow((ptDev.x -xOrig), (ptDev.y -yOrig) );
}
***************
*** 656,659 ****
--- 666,671 ----
// control over our scrollbars
EnableScrollBarCtrl(SB_BOTH, FALSE);
+ SetScrollRange(SB_HORZ, 0, 0, TRUE);
+ SetScrollRange(SB_VERT, 0, 0, TRUE);
}
m_bInsideUpdate = FALSE;
***************
*** 682,686 ****
// first scroll the window as needed
! ScrollToDevicePosition(ptMove); // will set the scroll bar positions too
// this structure needed to update the scrollbar page range
--- 694,701 ----
// first scroll the window as needed
! if (!m_zoomScroll)
! {
! ScrollToDevicePosition(ptMove); // will set the scroll bar positions too
! }
// this structure needed to update the scrollbar page range
***************
*** 698,701 ****
--- 713,720 ----
SetScrollRange(SB_HORZ, 0, sizeRange.cx, TRUE);
}
+ else
+ {
+ SetScrollRange(SB_HORZ, 0, 0, TRUE);
+ }
EnableScrollBarCtrl(SB_VERT, needSb.cy);
if (needSb.cy)
***************
*** 705,708 ****
--- 724,737 ----
if (!SetScrollInfo(SB_VERT, &info, TRUE))
SetScrollRange(SB_VERT, 0, sizeRange.cy, TRUE);
+ }
+ else
+ {
+ SetScrollRange(SB_VERT, 0, 0, TRUE);
+ }
+ if (m_zoomScroll)
+ {
+ ScrollToPosition(m_zoomP); // logical coordinates
+ m_zoomP.x = m_zoomP.y = 0;
+ m_zoomScroll = false;
}
Index: resource.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/resource.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** resource.h 1 Mar 2004 20:11:13 -0000 1.51
--- resource.h 11 Mar 2004 18:04:27 -0000 1.52
***************
*** 68,71 ****
--- 68,72 ----
#define IDD_PRINTDLGORD 202
#define IDD_PRNSETUPDLGORD 203
+ #define IDD_DIALOG1 205
#define IDC_NAME 1000
#define IDC_TYPENAME 1001
***************
*** 77,80 ****
--- 78,82 ----
#define IDC_ASPECT_TAB 1007
#define IDD_PARTBROWSER_PANE 1008
+ #define IDC_ZOOMS 1008
#define IDC_MODELNAME 1009
#define IDC_MODELTYPE 1010
***************
*** 134,137 ****
--- 136,141 ----
#define IDC_SCALETXT 1085
#define IDC_PREVIEWBTN 1087
+ #define IDC_COMBO1 1088
+ #define IDC_EDIT1 1089
#define ID_CANCEL_EDIT_CNTR 32768
#define ID_MODE_EDIT 32769
***************
*** 306,312 ****
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
! #define _APS_NEXT_RESOURCE_VALUE 204
#define _APS_NEXT_COMMAND_VALUE 32958
! #define _APS_NEXT_CONTROL_VALUE 1088
#define _APS_NEXT_SYMED_VALUE 114
#endif
--- 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
More information about the GME-commit
mailing list