OSDN Git Service

Add SCI Edit to GitBlameView
[tortoisegit/TortoiseGitJp.git] / src / TortoiseGitBlame / TortoiseGitBlameView.cpp
index fcfc14a..e79f41b 100644 (file)
@@ -39,6 +39,8 @@ BEGIN_MESSAGE_MAP(CTortoiseGitBlameView, CView)
        ON_COMMAND(ID_FILE_PRINT, &CView::OnFilePrint)\r
        ON_COMMAND(ID_FILE_PRINT_DIRECT, &CView::OnFilePrint)\r
        ON_COMMAND(ID_FILE_PRINT_PREVIEW, &CTortoiseGitBlameView::OnFilePrintPreview)\r
+       ON_WM_CREATE()\r
+       ON_WM_SIZE()\r
 END_MESSAGE_MAP()\r
 \r
 // CTortoiseGitBlameView construction/destruction\r
@@ -55,7 +57,7 @@ CTortoiseGitBlameView::CTortoiseGitBlameView()
 \r
        m_font = 0;\r
        m_italicfont = 0;\r
-       m_blamewidth = 0;\r
+       m_blamewidth = 100;\r
        m_revwidth = 0;\r
        m_datewidth = 0;\r
        m_authorwidth = 0;\r
@@ -91,7 +93,35 @@ CTortoiseGitBlameView::~CTortoiseGitBlameView()
 }\r
 \r
 \r
+int CTortoiseGitBlameView::OnCreate(LPCREATESTRUCT lpcs)\r
+{\r
 \r
+       CRect rect,rect1;\r
+       this->GetWindowRect(&rect1);\r
+       rect.left=m_blamewidth;\r
+       rect.right=rect.Width();\r
+       rect.top=0;\r
+       rect.bottom=rect.Height();\r
+       BOOL b=m_TextView.Create(_T("Scintilla"),_T("source"),0,rect,this,0,0);\r
+       m_TextView.Init(0);\r
+       m_TextView.ShowWindow( SW_SHOW);\r
+       //m_TextView.InsertText(_T("Abdadfasdf"));\r
+        \r
+       return CView::OnCreate(lpcs);\r
+}\r
+\r
+void CTortoiseGitBlameView::OnSize(UINT nType,int cx, int cy)\r
+{\r
+\r
+       CRect rect;\r
+       rect.left=m_blamewidth;\r
+       rect.right=cx;\r
+       rect.top=0;\r
+       rect.bottom=cy;\r
+\r
+       m_TextView.MoveWindow(&rect);\r
+\r
+}\r
 BOOL CTortoiseGitBlameView::PreCreateWindow(CREATESTRUCT& cs)\r
 {\r
        // TODO: Modify the Window class or styles here by modifying\r