-
Notifications
You must be signed in to change notification settings - Fork 12
/
MainFrm.h
138 lines (120 loc) · 4.23 KB
/
MainFrm.h
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAINFRM_H__5C41C8D3_D26B_4223_A02B_81991C75FCD7__INCLUDED_)
#define AFX_MAINFRM_H__5C41C8D3_D26B_4223_A02B_81991C75FCD7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TabView.h"
#include "TabDef.h"
#include "itemlistview.h"
#include "indexTreeview.h"
#include "contentlistview.h"
#include "CategoryTree.h"
#include "FlashGetToolBar.h"
class CFlashGetTray;
#define WM_USER_TREECTRL_SEL_CHANGED WM_USER + 102
#define WM_USER_DOWNLOAD_THREAD_REFRESH_MAIN_FRAME WM_USER + 103
#define WM_USER_FLASH_GET_TRAY WM_USER + 104
#define WM_USER_REFRESH_SPEED WM_USER + 105
class CMainFrame : public CFrameWnd
{
protected: // create from serialization only
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
virtual BOOL OnDynamicTipText( UINT id, NMHDR * pNMHDR, LRESULT * pResult );
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected: // control bar embedded members
CStatusBar m_wndStatusBar;
CFlashGetToolBar m_wndToolBar;
// CReBar m_wndReBar;
// CDialogBar m_wndDlgBar;
public:
UINT ReloadPopMenu(CMenu *pPopMenu);
void ReloadResource();
void RefreshViews();
BOOL IsCanMove(HTREEITEM hMovedItem, HTREEITEM hMoveToItem);
CTabView m_wndIndexBar;
CItemListView *m_pItemListView;
CIndexTreeView *m_pIndexTreeView;
CContentListView *m_pContentListView;
CCategoryTree *m_pMainCategoryTree;
virtual void GetMessageString( UINT nID, CString& rMessage ) const;
// Generated message map functions
protected:
CFlashGetTray * m_pFlashGetTray;
CImageList m_ItemIconList;
CSplitterWnd m_wndSplitterLower;
CSplitterWnd m_wndSplitter;
#define MAX_SUPPORTTED_LANGUAGES 100
char *m_szarLanguageINIs[MAX_SUPPORTTED_LANGUAGES][2];
int m_iCountOfLanguages;
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnClose();
afx_msg void OnCategoryNew();
afx_msg void OnCategoryProp();
afx_msg void OnCategoryMoveTo();
afx_msg void OnUpdateCategoryMoveTo(CCmdUI* pCmdUI);
afx_msg void OnCategoryContextProp();
afx_msg void OnCategoryContextMoveTo();
afx_msg void OnCategoryContextNew();
afx_msg void OnUpdateCategoryContextMoveTo(CCmdUI* pCmdUI);
afx_msg void OnUpdateCategoryContextDelete(CCmdUI* pCmdUI);
afx_msg void OnCategoryContextDelete();
afx_msg void OnCategoryDelete();
afx_msg void OnUpdateCategoryDelete(CCmdUI* pCmdUI);
afx_msg void OnCategoryContextOpen();
afx_msg void OnToolsOptions();
afx_msg void OnUpdateCategoryNew(CCmdUI* pCmdUI);
afx_msg void OnUpdateCategoryProp(CCmdUI* pCmdUI);
afx_msg void OnUpdateJobMenu(CCmdUI* pCmdUI);
afx_msg void OnToolsDefaultDownloadProperties();
afx_msg void OnJobNewDownload();
afx_msg void OnJobAddBatchDownload();
afx_msg void OnJobProperties();
afx_msg void OnJobStart();
afx_msg void OnDownloadRefreshMainFrame(WPARAM wParam, LPARAM lParam);
afx_msg void OnSize(UINT nType, int cx, int cy);
// afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnUpdateSpeed(WPARAM wParam, LPARAM lParam);
afx_msg void OnJobPause();
afx_msg void OnJobMoveUp();
afx_msg void OnJobMoveDown();
afx_msg void OnViewLanguage(UINT nID);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void prv_UpdateMenu();
void prv_UpdateDownloadCategory();
void prv_DeleteCategory();
BOOL prv_IsCanDeleteCategory();
BOOL prv_IsCanMoveCategory();
void prv_ShowCategoryDlg(int iDlgType);
CImageList m_enImageList, m_disImageList;
BOOL prv_CreateTabView();
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAINFRM_H__5C41C8D3_D26B_4223_A02B_81991C75FCD7__INCLUDED_)