1 // TortoiseSVN - a Windows shell extension for easy version control
\r
3 // Copyright (C) 2007,2009 - TortoiseUDiff
\r
5 // This program is free software; you can redistribute it and/or
\r
6 // modify it under the terms of the GNU General Public License
\r
7 // as published by the Free Software Foundation; either version 2
\r
8 // of the License, or (at your option) any later version.
\r
10 // This program is distributed in the hope that it will be useful,
\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 // GNU General Public License for more details.
\r
15 // You should have received a copy of the GNU General Public License
\r
16 // along with this program; if not, write to the Free Software Foundation,
\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
20 #include "BaseWindow.h"
\r
21 #include "SciLexer.h"
\r
22 #include "Scintilla.h"
\r
23 #include "Registry.h"
\r
24 #include "resource.h"
\r
25 #include "FindBar.h"
\r
29 using namespace std;
\r
32 * \ingroup TortoiseUDiff
\r
33 * Main window of TortoiseUDiff. Handles the child windows (Scintilla control,
\r
36 class CMainWindow : public CWindow
\r
39 CMainWindow(HINSTANCE hInst, const WNDCLASSEX* wcx = NULL);
\r
43 * Registers the window class and creates the window.
\r
45 bool RegisterAndCreateWindow();
\r
47 LRESULT SendEditor(UINT Msg, WPARAM wParam = 0, LPARAM lParam = 0);
\r
48 HWND GetHWNDEdit() { return m_hWndEdit; }
\r
49 bool LoadFile(LPCTSTR filename);
\r
50 bool SaveFile(LPCTSTR filename);
\r
51 void SetTitle(LPCTSTR title);
\r
54 /// the message handler for this window
\r
55 LRESULT CALLBACK WinMsgHandler(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
\r
56 /// Handles all the WM_COMMAND window messages (e.g. menu commands)
\r
57 LRESULT DoCommand(int id);
\r
62 void SetAStyle(int style, COLORREF fore, COLORREF back=::GetSysColor(COLOR_WINDOW), int size=-1, const char *face=0);
\r
63 bool IsUTF8(LPVOID pBuffer, size_t cb);
\r
66 LRESULT m_directFunction;
\r
67 LRESULT m_directPointer;
\r
72 bool m_bShowFindBar;
\r