[GME-commit]
GMESRC/GME/Gme ScrollZoomView.h,1.4,1.5 ScrollZoomView.cpp,1.7,1.8
PannWinDlg.h,1.3,1.4 PannWinDlg.cpp,1.3,1.4 PanningWindow.h,1.2,1.3
PanningWindow.cpp,1.2,1.3 PannButton.h,1.3,1.4
PannButton.cpp,1.5,1.6 MainFrm.h,1.16,1.17 MainFrm.cpp,1.20,1.21
GMEView.h,1.57,1.58 GMEView.cpp,1.141,1.142
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Fri May 7 16:58:35 CDT 2004
Update of /var/lib/gme/GMESRC/GME/Gme
In directory braindrain:/tmp/cvs-serv17183
Modified Files:
ScrollZoomView.h ScrollZoomView.cpp PannWinDlg.h
PannWinDlg.cpp PanningWindow.h PanningWindow.cpp PannButton.h
PannButton.cpp MainFrm.h MainFrm.cpp GMEView.h GMEView.cpp
Log Message:
panning win refresh improved
CVS User: bogyom
Index: ScrollZoomView.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/ScrollZoomView.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ScrollZoomView.h 25 Mar 2004 16:44:49 -0000 1.4
--- ScrollZoomView.h 7 May 2004 20:58:24 -0000 1.5
***************
*** 52,56 ****
BOOL DoMouseWheel(UINT fFlags, short zDelta, CPoint point);
- private:
void notifyPanning(CPoint pt);
--- 52,55 ----
Index: ScrollZoomView.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/ScrollZoomView.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ScrollZoomView.cpp 25 Mar 2004 16:44:49 -0000 1.7
--- ScrollZoomView.cpp 7 May 2004 20:58:25 -0000 1.8
***************
*** 708,712 ****
}
m_bInsideUpdate = FALSE;
! notifyPanning(CPoint(0,0)); // ??
return;
}
--- 708,712 ----
}
m_bInsideUpdate = FALSE;
! // notifyPanning(CPoint(0,0)); // ??
return;
}
Index: PannWinDlg.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/PannWinDlg.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PannWinDlg.h 6 May 2004 17:49:48 -0000 1.3
--- PannWinDlg.h 7 May 2004 20:58:25 -0000 1.4
***************
*** 18,22 ****
public:
CPannWinDlg(CWnd* pParent = NULL); // standard constructor
! void SetBitmapDC(CDC *bdc, CRect &ori, CRect &rect, COLORREF &bkgrnd);
void SetViewRect(CRect &vrect);
BOOL OnInitDialog();
--- 18,22 ----
public:
CPannWinDlg(CWnd* pParent = NULL); // standard constructor
! void SetBitmapDC(CWnd *owner, CDC *bdc, CRect &ori, CRect &rect, COLORREF &bkgrnd);
void SetViewRect(CRect &vrect);
BOOL OnInitDialog();
Index: PannWinDlg.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/PannWinDlg.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PannWinDlg.cpp 6 May 2004 17:49:48 -0000 1.3
--- PannWinDlg.cpp 7 May 2004 20:58:25 -0000 1.4
***************
*** 35,45 ****
{
BOOL ret = CDialog::OnInitDialog();
! bool rett = m_pvbutton.Create(this);
return ret;
}
! void CPannWinDlg::SetBitmapDC(CDC *bdc, CRect &ori, CRect &rect, COLORREF &bkgrnd)
{
! m_pvbutton.SetBitmapDC(bdc, ori, rect, bkgrnd);
}
--- 35,45 ----
{
BOOL ret = CDialog::OnInitDialog();
! bool rett = m_pvbutton.Create();
return ret;
}
! void CPannWinDlg::SetBitmapDC(CWnd *owner, CDC *bdc, CRect &ori, CRect &rect, COLORREF &bkgrnd)
{
! m_pvbutton.SetBitmapDC(owner, bdc, ori, rect, bkgrnd);
}
Index: PanningWindow.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/PanningWindow.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PanningWindow.h 6 May 2004 17:49:48 -0000 1.2
--- PanningWindow.h 7 May 2004 20:58:25 -0000 1.3
***************
*** 20,24 ****
void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
! void SetBitmapDC(CDC *bdc, CRect &ori, CRect &rect, COLORREF &bkgrnd);
void SetViewRect(CRect vrect);
--- 20,24 ----
void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
! void SetBitmapDC(CWnd *owner, CDC *bdc, CRect &ori, CRect &rect, COLORREF &bkgrnd);
void SetViewRect(CRect vrect);
Index: PanningWindow.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/PanningWindow.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PanningWindow.cpp 6 May 2004 17:49:48 -0000 1.2
--- PanningWindow.cpp 7 May 2004 20:58:25 -0000 1.3
***************
*** 80,86 ****
! void CPanningWindow::SetBitmapDC(CDC *bdc, CRect &ori, CRect &rect, COLORREF &bkgrnd)
{
! m_pannWinDlg.SetBitmapDC(bdc, ori, rect, bkgrnd);
}
--- 80,86 ----
! void CPanningWindow::SetBitmapDC(CWnd *owner, CDC *bdc, CRect &ori, CRect &rect, COLORREF &bkgrnd)
{
! m_pannWinDlg.SetBitmapDC(owner, bdc, ori, rect, bkgrnd);
}
Index: PannButton.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/PannButton.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PannButton.h 6 May 2004 17:49:48 -0000 1.3
--- PannButton.h 7 May 2004 20:58:25 -0000 1.4
***************
*** 16,21 ****
public:
CPannButton();
! bool Create(CWnd *parent);
! void SetBitmapDC(CDC *bdc, CRect &ori, CRect &rect, COLORREF &bkgrnd);
void SetViewRect(CRect vrect);
--- 16,21 ----
public:
CPannButton();
! bool Create();
! void SetBitmapDC(CWnd *owner, CDC *bdc, CRect &ori, CRect &rect, COLORREF &bkgrnd);
void SetViewRect(CRect vrect);
***************
*** 29,33 ****
CRect m_moveStartRect;
! CWnd* m_parent;
CDC* m_bitmapDC;
CRect m_bitmapSizeOri;
--- 29,33 ----
CRect m_moveStartRect;
! CWnd* m_owner;
CDC* m_bitmapDC;
CRect m_bitmapSizeOri;
Index: PannButton.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/PannButton.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PannButton.cpp 6 May 2004 19:39:41 -0000 1.5
--- PannButton.cpp 7 May 2004 20:58:25 -0000 1.6
***************
*** 23,27 ****
m_bitmapSizeStored = CRect(0,0,0,0);
m_bitmapSizeOri = CRect(0,0,0,0);
! m_parent = NULL;
m_sizeallh = NULL;
m_arrowh = NULL;
--- 23,27 ----
m_bitmapSizeStored = CRect(0,0,0,0);
m_bitmapSizeOri = CRect(0,0,0,0);
! m_owner = NULL;
m_sizeallh = NULL;
m_arrowh = NULL;
***************
*** 52,58 ****
// CPannButton message handlers
! bool CPannButton::Create(CWnd *parent)
{
- m_parent = parent;
m_sizeallh = ::LoadCursor(NULL, IDC_SIZEALL);
m_arrowh = ::LoadCursor(NULL, IDC_ARROW);
--- 52,57 ----
// CPannButton message handlers
! bool CPannButton::Create()
{
m_sizeallh = ::LoadCursor(NULL, IDC_SIZEALL);
m_arrowh = ::LoadCursor(NULL, IDC_ARROW);
***************
*** 60,68 ****
}
! void CPannButton::SetBitmapDC(CDC *bdc, CRect &orisize, CRect &actsize, COLORREF &bkgrnd) // may be empty
{
TRACE("SetBitmapDC\n");
if (m_bitmapDC)
delete m_bitmapDC;
m_bitmapDC = bdc;
m_bitmapSizeOri = orisize;
--- 59,68 ----
}
! void CPannButton::SetBitmapDC(CWnd *owner, CDC *bdc, CRect &orisize, CRect &actsize, COLORREF &bkgrnd) // may be empty
{
TRACE("SetBitmapDC\n");
if (m_bitmapDC)
delete m_bitmapDC;
+ m_owner = owner;
m_bitmapDC = bdc;
m_bitmapSizeOri = orisize;
***************
*** 80,83 ****
--- 80,85 ----
if (m_bitmapSizeOri.IsRectEmpty() || m_bitmapSizeStored.IsRectEmpty())
return;
+ if (!::IsWindow(GetSafeHwnd()))
+ return;
m_oriToStoredRx = (double)(m_bitmapSizeStored.Width())/ m_bitmapSizeOri.Width();
***************
*** 94,106 ****
viewRectToScreen(vRect);
! if (::IsWindow(GetSafeHwnd()))
! {
! InvalidateRect(&m_viewRectOnScreen, FALSE);
! m_viewRectOnScreen = vRect;
! InvalidateRect(&vRect, FALSE);
! UpdateWindow();
! }
! else
! m_viewRectOnScreen = vRect;
}
--- 96,103 ----
viewRectToScreen(vRect);
! InvalidateRect(&m_viewRectOnScreen, FALSE);
! m_viewRectOnScreen = vRect;
! InvalidateRect(&vRect, FALSE);
! UpdateWindow();
}
***************
*** 251,256 ****
ReleaseCapture();
m_inMove = false;
! CWnd* mainw = AfxGetMainWnd();
! if (mainw)
{
double dx = point.x -m_moveStartPoint.x ;
--- 248,253 ----
ReleaseCapture();
m_inMove = false;
! // CWnd* mainw = AfxGetMainWnd();
! if (m_owner) // mainw)
{
double dx = point.x -m_moveStartPoint.x ;
***************
*** 262,266 ****
dx /= m_oriToStoredRx;
dy /= m_oriToStoredRy;
! mainw->PostMessage(WM_PANN_SCROLL, (WPARAM)(int)dx, (LPARAM)(int)dy);
Invalidate();
}
--- 259,263 ----
dx /= m_oriToStoredRx;
dy /= m_oriToStoredRy;
! m_owner->PostMessage(WM_PANN_SCROLL, (WPARAM)(int)dx, (LPARAM)(int)dy);
Invalidate();
}
Index: MainFrm.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/MainFrm.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** MainFrm.h 5 May 2004 18:33:20 -0000 1.16
--- MainFrm.h 7 May 2004 20:58:25 -0000 1.17
***************
*** 109,113 ****
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnDestroy();
- afx_msg LRESULT OnPannScroll(WPARAM wParam, LPARAM lParam);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
--- 109,112 ----
Index: MainFrm.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/MainFrm.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** MainFrm.cpp 5 May 2004 18:33:20 -0000 1.20
--- MainFrm.cpp 7 May 2004 20:58:25 -0000 1.21
***************
*** 75,79 ****
ON_WM_TIMER()
ON_WM_DESTROY()
- ON_MESSAGE(WM_PANN_SCROLL, OnPannScroll)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
--- 75,78 ----
***************
*** 545,556 ****
}
- LRESULT CMainFrame::OnPannScroll(WPARAM wParam, LPARAM lParam)
- {
- CMDIChildWnd *pChild = CMainFrame::theInstance->MDIGetActive();
- if (pChild)
- {
- CView *view = (CView*)pChild->GetActiveView();
- view->PostMessage(WM_PANN_SCROLL, wParam, lParam);
- }
- return 0;
- }
\ No newline at end of file
--- 544,545 ----
Index: GMEView.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GMEView.h,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** GMEView.h 6 May 2004 17:47:32 -0000 1.57
--- GMEView.h 7 May 2004 20:58:25 -0000 1.58
***************
*** 250,253 ****
--- 250,254 ----
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
+ virtual void OnActivateFrame( UINT nState, CFrameWnd* pFrameWnd );
//}}AFX_VIRTUAL
Index: GMEView.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GMEView.cpp,v
retrieving revision 1.141
retrieving revision 1.142
diff -C2 -d -r1.141 -r1.142
*** GMEView.cpp 6 May 2004 19:39:41 -0000 1.141
--- GMEView.cpp 7 May 2004 20:58:25 -0000 1.142
***************
*** 105,110 ****
attrNeedsRefresh = false;
}
- // view->m_refreshpannwin = true; // terge
- view->DoPannWinRefresh();
break;
}
--- 105,108 ----
***************
*** 543,547 ****
CMainFrame* main = (CMainFrame*)AfxGetMainWnd();
! main->m_pannWin.SetBitmapDC(pannDC, extent, target, bgColor);
}
--- 541,546 ----
CMainFrame* main = (CMainFrame*)AfxGetMainWnd();
! main->m_pannWin.SetBitmapDC(this, pannDC, extent, target, bgColor);
! notifyPanning(GetDeviceScrollPosition());
}
***************
*** 729,738 ****
CPoint pt = GetScrollPosition();
onScreen->BitBlt(pt.x-5,pt.y-5,r.Width()+10,r.Height()+10,offScreen,pt.x-5,pt.y-5,SRCCOPY);
! /* if (m_refreshpannwin)
{
m_refreshpannwin = false;
DoPannWinRefresh();
}
! */ }
}
--- 728,737 ----
CPoint pt = GetScrollPosition();
onScreen->BitBlt(pt.x-5,pt.y-5,r.Width()+10,r.Height()+10,offScreen,pt.x-5,pt.y-5,SRCCOPY);
! if (m_refreshpannwin)
{
m_refreshpannwin = false;
DoPannWinRefresh();
}
! }
}
***************
*** 834,837 ****
--- 833,837 ----
// AutoRoute();
+ TRACE("CGMEView::OnInitialUpdate DoPannWinRefresh\n");
DoPannWinRefresh(); // terge - new window opened
SetScroll();
***************
*** 1146,1151 ****
CMainFrame* main = (CMainFrame*)AfxGetMainWnd();
! CRect extent(0,0,0,0), target(0,0,0,0); // terge
! main->m_pannWin.SetBitmapDC(NULL, extent, target, bgColor);
CScrollZoomView::OnDestroy();
}
--- 1146,1157 ----
CMainFrame* main = (CMainFrame*)AfxGetMainWnd();
! CDocument* doc = GetDocument();
! POSITION pos = doc->GetFirstViewPosition();
! if (pos != NULL && doc->GetNextView(pos) && pos == NULL)
! {
! CRect extent(0,0,0,0), target(0,0,0,0); // terge
! main->m_pannWin.SetBitmapDC(this, NULL, extent, target, bgColor);
! }
!
CScrollZoomView::OnDestroy();
}
***************
*** 1554,1559 ****
EndWaitCursor();
! // m_refreshpannwin = true; // terge - graphics modified
! DoPannWinRefresh();
}
--- 1560,1570 ----
EndWaitCursor();
! CGMEView* gmeviewA = (CGMEView*)GetActiveView();
!
! if (gmeviewA)
! {
! TRACE("CGMEView::Reset\n");
! gmeviewA->m_refreshpannwin = true;
! }
}
***************
*** 3177,3182 ****
selectedAnnotations.RemoveAll();
! // m_refreshpannwin = true;
! DoPannWinRefresh();
Invalidate();
}
--- 3188,3197 ----
selectedAnnotations.RemoveAll();
! CGMEView* gmeviewA = (CGMEView*)GetActiveView();
! if (gmeviewA)
! {
! TRACE("CGMEView::ChangeAspect\n");
! gmeviewA->m_refreshpannwin = true;
! }
Invalidate();
}
***************
*** 3311,3316 ****
selectedAnnotations.RemoveAll();
! // m_refreshpannwin = true;
! DoPannWinRefresh();
Invalidate();
}
--- 3326,3331 ----
selectedAnnotations.RemoveAll();
! TRACE("CGMEView::OnSelChangeAspectProp\n");
! m_refreshpannwin = true;
Invalidate();
}
***************
*** 4667,4670 ****
--- 4682,4699 ----
}
+ void CGMEView::OnActivateFrame( UINT nState, CFrameWnd* pFrameWnd )
+ {
+
+ CGMEView* gmeviewA = (CGMEView*)GetActiveView();
+
+ if (gmeviewA)
+ {
+ TRACE("CGMEView::OnActivateFrame\n");
+ gmeviewA->m_refreshpannwin = true;
+ }
+ CScrollZoomView::OnActivateFrame(nState, pFrameWnd);
+ }
+
+
void CGMEView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView)
{
***************
*** 4696,4704 ****
if (bActivate)
{
! // gmeviewA->m_refreshpannwin = true; // ??
! gmeviewA->DoPannWinRefresh();
}
! // else
! // gmeviewI->m_refreshpannwin = false; // ??
CScrollZoomView::OnActivateView(bActivate, pActivateView, pDeactiveView);
}
--- 4725,4736 ----
if (bActivate)
{
! if (gmeviewA && guiMeta)
! {
! TRACE("CGMEView::OnActivateView DoPannWinRefresh\n");
! DoPannWinRefresh();
! }
}
! TRACE("CGMEView::OnActivateView final false\n");
! m_refreshpannwin = false;
CScrollZoomView::OnActivateView(bActivate, pActivateView, pDeactiveView);
}
More information about the GME-commit
mailing list