|
From: <pst...@us...> - 2010-04-25 04:42:47
|
Revision: 752
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=752&view=rev
Author: pstieber
Date: 2010-04-25 04:42:41 +0000 (Sun, 25 Apr 2010)
Log Message:
-----------
replaced old Program Channel dialog with a new version. This still isn't functional.
Modified Paths:
--------------
trunk/jazz/src/Dialogs.cpp
trunk/jazz/src/Makefile.am
trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj
Added Paths:
-----------
trunk/jazz/src/Dialogs/ProgramChangeDialog.cpp
trunk/jazz/src/Dialogs/ProgramChangeDialog.h
Added: trunk/jazz/src/Dialogs/ProgramChangeDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/ProgramChangeDialog.cpp (rev 0)
+++ trunk/jazz/src/Dialogs/ProgramChangeDialog.cpp 2010-04-25 04:42:41 UTC (rev 752)
@@ -0,0 +1,59 @@
+#include "ProgramChangeDialog.h"
+
+#include "../Configuration.h"
+#include "../Globals.h"
+
+#include <wx/button.h>
+#include <wx/listbox.h>
+#include <wx/sizer.h>
+
+using namespace std;
+
+//*****************************************************************************
+//*****************************************************************************
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+BEGIN_EVENT_TABLE(JZProgramChangeDialog, wxDialog)
+END_EVENT_TABLE()
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+JZProgramChangeDialog::JZProgramChangeDialog(wxWindow* pParent)
+ : wxDialog(pParent, wxID_ANY, wxString("Program Change")),
+ mpProgramListBox(0)
+{
+ mpProgramListBox = new wxListBox(this, wxID_ANY);
+
+ const vector<pair<string, int> >& VoiceNames = gpConfig->GetVoiceNames();
+ for (
+ vector<pair<string, int> >::const_iterator iName = VoiceNames.begin();
+ iName != VoiceNames.end();
+ ++iName)
+ {
+ mpProgramListBox->Append(iName->first.c_str());
+ }
+
+ wxButton* pOkButton = new wxButton(this, wxID_OK, "&OK");
+ wxButton* pCancelButton = new wxButton(this, wxID_CANCEL, "Cancel");
+ wxButton* pHelpButton = new wxButton(this, wxID_HELP, "Help");
+ pOkButton->SetDefault();
+
+ wxBoxSizer* pTopSizer = new wxBoxSizer(wxVERTICAL);
+
+ pTopSizer->Add(mpProgramListBox, 0, wxGROW | wxALL, 2);
+
+ wxBoxSizer* pButtonSizer = new wxBoxSizer(wxHORIZONTAL);
+
+ pButtonSizer->Add(pOkButton, 0, wxALL, 5);
+ pButtonSizer->Add(pCancelButton, 0, wxALL, 5);
+ pButtonSizer->Add(pHelpButton, 0, wxALL, 5);
+
+ pTopSizer->Add(pButtonSizer, 0, wxALIGN_CENTER | wxBOTTOM, 6);
+
+ SetAutoLayout(true);
+ SetSizer(pTopSizer);
+
+ pTopSizer->SetSizeHints(this);
+ pTopSizer->Fit(this);
+}
+
Property changes on: trunk/jazz/src/Dialogs/ProgramChangeDialog.cpp
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/jazz/src/Dialogs/ProgramChangeDialog.h
===================================================================
--- trunk/jazz/src/Dialogs/ProgramChangeDialog.h (rev 0)
+++ trunk/jazz/src/Dialogs/ProgramChangeDialog.h 2010-04-25 04:42:41 UTC (rev 752)
@@ -0,0 +1,43 @@
+//*****************************************************************************
+// The JAZZ++ Midi Sequencer
+//
+// Copyright (C) 2010 Peter J. Stieber, all rights reserved.
+//
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//*****************************************************************************
+
+#ifndef JZ_PROGRAMCHANGEDIALOG_H
+#define JZ_PROGRAMCHANGEDIALOG_H
+
+#include <wx/dialog.h>
+
+class wxListBox;
+
+//*****************************************************************************
+//*****************************************************************************
+class JZProgramChangeDialog : public wxDialog
+{
+ public:
+
+ JZProgramChangeDialog(wxWindow* pParent);
+
+ private:
+
+ wxListBox* mpProgramListBox;
+
+ DECLARE_EVENT_TABLE();
+};
+
+#endif // !defined(JZ_PROGRAMCHANGEDIALOG_H)
Property changes on: trunk/jazz/src/Dialogs/ProgramChangeDialog.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/jazz/src/Dialogs.cpp
===================================================================
--- trunk/jazz/src/Dialogs.cpp 2010-04-25 03:54:05 UTC (rev 751)
+++ trunk/jazz/src/Dialogs.cpp 2010-04-25 04:42:41 UTC (rev 752)
@@ -26,6 +26,7 @@
#include "Command.h"
#include "DeprecatedWx/proplist.h"
#include "Dialogs/KeyOnDialog.h"
+#include "Dialogs/ProgramChangeDialog.h"
//#include "EventFrame.h"
#include "Events.h"
#include "EventWindow.h"
@@ -590,11 +591,12 @@
}
+#ifdef DEPRECATED
// -------------------------------- Program ---------------------------
class tProgramDlg : public tEventDlg
{
- public:
+public:
int Program;
// tNamedChoice Choice;
@@ -635,6 +637,7 @@
"props",
new tNamedValueListValidator(gpConfig->GetVoiceNames())));
}
+#endif // DEPRECATED
@@ -948,8 +951,12 @@
break;
case StatProgram:
- str = "Program Change";
- dlg = new tProgramDlg(e->IsProgram(), pPianoWindow, t);
+ {
+// str = "Program Change";
+// dlg = new tProgramDlg(e->IsProgram(), pPianoWindow, t);
+ JZProgramChangeDialog ProgramChangeDialog(pPianoWindow);
+ ProgramChangeDialog.ShowModal();
+ }
break;
case StatSetTempo:
Modified: trunk/jazz/src/Makefile.am
===================================================================
--- trunk/jazz/src/Makefile.am 2010-04-25 03:54:05 UTC (rev 751)
+++ trunk/jazz/src/Makefile.am 2010-04-25 04:42:41 UTC (rev 752)
@@ -30,6 +30,7 @@
Dialogs/KeyOnDialog.cpp \
Dialogs/MetronomeSettingsDialog.cpp \
Dialogs/MidiChannelDialog.cpp \
+Dialogs/ProgramChannelDialog.cpp \
Dialogs/QuantizeDialog.cpp \
Dialogs/SearchAndReplaceDialog.cpp \
Dialogs/ShiftDialog.cpp \
@@ -119,6 +120,7 @@
Dialogs/KeyOnDialog.cpp \
Dialogs/MetronomeSettingsDialog.cpp \
Dialogs/MidiChannelDialog.cpp \
+Dialogs/ProgramChannelDialog.cpp \
Dialogs/QuantizeDialog.cpp \
Dialogs/SearchAndReplaceDialog.cpp \
Dialogs/ShiftDialog.cpp \
@@ -213,6 +215,7 @@
Dialogs/KeyOnDialog.h \
Dialogs/MetronomeSettingsDialog.h \
Dialogs/MidiChannelDialog.h \
+Dialogs/ProgramChannelDialog.h \
Dialogs/QuantizeDialog.h \
Dialogs/SearchAndReplaceDialog.h \
Dialogs/ShiftDialog.h \
Modified: trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj
===================================================================
--- trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2010-04-25 03:54:05 UTC (rev 751)
+++ trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2010-04-25 04:42:41 UTC (rev 752)
@@ -911,6 +911,14 @@
>
</File>
<File
+ RelativePath="..\src\Dialogs\ProgramChangeDialog.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\src\Dialogs\ProgramChangeDialog.h"
+ >
+ </File>
+ <File
RelativePath="..\src\Dialogs\QuantizeDialog.cpp"
>
</File>
@@ -983,6 +991,10 @@
>
</File>
</Filter>
+ <File
+ RelativePath="..\src\Makefile.am"
+ >
+ </File>
</Files>
<Globals>
</Globals>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|