view EventBoxUnit.h @ 0:a6a46af64546

first upload
author wenx <xue.wen@eecs.qmul.ac.uk>
date Wed, 10 Aug 2011 14:55:38 +0100
parents
children
line wrap: on
line source
/*
    Harmonic Visualiser

    An audio file viewer and editor.
    Centre for Digital Music, Queen Mary, University of London.
    This file copyright 2011 Wen Xue.

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

#ifndef EventBoxUnitH
#define EventBoxUnitH
//---------------------------------------------------------------------------
/*
  EventBoxUnit.cpp implements the event (harmonic sinusoid) box used by HV to maintain
  a list of harmonic sinusoidal events.
*/

#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <Menus.hpp>
#include "hs.h"
#include "arrayalloc.h"
//---------------------------------------------------------------------------

class TEventBox : public TForm
{
__published:	// IDE-managed Components
  TListBox *ListBox1;
  TSpeedButton *SpeedButton1;
  TSpeedButton *SpeedButton2;
  TPopupMenu *PopupMenu1;
  TMenuItem *Vibratowizard1;
  TCheckBox *CheckBox1;
  TMenuItem *Cut1;
  TMenuItem *Extract1;
  TMenuItem *Sourcefilter1;
  void __fastcall ListBox1MouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
  void __fastcall Save(TObject *Sender);
  void __fastcall Load(TObject *Sender);
  void __fastcall ListBox1KeyUp(TObject *Sender, WORD &Key,
          TShiftState Shift);
  void __fastcall Vibratowizard1Click(TObject *Sender);
  void __fastcall ListBox1DblClick(TObject *Sender);
  void __fastcall FormClick(TObject *Sender);
  void __fastcall Cut1Click(TObject *Sender);
  void __fastcall PopupMenu1Popup(TObject *Sender);
  void __fastcall Extract1Click(TObject *Sender);
  void __fastcall Sourcefilter1Click(TObject *Sender);
private:	// User declarations
public:		// User declarations
  __fastcall TEventBox(TComponent* Owner);
  __fastcall ~TEventBox();
  void __fastcall Clear();
  void __fastcall LoadFromFile(AnsiString FileName);
  THS* __fastcall NewHS(int M, int Fr);
  void __fastcall SaveToFile(AnsiString FileName);
  void __fastcall SetItemIndex(int index);
  void __fastcall Sort();
  int HSCount;
  int HSCapacity;
  THS** HS;
};
//---------------------------------------------------------------------------
extern PACKAGE TEventBox *EventBox;
//---------------------------------------------------------------------------
#endif