| 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: SpikeViewBar.cpp,v 1.1 2006/02/02 07:33:27 orrisroot Exp $ */ |
| 23 |
|
| 24 |
// SpikeViewBar.cpp : implementation of the CSpikeViewBar class |
| 25 |
// |
| 26 |
|
| 27 |
#include "stdafx.h" |
| 28 |
#include "NeuroManager.h" |
| 29 |
|
| 30 |
#include "SpikeView.h" |
| 31 |
#include "SpikeViewProperties.h" |
| 32 |
#include "SpikeViewSplitter.h" |
| 33 |
#include "SpikeViewBar.h" |
| 34 |
#include ".\spikeviewbar.h" |
| 35 |
|
| 36 |
#ifdef _DEBUG |
| 37 |
#define new DEBUG_NEW |
| 38 |
#undef THIS_FILE |
| 39 |
static char THIS_FILE[] = __FILE__; |
| 40 |
#endif |
| 41 |
|
| 42 |
|
| 43 |
#define DEFAULT_WIDTH 600 |
| 44 |
#define DEFAULT_HEIGHT 100 |
| 45 |
|
| 46 |
// CSpikeViewBar |
| 47 |
|
| 48 |
CSpikeViewBar::CSpikeViewBar() |
| 49 |
{} |
| 50 |
|
| 51 |
CSpikeViewBar::~CSpikeViewBar() |
| 52 |
{} |
| 53 |
|
| 54 |
|
| 55 |
BEGIN_MESSAGE_MAP( CSpikeViewBar, baseCSpikeViewBar ) |
| 56 |
ON_WM_CREATE() |
| 57 |
END_MESSAGE_MAP() |
| 58 |
|
| 59 |
|
| 60 |
// CSpikeViewBar message handlers |
| 61 |
|
| 62 |
int CSpikeViewBar::OnCreate( LPCREATESTRUCT lpCreateStruct ) |
| 63 |
{ |
| 64 |
if ( baseCSpikeViewBar::OnCreate( lpCreateStruct ) == -1 ) |
| 65 |
return -1; |
| 66 |
|
| 67 |
SetSCBStyle( GetSCBStyle() | SCBS_SHOWEDGES | SCBS_SIZECHILD ); |
| 68 |
|
| 69 |
return 0; |
| 70 |
} |
| 71 |
|
| 72 |
BOOL CSpikeViewBar::CreateInnerViews( CCreateContext *pContext ) |
| 73 |
{ |
| 74 |
// create inner frame |
| 75 |
if ( !m_spWndChild.CreateStatic( this, 1, 2, WS_CHILD | WS_VISIBLE, IDS_SPIKEVIEW ) ) |
| 76 |
return FALSE; |
| 77 |
|
| 78 |
if ( !m_spWndChild.CreateView( 0, 0, RUNTIME_CLASS( CSpikeView ), |
| 79 |
CSize( DEFAULT_WIDTH, DEFAULT_HEIGHT ), pContext ) ) |
| 80 |
return FALSE; |
| 81 |
if ( !m_spWndChild.CreateView( 0, 1, RUNTIME_CLASS( CSpikeViewProperties ), |
| 82 |
CSize( DEFAULT_WIDTH, 120 ), pContext ) ) |
| 83 |
return FALSE; |
| 84 |
return TRUE; |
| 85 |
|
| 86 |
} |