root / trunk / win / Mainfrm.h

Revision 723, 3.7 kB (checked in by Leo, 7 months ago)

Rewrote messaging system.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1// MainFrm.h : interface of the CMainFrame class
2//
3/////////////////////////////////////////////////////////////////////////////
4
5#if !defined(AFX_MAINFRM_H__195E1F4E_3FF2_11D2_8202_D2B1707B2D1B__INCLUDED_)
6#define AFX_MAINFRM_H__195E1F4E_3FF2_11D2_8202_D2B1707B2D1B__INCLUDED_
7
8#if _MSC_VER >= 1000
9#pragma once
10#endif // _MSC_VER >= 1000
11
12#include "FlatBar.h"
13#include "PieceBar.h"
14#include "CADBar.h"
15#include "BMPMenu.h"
16#include "ModDlg.h"
17#include "dynsplit.h"
18#include "lc_message.h"
19
20class MainWnd;
21
22class CMainFrame : public CFrameWnd, public lcListener
23{
24protected: // create from serialization only
25    CMainFrame();
26    DECLARE_DYNCREATE(CMainFrame)
27
28// Attributes
29public:
30
31// Operations
32public:
33    void ProcessMessage(lcMessageType Message, void* Data);
34
35// Overrides
36    // ClassWizard generated virtual function overrides
37    //{{AFX_VIRTUAL(CMainFrame)
38    public:
39    virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
40    virtual BOOL PreTranslateMessage(MSG* pMsg);
41    protected:
42    virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
43    virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
44    //}}AFX_VIRTUAL
45
46// Implementation
47public:
48    HMENU NewMenu();
49    virtual ~CMainFrame();
50#ifdef _DEBUG
51    virtual void AssertValid() const;
52    virtual void Dump(CDumpContext& dc) const;
53#endif
54
55    // control bar embedded members
56    CCADStatusBar m_wndStatusBar;
57    CFlatToolBar  m_wndStandardBar;
58    CFlatToolBar  m_wndToolsBar;
59    CFlatToolBar  m_wndAnimationBar;
60    CPiecesBar    m_wndPiecesBar;
61    CDynamicSplitterWnd  m_wndSplitter;
62
63    CTypedPtrArray<CPtrArray, CDynamicSplitterWnd*> m_SplitterList;
64
65    void SetViewLayout(CWnd* wnd, const char*& str);
66    void GetViewLayout(CWnd* wnd, class String& str) const;
67
68    void UpdateMenuAccelerators();
69    void SetStatusBarPane(UINT ID, const char* Text);
70    void SetStatusBarMessage(const char* Message)
71        { m_strStatusBar = Message; }
72
73protected:
74    CModifyDialogBar    m_wndModifyDlg;
75
76    CBMPMenu m_bmpMenu;
77    WINDOWPLACEMENT m_wpPrev;
78    CToolBar* m_pwndFullScrnBar;
79    CRect m_FullScreenWindowRect;
80    CString m_strStatusBar;
81
82// Generated message map functions
83protected:
84    //{{AFX_MSG(CMainFrame)
85    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
86    afx_msg void OnClose();
87    afx_msg void OnSetFocus(CWnd* pOldWnd);
88    afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
89    afx_msg void CMainFrame::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
90    afx_msg LRESULT OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu);
91    afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
92    afx_msg void OnViewFullscreen();
93    afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
94    afx_msg void OnFilePrintPieceList();
95    afx_msg void OnActivateApp(BOOL bActive, ACTIVATEAPPPARAM hTask);
96    afx_msg void OnViewNewView();
97    afx_msg LRESULT OnSetMessageString(WPARAM wParam, LPARAM lParam);
98    afx_msg void OnDropFiles(HDROP hDropInfo);
99    //}}AFX_MSG
100
101    // Status bar
102    void GetMessageString(UINT nID, CString& rMessage) const;
103
104    afx_msg void OnPieceBar(UINT nID);
105    afx_msg void OnUpdatePieceBar(CCmdUI* pCmdUI);
106   
107    afx_msg LONG OnUpdateList(UINT lParam, LONG wParam);
108    afx_msg LONG OnPopupClose(UINT lParam, LONG wParam);
109    afx_msg LONG OnAddString(UINT lParam, LONG wParam);
110    afx_msg LONG UpdateSettings(UINT lParam, LONG wParam);
111
112    DECLARE_MESSAGE_MAP()
113public:
114    afx_msg void OnViewSplitVertically();
115    afx_msg void OnViewSplitHorizontally();
116    afx_msg void OnViewDeleteView();
117    afx_msg void OnViewResetViews();
118};
119
120/////////////////////////////////////////////////////////////////////////////
121
122//{{AFX_INSERT_LOCATION}}
123// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
124
125#endif // !defined(AFX_MAINFRM_H__195E1F4E_3FF2_11D2_8202_D2B1707B2D1B__INCLUDED_)
Note: See TracBrowser for help on using the browser.