Develop and Download Open Source Software

Browse CVS Repository

Contents of /satellite/neuromanager/NeuroManager.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.13 - (show annotations) (download) (as text)
Sat Feb 4 13:38:16 2006 UTC (18 years, 2 months ago) by orrisroot
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +1 -1 lines
File MIME type: text/x-c++src
FILE REMOVED
moved main application sources to neuromanager directory.

1 /* --------------------------------------------------------------------- */
2 /* NeuroManager - A spike train analysis tool */
3 /* Copyright (c) 2005-2006 RIKEN, Japan. All rights reserved. */
4 /* http://satellite.sourceforge.jp/ */
5 /* --------------------------------------------------------------------- */
6 /* This program is free software; you can redistribute it and/or */
7 /* modify it under the terms of the GNU General Public License */
8 /* as published by the Free Software Foundation; either version 2 */
9 /* of the License, or (at your option) any later version. */
10 /* */
11 /* This program is distributed in the hope that it will be useful, */
12 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14 /* GNU General Public License for more details. */
15 /* */
16 /* You should have received a copy of the GNU General Public License */
17 /* along with this program; see the file COPYING.txt. If not, write */
18 /* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth */
19 /* Floor, Boston, MA 02110-1301, USA. */
20 /* --------------------------------------------------------------------- */
21
22 /* $Id: NeuroManager.cpp,v 1.12 2006/02/02 07:33:27 orrisroot Exp $ */
23
24 // NeuroManager.cpp : Defines the class behaviors for the application.
25 //
26
27 #include "stdafx.h"
28 #include "NeuroManager.h"
29 #include "DataViewSplitter.h"
30 #include "DataViewBar.h"
31 #include "SpikeViewSplitter.h"
32 #include "SpikeViewBar.h"
33 #include "MainFrm.h"
34
35 #include "NeuroManagerDoc.h"
36 #include "NeuroManagerView.h"
37 #include "SpikeViewProperties.h"
38
39 #ifdef _DEBUG
40 #define new DEBUG_NEW
41 #endif
42
43
44 // CNeuroManagerApp
45
46 BEGIN_MESSAGE_MAP( CNeuroManagerApp, CWinApp )
47 ON_COMMAND( ID_APP_ABOUT, OnAppAbout )
48 // Standard file based document commands
49 ON_COMMAND( ID_FILE_NEW, CWinApp::OnFileNew )
50 ON_COMMAND( ID_FILE_OPEN, CWinApp::OnFileOpen )
51 // Standard print setup command
52 ON_COMMAND( ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup )
53 END_MESSAGE_MAP()
54
55
56 // CNeuroManagerApp construction
57
58 CNeuroManagerApp::CNeuroManagerApp()
59 {
60 // TODO: add construction code here,
61 // Place all significant initialization in InitInstance
62 }
63
64
65 // The one and only CNeuroManagerApp object
66
67 CNeuroManagerApp theApp;
68
69 // CNeuroManagerApp initialization
70
71 BOOL CNeuroManagerApp::InitInstance()
72 {
73 AfxOleInit();
74 // InitCommonControls() is required on Windows XP if an application
75 // manifest specifies use of ComCtl32.dll version 6 or later to enable
76 // visual styles. Otherwise, any window creation will fail.
77 InitCommonControls();
78
79 CWinApp::InitInstance();
80
81 // Standard initialization
82 // If you are not using these features and wish to reduce the size
83 // of your final executable, you should remove from the following
84 // the specific initialization routines you do not need
85 // Change the registry key under which our settings are stored
86 // TODO: You should modify this string to be something appropriate
87 // such as the name of your company or organization
88 SetRegistryKey( _T( "Neuroinformatics Laboratory" ) );
89 LoadStdProfileSettings( 4 ); // Load standard INI file options (including MRU)
90 // Register the application's document templates. Document templates
91 // serve as the connection between documents, frame windows and views
92 CSingleDocTemplate* pDocTemplate;
93 pDocTemplate = new CSingleDocTemplate(
94 IDR_MAINFRAME,
95 RUNTIME_CLASS( CNeuroManagerDoc ),
96 // main SDI frame window
97 RUNTIME_CLASS( CMainFrame ),
98 RUNTIME_CLASS( CNeuroManagerView ) );
99 if ( !pDocTemplate )
100 return FALSE;
101 AddDocTemplate( pDocTemplate );
102
103 // Parse command line for standard shell commands, DDE, file open
104 CCommandLineInfo cmdInfo;
105 ParseCommandLine( cmdInfo );
106
107 // disable to open empty document
108 //if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
109 // cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
110
111 // Dispatch commands specified on the command line. Will return FALSE if
112 // app was launched with /RegServer, /Register, /Unregserver or /Unregister.
113 if ( !ProcessShellCommand( cmdInfo ) )
114 return FALSE;
115
116 // The one and only window has been initialized, so show and update it.
117 m_pMainWnd->ShowWindow( SW_SHOW );
118 m_pMainWnd->UpdateWindow();
119
120 // create ohter views
121 //if (!((CMainFrame*)m_pMainWnd)->CreateMultiViews())
122 // return FALSE;
123
124 return TRUE;
125 }
126
127
128
129 // CAboutDlg dialog used for App About
130
131 class CAboutDlg : public CDialog
132 {
133 public:
134 CAboutDlg();
135
136 // Dialog Data
137 enum { IDD = IDD_ABOUTBOX };
138
139 protected:
140 virtual void DoDataExchange( CDataExchange* pDX ); // DDX/DDV support
141
142 // Implementation
143 protected:
144 DECLARE_MESSAGE_MAP()
145 };
146
147 CAboutDlg::CAboutDlg() : CDialog( CAboutDlg::IDD )
148 {}
149
150 void CAboutDlg::DoDataExchange( CDataExchange* pDX )
151 {
152 CDialog::DoDataExchange( pDX );
153 }
154
155 BEGIN_MESSAGE_MAP( CAboutDlg, CDialog )
156 END_MESSAGE_MAP()
157
158 // App command to run the dialog
159 void CNeuroManagerApp::OnAppAbout()
160 {
161 CAboutDlg aboutDlg;
162 aboutDlg.DoModal();
163 }
164
165
166 // CNeuroManagerApp message handlers

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26