OSDN Git Service

TortoiseGitBlame Add Next and Previous Function when choose one commit
[tortoisegit/TortoiseGitJp.git] / src / TortoiseGitBlame / TortoiseGitBlameView.h
index 2592455..01a8667 100644 (file)
@@ -10,6 +10,8 @@
 #include "registry.h"\r
 #include "SciEdit.h"\r
 \r
+#include "GitBlameLogList.h"\r
+#include "Balloon.h"\r
 \r
 const COLORREF black = RGB(0,0,0);\r
 const COLORREF white = RGB(0xff,0xff,0xff);\r
@@ -20,9 +22,9 @@ const COLORREF darkBlue = RGB(0, 0, 0x80);
 const COLORREF lightBlue = RGB(0xA6, 0xCA, 0xF0);\r
 const int blockSize = 128 * 1024;\r
 \r
-#define BLAMESPACE 20\r
+#define BLAMESPACE 5\r
 #define HEADER_HEIGHT 18\r
-#define LOCATOR_WIDTH 20\r
+#define LOCATOR_WIDTH 10\r
 \r
 #define MAX_LOG_LENGTH 2000\r
 \r
@@ -69,19 +71,48 @@ protected:
 \r
 // Generated message map functions\r
 protected:\r
+       BOOL PreTranslateMessage(MSG* pMsg);\r
+       afx_msg void OnEditFind();\r
+       afx_msg void OnEditGoto();\r
        afx_msg void OnFilePrintPreview();\r
        afx_msg void OnRButtonUp(UINT nFlags, CPoint point);\r
        afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);\r
        afx_msg int OnCreate(LPCREATESTRUCT lpcs);\r
        afx_msg void OnSize(UINT nType, int cx, int cy);\r
+       afx_msg void OnSciPainted(NMHDR*, LRESULT*);\r
+       afx_msg void OnLButtonDown(UINT nFlags,CPoint point);\r
+       afx_msg void OnRButtonDown(UINT nFlags,CPoint point){OnLButtonDown(nFlags,point);CView::OnRButtonDown(nFlags,point);};\r
+       afx_msg void OnSciGetBkColor(NMHDR*, LRESULT*);\r
+       afx_msg void OnMouseHover(UINT nFlags, CPoint point);\r
+       afx_msg void OnMouseMove(UINT nFlags, CPoint point);\r
+    afx_msg LRESULT OnFindDialogMessage(WPARAM   wParam,   LPARAM   lParam);\r
+       afx_msg void OnViewNext();\r
+       afx_msg void OnViewPrev();\r
+       \r
+       int FindNextLine(CString commithash, bool bUpOrDown=false);\r
+       int FindFirstLine(CString commithash, int line)\r
+       {\r
+               while(line>=0)\r
+               {\r
+                       if( m_CommitHash[line] != commithash )\r
+                       {\r
+                               return line++;\r
+                       }\r
+                       line--;\r
+               }\r
+               return line;\r
+       }\r
 \r
        DECLARE_MESSAGE_MAP()\r
 \r
+    static UINT m_FindDialogMessage;\r
 public:\r
 \r
        void UpdateInfo();\r
+       void FocusOn(GitRev *pRev);\r
 \r
        CSciEdit                        m_TextView;\r
+       CBalloon                        m_ToolTip;\r
 \r
        HINSTANCE hInstance;\r
        HINSTANCE hResource;\r
@@ -97,6 +128,10 @@ public:
        BOOL bIgnoreSpaces;\r
        BOOL bIgnoreAllSpaces;\r
 \r
+       BOOL m_bShowAuthor;\r
+       BOOL m_bShowDate;\r
+\r
+\r
        LRESULT SendEditor(UINT Msg, WPARAM wParam=0, LPARAM lParam=0);\r
 \r
        void GetRange(int start, int end, char *text);\r
@@ -108,7 +143,8 @@ public:
        void Command(int id);\r
        void Notify(SCNotification *notification);\r
 \r
-       void SetAStyle(int style, COLORREF fore, COLORREF back=::GetSysColor(COLOR_WINDOW), int size=-1, const char *face=0);\r
+       void SetAStyle(int style, COLORREF fore, COLORREF back=::GetSysColor(COLOR_WINDOW), int size=-1, CString *face=0);\r
+\r
        void InitialiseEditor();\r
     void InitSize();\r
        LONG GetBlameWidth();\r
@@ -120,7 +156,7 @@ public:
        void BlamePreviousRevision();\r
        void DiffPreviousRevision();\r
        void ShowLog();\r
-       bool DoSearch(LPSTR what, DWORD flags);\r
+       bool DoSearch(CString what, DWORD flags);\r
        bool GotoLine(long line);\r
        bool ScrollToLine(long line);\r
        void GotoLineDlg();\r
@@ -129,11 +165,11 @@ public:
        void SetSelectedLine(LONG line) { m_SelectedLine=line;};\r
 \r
        LONG                                            m_mouserev;\r
-       CString                                 m_mouseauthor;\r
+       LONG                                            m_MouseLine;\r
        LONG                                            m_selectedrev;\r
        LONG                                            m_selectedorigrev;\r
-       CString                                 m_selectedauthor;\r
-       CString                                 m_selecteddate;\r
+       CString                                         m_SelectedHash;\r
+       CString                                         m_selecteddate;\r
        static long                                     m_gotoline;\r
        long                                            m_lowestrev;\r
        long                                            m_highestrev;\r
@@ -147,6 +183,8 @@ public:
        std::vector<CString>    m_Authors;\r
        std::vector<CString>    m_CommitHash;\r
 \r
+       std::map<CString,GitRev> m_NoListCommit;\r
+\r
 //     std::vector<CString>    m_Paths;\r
 //     std::map<LONG, CString> logmessages;\r
        char                                            m_szTip[MAX_LOG_LENGTH*2+6];\r
@@ -154,6 +192,11 @@ public:
        void StringExpand(LPSTR str);\r
        void StringExpand(LPWSTR str);\r
        BOOL                                            ttVisible;\r
+\r
+       CLogDataVector *                GetLogData();\r
+\r
+       BOOL m_bShowLine;\r
+\r
 protected:\r
        void CreateFont();\r
        void SetupLexer(CString filename);\r
@@ -187,6 +230,11 @@ protected:
        CRegStdWORD                                     m_regOldLinesColor;\r
        CRegStdWORD                                     m_regNewLinesColor;\r
 \r
+       CGitBlameLogList * GetLogList();\r
+\r
+    CFindReplaceDialog          *m_pFindDialog;\r
+\r
+       DWORD                                           m_DateFormat;   // DATE_SHORTDATE or DATE_LONGDATE\r
 };\r
 \r
 #ifndef _DEBUG  // debug version in TortoiseGitBlameView.cpp\r