-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainFrmHndr.cpp
105 lines (87 loc) · 2.35 KB
/
MainFrmHndr.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#include "stdafx.h"
#include "cedtHeader.h"
void CMainFrame::OnViewFileTab()
{
BOOL bVisible = m_wndFileTab.IsWindowVisible();
ShowControlBar( & m_wndFileTab, ! bVisible, FALSE );
}
void CMainFrame::OnUpdateViewFileTab(CCmdUI* pCmdUI)
{
BOOL bVisible = m_wndFileTab.IsWindowVisible();
pCmdUI->SetCheck( bVisible );
}
void CMainFrame::OnViewDirectory()
{
ToggleFileWindowCategory( FILE_WINDOW_DIRECTORY );
}
void CMainFrame::OnUpdateViewDirectory(CCmdUI* pCmdUI)
{
BOOL bVisible = m_wndFileWindow.IsWindowVisible();
INT nCategory = m_wndFileWindow.GetActiveCategory();
pCmdUI->SetCheck( bVisible && (nCategory == FILE_WINDOW_DIRECTORY) );
}
void CMainFrame::OnViewProject()
{
ToggleFileWindowCategory( FILE_WINDOW_PROJECT );
}
void CMainFrame::OnUpdateViewProject(CCmdUI* pCmdUI)
{
BOOL bVisible = m_wndFileWindow.IsWindowVisible();
INT nCategory = m_wndFileWindow.GetActiveCategory();
pCmdUI->SetCheck( bVisible && (nCategory == FILE_WINDOW_PROJECT) );
}
void CMainFrame::OnViewOutput()
{
BOOL bVisible = m_wndOutputWindow.IsWindowVisible();
ShowControlBar( & m_wndOutputWindow, ! bVisible, FALSE );
}
void CMainFrame::OnUpdateViewOutput(CCmdUI* pCmdUI)
{
BOOL bVisible = m_wndOutputWindow.IsWindowVisible();
pCmdUI->SetCheck( bVisible );
}
void CMainFrame::OnWindowLastVisited()
{
m_bSwitchingChildFrame = TRUE;
ActivateChildFrameInZOrder(1);
m_bSwitchingChildFrame = FALSE;
BringChildFrameToTop(NULL);
}
void CMainFrame::OnWindowNext()
{
m_bSwitchingChildFrame = TRUE;
ActivateNextChildFrame();
m_bSwitchingChildFrame = FALSE;
BringChildFrameToTop(NULL);
}
void CMainFrame::OnWindowPrev()
{
m_bSwitchingChildFrame = TRUE;
ActivatePrevChildFrame();
m_bSwitchingChildFrame = FALSE;
BringChildFrameToTop(NULL);
}
void CMainFrame::OnFileWindowHide()
{
ShowControlBar( & m_wndFileWindow, FALSE, FALSE );
}
void CMainFrame::OnFileWindowSync()
{
CCedtDoc * pDoc = (CCedtDoc *)MDIGetActiveDocument(); if( ! pDoc ) return;
if( ! pDoc->IsRemoteFile() && ! pDoc->IsNewFileNotSaved() ) {
CString szPathName = pDoc->GetPathName();
m_wndFileWindow.SetBrowsingDirectory( szPathName );
}
}
void CMainFrame::OnOutputWindowHide()
{
ShowControlBar( & m_wndOutputWindow, FALSE, FALSE );
}
void CMainFrame::OnOutputWindowCopy()
{
m_wndOutputWindow.CopyAllTheContents();
}
void CMainFrame::OnOutputWindowClear()
{
m_wndOutputWindow.ClearAllTheContents();
}