OSDN Git Service

Change Dir Structure to be same as TortoiseSVN'
[tortoisegit/TortoiseGitJp.git] / Utils / MiscUI / ScrollTool.cpp
diff --git a/Utils/MiscUI/ScrollTool.cpp b/Utils/MiscUI/ScrollTool.cpp
deleted file mode 100644 (file)
index ca09423..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-// TortoiseSVN - a Windows shell extension for easy version control\r
-\r
-// Copyright (C) 2003-2006 - Stefan Kueng\r
-\r
-// This program is free software; you can redistribute it and/or\r
-// modify it under the terms of the GNU General Public License\r
-// as published by the Free Software Foundation; either version 2\r
-// of the License, or (at your option) any later version.\r
-\r
-// This program is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-// GNU General Public License for more details.\r
-\r
-// You should have received a copy of the GNU General Public License\r
-// along with this program; if not, write to the Free Software Foundation,\r
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
-//\r
-#include "stdafx.h"\r
-#include "ScrollTool.h"\r
-\r
-\r
-CScrollTool::CScrollTool() : m_bInitCalled(false)\r
-{\r
-}\r
-\r
-CScrollTool::~CScrollTool()\r
-{\r
-}\r
-\r
-\r
-BEGIN_MESSAGE_MAP(CScrollTool, CWnd)\r
-END_MESSAGE_MAP()\r
-\r
-\r
-bool CScrollTool::Init(LPPOINT pos, bool bRightAligned /* = false */)\r
-{\r
-    if (!m_bInitCalled)\r
-    {\r
-        // create the tooltip window\r
-        if (!CreateEx(WS_EX_TOPMOST,\r
-                                        TOOLTIPS_CLASS,\r
-                                        NULL,\r
-                                        TTS_NOPREFIX | TTS_ALWAYSTIP,      \r
-                                        CW_USEDEFAULT,\r
-                                        CW_USEDEFAULT,\r
-                                        CW_USEDEFAULT,\r
-                                        CW_USEDEFAULT,\r
-                                        NULL,\r
-                                        NULL,\r
-                                        NULL))\r
-               {\r
-                       return false;\r
-               }\r
-\r
-        ti.cbSize = sizeof(TOOLINFO);\r
-        ti.uFlags = TTF_TRACK;\r
-        ti.hwnd = NULL;\r
-        ti.hinst = NULL;\r
-        ti.uId = 0;\r
-        ti.lpszText = _T(" ");\r
-\r
-               // ToolTip control will cover the whole window\r
-        ti.rect.left = 0;\r
-        ti.rect.top = 0;\r
-        ti.rect.right = 0;\r
-        ti.rect.bottom = 0;\r
-\r
-        CPoint point;\r
-        ::GetCursorPos(&point);\r
-\r
-        SendMessage(TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);\r
-\r
-               SendMessage(TTM_TRACKPOSITION, 0, (LPARAM)(DWORD) MAKELONG(point.x, point.y));\r
-        SendMessage(TTM_TRACKACTIVATE, true, (LPARAM)(LPTOOLINFO) &ti);\r
-               SendMessage(TTM_TRACKPOSITION, 0, MAKELONG(pos->x, pos->y));\r
-               m_bRightAligned = bRightAligned;\r
-        m_bInitCalled = true;\r
-    }\r
-       return true;\r
-}\r
-\r
-void CScrollTool::SetText(LPPOINT pos, const TCHAR * fmt, ...)\r
-{\r
-    CString s;\r
-    va_list marker;\r
-\r
-    va_start( marker, fmt );\r
-    s.FormatV(fmt, marker);\r
-    va_end( marker );\r
-       \r
-       CSize textsize(0);\r
-       if (m_bRightAligned)\r
-       {\r
-               CDC *pDC = GetDC();\r
-               textsize = pDC->GetTextExtent(s);\r
-               ReleaseDC(pDC);\r
-       }\r
-\r
-       ti.lpszText = s.GetBuffer();       \r
-    SendMessage(TTM_UPDATETIPTEXT, 0, (LPARAM)(LPTOOLINFO) &ti);\r
-       SendMessage(TTM_TRACKPOSITION, 0, MAKELONG(pos->x-textsize.cx, pos->y));\r
-       s.ReleaseBuffer();\r
-}\r
-\r
-void CScrollTool::Clear()\r
-{\r
-       if (m_bInitCalled)\r
-       {\r
-               SendMessage(TTM_DELTOOL, 0, (LPARAM)(LPTOOLINFO) &ti);\r
-               DestroyWindow();\r
-       }\r
-    m_bInitCalled = false;\r
-}\r
-\r
-LONG CScrollTool::GetTextWidth(LPCTSTR szText)\r
-{\r
-       CDC *pDC = GetDC();\r
-       CSize textsize = pDC->GetTextExtent(szText, _tcslen(szText));\r
-       ReleaseDC(pDC);\r
-       return textsize.cx;\r
-}
\ No newline at end of file