summaryrefslogtreecommitdiffstats
path: root/src/mainframe.h
blob: a8a9fe207f5aae99e1874f737569d63196689aaa (plain)
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
//******************************************************************************
// MIDIシーケンサーソフト『世界樹』
// MDI親フレームウィンドウクラス
// (C)2002-2013 おーぷんMIDIぷろじぇくと/くず
//******************************************************************************

/* This library is free software; you can redistribute it and/or */
/* modify it under the terms of the GNU Lesser General Public */
/* License as published by the Free Software Foundation; either */
/* version 2.1 of the License, or (at your option) any later version. */

/* This library is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU */
/* Lesser General Public License for more details. */

/* You should have received a copy of the GNU Lesser General Public */
/* License along with this library; if not, write to the Free Software */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

#ifndef _MAINFRAME_H_
#define _MAINFRAME_H_

class CMainFrame : public CMDIFrameWnd {
	DECLARE_DYNAMIC (CMainFrame)

	//--------------------------------------------------------------------------
	// メンバ変数
	//--------------------------------------------------------------------------
public:
	CString     m_strWndClass;          // ウィンドウクラス名
	CString     m_strTempFileName;      // 一時的なファイル名格納場所
		
	//--------------------------------------------------------------------------
	// ツールバーとステータスバーとその内部のウィンドウ
	//--------------------------------------------------------------------------
public:  
	CSekaijuStatusBar  m_wndStatusBar;  // ステータスバー
	CSekaijuToolBar m_wndToolBar1;      // ツールバー1
	CSekaijuToolBar m_wndToolBar2;      // ツールバー2
	CEdit       m_wndMillisecEdit;      // 時:分:秒:ミリ秒用エディット(読み取り専用)
	CEdit       m_wndTimeEdit;          // 小節:拍:ティックorフレーム:サブフレーム用エディット(読み取り専用)
	CScrollBar  m_wndPositionScroll;    // 位置スクロールバー
	CEdit       m_wndMeasureEdit;       // 拍子記号・調性記号用エディット(読み取り専用)
	CEdit       m_wndTempoEdit;         // テンポ用エディット(読み取り専用)

	//--------------------------------------------------------------------------
	// 構築と破壊
	//--------------------------------------------------------------------------
public:
	CMainFrame ();                      // コンストラクタ
	virtual ~CMainFrame();              // デストラクタ

	//--------------------------------------------------------------------------
	// オペレーション
	//--------------------------------------------------------------------------
public:
	void SetPositionScrollRange (long lStartTime, long lEndTime, BOOL bRedraw);
	int SetWindowTextWhenDifferent (CWnd* pWnd, LPCTSTR lpszText);

	//--------------------------------------------------------------------------
	// オーバーライド
	//--------------------------------------------------------------------------
public:
	virtual CFrameWnd* GetActiveFrame ();
protected:
	virtual BOOL PreCreateWindow (CREATESTRUCT& cs);


	//--------------------------------------------------------------------------
	// メッセージマップ
	//--------------------------------------------------------------------------
protected:
	afx_msg int OnCreate (LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy ();
	afx_msg void OnTimer (UINT nIDEvent);
	afx_msg void OnHScroll (UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnMouseWheel40 (UINT nFlags, CPoint point);
	afx_msg void OnViewToolbar1 ();
	afx_msg void OnUpdateViewToolbar1UI (CCmdUI* pCmdUI);
	afx_msg void OnViewToolbar2 ();
	afx_msg void OnUpdateViewToolbar2UI (CCmdUI* pCmdUI);
	afx_msg void OnUpdateIndicatorInputVelocityUI (CCmdUI* pCmdUI);
	afx_msg void OnUpdateIndicatorOutputVelocityUI (CCmdUI* pCmdUI);
	afx_msg void OnUpdateIndicatorFormatUI (CCmdUI* pCmdUI);
	afx_msg void OnUpdateIndicatorNumTracksUI (CCmdUI* pCmdUI);
	afx_msg void OnUpdateIndicatorTimeBaseUI (CCmdUI* pCmdUI);
	
	afx_msg long OnCommandWakeUp (WPARAM wParam, LPARAM lParam);
	afx_msg long OnCommandReadShm (WPARAM wParam, LPARAM lParam);
	afx_msg long OnCommandFileOpen (WPARAM wParam, LPARAM lParam);

	DECLARE_MESSAGE_MAP ()

};

#endif