[commit] r2330 - in trunk/Tests: . svngui
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Tue Sep 3 07:43:36 CDT 2013
Author: volgy
Date: Tue Sep 3 07:43:35 2013
New Revision: 2330
Log:
BBad import location for svngui test, moving to subdir.
Added:
trunk/Tests/svngui/MainFrm.cpp (props changed)
- copied unchanged from r2329, trunk/Tests/MainFrm.cpp
trunk/Tests/svngui/MainFrm.h (props changed)
- copied unchanged from r2329, trunk/Tests/MainFrm.h
trunk/Tests/svngui/OutputWnd.cpp (props changed)
- copied unchanged from r2329, trunk/Tests/OutputWnd.cpp
trunk/Tests/svngui/OutputWnd.h (props changed)
- copied unchanged from r2329, trunk/Tests/OutputWnd.h
trunk/Tests/svngui/ReadMe.txt (props changed)
- copied unchanged from r2329, trunk/Tests/ReadMe.txt
trunk/Tests/svngui/Resource.h (props changed)
- copied unchanged from r2329, trunk/Tests/Resource.h
trunk/Tests/svngui/SVNClient.cpp (props changed)
- copied unchanged from r2329, trunk/Tests/SVNClient.cpp
trunk/Tests/svngui/SVNClient.h (props changed)
- copied unchanged from r2329, trunk/Tests/SVNClient.h
trunk/Tests/svngui/UserImages.bmp (props changed)
- copied unchanged from r2329, trunk/Tests/UserImages.bmp
trunk/Tests/svngui/stdafx.cpp (props changed)
- copied unchanged from r2329, trunk/Tests/stdafx.cpp
trunk/Tests/svngui/stdafx.h (props changed)
- copied unchanged from r2329, trunk/Tests/stdafx.h
trunk/Tests/svngui/svngui.cpp (props changed)
- copied unchanged from r2329, trunk/Tests/svngui.cpp
trunk/Tests/svngui/svngui.h (props changed)
- copied unchanged from r2329, trunk/Tests/svngui.h
trunk/Tests/svngui/svngui.rc (props changed)
- copied unchanged from r2329, trunk/Tests/svngui.rc
trunk/Tests/svngui/svngui.reg (props changed)
- copied unchanged from r2329, trunk/Tests/svngui.reg
trunk/Tests/svngui/svngui.sln (props changed)
- copied unchanged from r2329, trunk/Tests/svngui.sln
trunk/Tests/svngui/svngui.vcxproj (props changed)
- copied unchanged from r2329, trunk/Tests/svngui.vcxproj
trunk/Tests/svngui/svngui.vcxproj.filters (props changed)
- copied unchanged from r2329, trunk/Tests/svngui.vcxproj.filters
trunk/Tests/svngui/svnguiDoc.cpp (props changed)
- copied unchanged from r2329, trunk/Tests/svnguiDoc.cpp
trunk/Tests/svngui/svnguiDoc.h (props changed)
- copied unchanged from r2329, trunk/Tests/svnguiDoc.h
trunk/Tests/svngui/svnguiView.cpp (props changed)
- copied unchanged from r2329, trunk/Tests/svnguiView.cpp
trunk/Tests/svngui/svnguiView.h (props changed)
- copied unchanged from r2329, trunk/Tests/svnguiView.h
trunk/Tests/svngui/targetver.h (props changed)
- copied unchanged from r2329, trunk/Tests/targetver.h
Deleted:
trunk/Tests/MainFrm.cpp
trunk/Tests/MainFrm.h
trunk/Tests/OutputWnd.cpp
trunk/Tests/OutputWnd.h
trunk/Tests/ReadMe.txt
trunk/Tests/Resource.h
trunk/Tests/SVNClient.cpp
trunk/Tests/SVNClient.h
trunk/Tests/UserImages.bmp
trunk/Tests/stdafx.cpp
trunk/Tests/stdafx.h
trunk/Tests/svngui.cpp
trunk/Tests/svngui.h
trunk/Tests/svngui.rc
trunk/Tests/svngui.reg
trunk/Tests/svngui.sln
trunk/Tests/svngui.vcxproj
trunk/Tests/svngui.vcxproj.filters
trunk/Tests/svnguiDoc.cpp
trunk/Tests/svnguiDoc.h
trunk/Tests/svnguiView.cpp
trunk/Tests/svnguiView.h
trunk/Tests/targetver.h
Copied: trunk/Tests/svngui/MainFrm.cpp (from r2329, trunk/Tests/MainFrm.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/MainFrm.cpp Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/MainFrm.cpp)
@@ -0,0 +1,277 @@
+
+// MainFrm.cpp : implementation of the CMainFrame class
+//
+
+#include "stdafx.h"
+#include "svngui.h"
+
+#include "MainFrm.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+// CMainFrame
+
+IMPLEMENT_DYNCREATE(CMainFrame, CFrameWndEx)
+
+const int iMaxUserToolbars = 10;
+const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40;
+const UINT uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1;
+
+BEGIN_MESSAGE_MAP(CMainFrame, CFrameWndEx)
+ ON_WM_CREATE()
+ ON_COMMAND(ID_VIEW_CUSTOMIZE, &CMainFrame::OnViewCustomize)
+ ON_REGISTERED_MESSAGE(AFX_WM_CREATETOOLBAR, &CMainFrame::OnToolbarCreateNew)
+ ON_WM_SETTINGCHANGE()
+END_MESSAGE_MAP()
+
+static UINT indicators[] =
+{
+ ID_SEPARATOR, // status line indicator
+ ID_INDICATOR_CAPS,
+ ID_INDICATOR_NUM,
+ ID_INDICATOR_SCRL,
+};
+
+// CMainFrame construction/destruction
+
+CMainFrame::CMainFrame()
+{
+ // TODO: add member initialization code here
+}
+
+CMainFrame::~CMainFrame()
+{
+}
+
+int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
+{
+ if (CFrameWndEx::OnCreate(lpCreateStruct) == -1)
+ return -1;
+
+ BOOL bNameValid;
+
+ // set the visual manager used to draw all user interface elements
+ CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerVS2008));
+
+ if (!m_wndMenuBar.Create(this))
+ {
+ TRACE0("Failed to create menubar\n");
+ return -1; // fail to create
+ }
+
+ m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC | CBRS_TOOLTIPS | CBRS_FLYBY);
+
+ // prevent the menu bar from taking the focus on activation
+ CMFCPopupMenu::SetForceMenuFocus(FALSE);
+
+ if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
+ !m_wndToolBar.LoadToolBar(theApp.m_bHiColorIcons ? IDR_MAINFRAME_256 : IDR_MAINFRAME))
+ {
+ TRACE0("Failed to create toolbar\n");
+ return -1; // fail to create
+ }
+
+ CString strToolBarName;
+ bNameValid = strToolBarName.LoadString(IDS_TOOLBAR_STANDARD);
+ ASSERT(bNameValid);
+ m_wndToolBar.SetWindowText(strToolBarName);
+
+ CString strCustomize;
+ bNameValid = strCustomize.LoadString(IDS_TOOLBAR_CUSTOMIZE);
+ ASSERT(bNameValid);
+ m_wndToolBar.EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, strCustomize);
+
+ // Allow user-defined toolbars operations:
+ InitUserToolbars(NULL, uiFirstUserToolBarId, uiLastUserToolBarId);
+
+ if (!m_wndStatusBar.Create(this))
+ {
+ TRACE0("Failed to create status bar\n");
+ return -1; // fail to create
+ }
+ m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT));
+
+ // TODO: Delete these five lines if you don't want the toolbar and menubar to be dockable
+ m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
+ m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
+ EnableDocking(CBRS_ALIGN_ANY);
+ DockPane(&m_wndMenuBar);
+ DockPane(&m_wndToolBar);
+
+
+ // enable Visual Studio 2005 style docking window behavior
+ CDockingManager::SetDockingMode(DT_SMART);
+ // enable Visual Studio 2005 style docking window auto-hide behavior
+ EnableAutoHidePanes(CBRS_ALIGN_ANY);
+
+ // create docking windows
+ if (!CreateDockingWindows())
+ {
+ TRACE0("Failed to create docking windows\n");
+ return -1;
+ }
+
+ m_wndOutput.EnableDocking(CBRS_ALIGN_ANY);
+ DockPane(&m_wndOutput);
+
+
+ // Enable toolbar and docking window menu replacement
+ EnablePaneMenu(TRUE, ID_VIEW_CUSTOMIZE, strCustomize, ID_VIEW_TOOLBAR);
+
+ // enable quick (Alt+drag) toolbar customization
+ CMFCToolBar::EnableQuickCustomization();
+
+ if (CMFCToolBar::GetUserImages() == NULL)
+ {
+ // load user-defined toolbar images
+ if (m_UserImages.Load(_T(".\\UserImages.bmp")))
+ {
+ CMFCToolBar::SetUserImages(&m_UserImages);
+ }
+ }
+
+ // enable menu personalization (most-recently used commands)
+ // TODO: define your own basic commands, ensuring that each pulldown menu has at least one basic command.
+ CList<UINT, UINT> lstBasicCommands;
+
+ lstBasicCommands.AddTail(ID_FILE_NEW);
+ lstBasicCommands.AddTail(ID_FILE_OPEN);
+ lstBasicCommands.AddTail(ID_FILE_SAVE);
+ lstBasicCommands.AddTail(ID_FILE_PRINT);
+ lstBasicCommands.AddTail(ID_APP_EXIT);
+ lstBasicCommands.AddTail(ID_EDIT_CUT);
+ lstBasicCommands.AddTail(ID_EDIT_PASTE);
+ lstBasicCommands.AddTail(ID_EDIT_UNDO);
+ lstBasicCommands.AddTail(ID_APP_ABOUT);
+ lstBasicCommands.AddTail(ID_VIEW_STATUS_BAR);
+ lstBasicCommands.AddTail(ID_VIEW_TOOLBAR);
+
+ CMFCToolBar::SetBasicCommands(lstBasicCommands);
+
+ return 0;
+}
+
+BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
+{
+ if( !CFrameWndEx::PreCreateWindow(cs) )
+ return FALSE;
+ // TODO: Modify the Window class or styles here by modifying
+ // the CREATESTRUCT cs
+
+ return TRUE;
+}
+
+BOOL CMainFrame::CreateDockingWindows()
+{
+ BOOL bNameValid;
+ // Create output window
+ CString strOutputWnd;
+ bNameValid = strOutputWnd.LoadString(IDS_OUTPUT_WND);
+ ASSERT(bNameValid);
+ if (!m_wndOutput.Create(strOutputWnd, this, CRect(0, 0, 100, 100), TRUE, ID_VIEW_OUTPUTWND, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_BOTTOM | CBRS_FLOAT_MULTI))
+ {
+ TRACE0("Failed to create Output window\n");
+ return FALSE; // failed to create
+ }
+
+ SetDockingWindowIcons(theApp.m_bHiColorIcons);
+ return TRUE;
+}
+
+void CMainFrame::SetDockingWindowIcons(BOOL bHiColorIcons)
+{
+ HICON hOutputBarIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_OUTPUT_WND_HC : IDI_OUTPUT_WND), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
+ m_wndOutput.SetIcon(hOutputBarIcon, FALSE);
+
+}
+
+// CMainFrame diagnostics
+
+#ifdef _DEBUG
+void CMainFrame::AssertValid() const
+{
+ CFrameWndEx::AssertValid();
+}
+
+void CMainFrame::Dump(CDumpContext& dc) const
+{
+ CFrameWndEx::Dump(dc);
+}
+#endif //_DEBUG
+
+
+// CMainFrame message handlers
+
+void CMainFrame::OnViewCustomize()
+{
+ CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog(this, TRUE /* scan menus */);
+ pDlgCust->EnableUserDefinedToolbars();
+ pDlgCust->Create();
+}
+
+LRESULT CMainFrame::OnToolbarCreateNew(WPARAM wp,LPARAM lp)
+{
+ LRESULT lres = CFrameWndEx::OnToolbarCreateNew(wp,lp);
+ if (lres == 0)
+ {
+ return 0;
+ }
+
+ CMFCToolBar* pUserToolbar = (CMFCToolBar*)lres;
+ ASSERT_VALID(pUserToolbar);
+
+ BOOL bNameValid;
+ CString strCustomize;
+ bNameValid = strCustomize.LoadString(IDS_TOOLBAR_CUSTOMIZE);
+ ASSERT(bNameValid);
+
+ pUserToolbar->EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, strCustomize);
+ return lres;
+}
+
+BOOL CMainFrame::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle, CWnd* pParentWnd, CCreateContext* pContext)
+{
+ // base class does the real work
+
+ if (!CFrameWndEx::LoadFrame(nIDResource, dwDefaultStyle, pParentWnd, pContext))
+ {
+ return FALSE;
+ }
+
+
+ // enable customization button for all user toolbars
+ BOOL bNameValid;
+ CString strCustomize;
+ bNameValid = strCustomize.LoadString(IDS_TOOLBAR_CUSTOMIZE);
+ ASSERT(bNameValid);
+
+ for (int i = 0; i < iMaxUserToolbars; i ++)
+ {
+ CMFCToolBar* pUserToolbar = GetUserToolBarByIndex(i);
+ if (pUserToolbar != NULL)
+ {
+ pUserToolbar->EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, strCustomize);
+ }
+ }
+
+ return TRUE;
+}
+
+
+void CMainFrame::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
+{
+ CFrameWndEx::OnSettingChange(uFlags, lpszSection);
+ m_wndOutput.UpdateFonts();
+}
+
+//void CMainFrame::Log(LPCSTR message)
+//{
+/// m_wndOutput.Log(message);
+// }
+
+void CMainFrame::Log(LPCTSTR message)
+{
+ m_wndOutput.Log(message);
+}
\ No newline at end of file
Copied: trunk/Tests/svngui/MainFrm.h (from r2329, trunk/Tests/MainFrm.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/MainFrm.h Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/MainFrm.h)
@@ -0,0 +1,55 @@
+
+// MainFrm.h : interface of the CMainFrame class
+//
+
+#pragma once
+#include "OutputWnd.h"
+
+class CMainFrame : public CFrameWndEx
+{
+
+protected: // create from serialization only
+ CMainFrame();
+ DECLARE_DYNCREATE(CMainFrame)
+
+// Attributes
+public:
+
+// Operations
+public:
+
+// Overrides
+public:
+ virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
+ virtual BOOL LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, CWnd* pParentWnd = NULL, CCreateContext* pContext = NULL);
+
+// Implementation
+public:
+ virtual ~CMainFrame();
+#ifdef _DEBUG
+ virtual void AssertValid() const;
+ virtual void Dump(CDumpContext& dc) const;
+#endif
+ //void Log(LPCSTR message);
+ void Log(LPCTSTR message);
+
+protected: // control bar embedded members
+ CMFCMenuBar m_wndMenuBar;
+ CMFCToolBar m_wndToolBar;
+ CMFCStatusBar m_wndStatusBar;
+ CMFCToolBarImages m_UserImages;
+ COutputWnd m_wndOutput;
+
+// Generated message map functions
+protected:
+ afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
+ afx_msg void OnViewCustomize();
+ afx_msg LRESULT OnToolbarCreateNew(WPARAM wp, LPARAM lp);
+ afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
+ DECLARE_MESSAGE_MAP()
+
+ BOOL CreateDockingWindows();
+ void SetDockingWindowIcons(BOOL bHiColorIcons);
+};
+
+
Copied: trunk/Tests/svngui/OutputWnd.cpp (from r2329, trunk/Tests/OutputWnd.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/OutputWnd.cpp Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/OutputWnd.cpp)
@@ -0,0 +1,214 @@
+
+#include "stdafx.h"
+
+#include "OutputWnd.h"
+#include "Resource.h"
+#include "MainFrm.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// COutputBar
+
+COutputWnd::COutputWnd()
+{
+}
+
+COutputWnd::~COutputWnd()
+{
+}
+
+BEGIN_MESSAGE_MAP(COutputWnd, CDockablePane)
+ ON_WM_CREATE()
+ ON_WM_SIZE()
+END_MESSAGE_MAP()
+
+int COutputWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
+{
+ if (CDockablePane::OnCreate(lpCreateStruct) == -1)
+ return -1;
+
+ CRect rectDummy;
+ rectDummy.SetRectEmpty();
+
+ // Create tabs window:
+ if (!m_wndTabs.Create(CMFCTabCtrl::STYLE_FLAT, rectDummy, this, 1))
+ {
+ TRACE0("Failed to create output tab window\n");
+ return -1; // fail to create
+ }
+
+ // Create output panes:
+ const DWORD dwStyle = LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;
+
+ if (!m_wndOutputBuild.Create(dwStyle, rectDummy, &m_wndTabs, 2) ||
+ !m_wndOutputDebug.Create(dwStyle, rectDummy, &m_wndTabs, 3) ||
+ !m_wndOutputFind.Create(dwStyle, rectDummy, &m_wndTabs, 4))
+ {
+ TRACE0("Failed to create output windows\n");
+ return -1; // fail to create
+ }
+
+ UpdateFonts();
+
+ CString strTabName;
+ BOOL bNameValid;
+
+ // Attach list windows to tab:
+ bNameValid = strTabName.LoadString(IDS_BUILD_TAB);
+ ASSERT(bNameValid);
+ m_wndTabs.AddTab(&m_wndOutputBuild, strTabName, (UINT)0);
+ bNameValid = strTabName.LoadString(IDS_DEBUG_TAB);
+ ASSERT(bNameValid);
+ m_wndTabs.AddTab(&m_wndOutputDebug, strTabName, (UINT)1);
+ bNameValid = strTabName.LoadString(IDS_FIND_TAB);
+ ASSERT(bNameValid);
+ m_wndTabs.AddTab(&m_wndOutputFind, strTabName, (UINT)2);
+
+ // Fill output tabs with some dummy text (nothing magic here)
+ FillBuildWindow();
+ FillDebugWindow();
+ FillFindWindow();
+
+ return 0;
+}
+
+void COutputWnd::OnSize(UINT nType, int cx, int cy)
+{
+ CDockablePane::OnSize(nType, cx, cy);
+
+ // Tab control should cover the whole client area:
+ m_wndTabs.SetWindowPos (NULL, -1, -1, cx, cy, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
+}
+
+void COutputWnd::AdjustHorzScroll(CListBox& wndListBox)
+{
+ CClientDC dc(this);
+ CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontRegular);
+
+ int cxExtentMax = 0;
+
+ for (int i = 0; i < wndListBox.GetCount(); i ++)
+ {
+ CString strItem;
+ wndListBox.GetText(i, strItem);
+
+ cxExtentMax = max(cxExtentMax, dc.GetTextExtent(strItem).cx);
+ }
+
+ wndListBox.SetHorizontalExtent(cxExtentMax);
+ dc.SelectObject(pOldFont);
+}
+
+void COutputWnd::FillBuildWindow()
+{
+ m_wndOutputBuild.AddString(_T("Build output is being displayed here."));
+ m_wndOutputBuild.AddString(_T("The output is being displayed in rows of a list view"));
+ m_wndOutputBuild.AddString(_T("but you can change the way it is displayed as you wish..."));
+}
+
+void COutputWnd::FillDebugWindow()
+{
+ m_wndOutputDebug.AddString(_T("Debug output is being displayed here."));
+ m_wndOutputDebug.AddString(_T("The output is being displayed in rows of a list view"));
+ m_wndOutputDebug.AddString(_T("but you can change the way it is displayed as you wish..."));
+}
+
+void COutputWnd::FillFindWindow()
+{
+ m_wndOutputFind.AddString(_T("Find output is being displayed here."));
+ m_wndOutputFind.AddString(_T("The output is being displayed in rows of a list view"));
+ m_wndOutputFind.AddString(_T("but you can change the way it is displayed as you wish..."));
+}
+
+/*
+void COutputWnd::Log(LPCSTR message)
+{
+ TCHAR szMessage[1024];
+ MultiByteToWideChar(CP_UTF8, 0, message, -1, szMessage, sizeof(szMessage)/sizeof(TCHAR));
+ m_wndOutputDebug.AddString(szMessage);
+}
+*/
+
+void COutputWnd::Log(LPCTSTR message)
+{
+ m_wndOutputDebug.AddString(message);
+}
+
+
+void COutputWnd::UpdateFonts()
+{
+ m_wndOutputBuild.SetFont(&afxGlobalData.fontRegular);
+ m_wndOutputDebug.SetFont(&afxGlobalData.fontRegular);
+ m_wndOutputFind.SetFont(&afxGlobalData.fontRegular);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// COutputList1
+
+COutputList::COutputList()
+{
+}
+
+COutputList::~COutputList()
+{
+}
+
+BEGIN_MESSAGE_MAP(COutputList, CListBox)
+ ON_WM_CONTEXTMENU()
+ ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
+ ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
+ ON_COMMAND(ID_VIEW_OUTPUTWND, OnViewOutput)
+ ON_WM_WINDOWPOSCHANGING()
+END_MESSAGE_MAP()
+/////////////////////////////////////////////////////////////////////////////
+// COutputList message handlers
+
+void COutputList::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
+{
+ CMenu menu;
+ menu.LoadMenu(IDR_OUTPUT_POPUP);
+
+ CMenu* pSumMenu = menu.GetSubMenu(0);
+
+ if (AfxGetMainWnd()->IsKindOf(RUNTIME_CLASS(CMDIFrameWndEx)))
+ {
+ CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
+
+ if (!pPopupMenu->Create(this, point.x, point.y, (HMENU)pSumMenu->m_hMenu, FALSE, TRUE))
+ return;
+
+ ((CMDIFrameWndEx*)AfxGetMainWnd())->OnShowPopupMenu(pPopupMenu);
+ UpdateDialogControls(this, FALSE);
+ }
+
+ SetFocus();
+}
+
+void COutputList::OnEditCopy()
+{
+ MessageBox(_T("Copy output"));
+}
+
+void COutputList::OnEditClear()
+{
+ MessageBox(_T("Clear output"));
+}
+
+void COutputList::OnViewOutput()
+{
+ CDockablePane* pParentBar = DYNAMIC_DOWNCAST(CDockablePane, GetOwner());
+ CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWndEx, GetTopLevelFrame());
+
+ if (pMainFrame != NULL && pParentBar != NULL)
+ {
+ pMainFrame->SetFocus();
+ pMainFrame->ShowPane(pParentBar, FALSE, FALSE, FALSE);
+ pMainFrame->RecalcLayout();
+
+ }
+}
Copied: trunk/Tests/svngui/OutputWnd.h (from r2329, trunk/Tests/OutputWnd.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/OutputWnd.h Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/OutputWnd.h)
@@ -0,0 +1,62 @@
+
+#pragma once
+
+/////////////////////////////////////////////////////////////////////////////
+// COutputList window
+
+class COutputList : public CListBox
+{
+// Construction
+public:
+ COutputList();
+
+// Implementation
+public:
+ virtual ~COutputList();
+
+protected:
+ afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
+ afx_msg void OnEditCopy();
+ afx_msg void OnEditClear();
+ afx_msg void OnViewOutput();
+
+ DECLARE_MESSAGE_MAP()
+};
+
+class COutputWnd : public CDockablePane
+{
+// Construction
+public:
+ COutputWnd();
+
+ void UpdateFonts();
+
+// Attributes
+protected:
+ CMFCTabCtrl m_wndTabs;
+
+ COutputList m_wndOutputBuild;
+ COutputList m_wndOutputDebug;
+ COutputList m_wndOutputFind;
+
+protected:
+ void FillBuildWindow();
+ void FillDebugWindow();
+ void FillFindWindow();
+
+ void AdjustHorzScroll(CListBox& wndListBox);
+
+// Implementation
+public:
+ virtual ~COutputWnd();
+
+ // void Log(LPCSTR message);
+ void Log(LPCTSTR message);
+
+protected:
+ afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
+ afx_msg void OnSize(UINT nType, int cx, int cy);
+
+ DECLARE_MESSAGE_MAP()
+};
+
Copied: trunk/Tests/svngui/ReadMe.txt (from r2329, trunk/Tests/ReadMe.txt)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/ReadMe.txt Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/ReadMe.txt)
@@ -0,0 +1,136 @@
+================================================================================
+ MICROSOFT FOUNDATION CLASS LIBRARY : svngui Project Overview
+===============================================================================
+
+The application wizard has created this svngui application for
+you. This application not only demonstrates the basics of using the Microsoft
+Foundation Classes but is also a starting point for writing your application.
+
+This file contains a summary of what you will find in each of the files that
+make up your svngui application.
+
+svngui.vcxproj
+ This is the main project file for VC++ projects generated using an application wizard.
+ It contains information about the version of Visual C++ that generated the file, and
+ information about the platforms, configurations, and project features selected with the
+ application wizard.
+
+svngui.vcxproj.filters
+ This is the filters file for VC++ projects generated using an Application Wizard.
+ It contains information about the association between the files in your project
+ and the filters. This association is used in the IDE to show grouping of files with
+ similar extensions under a specific node (for e.g. ".cpp" files are associated with the
+ "Source Files" filter).
+
+svngui.h
+ This is the main header file for the application. It includes other
+ project specific headers (including Resource.h) and declares the
+ CsvnguiApp application class.
+
+svngui.cpp
+ This is the main application source file that contains the application
+ class CsvnguiApp.
+
+svngui.rc
+ This is a listing of all of the Microsoft Windows resources that the
+ program uses. It includes the icons, bitmaps, and cursors that are stored
+ in the RES subdirectory. This file can be directly edited in Microsoft
+ Visual C++. Your project resources are in 1033.
+
+res\svngui.ico
+ This is an icon file, which is used as the application's icon. This
+ icon is included by the main resource file svngui.rc.
+
+res\svngui.rc2
+ This file contains resources that are not edited by Microsoft
+ Visual C++. You should place all resources not editable by
+ the resource editor in this file.
+
+svngui.reg
+ This is an example .reg file that shows you the kind of registration
+ settings the framework will set for you. You can use this as a .reg
+ file to go along with your application or just delete it and rely
+ on the default RegisterShellFileTypes registration.
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+For the main frame window:
+ The project includes a standard MFC interface.
+
+MainFrm.h, MainFrm.cpp
+ These files contain the frame class CMainFrame, which is derived from
+ CFrameWnd and controls all SDI frame features.
+
+res\Toolbar.bmp
+ This bitmap file is used to create tiled images for the toolbar.
+ The initial toolbar and status bar are constructed in the CMainFrame
+ class. Edit this toolbar bitmap using the resource editor, and
+ update the IDR_MAINFRAME TOOLBAR array in svngui.rc to add
+ toolbar buttons.
+/////////////////////////////////////////////////////////////////////////////
+
+The application wizard creates one document type and one view:
+
+svnguiDoc.h, svnguiDoc.cpp - the document
+ These files contain your CsvnguiDoc class. Edit these files to
+ add your special document data and to implement file saving and loading
+ (via CsvnguiDoc::Serialize).
+ The Document will have the following strings:
+ File extension: svngui
+ File type ID: svngui.Document
+ Main frame caption: svngui
+ Doc type name: svngui
+ Filter name: svngui Files (*.svngui)
+ File new short name: svngui
+ File type long name: svngui.Document
+
+svnguiView.h, svnguiView.cpp - the view of the document
+ These files contain your CsvnguiView class.
+ CsvnguiView objects are used to view CsvnguiDoc objects.
+
+
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+Other Features:
+
+ActiveX Controls
+ The application includes support to use ActiveX controls.
+
+/////////////////////////////////////////////////////////////////////////////
+
+Other standard files:
+
+StdAfx.h, StdAfx.cpp
+ These files are used to build a precompiled header (PCH) file
+ named svngui.pch and a precompiled types file named StdAfx.obj.
+
+Resource.h
+ This is the standard header file, which defines new resource IDs.
+ Microsoft Visual C++ reads and updates this file.
+
+svngui.manifest
+ Application manifest files are used by Windows XP to describe an applications
+ dependency on specific versions of Side-by-Side assemblies. The loader uses this
+ information to load the appropriate assembly from the assembly cache or private
+ from the application. The Application manifest maybe included for redistribution
+ as an external .manifest file that is installed in the same folder as the application
+ executable or it may be included in the executable in the form of a resource.
+/////////////////////////////////////////////////////////////////////////////
+
+Other notes:
+
+The application wizard uses "TODO:" to indicate parts of the source code you
+should add to or customize.
+
+If your application uses MFC in a shared DLL, you will need
+to redistribute the MFC DLLs. If your application is in a language
+other than the operating system's locale, you will also have to
+redistribute the corresponding localized resources MFC100XXX.DLL.
+For more information on both of these topics, please see the section on
+redistributing Visual C++ applications in MSDN documentation.
+
+/////////////////////////////////////////////////////////////////////////////
Copied: trunk/Tests/svngui/Resource.h (from r2329, trunk/Tests/Resource.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/Resource.h Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/Resource.h)
@@ -0,0 +1,37 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by svngui.rc
+//
+#define IDD_ABOUTBOX 100
+#define IDP_OLE_INIT_FAILED 100
+#define IDR_POPUP_EDIT 119
+#define ID_STATUSBAR_PANE1 120
+#define ID_STATUSBAR_PANE2 121
+#define IDS_STATUS_PANE1 122
+#define IDS_STATUS_PANE2 123
+#define IDS_TOOLBAR_STANDARD 124
+#define IDS_TOOLBAR_CUSTOMIZE 125
+#define ID_VIEW_CUSTOMIZE 126
+#define IDR_MAINFRAME 128
+#define IDR_MAINFRAME_256 129
+#define IDR_svnguiTYPE 130
+#define ID_VIEW_OUTPUTWND 149
+#define IDS_OUTPUT_WND 157
+#define IDI_OUTPUT_WND 165
+#define IDI_OUTPUT_WND_HC 166
+#define IDR_OUTPUT_POPUP 182
+#define IDS_BUILD_TAB 300
+#define IDS_DEBUG_TAB 301
+#define IDS_FIND_TAB 302
+#define IDS_EDIT_MENU 306
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 310
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 310
+#define _APS_NEXT_COMMAND_VALUE 32771
+#endif
+#endif
Copied: trunk/Tests/svngui/SVNClient.cpp (from r2329, trunk/Tests/SVNClient.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/SVNClient.cpp Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/SVNClient.cpp)
@@ -0,0 +1,303 @@
+#include "StdAfx.h"
+
+#include "svngui.h"
+
+#include "SVNClient.h"
+#include "svn_client.h"
+#include "svn_pools.h"
+#include "svn_dso.h"
+#include "svn_utf.h"
+#include "svn_nls.h"
+#include "svn_fs.h"
+#include "svn_hash.h"
+
+#pragma comment(lib, "advapi32.lib")
+#pragma comment(lib, "shfolder.lib")
+#pragma comment(lib, "ws2_32.lib")
+#pragma comment(lib, "secur32.lib")
+#pragma comment(lib, "crypt32.lib")
+#pragma comment(lib, "version.lib")
+#pragma comment(lib, "psapi.lib")
+
+
+// Subversion libraries and dependencies
+#pragma comment(lib, "libapr-1.lib")
+#pragma comment(lib, "libaprutil-1.lib")
+#pragma comment(lib, "libapriconv-1.lib")
+#pragma comment(lib, "xml.lib")
+
+#pragma comment(lib, "libeay32.lib")
+#pragma comment(lib, "ssleay32.lib")
+
+#pragma comment(lib, "svn_client-1.lib")
+#pragma comment(lib, "svn_delta-1.lib")
+#pragma comment(lib, "svn_diff-1.lib")
+#pragma comment(lib, "svn_fs-1.lib")
+#pragma comment(lib, "libsvn_fs_fs-1.lib")
+#pragma comment(lib, "libsvn_fs_util-1.lib")
+#pragma comment(lib, "svn_ra-1.lib")
+#pragma comment(lib, "libsvn_ra_local-1.lib")
+#pragma comment(lib, "libsvn_ra_svn-1.lib")
+#pragma comment(lib, "svn_repos-1.lib")
+#pragma comment(lib, "svn_subr-1.lib")
+#pragma comment(lib, "svn_wc-1.lib")
+#pragma comment(lib, "libsvn_ra_serf-1.lib")
+#pragma comment(lib, "serf-1.lib")
+
+// These are contained by serf-1.lib
+// NOTE: zlibstatD.lib includes /DEFAULTLIB:"MSVCRT" disrectives
+// (instead of "MSVCRTD"), resulting in linker warnings.
+
+//#ifdef _DEBUG
+// #pragma comment(lib, "zlibstatD.lib")
+//#else
+// #pragma comment(lib, "zlibstat.lib")
+//#endif
+
+#define SVNTHROW(FUNC) \
+do { \
+ svn_error_t* _err = (FUNC); \
+ if( _err ) { \
+ throw CSVNError(_err); \
+ } \
+} while(false)
+
+
+CSVNError::CSVNError(svn_error_t* e) : svnError(e)
+{
+}
+
+CSVNError::~CSVNError()
+{
+ svn_error_clear(svnError);
+}
+
+CString CSVNError::msg()
+{
+ char buf[SVN_ERROR_MSG_MAX];
+
+ svn_err_best_message(svnError, buf, sizeof(buf));
+ return CString(buf);
+}
+
+CSVNClient::CSVNClient() : isInitialized(false)
+{
+}
+
+
+CSVNClient::~CSVNClient(void)
+{
+ POSITION p = svnFiles.GetHeadPosition();
+ while (p) {
+ delete svnFiles.GetNext(p);
+ }
+
+ apr_terminate();
+}
+
+void CSVNClient::initialize(void)
+{
+ apr_status_t status;
+ apr_pool_t *pool;
+ svn_error_t *err;
+ svn_client_ctx_t *ctx;
+
+ // TODO: subversion/libsvn_subr/cmdline.c contains a lot of esoteric stuff
+ // such as "setvbuf", input/output encodings, exception handlers, locale settings, etc.
+
+ /* Initialize the APR subsystem, and register an atexit() function
+ to Uninitialize that subsystem at program exit. */
+ status = apr_initialize();
+ if (status)
+ {
+ // this is not a real svn error, but coming from apr
+ throw CSVNError(svn_error_create(status, NULL, NULL));
+ }
+
+ /* DSO pool must be created before any other pools used by the
+ application so that pool cleanup doesn't unload DSOs too
+ early. See docstring of svn_dso_initialize2(). */
+ SVNTHROW(svn_dso_initialize2());
+
+ /* Create a pool for use by the UTF-8 routines. It will be cleaned
+ up by APR at exit time. */
+ pool = svn_pool_create(NULL);
+ svn_utf_initialize2(FALSE, pool);
+ SVNTHROW(svn_nls_init());
+
+ /* Create top-level memory pool. */
+ pool = svn_pool_create(NULL);
+
+ /* Initialize the FS library. */
+ SVNTHROW(svn_fs_initialize(pool));
+
+ /* Initialize the RA library. */
+ SVNTHROW(svn_ra_initialize(pool));
+
+ /* Make sure the ~/.subversion run-time config files exist */
+ SVNTHROW(svn_config_ensure (NULL, pool));
+
+
+ /* All clients need to fill out a client_ctx object. */
+ {
+ svn_config_t *cfg_config;
+
+ /* Initialize and allocate the client_ctx object. */
+ SVNTHROW(svn_client_create_context (&ctx, pool));
+
+ /* Load the run-time config file into a hash */
+ SVNTHROW(svn_config_get_config (&(ctx->config), NULL, pool));
+
+ cfg_config = (svn_config_t *)svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG);
+
+ /* Set the working copy administrative directory name. */
+ if (getenv ("SVN_ASP_DOT_NET_HACK"))
+ {
+ SVNTHROW(svn_wc_set_adm_dir ("_svn", pool));
+ }
+
+ /* Depending on what your client does, you'll want to read about
+ (and implement) the various callback function types below. */
+
+ /* A func (& context) which receives event signals during
+ checkouts, updates, commits, etc. */
+ /* ctx->notify_func2 = my_notification_func;
+ ctx->notify_baton2 = NULL; */
+
+ /* A func (& context) which can receive log messages */
+ /* ctx->log_msg_func3 = my_log_msg_receiver_func;
+ ctx->log_msg_baton3 = NULL; */
+
+ /* A func (& context) which checks whether the user cancelled */
+ /* ctx->cancel_func = my_cancel_checking_func;
+ ctx->cancel_baton = NULL; */
+
+ /* A func (& context) for network progress */
+ /* ctx->progress_func = my_progress_func;
+ ctx->progress_baton = NULL; */
+
+ /* A func (& context) for conflict resolution */
+ /* ctx->conflict_func2 = my_conflict_func;
+ ctx->conflict_baton2 = NULL; */
+
+ /* Make the client_ctx capable of authenticating users */
+ {
+ svn_auth_provider_object_t *provider;
+ apr_array_header_t *providers;
+
+ /* For caching encrypted username/password and client cert passwords - no prompting */
+ SVNTHROW(svn_auth_get_platform_specific_client_providers(&providers, cfg_config, pool));
+
+ /* For caching unencrypted username/password (also from config file) - prompting only to confirm storing creds in cleartext */
+ svn_auth_get_simple_provider2(&provider,svn_cmdline_auth_plaintext_prompt, NULL /* prompt baton */, pool);
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
+
+ /* For guessing and optionally saving username - no prompting */
+ svn_auth_get_username_provider(&provider, pool);
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
+
+ /* For validating server SSL certs from windows certificate store - no prompting (windows itself might show a dialog ?) */
+ SVNTHROW(svn_auth_get_platform_specific_provider(&provider, "windows", "ssl_server_trust", pool));
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
+
+ /* For validating and/or storing SSL server certs (in custom files) - no prompting */
+ svn_auth_get_ssl_server_trust_file_provider(&provider, pool);
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
+
+ /* For retrieving custom client certificate (file path) from server config - no prompting */
+ svn_auth_get_ssl_client_cert_file_provider(&provider, pool);
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
+
+ svn_auth_get_ssl_client_cert_pw_file_provider2(&provider, svn_cmdline_auth_plaintext_passphrase_prompt, NULL /* prompt baton */, pool);
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
+
+ svn_auth_get_simple_prompt_provider(&provider, svn_cmdline_auth_simple_prompt, NULL /* prompt baton */, 2 /* retry limit */, pool);
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
+
+ svn_auth_get_username_prompt_provider(&provider, svn_cmdline_auth_username_prompt, NULL /* prompt baton */, 2 /* retry limit */, pool);
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
+
+ svn_auth_get_ssl_server_trust_prompt_provider(&provider, svn_cmdline_auth_ssl_server_trust_prompt, NULL /* prompt baton */, pool);
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
+
+ svn_auth_get_ssl_client_cert_pw_prompt_provider(&provider, svn_cmdline_auth_ssl_client_cert_pw_prompt, NULL /* prompt baton */, 2 /* retry limit */, pool);
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
+
+ /* If configuration allows, add a provider for client-cert path
+ prompting, too. */
+ svn_boolean_t ssl_client_cert_file_prompt;
+ SVNTHROW(svn_config_get_bool(cfg_config, &ssl_client_cert_file_prompt,
+ SVN_CONFIG_SECTION_AUTH,
+ SVN_CONFIG_OPTION_SSL_CLIENT_CERT_FILE_PROMPT,
+ FALSE));
+ if (ssl_client_cert_file_prompt)
+ {
+ svn_auth_get_ssl_client_cert_prompt_provider(&provider, svn_cmdline_auth_ssl_client_cert_prompt, NULL /* prompt baton */, 2 /* retry limit */, pool);
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
+ }
+
+ /* Register the auth-providers into the context's auth_baton. */
+ svn_auth_open (&ctx->auth_baton, providers, pool);
+ }
+ }
+
+ isInitialized = true;
+}
+
+CSVNFile* CSVNClient::embraceFile(const CString & filePath)
+{
+ ASSERT(isInitialized);
+
+ CSVNFile* svnFile = new CSVNFile(filePath);
+ if (svnFile) {
+ svnFiles.AddTail(svnFile);
+ }
+ return svnFile;
+}
+
+void CSVNClient::forgetFile(CSVNFile* svnFile)
+{
+ ASSERT(isInitialized);
+
+ POSITION p = svnFiles.Find(svnFile);
+ while (p) {
+ delete p;
+ svnFiles.RemoveAt(p);
+ p = svnFiles.Find(svnFile);
+ }
+}
+
+CSVNFile::CSVNFile(const CString & filePath)
+{
+}
+
+CSVNFile::~CSVNFile()
+{
+}
+
+bool CSVNFile::isTracked()
+{
+ //TODO: implement this
+ return false;
+}
+
+bool CSVNFile::isOwned()
+{
+ //TODO: implement this
+ return false;
+}
+
+bool CSVNFile::isLatest()
+{
+ //TODO: implement this
+ return false;
+}
+
+void CSVNFile::takeOwnership()
+{
+}
+
+void CSVNFile::commit()
+{
+}
+
Copied: trunk/Tests/svngui/SVNClient.h (from r2329, trunk/Tests/SVNClient.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/SVNClient.h Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/SVNClient.h)
@@ -0,0 +1,65 @@
+#pragma once
+
+#include "svn_client.h"
+#include "svn_config.h"
+
+class CSVNClient;
+
+#define SVN_ERROR_MSG_MAX 256
+
+class CSVNError
+{
+ friend class CSVNClient;
+
+private:
+ CSVNError(svn_error_t* e);
+
+public:
+ virtual ~CSVNError();
+ CString msg();
+
+private:
+ svn_error_t *svnError;
+};
+
+
+class CSVNFile
+{
+ friend class CSVNClient;
+
+private:
+ CSVNFile(const CString & filePath);
+
+public:
+ virtual ~CSVNFile();
+
+ bool isTracked();
+ bool isOwned();
+ bool isLatest();
+
+ void takeOwnership();
+ void commit();
+};
+
+
+class CSVNClient
+{
+ friend class CSVNFile;
+
+public:
+ CSVNClient();
+ virtual ~CSVNClient();
+
+ void initialize();
+
+ CSVNFile* embraceFile(const CString & filePath);
+
+private:
+ void forgetFile(CSVNFile* svnFile);
+
+private:
+ CList<CSVNFile*, CSVNFile*> svnFiles;
+ bool isInitialized;
+
+};
+
Copied: trunk/Tests/svngui/UserImages.bmp (from r2329, trunk/Tests/UserImages.bmp)
==============================================================================
Binary file (source and/or target). No diff available.
Copied: trunk/Tests/svngui/stdafx.cpp (from r2329, trunk/Tests/stdafx.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/stdafx.cpp Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/stdafx.cpp)
@@ -0,0 +1,8 @@
+
+// stdafx.cpp : source file that includes just the standard includes
+// svngui.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+
Copied: trunk/Tests/svngui/stdafx.h (from r2329, trunk/Tests/stdafx.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/stdafx.h Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/stdafx.h)
@@ -0,0 +1,58 @@
+
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+
+#pragma once
+
+#ifndef _SECURE_ATL
+#define _SECURE_ATL 1
+#endif
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+#endif
+
+#include "targetver.h"
+
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
+
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#include <afxwin.h> // MFC core and standard components
+#include <afxext.h> // MFC extensions
+
+
+#include <afxdisp.h> // MFC Automation classes
+
+
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
+#endif
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <afxcontrolbars.h> // MFC support for ribbons and control bars
+
+
+
+
+
+
+
+
+
+#ifdef _UNICODE
+#if defined _M_IX86
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_X64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#else
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+#endif
+
+
Copied: trunk/Tests/svngui/svngui.cpp (from r2329, trunk/Tests/svngui.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/svngui.cpp Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/svngui.cpp)
@@ -0,0 +1,238 @@
+
+// svngui.cpp : Defines the class behaviors for the application.
+//
+
+#include "stdafx.h"
+#include "afxwinappex.h"
+#include "afxdialogex.h"
+
+#include "svngui.h"
+#include "MainFrm.h"
+
+#include "svnguiDoc.h"
+#include "svnguiView.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// CsvnguiApp
+
+BEGIN_MESSAGE_MAP(CsvnguiApp, CWinAppEx)
+ ON_COMMAND(ID_APP_ABOUT, &CsvnguiApp::OnAppAbout)
+ // Standard file based document commands
+ ON_COMMAND(ID_FILE_NEW, &CWinAppEx::OnFileNew)
+ ON_COMMAND(ID_FILE_OPEN, &CWinAppEx::OnFileOpen)
+END_MESSAGE_MAP()
+
+
+// CsvnguiApp construction
+
+CsvnguiApp::CsvnguiApp()
+{
+ m_bHiColorIcons = TRUE;
+
+ // support Restart Manager
+ m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
+#ifdef _MANAGED
+ // If the application is built using Common Language Runtime support (/clr):
+ // 1) This additional setting is needed for Restart Manager support to work properly.
+ // 2) In your project, you must add a reference to System.Windows.Forms in order to build.
+ System::Windows::Forms::Application::SetUnhandledExceptionMode(System::Windows::Forms::UnhandledExceptionMode::ThrowException);
+#endif
+
+ // TODO: replace application ID string below with unique ID string; recommended
+ // format for string is CompanyName.ProductName.SubProduct.VersionInformation
+ SetAppID(_T("svngui.AppID.NoVersion"));
+
+ // TODO: add construction code here,
+ // Place all significant initialization in InitInstance
+}
+
+// The one and only CsvnguiApp object
+
+CsvnguiApp theApp;
+
+
+// CsvnguiApp initialization
+
+BOOL CsvnguiApp::InitInstance()
+{
+ // InitCommonControlsEx() is required on Windows XP if an application
+ // manifest specifies use of ComCtl32.dll version 6 or later to enable
+ // visual styles. Otherwise, any window creation will fail.
+ INITCOMMONCONTROLSEX InitCtrls;
+ InitCtrls.dwSize = sizeof(InitCtrls);
+ // Set this to include all the common control classes you want to use
+ // in your application.
+ InitCtrls.dwICC = ICC_WIN95_CLASSES;
+ InitCommonControlsEx(&InitCtrls);
+
+ CWinAppEx::InitInstance();
+
+
+ // Initialize OLE libraries
+ if (!AfxOleInit())
+ {
+ AfxMessageBox(IDP_OLE_INIT_FAILED);
+ return FALSE;
+ }
+
+ AfxEnableControlContainer();
+
+ EnableTaskbarInteraction(FALSE);
+
+ // AfxInitRichEdit2() is required to use RichEdit control
+ // AfxInitRichEdit2();
+
+ // Standard initialization
+ // If you are not using these features and wish to reduce the size
+ // of your final executable, you should remove from the following
+ // the specific initialization routines you do not need
+ // Change the registry key under which our settings are stored
+ // TODO: You should modify this string to be something appropriate
+ // such as the name of your company or organization
+ SetRegistryKey(_T("Local AppWizard-Generated Applications"));
+ LoadStdProfileSettings(4); // Load standard INI file options (including MRU)
+
+
+ InitContextMenuManager();
+
+ InitKeyboardManager();
+
+ InitTooltipManager();
+ CMFCToolTipInfo ttParams;
+ ttParams.m_bVislManagerTheme = TRUE;
+ theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL,
+ RUNTIME_CLASS(CMFCToolTipCtrl), &ttParams);
+
+ // Register the application's document templates. Document templates
+ // serve as the connection between documents, frame windows and views
+ CSingleDocTemplate* pDocTemplate;
+ pDocTemplate = new CSingleDocTemplate(
+ IDR_MAINFRAME,
+ RUNTIME_CLASS(CsvnguiDoc),
+ RUNTIME_CLASS(CMainFrame), // main SDI frame window
+ RUNTIME_CLASS(CsvnguiView));
+ if (!pDocTemplate)
+ return FALSE;
+ AddDocTemplate(pDocTemplate);
+
+
+ // Parse command line for standard shell commands, DDE, file open
+ CCommandLineInfo cmdInfo;
+ ParseCommandLine(cmdInfo);
+
+ // Enable DDE Execute open
+ EnableShellOpen();
+ RegisterShellFileTypes(TRUE);
+
+
+ // Dispatch commands specified on the command line. Will return FALSE if
+ // app was launched with /RegServer, /Register, /Unregserver or /Unregister.
+ if (!ProcessShellCommand(cmdInfo))
+ return FALSE;
+
+ // The one and only window has been initialized, so show and update it
+ m_pMainWnd->ShowWindow(SW_SHOW);
+ m_pMainWnd->UpdateWindow();
+ // call DragAcceptFiles only if there's a suffix
+ // In an SDI app, this should occur after ProcessShellCommand
+ // Enable drag/drop open
+ m_pMainWnd->DragAcceptFiles();
+
+ try {
+ svn = new CSVNClient();
+ }
+ catch (const CSVNError& svnError) {
+ //Log(svnError->msg());
+ }
+
+ return TRUE;
+}
+
+int CsvnguiApp::ExitInstance()
+{
+ //TODO: handle additional resources you may have added
+ AfxOleTerm(FALSE);
+
+ delete svn;
+ apr_terminate();
+ return CWinAppEx::ExitInstance();
+}
+
+// void CsvnguiApp::Log(LPCSTR message)
+// {
+// ((CMainFrame*)m_pMainWnd)->Log(message);
+// }
+
+void CsvnguiApp::Log(LPCTSTR message)
+{
+ ((CMainFrame*)m_pMainWnd)->Log(message);
+}
+
+
+// CsvnguiApp message handlers
+
+
+// CAboutDlg dialog used for App About
+
+class CAboutDlg : public CDialogEx
+{
+public:
+ CAboutDlg();
+
+// Dialog Data
+ enum { IDD = IDD_ABOUTBOX };
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+
+// Implementation
+protected:
+ DECLARE_MESSAGE_MAP()
+};
+
+CAboutDlg::CAboutDlg() : CDialogEx(CAboutDlg::IDD)
+{
+}
+
+void CAboutDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialogEx::DoDataExchange(pDX);
+}
+
+BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
+END_MESSAGE_MAP()
+
+// App command to run the dialog
+void CsvnguiApp::OnAppAbout()
+{
+ CAboutDlg aboutDlg;
+ aboutDlg.DoModal();
+}
+
+// CsvnguiApp customization load/save methods
+
+void CsvnguiApp::PreLoadState()
+{
+ BOOL bNameValid;
+ CString strName;
+ bNameValid = strName.LoadString(IDS_EDIT_MENU);
+ ASSERT(bNameValid);
+ GetContextMenuManager()->AddMenu(strName, IDR_POPUP_EDIT);
+}
+
+void CsvnguiApp::LoadCustomState()
+{
+}
+
+void CsvnguiApp::SaveCustomState()
+{
+}
+
+// CsvnguiApp message handlers
+
+
+
Copied: trunk/Tests/svngui/svngui.h (from r2329, trunk/Tests/svngui.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/svngui.h Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/svngui.h)
@@ -0,0 +1,45 @@
+
+// svngui.h : main header file for the svngui application
+//
+#pragma once
+
+#ifndef __AFXWIN_H__
+ #error "include 'stdafx.h' before including this file for PCH"
+#endif
+
+#include "resource.h" // main symbols
+
+#include "SVNClient.h"
+
+
+// CsvnguiApp:
+// See svngui.cpp for the implementation of this class
+//
+
+class CsvnguiApp : public CWinAppEx
+{
+public:
+ CsvnguiApp();
+
+
+// Overrides
+public:
+ virtual BOOL InitInstance();
+ virtual int ExitInstance();
+
+ // void Log(LPCSTR message);
+ void Log(LPCTSTR message);
+
+// Implementation
+ BOOL m_bHiColorIcons;
+ CSVNClient *svn;
+
+ virtual void PreLoadState();
+ virtual void LoadCustomState();
+ virtual void SaveCustomState();
+
+ afx_msg void OnAppAbout();
+ DECLARE_MESSAGE_MAP()
+};
+
+extern CsvnguiApp theApp;
Copied: trunk/Tests/svngui/svngui.rc (from r2329, trunk/Tests/svngui.rc)
==============================================================================
Binary file (source and/or target). No diff available.
Copied: trunk/Tests/svngui/svngui.reg (from r2329, trunk/Tests/svngui.reg)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/svngui.reg Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/svngui.reg)
@@ -0,0 +1,15 @@
+REGEDIT
+; This .REG file may be used by your SETUP program.
+; If a SETUP program is not available, the entries below will be
+; registered in your InitInstance automatically with a call to
+; CWinApp::RegisterShellFileTypes and COleObjectFactory::UpdateRegistryAll.
+
+HKEY_CLASSES_ROOT\.svngui = svngui.Document
+HKEY_CLASSES_ROOT\svngui.Document\shell\open\command = svngui.EXE %1
+HKEY_CLASSES_ROOT\svngui.Document\shell\open\ddeexec = [open("%1")]
+HKEY_CLASSES_ROOT\svngui.Document\shell\open\ddeexec\application = svngui
+ ; note: the application is optional
+ ; (it defaults to the app name in "command")
+
+HKEY_CLASSES_ROOT\svngui.Document = svngui.Document
+
Copied: trunk/Tests/svngui/svngui.sln (from r2329, trunk/Tests/svngui.sln)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/svngui.sln Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/svngui.sln)
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "svngui", "svngui.vcxproj", "{9F253C73-B7DB-45D8-A8AE-46F57A1C5FA1}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9F253C73-B7DB-45D8-A8AE-46F57A1C5FA1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9F253C73-B7DB-45D8-A8AE-46F57A1C5FA1}.Debug|Win32.Build.0 = Debug|Win32
+ {9F253C73-B7DB-45D8-A8AE-46F57A1C5FA1}.Release|Win32.ActiveCfg = Release|Win32
+ {9F253C73-B7DB-45D8-A8AE-46F57A1C5FA1}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Copied: trunk/Tests/svngui/svngui.vcxproj (from r2329, trunk/Tests/svngui.vcxproj)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/svngui.vcxproj Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/svngui.vcxproj)
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9F253C73-B7DB-45D8-A8AE-46F57A1C5FA1}</ProjectGuid>
+ <RootNamespace>svngui</RootNamespace>
+ <Keyword>MFCProj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <UseOfMfc>Dynamic</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <UseOfMfc>Dynamic</UseOfMfc>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <IncludePath>$(SolutionDir)\include\apr;$(SolutionDir)\include\apr-util;$(SolutionDir)\include\apr-iconv;$(SolutionDir)\include\subversion;$(IncludePath)</IncludePath>
+ <LibraryPath>$(SolutionDir)\lib;$(SolutionDir)\lib\subv_$(Configuration);$(LibraryPath)</LibraryPath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <IncludePath>$(SolutionDir)\include\apr;$(SolutionDir)\include\apr-util;$(SolutionDir)\include\apr-iconv;$(SolutionDir)\include\subversion;$(IncludePath)</IncludePath>
+ <LibraryPath>$(SolutionDir)\lib;$(SolutionDir)\lib\subv_$(Configuration);$(LibraryPath)</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ <Midl>
+ <MkTypLibCompatible>false</MkTypLibCompatible>
+ <ValidateAllParameters>true</ValidateAllParameters>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </Midl>
+ <ResourceCompile>
+ <Culture>0x0409</Culture>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <CustomBuildStep>
+ <Command>xcopy /Y/D/F ..\lib\libeay32.dll "$(OutDir)" && ^
+xcopy /Y/D/F ..\lib\ssleay32.dll "$(OutDir)" && ^
+xcopy /Y/D/F ..\lib\subv_$(ConfigurationName)\libapr-1.dll "$(OutDir)" && ^
+xcopy /Y/D/F ..\lib\subv_$(ConfigurationName)\libaprutil-1.dll "$(OutDir)" && ^
+xcopy /Y/D/F ..\lib\subv_$(ConfigurationName)\libapriconv-1.dll "$(OutDir)" && ^
+</Command>
+ </CustomBuildStep>
+ <CustomBuildStep>
+ <Message>Copying dependency DLLs...</Message>
+ </CustomBuildStep>
+ <CustomBuildStep>
+ <Outputs>$(OutDir)\libeay32.dll</Outputs>
+ </CustomBuildStep>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <Midl>
+ <MkTypLibCompatible>false</MkTypLibCompatible>
+ <ValidateAllParameters>true</ValidateAllParameters>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </Midl>
+ <ResourceCompile>
+ <Culture>0x0409</Culture>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <CustomBuildStep>
+ <Command>xcopy /Y/D/F ..\lib\libeay32.dll "$(OutDir)" && ^
+xcopy /Y/D/F ..\lib\ssleay32.dll "$(OutDir)" && ^
+xcopy /Y/D/F ..\lib\subv_$(ConfigurationName)\libapr-1.dll "$(OutDir)" && ^
+xcopy /Y/D/F ..\lib\subv_$(ConfigurationName)\libaprutil-1.dll "$(OutDir)" && ^
+xcopy /Y/D/F ..\lib\subv_$(ConfigurationName)\libapriconv-1.dll "$(OutDir)" && ^
+</Command>
+ </CustomBuildStep>
+ <CustomBuildStep>
+ <Message>Copying dependency DLLs...</Message>
+ </CustomBuildStep>
+ <CustomBuildStep>
+ <Outputs>$(OutDir)\libeay32.dll</Outputs>
+ </CustomBuildStep>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <None Include="ReadMe.txt" />
+ <None Include="res\output_wnd.ico" />
+ <None Include="res\output_wnd_hc.ico" />
+ <None Include="res\svngui.ico" />
+ <None Include="res\svngui.rc2" />
+ <None Include="res\svnguiDoc.ico" />
+ <None Include="res\Toolbar.bmp" />
+ <None Include="res\Toolbar256.bmp" />
+ <None Include="svngui.reg" />
+ <None Include="UserImages.bmp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="MainFrm.h" />
+ <ClInclude Include="OutputWnd.h" />
+ <ClInclude Include="Resource.h" />
+ <ClInclude Include="stdafx.h" />
+ <ClInclude Include="SVNClient.h" />
+ <ClInclude Include="svngui.h" />
+ <ClInclude Include="svnguiDoc.h" />
+ <ClInclude Include="svnguiView.h" />
+ <ClInclude Include="targetver.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="MainFrm.cpp" />
+ <ClCompile Include="OutputWnd.cpp" />
+ <ClCompile Include="stdafx.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="SVNClient.cpp" />
+ <ClCompile Include="svngui.cpp" />
+ <ClCompile Include="svnguiDoc.cpp" />
+ <ClCompile Include="svnguiView.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="svngui.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
Copied: trunk/Tests/svngui/svngui.vcxproj.filters (from r2329, trunk/Tests/svngui.vcxproj.filters)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/svngui.vcxproj.filters Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/svngui.vcxproj.filters)
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="ReadMe.txt" />
+ <None Include="svngui.reg" />
+ <None Include="res\output_wnd.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\output_wnd_hc.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="UserImages.bmp">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\svngui.rc2">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\svnguiDoc.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\svngui.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\Toolbar.bmp">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\Toolbar256.bmp">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="svngui.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="stdafx.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="targetver.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="svnguiDoc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="svnguiView.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="OutputWnd.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="SVNClient.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="MainFrm.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="svngui.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="svnguiDoc.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="svnguiView.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="OutputWnd.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="SVNClient.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="MainFrm.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="svngui.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
Copied: trunk/Tests/svngui/svnguiDoc.cpp (from r2329, trunk/Tests/svnguiDoc.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/svnguiDoc.cpp Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/svnguiDoc.cpp)
@@ -0,0 +1,154 @@
+
+// svnguiDoc.cpp : implementation of the CsvnguiDoc class
+//
+
+#include "stdafx.h"
+// SHARED_HANDLERS can be defined in an ATL project implementing preview, thumbnail
+// and search filter handlers and allows sharing of document code with that project.
+#ifndef SHARED_HANDLERS
+#include "svngui.h"
+#endif
+
+#include "svnguiDoc.h"
+
+#include <propkey.h>
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+// CsvnguiDoc
+
+IMPLEMENT_DYNCREATE(CsvnguiDoc, CDocument)
+
+BEGIN_MESSAGE_MAP(CsvnguiDoc, CDocument)
+END_MESSAGE_MAP()
+
+
+// CsvnguiDoc construction/destruction
+
+CsvnguiDoc::CsvnguiDoc()
+{
+ // TODO: add one-time construction code here
+
+}
+
+CsvnguiDoc::~CsvnguiDoc()
+{
+}
+
+BOOL CsvnguiDoc::OnNewDocument()
+{
+ if (!CDocument::OnNewDocument())
+ return FALSE;
+ if (!m_viewList.IsEmpty())
+ {
+ reinterpret_cast<CEditView*>(m_viewList.GetHead())->SetWindowText(NULL);
+ }
+
+ // TODO: add reinitialization code here
+ // (SDI documents will reuse this document)
+
+ return TRUE;
+}
+
+
+
+
+// CsvnguiDoc serialization
+
+void CsvnguiDoc::Serialize(CArchive& ar)
+{
+ // CEditView contains an edit control which handles all serialization
+ if (!m_viewList.IsEmpty())
+ {
+ reinterpret_cast<CEditView*>(m_viewList.GetHead())->SerializeRaw(ar);
+ }
+#ifdef SHARED_HANDLERS
+
+ if (m_viewList.IsEmpty() && ar.IsLoading())
+ {
+ CFile* pFile = ar.GetFile();
+ pFile->Seek(0, FILE_BEGIN);
+ ULONGLONG nFileSizeBytes = pFile->GetLength();
+ ULONGLONG nFileSizeChars = nFileSizeBytes/sizeof(TCHAR);
+ LPTSTR lpszText = (LPTSTR)malloc(((size_t)nFileSizeChars + 1) * sizeof(TCHAR));
+ if (lpszText != NULL)
+ {
+ ar.Read(lpszText, (UINT)nFileSizeBytes);
+ lpszText[nFileSizeChars] = '\0';
+ m_strThumbnailContent = lpszText;
+ m_strSearchContent = lpszText;
+ }
+ }
+#endif
+}
+
+#ifdef SHARED_HANDLERS
+
+// Support for thumbnails
+void CsvnguiDoc::OnDrawThumbnail(CDC& dc, LPRECT lprcBounds)
+{
+ // Modify this code to draw the document's data
+ dc.FillSolidRect(lprcBounds, RGB(255, 255, 255));
+
+ LOGFONT lf;
+
+ CFont* pDefaultGUIFont = CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT));
+ pDefaultGUIFont->GetLogFont(&lf);
+ lf.lfHeight = 36;
+
+ CFont fontDraw;
+ fontDraw.CreateFontIndirect(&lf);
+
+ CFont* pOldFont = dc.SelectObject(&fontDraw);
+ dc.DrawText(m_strThumbnailContent, lprcBounds, DT_CENTER | DT_WORDBREAK);
+ dc.SelectObject(pOldFont);
+}
+
+// Support for Search Handlers
+void CsvnguiDoc::InitializeSearchContent()
+{
+ // Set search contents from document's data.
+ // The content parts should be separated by ";"
+
+ // Use the entire text file content as the search content.
+ SetSearchContent(m_strSearchContent);
+}
+
+void CsvnguiDoc::SetSearchContent(const CString& value)
+{
+ if (value.IsEmpty())
+ {
+ RemoveChunk(PKEY_Search_Contents.fmtid, PKEY_Search_Contents.pid);
+ }
+ else
+ {
+ CMFCFilterChunkValueImpl *pChunk = NULL;
+ ATLTRY(pChunk = new CMFCFilterChunkValueImpl);
+ if (pChunk != NULL)
+ {
+ pChunk->SetTextValue(PKEY_Search_Contents, value, CHUNK_TEXT);
+ SetChunkValue(pChunk);
+ }
+ }
+}
+
+#endif // SHARED_HANDLERS
+
+// CsvnguiDoc diagnostics
+
+#ifdef _DEBUG
+void CsvnguiDoc::AssertValid() const
+{
+ CDocument::AssertValid();
+}
+
+void CsvnguiDoc::Dump(CDumpContext& dc) const
+{
+ CDocument::Dump(dc);
+}
+#endif //_DEBUG
+
+
+// CsvnguiDoc commands
Copied: trunk/Tests/svngui/svnguiDoc.h (from r2329, trunk/Tests/svnguiDoc.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/svnguiDoc.h Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/svnguiDoc.h)
@@ -0,0 +1,54 @@
+
+// svnguiDoc.h : interface of the CsvnguiDoc class
+//
+
+
+#pragma once
+
+
+class CsvnguiDoc : public CDocument
+{
+protected: // create from serialization only
+ CsvnguiDoc();
+ DECLARE_DYNCREATE(CsvnguiDoc)
+
+// Attributes
+public:
+
+// Operations
+public:
+
+// Overrides
+public:
+ virtual BOOL OnNewDocument();
+ virtual void Serialize(CArchive& ar);
+#ifdef SHARED_HANDLERS
+ virtual void InitializeSearchContent();
+ virtual void OnDrawThumbnail(CDC& dc, LPRECT lprcBounds);
+#endif // SHARED_HANDLERS
+
+// Implementation
+public:
+ virtual ~CsvnguiDoc();
+#ifdef _DEBUG
+ virtual void AssertValid() const;
+ virtual void Dump(CDumpContext& dc) const;
+#endif
+
+protected:
+
+// Generated message map functions
+protected:
+ DECLARE_MESSAGE_MAP()
+
+#ifdef SHARED_HANDLERS
+ // Helper function that sets search content for a Search Handler
+ void SetSearchContent(const CString& value);
+#endif // SHARED_HANDLERS
+
+#ifdef SHARED_HANDLERS
+private:
+ CString m_strSearchContent;
+ CString m_strThumbnailContent;
+#endif // SHARED_HANDLERS
+};
Copied: trunk/Tests/svngui/svnguiView.cpp (from r2329, trunk/Tests/svnguiView.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/svnguiView.cpp Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/svnguiView.cpp)
@@ -0,0 +1,87 @@
+
+// svnguiView.cpp : implementation of the CsvnguiView class
+//
+
+#include "stdafx.h"
+// SHARED_HANDLERS can be defined in an ATL project implementing preview, thumbnail
+// and search filter handlers and allows sharing of document code with that project.
+#ifndef SHARED_HANDLERS
+#include "svngui.h"
+#endif
+
+#include "svnguiDoc.h"
+#include "svnguiView.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// CsvnguiView
+
+IMPLEMENT_DYNCREATE(CsvnguiView, CEditView)
+
+BEGIN_MESSAGE_MAP(CsvnguiView, CEditView)
+ ON_WM_CONTEXTMENU()
+ ON_WM_RBUTTONUP()
+END_MESSAGE_MAP()
+
+// CsvnguiView construction/destruction
+
+CsvnguiView::CsvnguiView()
+{
+ // TODO: add construction code here
+
+}
+
+CsvnguiView::~CsvnguiView()
+{
+}
+
+BOOL CsvnguiView::PreCreateWindow(CREATESTRUCT& cs)
+{
+ // TODO: Modify the Window class or styles here by modifying
+ // the CREATESTRUCT cs
+
+ BOOL bPreCreated = CEditView::PreCreateWindow(cs);
+ cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping
+
+ return bPreCreated;
+}
+
+void CsvnguiView::OnRButtonUp(UINT /* nFlags */, CPoint point)
+{
+ ClientToScreen(&point);
+ OnContextMenu(this, point);
+}
+
+void CsvnguiView::OnContextMenu(CWnd* /* pWnd */, CPoint point)
+{
+#ifndef SHARED_HANDLERS
+ theApp.GetContextMenuManager()->ShowPopupMenu(IDR_POPUP_EDIT, point.x, point.y, this, TRUE);
+#endif
+}
+
+
+// CsvnguiView diagnostics
+
+#ifdef _DEBUG
+void CsvnguiView::AssertValid() const
+{
+ CEditView::AssertValid();
+}
+
+void CsvnguiView::Dump(CDumpContext& dc) const
+{
+ CEditView::Dump(dc);
+}
+
+CsvnguiDoc* CsvnguiView::GetDocument() const // non-debug version is inline
+{
+ ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CsvnguiDoc)));
+ return (CsvnguiDoc*)m_pDocument;
+}
+#endif //_DEBUG
+
+
+// CsvnguiView message handlers
Copied: trunk/Tests/svngui/svnguiView.h (from r2329, trunk/Tests/svnguiView.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/svnguiView.h Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/svnguiView.h)
@@ -0,0 +1,48 @@
+
+// svnguiView.h : interface of the CsvnguiView class
+//
+
+#pragma once
+
+
+class CsvnguiView : public CEditView
+{
+protected: // create from serialization only
+ CsvnguiView();
+ DECLARE_DYNCREATE(CsvnguiView)
+
+// Attributes
+public:
+ CsvnguiDoc* GetDocument() const;
+
+// Operations
+public:
+
+// Overrides
+public:
+ virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
+protected:
+
+// Implementation
+public:
+ virtual ~CsvnguiView();
+#ifdef _DEBUG
+ virtual void AssertValid() const;
+ virtual void Dump(CDumpContext& dc) const;
+#endif
+
+protected:
+
+// Generated message map functions
+protected:
+ afx_msg void OnFilePrintPreview();
+ afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
+ afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
+ DECLARE_MESSAGE_MAP()
+};
+
+#ifndef _DEBUG // debug version in svnguiView.cpp
+inline CsvnguiDoc* CsvnguiView::GetDocument() const
+ { return reinterpret_cast<CsvnguiDoc*>(m_pDocument); }
+#endif
+
Copied: trunk/Tests/svngui/targetver.h (from r2329, trunk/Tests/targetver.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/svngui/targetver.h Tue Sep 3 07:43:35 2013 (r2330, copy of r2329, trunk/Tests/targetver.h)
@@ -0,0 +1,8 @@
+#pragma once
+
+// Including SDKDDKVer.h defines the highest available Windows platform.
+
+// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
+// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
+
+#include <SDKDDKVer.h>
More information about the gme-commit
mailing list