1 /*M///////////////////////////////////////////////////////////////////////////////////////
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
5 // By downloading, copying, installing or using the software you agree to this license.
6 // If you do not agree to this license, do not download, install,
7 // copy or use the software.
10 // Intel License Agreement
11 // For Open Source Computer Vision Library
13 // Copyright (C) 2000, Intel Corporation, all rights reserved.
14 // Third party copyrights are property of their respective owners.
16 // Redistribution and use in source and binary forms, with or without modification,
17 // are permitted provided that the following conditions are met:
19 // * Redistribution's of source code must retain the above copyright notice,
20 // this list of conditions and the following disclaimer.
22 // * Redistribution's in binary form must reproduce the above copyright notice,
23 // this list of conditions and the following disclaimer in the documentation
24 // and/or other materials provided with the distribution.
26 // * The name of Intel Corporation may not be used to endorse or promote products
27 // derived from this software without specific prior written permission.
29 // This software is provided by the copyright holders and contributors "as is" and
30 // any express or implied warranties, including, but not limited to, the implied
31 // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 // In no event shall the Intel Corporation or contributors be liable for any direct,
33 // indirect, incidental, special, exemplary, or consequential damages
34 // (including, but not limited to, procurement of substitute goods or services;
35 // loss of use, data, or profits; or business interruption) however caused
36 // and on any theory of liability, whether in contract, strict liability,
37 // or tort (including negligence or otherwise) arising in any way out of
38 // the use of this software, even if advised of the possibility of such damage.
40 //M*/// MainFrm.h : interface of the CMainFrame class
42 /////////////////////////////////////////////////////////////////////////////
44 #if !defined(AFX_MAINFRM_H__08FC8D46_DB62_4573_A129_5B4FE94720E5__INCLUDED_)
45 #define AFX_MAINFRM_H__08FC8D46_DB62_4573_A129_5B4FE94720E5__INCLUDED_
49 #endif // _MSC_VER > 1000
51 #include "HMMDemoDoc.h"
52 #include "HMMDemoView.h"
53 #include "ImageBaseView.h"
54 //#include "TestImageBaseView.h"
57 class CMainFrame : public CFrameWnd
60 protected: // create from serialization only
62 DECLARE_DYNCREATE(CMainFrame)
71 // ClassWizard generated virtual function overrides
72 //{{AFX_VIRTUAL(CMainFrame)
74 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
76 virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
81 virtual ~CMainFrame();
83 CImageBaseView* GetImageBaseView();
84 CHMMDemoView* GetCameraView();
85 CStatusBar* GetStatusBar() { return &m_wndStatusBar; }
86 void SetBusy( BOOL busy ) { m_busy = busy; }
89 CStatusBar m_wndStatusBar;
90 CToolBar m_wndToolBar;
92 CSplitterWnd m_wndSplitter;
93 //CDialogBar m_wndDlgBar;
97 // Generated message map functions
99 //{{AFX_MSG(CMainFrame)
100 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
101 afx_msg void OnUpdateCapture(CCmdUI* pCmdUI);
102 afx_msg void OnCapture();
103 afx_msg void OnUpdateCapOptions(CCmdUI* pCmdUI);
104 afx_msg void OnCapOptions();
105 afx_msg void OnUpdateCapFormat(CCmdUI* pCmdUI);
106 afx_msg void OnCapFormat();
107 afx_msg void OnAddObj();
108 afx_msg void OnUpdateAddObj(CCmdUI* pCmdUI);
109 afx_msg void OnRemoveObj();
110 afx_msg void OnUpdateRemoveObj(CCmdUI* pCmdUI);
111 afx_msg void OnZoomIn();
112 afx_msg void OnZoomOut();
113 afx_msg void OnChangeBaseParams();
114 afx_msg void OnTrain();
115 afx_msg void OnUpdateTrain(CCmdUI* pCmdUI);
116 afx_msg void OnRecognize();
117 afx_msg void OnUpdateRecog(CCmdUI* pCmdUI);
118 afx_msg void OnSelectAll();
119 afx_msg void OnDelHmm();
120 afx_msg void OnAddTest();
121 afx_msg void OnUpdateAddTest(CCmdUI* pCmdUI);
122 afx_msg void OnTestFolder();
123 afx_msg void OnRecobase();
124 afx_msg void OnUpdateRecobase(CCmdUI* pCmdUI);
125 afx_msg void OnSettings();
127 DECLARE_MESSAGE_MAP()
131 inline CHMMDemoView* GetCameraView()
133 CMainFrame* main_frame = (CMainFrame*)AfxGetMainWnd();
134 return main_frame ? main_frame->GetCameraView() : 0;
137 inline CImageBaseView* GetImageBaseView()
139 CMainFrame* main_frame = (CMainFrame*)AfxGetMainWnd();
140 return main_frame ? main_frame->GetImageBaseView() : 0;
143 inline CHMMDemoDoc* GetHMMDoc()
145 CMainFrame* main_frame = (CMainFrame*)AfxGetMainWnd();
146 return main_frame ? ((CHMMDemoDoc*)main_frame->GetActiveDocument()) : 0;
149 /////////////////////////////////////////////////////////////////////////////
151 //{{AFX_INSERT_LOCATION}}
152 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
154 #endif // !defined(AFX_MAINFRM_H__08FC8D46_DB62_4573_A129_5B4FE94720E5__INCLUDED_)