+}\r
+\r
+void CTortoiseGitBlameView::FocusOn(GitRev *pRev)\r
+{\r
+ m_SelectedHash = pRev->m_CommitHash;\r
+\r
+ //GitRev *pRev;\r
+ //pRev=&this->GetLogData()->at(this->GetLogList()->GetItemCount()-m_ID[line]);\r
+ this->GetDocument()->GetMainFrame()->m_wndProperties.UpdateProperties(pRev);\r
+\r
+ this->Invalidate();\r
+ this->m_TextView.Invalidate();\r
+\r
+}\r
+\r
+void CTortoiseGitBlameView::OnMouseHover(UINT nFlags, CPoint point)\r
+{\r
+\r
+ LONG_PTR line = SendEditor(SCI_GETFIRSTVISIBLELINE);\r
+ LONG_PTR height = SendEditor(SCI_TEXTHEIGHT);\r
+ line = line + (point.y/height);\r
+ \r
+ if (line < (LONG)m_CommitHash.size())\r
+ {\r
+ if (line != m_MouseLine)\r
+ {\r
+ m_MouseLine = line;//m_CommitHash[line];\r
+// app.m_selectedorigrev = app.origrevs[line];\r
+// app.m_selectedauthor = app.authors[line];\r
+// app.m_selecteddate = app.dates[line];\r
+ \r
+ \r
+ GitRev *pRev;\r
+ pRev=&this->GetLogData()->at(this->GetLogList()->GetItemCount()-m_ID[line]);\r
+ //this->GetDocument()->GetMainFrame()->m_wndProperties.UpdateProperties(pRev);\r
+ this->ClientToScreen(&point);\r
+ //BALLOON_INFO bi;\r
+ //if(m_ToolTip.GetTool(this, bi))\r
+ //{\r
+ // bi.sBalloonTip=pRev->m_CommitHash;\r
+ CString str;\r
+ str.Format(_T("%s\n<b>%s</b>\n%s\n%s"),pRev->m_CommitHash,\r
+ pRev->m_Subject,\r
+ pRev->m_AuthorDate.Format(_T("%Y-%m-%d %H:%M")),\r
+ pRev->m_Body);\r
+ m_ToolTip.AddTool(this,str);\r
+ m_ToolTip.DisplayToolTip(&point);\r
+ //}\r
+ \r
+ CRect rect;\r
+ this->ScreenToClient(&point);\r
+ rect.left=LOCATOR_WIDTH;\r
+ rect.right=this->m_blamewidth+rect.left;\r
+ rect.top=point.y-height;\r
+ rect.bottom=point.y+height;\r
+ this->InvalidateRect(rect);\r
+\r
+ }\r
+ else\r
+ {\r
+ m_MouseLine=-1;\r
+// app.m_selecteddate.clear();\r
+// app.m_selectedrev = -2;\r
+// app.m_selectedorigrev = -2;\r
+ }\r
+ //::InvalidateRect( NULL, FALSE);\r
+ //this->Invalidate();\r
+ }\r
+ \r
+// const CString str=_T("this is a <b>Message Balloon</b>\n<hr=100%>\n<ct=0x0000FF>Warning! Warning!</ct>\nSomething unexpected happened");\r
+ //CBalloon::ShowBalloon(NULL, point, \r
+ // str,\r
+ // FALSE, (HICON)IDI_EXCLAMATION,\r
+ // (UINT)CBalloon ::BALLOON_RIGHT_TOP, (UINT)CBalloon ::BALLOON_EFFECT_SOLID,(COLORREF)NULL, (COLORREF)NULL, (COLORREF)NULL);\r
+}\r
+\r
+void CTortoiseGitBlameView::OnMouseMove(UINT nFlags, CPoint point)\r
+{\r
+ TRACKMOUSEEVENT tme;\r
+ tme.cbSize=sizeof(TRACKMOUSEEVENT);\r
+ tme.dwFlags=TME_HOVER|TME_LEAVE;\r
+ tme.hwndTrack=this->m_hWnd;\r
+ tme.dwHoverTime=1;\r
+ TrackMouseEvent(&tme);\r
+}\r
+\r
+\r
+BOOL CTortoiseGitBlameView::PreTranslateMessage(MSG* pMsg)\r
+{\r
+ m_ToolTip.RelayEvent(pMsg);\r
+ return CView::PreTranslateMessage(pMsg);\r
+}\r
+\r
+void CTortoiseGitBlameView::OnEditFind()\r
+{\r
+ m_pFindDialog=new CFindReplaceDialog();\r
+ \r
+ m_pFindDialog->Create(TRUE,_T(""),NULL,FR_DOWN,this); \r
+}\r
+\r
+void CTortoiseGitBlameView::OnEditGoto()\r
+{\r
+ CEditGotoDlg dlg;\r
+ if(dlg.DoModal()==IDOK)\r
+ {\r
+ this->GotoLine(dlg.m_LineNumber);\r
+ }\r
+}\r
+\r
+LRESULT CTortoiseGitBlameView::OnFindDialogMessage(WPARAM wParam, LPARAM lParam)//Õâ¸öÒ²ÊÇÕÒÄǸö³ÌÐò¸ÄµÄ£¬Ö»²»¹ý»»³ÉÁË×Ô¼ºµÄÀà \r
+{ \r
+ ASSERT(m_pFindDialog != NULL); \r
+ \r
+ // If the FR_DIALOGTERM flag is set, \r
+ // invalidate the handle identifying the dialog box. \r
+ if (m_pFindDialog->IsTerminating()) \r
+ { \r
+ m_pFindDialog = NULL; \r
+ return 0; \r
+ } \r
+\r
+ // If the FR_FINDNEXT flag is set, \r
+ // call the application-defined search routine \r
+ // to search for the requested string. \r
+ if(m_pFindDialog->FindNext()) \r
+ { \r
+ //read data from dialog \r
+ CString FindName = m_pFindDialog->GetFindString(); \r
+ bool bMatchCase = m_pFindDialog->MatchCase() == TRUE; \r
+ bool bMatchWholeWord = m_pFindDialog->MatchWholeWord() == TRUE; \r
+ bool bSearchDown = m_pFindDialog->SearchDown() == TRUE; \r
+ \r
+ DoSearch(FindName,m_pFindDialog->m_fr.Flags);\r
+ //with given name do search \r
+ // *FindWhatYouNeed(FindName, bMatchCase, bMatchWholeWord, bSearchDown); \r
+ } \r
+\r
+ return 0; \r
+} \r