1 /* 2 * Copyright (C) 2002 - David W. Durham 3 * 4 * This file is part of ReZound, an audio editing application. 5 * 6 * ReZound is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published 8 * by the Free Software Foundation; either version 2 of the License, 9 * or (at your option) any later version. 10 * 11 * ReZound is distributed in the hope that it will be useful, but 12 * 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; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 19 */ 20 21 #ifndef __CPasteChannelsDialog_H__ 22 #define __CPasteChannelsDialog_H__ 23 24 #include "../../config/common.h" 25 #include "fox_compat.h" 26 27 #include <vector> 28 #include <utility> 29 30 class CPasteChannelsDialog; 31 32 #include "FXModalDialogBox.h" 33 34 #include "../backend/AActionDialog.h" 35 #include "../backend/CSound_defs.h" 36 37 38 extern CPasteChannelsDialog *gPasteChannelsDialog; 39 class FXConstantParamValue; 40 41 /* 42 * This is the implementation of AActionDialog that the backend 43 * asks to show whenever there is a question of what channels to 44 * apply to action to... This dialog's show method returns 45 * true if the user press okay.. or false if they hit cancel. 46 * 47 * The show method upon returning true should have also set 48 * actionSound's doChannel values according to the checkboxes 49 * on the dialog 50 */ 51 class CPasteChannelsDialog : public FXModalDialogBox, public AActionDialog 52 { 53 FXDECLARE(CPasteChannelsDialog); 54 public: 55 CPasteChannelsDialog(FXWindow *mainWindow); 56 virtual ~CPasteChannelsDialog(); 57 58 bool show(CActionSound *actionSound,CActionParameters *actionParameters); 59 void hide(); 60 setTitle(const string title)61 void setTitle(const string title) { } 62 63 void *getUserData(); 64 65 enum 66 { 67 ID_DEFAULT_BUTTON=FXModalDialogBox::ID_LAST, 68 ID_CLEAR_BUTTON, 69 70 ID_REPEAT_TYPE_COMBOBOX 71 }; 72 73 long onDefaultButton(FXObject *sender,FXSelector sel,void *ptr); 74 long onClearButton(FXObject *sender,FXSelector sel,void *ptr); 75 76 long onRepeatTypeChange(FXObject *sender,FXSelector sel,void *ptr); 77 78 protected: CPasteChannelsDialog()79 CPasteChannelsDialog() {} 80 81 private: 82 CActionSound *actionSound; 83 84 FXLabel *label; 85 FXHorizontalSeparator *horzSeparator; 86 FXComposite *topFrame; 87 FXMatrix *routingContents; 88 // dummy 89 FXLabel *sourceLabel; 90 FXLabel *destinationLabel; 91 FXMatrix *checkBoxMatrix; 92 FXCheckButton *checkBoxes[MAX_CHANNELS][MAX_CHANNELS]; 93 94 FXVerticalSeparator *vertSeparator; 95 96 FXComposite *repeatFrame; 97 FXSwitcher *repeatTypeSwitcher; 98 FXConstantParamValue *repeatCountSlider; 99 FXConstantParamValue *repeatTimeSlider; 100 FXComboBox *repeatTypeComboBox; 101 102 103 FXPacker *mixTypeFrame; 104 FXComboBox *mixTypeComboBox; 105 106 vector<vector<bool> > pasteChannels; 107 }; 108 109 #endif 110