xue@0
|
1 /*
|
xue@0
|
2 Harmonic Visualiser
|
xue@0
|
3
|
xue@0
|
4 An audio file viewer and editor.
|
xue@0
|
5 Centre for Digital Music, Queen Mary, University of London.
|
xue@0
|
6 This file copyright 2011 Wen Xue.
|
xue@0
|
7
|
xue@0
|
8 This program is free software; you can redistribute it and/or
|
xue@0
|
9 modify it under the terms of the GNU General Public License as
|
xue@0
|
10 published by the Free Software Foundation; either version 2 of the
|
xue@0
|
11 License, or (at your option) any later version.
|
xue@0
|
12 */
|
xue@0
|
13 //---------------------------------------------------------------------------
|
xue@0
|
14
|
xue@0
|
15 #ifndef EventBoxUnitH
|
xue@0
|
16 #define EventBoxUnitH
|
xue@0
|
17 //---------------------------------------------------------------------------
|
xue@0
|
18 /*
|
xue@0
|
19 EventBoxUnit.cpp implements the event (harmonic sinusoid) box used by HV to maintain
|
xue@0
|
20 a list of harmonic sinusoidal events.
|
xue@0
|
21 */
|
xue@0
|
22
|
xue@0
|
23 #include <Classes.hpp>
|
xue@0
|
24 #include <Controls.hpp>
|
xue@0
|
25 #include <StdCtrls.hpp>
|
xue@0
|
26 #include <Forms.hpp>
|
xue@0
|
27 #include <Buttons.hpp>
|
xue@0
|
28 #include <Menus.hpp>
|
xue@0
|
29 #include "hs.h"
|
xue@0
|
30 #include "arrayalloc.h"
|
xue@0
|
31 //---------------------------------------------------------------------------
|
xue@0
|
32
|
xue@0
|
33 class TEventBox : public TForm
|
xue@0
|
34 {
|
xue@0
|
35 __published: // IDE-managed Components
|
xue@0
|
36 TListBox *ListBox1;
|
xue@0
|
37 TSpeedButton *SpeedButton1;
|
xue@0
|
38 TSpeedButton *SpeedButton2;
|
xue@0
|
39 TPopupMenu *PopupMenu1;
|
xue@0
|
40 TMenuItem *Vibratowizard1;
|
xue@0
|
41 TCheckBox *CheckBox1;
|
xue@0
|
42 TMenuItem *Cut1;
|
xue@0
|
43 TMenuItem *Extract1;
|
xue@0
|
44 TMenuItem *Sourcefilter1;
|
xue@0
|
45 void __fastcall ListBox1MouseDown(TObject *Sender, TMouseButton Button,
|
xue@0
|
46 TShiftState Shift, int X, int Y);
|
xue@0
|
47 void __fastcall Save(TObject *Sender);
|
xue@0
|
48 void __fastcall Load(TObject *Sender);
|
xue@0
|
49 void __fastcall ListBox1KeyUp(TObject *Sender, WORD &Key,
|
xue@0
|
50 TShiftState Shift);
|
xue@0
|
51 void __fastcall Vibratowizard1Click(TObject *Sender);
|
xue@0
|
52 void __fastcall ListBox1DblClick(TObject *Sender);
|
xue@0
|
53 void __fastcall FormClick(TObject *Sender);
|
xue@0
|
54 void __fastcall Cut1Click(TObject *Sender);
|
xue@0
|
55 void __fastcall PopupMenu1Popup(TObject *Sender);
|
xue@0
|
56 void __fastcall Extract1Click(TObject *Sender);
|
xue@0
|
57 void __fastcall Sourcefilter1Click(TObject *Sender);
|
xue@0
|
58 private: // User declarations
|
xue@0
|
59 public: // User declarations
|
xue@0
|
60 __fastcall TEventBox(TComponent* Owner);
|
xue@0
|
61 __fastcall ~TEventBox();
|
xue@0
|
62 void __fastcall Clear();
|
xue@0
|
63 void __fastcall LoadFromFile(AnsiString FileName);
|
xue@0
|
64 THS* __fastcall NewHS(int M, int Fr);
|
xue@0
|
65 void __fastcall SaveToFile(AnsiString FileName);
|
xue@0
|
66 void __fastcall SetItemIndex(int index);
|
xue@0
|
67 void __fastcall Sort();
|
xue@0
|
68 int HSCount;
|
xue@0
|
69 int HSCapacity;
|
xue@0
|
70 THS** HS;
|
xue@0
|
71 };
|
xue@0
|
72 //---------------------------------------------------------------------------
|
xue@0
|
73 extern PACKAGE TEventBox *EventBox;
|
xue@0
|
74 //---------------------------------------------------------------------------
|
xue@0
|
75 #endif
|