OSDN Git Service

イニシャルコミット。
[marathon/ShapeFusion.git] / Sounds / SoundsView.h
1 /*
2  * This file is part of ShapeFusion (Copyright 2000 Tito Dal Canton)
3  *
4  * ShapeFusion is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * ShapeFusion is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with ShapeFusion; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 */
18
19 #ifndef __SOUNDSVIEW_H__
20 #define __SOUNDSVIEW_H__
21
22 #include "wx/docview.h"
23 #include "SoundsDocument.h"
24
25 class SoundsView: public wxView
26 {
27     DECLARE_DYNAMIC_CLASS(SoundsView)
28 private:
29         // control ids
30         enum {
31                 SOUND_CLASS_ID_FIELD,
32                 SOUND_CLASS_NUMBER_FIELD,
33                 SOUND_CLASS_LIST,
34                 SOUND_FLAGS_RESTART,
35                 SOUND_FLAGS_ABORT,
36                 SOUND_FLAGS_RESIST,
37                 SOUND_FLAGS_CHANGE,
38                 SOUND_FLAGS_OBSTRUCTED,
39                 SOUND_FLAGS_MOBSTRUCTED,
40                 SOUND_FLAGS_AMBIENT,
41                 SOUND_VOLUME_RADIO_BUTTON,
42                 SOUND_CHANCE_MENU,
43                 SOUND_LOW_PITCH_FIELD,
44                 SOUND_HIGH_PITCH_FIELD,
45                 SOUND_EIGHT_BIT_PERMUTATIONS_LIST,
46                 SOUND_SIXTEEN_BIT_PERMUTATIONS_LIST,
47                 SOUND_REMAP_CHECK_BOX
48         };
49
50         wxBoxSizer              *frame_sizer;
51         wxPanel                         *main_panel;
52         wxSizer                         *sound_class_sizer;
53         wxSizer                                 *sound_class_header_sizer;
54         wxStaticText                            *sound_class_text;
55         wxStaticText                            *sound_class_id_text;
56         wxTextCtrl                                      *sound_class_id_field;
57         wxStaticText                            *sound_class_number_text;
58         wxStaticText                            *sound_class_number_field;
59         wxListBox                               *sound_class_list;
60         wxSizer                         *sound_editor_sizer;
61         wxSizer                                 *sound_flags_sizer;
62         wxCheckBox                                      *sound_flag_restart_checkbox;
63         wxCheckBox                                      *sound_flag_abort_checkbox;
64         wxCheckBox                                      *sound_flag_resist_checkbox;
65         wxCheckBox                                      *sound_flag_change_checkbox;
66         wxCheckBox                                      *sound_flag_obstructed_checkbox;
67         wxCheckBox                                      *sound_flag_mobstructed_checkbox;
68         wxCheckBox                                      *sound_flag_ambient_checkbox;
69         wxRadioBox                              *sound_volume_radio_button;
70         wxSizer                                 *sound_menus_sizer;
71         wxStaticText                            *sound_chance_text;
72         wxChoice                                        *sound_chance_menu;
73         wxStaticText                            *sound_low_pitch_text;
74         wxTextCtrl                                      *sound_low_pitch_field;
75         wxStaticText                            *sound_high_pitch_text;
76         wxTextCtrl                                      *sound_high_pitch_field;
77         wxSizer                                 *sound_permutation_sizer;
78         wxSizer                                         *sound_eight_bit_sizer;
79         wxStaticText                                    *sound_eight_bit_text;
80         wxListBox                                               *sound_eight_bit_list;
81         wxSizer                                         *sound_sixteen_bit_sizer;
82         wxStaticText                                    *sound_sixteen_bit_text;
83         wxListBox                                               *sound_sixteen_bit_list;
84         wxCheckBox                                              *sound_remap_check_box;
85
86     wxFrame                     *frame;
87         wxMenuBar               *menubar;
88         SoundsDocument  *payload;
89         int                             mSoundClass,
90                                         mSoundSource,
91                                         mSoundPermutation;
92         
93 public:
94     SoundsView(void);
95     ~SoundsView(void) {};
96     
97     bool OnCreate(wxDocument *doc, long flags);
98     void OnDraw(wxDC *dc);
99     void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
100     bool OnClose(bool deleteWindow = true);
101
102         void Update(void);
103
104         void SoundClassChanged(wxCommandEvent &e);
105         void SoundClassIdChanged(wxCommandEvent& e);
106         void AddSound(wxCommandEvent &e);
107         void RemoveSound(wxCommandEvent &e);
108         void SourceRadioButtonChanged(wxCommandEvent &e);
109         void VolumeButtonChanged(wxCommandEvent &e);
110         void ChanceMenuChanged(wxCommandEvent &e);
111         void FlagsChanged(wxCommandEvent &e);
112         void LowPitchValueChanged(wxScrollEvent &e);
113         void HighPitchValueChanged(wxScrollEvent &e);
114         void SoundPermutationSelected(wxCommandEvent &e);
115         void SoundPermutationDoubleClicked(wxCommandEvent &e);
116         
117         // Menu events
118         void MenuDelete(wxCommandEvent &e);
119         void MenuAddSoundClass(wxCommandEvent &e);
120         void MenuImportSound(wxCommandEvent &e);
121         void MenuExportSound(wxCommandEvent &e);
122
123         void ExportSound(wxString filepath);
124
125 protected:
126     DECLARE_EVENT_TABLE()
127 };
128 #endif