From: <pst...@us...> - 2008-12-30 22:53:39
|
Revision: 661 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=661&view=rev Author: pstieber Date: 2008-12-30 22:53:35 +0000 (Tue, 30 Dec 2008) Log Message: ----------- 1. Added some pointers to the initializer list. 2. Put the code that initializes the patch list in a separate member function called SetPatchListEntries. 3. Added code to determine if the track is changing from or to a drum channel and update the patch list if this changes. Modified Paths: -------------- trunk/jazz/src/Dialogs/TrackDialog.cpp trunk/jazz/src/Dialogs/TrackDialog.h Modified: trunk/jazz/src/Dialogs/TrackDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/TrackDialog.cpp 2008-12-27 18:49:04 UTC (rev 660) +++ trunk/jazz/src/Dialogs/TrackDialog.cpp 2008-12-30 22:53:35 UTC (rev 661) @@ -53,47 +53,17 @@ JZTrackDialog::JZTrackDialog(JZTrack& Track, wxWindow* pParent) : wxDialog(pParent, wxID_ANY, wxString("Track Settings")), mTrack(Track), + mLastTrackChannelWasDrums(Track.IsDrumTrack()), mpTrackNameEdit(0), - mpPatchListBox(0) + mpPatchListBox(0), + mpChannelValue(0), + mpChannelKnob(0) { mpTrackNameEdit = new wxTextCtrl(this, wxID_ANY); mpPatchListBox = new wxListBox(this, wxID_ANY); - if (mTrack.IsDrumTrack()) - { - const vector<pair<string, int> >& DrumSets = gpConfig->GetDrumSets(); - for ( - vector<pair<string, int> >::const_iterator iDrumSet = - DrumSets.begin(); - iDrumSet != DrumSets.end(); - ++iDrumSet) - { - const string& DrumSet = iDrumSet->first; + SetPatchListEntries(); - if (!DrumSet.empty()) - { - mpPatchListBox->Append(DrumSet.c_str()); - } - } - } - else - { - const vector<pair<string, int> >& VoiceNames = gpConfig->GetVoiceNames(); - for ( - vector<pair<string, int> >::const_iterator iVoiceName = - VoiceNames.begin(); - iVoiceName != VoiceNames.end(); - ++iVoiceName) - { - const string& VoiceName = iVoiceName->first; - - if (!VoiceName.empty()) - { - mpPatchListBox->Append(VoiceName.c_str()); - } - } - } - mpChannelValue = new wxStaticText(this, wxID_ANY, "00"); mpChannelKnob = new JZKnob(this, IDC_KB_CHANNEL, 0, 1, 16); @@ -150,6 +120,48 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- +void JZTrackDialog::SetPatchListEntries() +{ + mpPatchListBox->Clear(); + + if (mTrack.IsDrumTrack()) + { + const vector<pair<string, int> >& DrumSets = gpConfig->GetDrumSets(); + for ( + vector<pair<string, int> >::const_iterator iDrumSet = + DrumSets.begin(); + iDrumSet != DrumSets.end(); + ++iDrumSet) + { + const string& DrumSet = iDrumSet->first; + + if (!DrumSet.empty()) + { + mpPatchListBox->Append(DrumSet.c_str()); + } + } + } + else + { + const vector<pair<string, int> >& VoiceNames = gpConfig->GetVoiceNames(); + for ( + vector<pair<string, int> >::const_iterator iVoiceName = + VoiceNames.begin(); + iVoiceName != VoiceNames.end(); + ++iVoiceName) + { + const string& VoiceName = iVoiceName->first; + + if (!VoiceName.empty()) + { + mpPatchListBox->Append(VoiceName.c_str()); + } + } + } +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- bool JZTrackDialog::TransferDataToWindow() { mpTrackNameEdit->ChangeValue(mTrack.GetName()); @@ -195,6 +207,17 @@ ostringstream Oss; Oss << Value; mpChannelValue->SetLabel(Oss.str().c_str()); + mTrack.Channel = Value; + + // Test to determine if the track channel toggled in our out of drum mode. + if (mLastTrackChannelWasDrums != mTrack.IsDrumTrack()) + { + // If it did switch, update the patch list entries. + SetPatchListEntries(); + } + + // Record if the current value for the channel indicates drums. + mLastTrackChannelWasDrums = mTrack.IsDrumTrack(); } //----------------------------------------------------------------------------- Modified: trunk/jazz/src/Dialogs/TrackDialog.h =================================================================== --- trunk/jazz/src/Dialogs/TrackDialog.h 2008-12-27 18:49:04 UTC (rev 660) +++ trunk/jazz/src/Dialogs/TrackDialog.h 2008-12-30 22:53:35 UTC (rev 661) @@ -40,6 +40,8 @@ private: + void SetPatchListEntries(); + virtual bool TransferDataToWindow(); virtual bool TransferDataFromWindow(); @@ -52,6 +54,8 @@ JZTrack& mTrack; + bool mLastTrackChannelWasDrums; + wxTextCtrl* mpTrackNameEdit; wxListBox* mpPatchListBox; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2009-01-01 03:12:34
|
Revision: 667 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=667&view=rev Author: pstieber Date: 2009-01-01 03:12:31 +0000 (Thu, 01 Jan 2009) Log Message: ----------- Added a new integer edit control class and a new filter dialog class. Added Paths: ----------- trunk/jazz/src/Dialogs/FilterDialog.cpp trunk/jazz/src/Dialogs/FilterDialog.h trunk/jazz/src/Dialogs/IntegerEdit.cpp trunk/jazz/src/Dialogs/IntegerEdit.h Added: trunk/jazz/src/Dialogs/FilterDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/FilterDialog.cpp (rev 0) +++ trunk/jazz/src/Dialogs/FilterDialog.cpp 2009-01-01 03:12:31 UTC (rev 667) @@ -0,0 +1,537 @@ +//***************************************************************************** +// The JAZZ++ Midi Sequencer +// +// Copyright (C) 2008 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. +//***************************************************************************** + +#include "FilterDialog.h" + +#include "../Filter.h" +#include "IntegerEdit.h" + +#include <wx/button.h> +#include <wx/checkbox.h> +#include <wx/msgdlg.h> +#include <wx/sizer.h> +#include <wx/stattext.h> +#include <wx/textctrl.h> + +#include <string> + +using namespace std; + +//***************************************************************************** +//***************************************************************************** +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +BEGIN_EVENT_TABLE(JZFilterDialog, wxDialog) + + EVT_BUTTON(wxID_HELP, JZFilterDialog::OnHelp) + +END_EVENT_TABLE() + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +JZFilterDialog::JZFilterDialog(JZFilter& Filter, wxWindow* pParent) + : wxDialog(pParent, wxID_ANY, wxString("Event Filter")), + mFilter(Filter), + mpFromTimeEdit(0), + mpToTimeEdit(0), + mpFromTrackEdit(0), + mpToTrackEdit(0), + mpNoteCheckBox(0), + mpNoteMinEdit(0), + mpNoteMaxEdit(0), + mpPolyAftertouchCheckBox(0), + mpPolyAftertouchMinEdit(0), + mpPolyAftertouchMaxEdit(0), + mpControllerCheckBox(0), + mpControllerMinEdit(0), + mpControllerMaxEdit(0), + mpPatchCheckBox(0), + mpPatchMinEdit(0), + mpPatchMaxEdit(0), + mpPitchCheckBox(0), + mpPitchMinEdit(0), + mpPitchMaxEdit(0), + mpMeterCheckBox(0), + mpChannelAftertouchCheckBox(0), + mpSysExCheckBox(0), + mpOtherBox(0) +{ + mpFromTimeEdit = new wxTextCtrl(this, wxID_ANY); + mpToTimeEdit = new wxTextCtrl(this, wxID_ANY); + + mpFromTrackEdit = new JZIntegerEdit(this, wxID_ANY); + mpFromTrackEdit->SetValueName("FromTrack"); + mpFromTrackEdit->SetMinAndMax(1, 127); + mpToTrackEdit = new JZIntegerEdit(this, wxID_ANY); + mpToTrackEdit->SetValueName("To Track"); + mpToTrackEdit->SetMinAndMax(1, 127); + + mpNoteCheckBox = new wxCheckBox(this, wxID_ANY, "Note"); + mpNoteMinEdit = new JZIntegerEdit(this, wxID_ANY); + mpNoteMinEdit->SetValueName("Note Minimum"); + mpNoteMinEdit->SetMinAndMax(0, 127); + mpNoteMaxEdit = new JZIntegerEdit(this, wxID_ANY); + mpNoteMaxEdit->SetValueName("Note Maximum"); + mpNoteMaxEdit->SetMinAndMax(0, 127); + + mpPolyAftertouchCheckBox = new wxCheckBox(this, wxID_ANY, "Poly Aftertouch"); + mpPolyAftertouchMinEdit = new JZIntegerEdit(this, wxID_ANY); + mpPolyAftertouchMinEdit->SetValueName("Poly Aftertouch Minimum"); + mpPolyAftertouchMinEdit->SetMinAndMax(0, 127); + mpPolyAftertouchMaxEdit = new JZIntegerEdit(this, wxID_ANY); + mpPolyAftertouchMaxEdit->SetValueName("Poly Aftertouch Maximum"); + mpPolyAftertouchMaxEdit->SetMinAndMax(0, 127); + + mpControllerCheckBox = new wxCheckBox(this, wxID_ANY, "Controller"); + mpControllerMinEdit = new JZIntegerEdit(this, wxID_ANY); + mpControllerMinEdit->SetValueName("Controller Minimum"); + mpControllerMinEdit->SetMinAndMax(0, 127); + mpControllerMaxEdit = new JZIntegerEdit(this, wxID_ANY); + mpControllerMaxEdit->SetValueName("Controller Maximum"); + mpControllerMaxEdit->SetMinAndMax(0, 127); + + mpPatchCheckBox = new wxCheckBox(this, wxID_ANY, "Patch"); + mpPatchMinEdit = new JZIntegerEdit(this, wxID_ANY); + mpPatchMinEdit->SetValueName("Patch Minimum"); + mpPatchMinEdit->SetMinAndMax(0, 127); + mpPatchMaxEdit = new JZIntegerEdit(this, wxID_ANY); + mpPatchMaxEdit->SetValueName("Patch Maximum"); + mpPatchMaxEdit->SetMinAndMax(0, 127); + + mpPitchCheckBox = new wxCheckBox(this, wxID_ANY, "Pitch"); + mpPitchMinEdit = new JZIntegerEdit(this, wxID_ANY); + mpPitchMinEdit->SetValueName("Pitch Minimum"); + mpPitchMinEdit->SetMinAndMax(-8192, 8192); + mpPitchMaxEdit = new JZIntegerEdit(this, wxID_ANY); + mpPitchMaxEdit->SetValueName("Pitch Maximum"); + mpPitchMaxEdit->SetMinAndMax(-8192, 8192); + + mpMeterCheckBox = new wxCheckBox(this, wxID_ANY, "Meter"); + + mpChannelAftertouchCheckBox = + new wxCheckBox(this, wxID_ANY, "Channel Aftertouch"); + + mpSysExCheckBox = new wxCheckBox(this, wxID_ANY, "SysEx"); + + mpOtherBox = new wxCheckBox(this, wxID_ANY, "Other"); + + 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); + + wxFlexGridSizer* pFlexGridSizer; + + pFlexGridSizer = new wxFlexGridSizer(2, 4, 4, 2); + + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "From Time:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpFromTimeEdit, + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "To Time:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpToTimeEdit, + 0, + wxALIGN_CENTER_VERTICAL); + + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "From Track:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpFromTrackEdit, + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "To Track:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpToTrackEdit, + 0, + wxALIGN_CENTER_VERTICAL); + + pTopSizer->Add(pFlexGridSizer, 0, wxCENTER | wxALL, 10); + + pFlexGridSizer = new wxFlexGridSizer(5, 5, 4, 2); + + pFlexGridSizer->Add( + mpNoteCheckBox, + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "Min:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpNoteMinEdit, + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "Max:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpNoteMaxEdit, + 0, + wxALIGN_CENTER_VERTICAL); + + pFlexGridSizer->Add( + mpPolyAftertouchCheckBox, + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "Min:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpPolyAftertouchMinEdit, + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "Max:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpPolyAftertouchMaxEdit, + 0, + wxALIGN_CENTER_VERTICAL); + + pFlexGridSizer->Add( + mpControllerCheckBox, + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "Min:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpControllerMinEdit, + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "Max:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpControllerMaxEdit, + 0, + wxALIGN_CENTER_VERTICAL); + + pFlexGridSizer->Add( + mpPatchCheckBox, + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "Min:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpPatchMinEdit, + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "Max:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpPatchMaxEdit, + 0, + wxALIGN_CENTER_VERTICAL); + + pFlexGridSizer->Add( + mpPitchCheckBox, + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "Min:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpPitchMinEdit, + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "Max:"), + 0, + wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpPitchMaxEdit, + 0, + wxALIGN_CENTER_VERTICAL); + + pTopSizer->Add(pFlexGridSizer, 0, wxCENTER | wxALL, 10); + + wxBoxSizer* pCheckBoxSizer = new wxBoxSizer(wxHORIZONTAL); + + pCheckBoxSizer->Add(mpMeterCheckBox, 0, wxALL, 5); + + pCheckBoxSizer->Add(mpChannelAftertouchCheckBox, 0, wxALL, 5); + + pCheckBoxSizer->Add(mpSysExCheckBox, 0, wxALL, 5); + + pCheckBoxSizer->Add(mpOtherBox, 0, wxALL, 5); + + pTopSizer->Add(pCheckBoxSizer, 0, wxCENTER | wxALL, 5); + + 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); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +bool JZFilterDialog::TransferDataToWindow() +{ + string TimeString; + + mFilter.GenerateFromTimeString(TimeString); + mpFromTimeEdit->ChangeValue(TimeString); + + mFilter.GenerateToTimeString(TimeString); + mpToTimeEdit->ChangeValue(TimeString); + + mpFromTrackEdit->SetNumber(mFilter.GetFromTrack()); + mpToTrackEdit->SetNumber(mFilter.GetToTrack()); + + bool Selected; + int FromValue, ToValue; + + mFilter.GetFilterEvent(eFilterKeyOn, Selected, FromValue, ToValue); + mpNoteCheckBox->SetValue(Selected); + mpNoteMinEdit->SetNumber(FromValue); + mpNoteMaxEdit->SetNumber(ToValue); + + mFilter.GetFilterEvent(eFilterKeyPressure, Selected, FromValue, ToValue); + mpPolyAftertouchCheckBox->SetValue(Selected); + mpPolyAftertouchMinEdit->SetNumber(FromValue); + mpPolyAftertouchMaxEdit->SetNumber(ToValue); + + mFilter.GetFilterEvent(eFilterControl, Selected, FromValue, ToValue); + mpControllerCheckBox->SetValue(Selected); + mpControllerMinEdit->SetNumber(FromValue); + mpControllerMaxEdit->SetNumber(ToValue); + + mFilter.GetFilterEvent(eFilterProgram, Selected, FromValue, ToValue); + mpPatchCheckBox->SetValue(Selected); + mpPatchMinEdit->SetNumber(FromValue); + mpPatchMaxEdit->SetNumber(ToValue); + + mFilter.GetFilterEvent(eFilterPitch, Selected, FromValue, ToValue); + mpPitchCheckBox->SetValue(Selected); + mpPitchMinEdit->SetNumber(FromValue); + mpPitchMaxEdit->SetNumber(ToValue); + + mpMeterCheckBox->SetValue(mFilter.GetFilterMeter()); + + mpChannelAftertouchCheckBox->SetValue(mFilter.GetFilterChannelAftertouch()); + + mpSysExCheckBox->SetValue(mFilter.GetFilterSysEx()); + + mpOtherBox->SetValue(mFilter.GetFilterOther()); + + return true; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +bool JZFilterDialog::TransferDataFromWindow() +{ + int FromTrack, ToTrack; + int NoteMin, NoteMax; + int PolyAftertouchMin, PolyAftertouchMax; + int ControllerMin, ControllerMax; + int PatchMin, PatchMax; + int PitchMin, PitchMax; + + if ( + mpFromTrackEdit->GetNumber(FromTrack) && + mpToTrackEdit->GetNumber(ToTrack) && + mpNoteMinEdit->GetNumber(NoteMin) && + mpNoteMaxEdit->GetNumber(NoteMax) && + mpPolyAftertouchMinEdit->GetNumber(PolyAftertouchMin) && + mpPolyAftertouchMaxEdit->GetNumber(PolyAftertouchMax) && + mpControllerMinEdit->GetNumber(ControllerMin) && + mpControllerMaxEdit->GetNumber(ControllerMax) && + mpPatchMinEdit->GetNumber(PatchMin) && + mpPatchMaxEdit->GetNumber(PatchMax) && + mpPitchMinEdit->GetNumber(PitchMin) && + mpPitchMaxEdit->GetNumber(PitchMax)) + { + if (FromTrack > ToTrack) + { + ::wxMessageBox( + "The From Track must be less than or equal to the To Track", + "Invalid Track Values", + wxOK | wxICON_EXCLAMATION, + this); + + mpFromTrackEdit->SetFocus(); + + return false; + } + + if (NoteMin > NoteMax) + { + ::wxMessageBox( + "The Minimum Note must be less than or equal to the Maximum Note", + "Invalid Note Values", + wxOK | wxICON_EXCLAMATION, + this); + + mpNoteMinEdit->SetFocus(); + + return false; + } + + if (PolyAftertouchMin > PolyAftertouchMax) + { + ::wxMessageBox( + "The Minimum Poly Aftertouch must be less than or equal to the Maximum" + " Poly Aftertouch", + "Invalid Poly Aftertouch Values", + wxOK | wxICON_EXCLAMATION, + this); + + mpPolyAftertouchMinEdit->SetFocus(); + + return false; + } + + if (ControllerMin > ControllerMax) + { + ::wxMessageBox( + "The Minimum Controller must be less than or equal to the Maximum" + " Controller", + "Invalid Controller Values", + wxOK | wxICON_EXCLAMATION, + this); + + mpControllerMinEdit->SetFocus(); + + return false; + } + + if (PatchMin > PatchMax) + { + ::wxMessageBox( + "The Minimum Patch must be less than or equal to the Maximum Patch", + "Invalid Patch Values", + wxOK | wxICON_EXCLAMATION, + this); + + mpPatchMinEdit->SetFocus(); + + return false; + } + + if (PitchMin > PitchMax) + { + ::wxMessageBox( + "The Minimum Pitch must be less than or equal to the Maximum Pitch", + "Invalid Pitch Values", + wxOK | wxICON_EXCLAMATION, + this); + + mpPitchMinEdit->SetFocus(); + + return false; + } + + string TimeString; + + TimeString = mpFromTimeEdit->GetValue(); + mFilter.SetFromTime(TimeString); + + TimeString = mpToTimeEdit->GetValue(); + mFilter.SetToTime(TimeString); + + mFilter.SetFromTrack(FromTrack); + mFilter.SetToTrack(ToTrack); + + mFilter.SetFilterEvent( + eFilterKeyOn, + mpNoteCheckBox->GetValue(), + NoteMin, + NoteMax); + + mFilter.SetFilterEvent( + eFilterKeyPressure, + mpPolyAftertouchCheckBox->GetValue(), + PolyAftertouchMin, + PolyAftertouchMax); + + mFilter.SetFilterEvent( + eFilterControl, + mpControllerCheckBox->GetValue(), + ControllerMin, + ControllerMax); + + mFilter.SetFilterEvent( + eFilterProgram, + mpPatchCheckBox->GetValue(), + PatchMin, + PatchMax); + + mFilter.SetFilterEvent( + eFilterPitch, + mpPitchCheckBox->GetValue(), + PitchMin, + PitchMax); + + mFilter.SetFilterMeter(mpMeterCheckBox->GetValue()); + + mFilter.SetFilterChannelAftertouch( + mpChannelAftertouchCheckBox->GetValue()); + + mFilter.SetFilterSysEx(mpSysExCheckBox->GetValue()); + + mFilter.SetFilterOther(mpOtherBox->GetValue()); + + return true; + } + + return false; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZFilterDialog::OnHelp(wxCommandEvent& Event) +{ +// gpHelpInstance->ShowTopic("Filter Dialog"); +} Property changes on: trunk/jazz/src/Dialogs/FilterDialog.cpp ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/jazz/src/Dialogs/FilterDialog.h =================================================================== --- trunk/jazz/src/Dialogs/FilterDialog.h (rev 0) +++ trunk/jazz/src/Dialogs/FilterDialog.h 2009-01-01 03:12:31 UTC (rev 667) @@ -0,0 +1,89 @@ +//***************************************************************************** +// The JAZZ++ Midi Sequencer +// +// Copyright (C) 2008 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_FILTERDIALOG_H +#define JZ_FILTERDIALOG_H + +#include <wx/dialog.h> + +class JZFilter; +class JZIntegerEdit; +class wxCheckBox; +class wxTextCtrl; + +//***************************************************************************** +//***************************************************************************** +class JZFilterDialog : public wxDialog +{ + public: + + JZFilterDialog(JZFilter& Filter, wxWindow* pParent); + + private: + + virtual bool TransferDataToWindow(); + + virtual bool TransferDataFromWindow(); + + void OnHelp(wxCommandEvent& Event); + + private: + + JZFilter& mFilter; + + wxTextCtrl* mpFromTimeEdit; + wxTextCtrl* mpToTimeEdit; + + JZIntegerEdit* mpFromTrackEdit; + JZIntegerEdit* mpToTrackEdit; + + wxCheckBox* mpNoteCheckBox; + JZIntegerEdit* mpNoteMinEdit; + JZIntegerEdit* mpNoteMaxEdit; + + wxCheckBox* mpPolyAftertouchCheckBox; + JZIntegerEdit* mpPolyAftertouchMinEdit; + JZIntegerEdit* mpPolyAftertouchMaxEdit; + + wxCheckBox* mpControllerCheckBox; + JZIntegerEdit* mpControllerMinEdit; + JZIntegerEdit* mpControllerMaxEdit; + + wxCheckBox* mpPatchCheckBox; + JZIntegerEdit* mpPatchMinEdit; + JZIntegerEdit* mpPatchMaxEdit; + + wxCheckBox* mpPitchCheckBox; + JZIntegerEdit* mpPitchMinEdit; + JZIntegerEdit* mpPitchMaxEdit; + + wxCheckBox* mpMeterCheckBox; + + wxCheckBox* mpChannelAftertouchCheckBox; + + wxCheckBox* mpSysExCheckBox; + + wxCheckBox* mpOtherBox; + + DECLARE_EVENT_TABLE(); +}; + + +#endif // !defined(JZ_FILTERDIALOG_H) Property changes on: trunk/jazz/src/Dialogs/FilterDialog.h ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/jazz/src/Dialogs/IntegerEdit.cpp =================================================================== --- trunk/jazz/src/Dialogs/IntegerEdit.cpp (rev 0) +++ trunk/jazz/src/Dialogs/IntegerEdit.cpp 2009-01-01 03:12:31 UTC (rev 667) @@ -0,0 +1,289 @@ +//***************************************************************************** +// The JAZZ++ Midi Sequencer +// +// Copyright (C) 2008 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. +//***************************************************************************** + +#include "IntegerEdit.h" + +#include <wx/msgdlg.h> + +#include <cstdlib> +#include <limits> +#include <sstream> + +using namespace std; + +//***************************************************************************** +// Description: +// This is the integer field edit class definition. +//***************************************************************************** +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +BEGIN_EVENT_TABLE(JZIntegerEdit, wxTextCtrl) + EVT_CHAR(JZIntegerEdit::OnChar) +END_EVENT_TABLE() + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +JZIntegerEdit::JZIntegerEdit( + wxWindow* pParent, + wxWindowID Id, + const wxPoint& Position, + const wxSize& Size, + long WindowStyle, + const wxValidator& Validator, + const wxString& Name) + : wxTextCtrl( + pParent, + Id, + wxEmptyString, + Position, + Size, + WindowStyle, + Validator, + Name), + mMin(numeric_limits<int>::min()), + mMax(numeric_limits<int>::max()), + mValueName() +{ +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZIntegerEdit::SetMinAndMax(int Min, int Max) +{ + if (Min <= Max) + { + mMin = Min; + mMax = Max; + } +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZIntegerEdit::SetValueName(const string& ValueName) +{ + mValueName = ValueName; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +bool JZIntegerEdit::GetNumber(int& Value) +{ + int TestValue; + bool Status = UnlimitedGetNumber(TestValue); + + ostringstream Oss; + if (mValueName.empty()) + { + Oss << "Value"; + } + else + { + Oss << mValueName; + } + + if (!Status) + { + Oss << " is not a valid number"; + } + else if (TestValue < mMin) + { + Oss << " must be greater than or equal to " << mMin; + Status = false; + } + else if (TestValue > mMax) + { + Oss << " must be less than or equal to " << mMax; + Status = false; + } + + if (!Status) + { + Oss << '.'; + ::wxMessageBox( + Oss.str().c_str(), + "Invalid Integer Value", + wxOK | wxICON_EXCLAMATION, + this); + SetFocus(); + SetSelection(0, GetLastPosition()); + } + else + { + Value = TestValue; + } + + return Status; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +bool JZIntegerEdit::IsValueValid(bool DisplayErrorMessage) +{ + int TestValue; + if (DisplayErrorMessage) + { + bool Status = UnlimitedGetNumber(TestValue); + // Prepare the initial portion of the error message. + ostringstream Oss; + if (mValueName.empty()) + { + Oss << "Value"; + } + else + { + Oss << mValueName; + } + if (!Status) + { + Oss << " is not a valid number"; + } + else if (TestValue < mMin) + { + Oss << " must be greater than or equal to " << mMin; + Status = false; + } + else if (TestValue > mMax) + { + Oss << " must be less than or equal to " << mMax; + Status = false; + } + if (!Status) + { + Oss << '.'; + ::wxMessageBox( + Oss.str().c_str(), + "Invalid Integer Value", + wxOK | wxICON_EXCLAMATION, + this); + SetFocus(); + SetSelection(0, GetLastPosition()); + } + return Status; + } + bool Status = UnlimitedGetNumber(TestValue); + if (!Status) + { + return false; + } + if (TestValue < mMin) + { + return false; + } + if (TestValue > mMax) + { + return false; + } + return true; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +bool JZIntegerEdit::UnlimitedGetNumber(int& Value) +{ + bool Status = true; + wxString ValueString = GetValue(); + long Test; + if (!ValueString.ToLong(&Test)) + { + Status = false; + Value = 0; + } + else + { + Value = static_cast<int>(Test); + } + return Status; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZIntegerEdit::SetNumber(int Value) +{ + if (Value < mMin) + { + Value = mMin; + } + if (Value > mMax) + { + Value = mMax; + } + ostringstream Oss; + Oss << Value; + wxString ValueString(Oss.str().c_str()); + + // Quickly check to see if the text is really going to change. + // This reduces flicker in the control and prevents false modification + // messages from being sent. + int NewLength = ValueString.Length(); + wxString OldString = GetValue(); + int OldLength = OldString.Length(); + if ( + NewLength > eStringLength || + OldLength != NewLength || + OldString != ValueString) + { + // Go ahead and change the text without sending a wxWidgets text changing + // event. + ChangeValue(ValueString); + } +} + +//----------------------------------------------------------------------------- +// Filter the keys processed by the control. +//----------------------------------------------------------------------------- +void JZIntegerEdit::OnChar(wxKeyEvent& Event) +{ + //------------------------------------- + // Check for non character adding keys. + // WARNING: Paste Ctrl-V is a problem! + // Should check the content and length + // of the paste, but don't know how! + //------------------------------------- + // The (Key >= 1 && Key <= 26) logic was added to to allow control keys + // through for cut an paste operations inside the control. The control + // key/operation pairs include + // 3 Ctrl-C for copy. + // 22 Ctrl-V for paste. + // 24 Ctrl-X for cut. + int Key = Event.GetKeyCode(); + if ( + (Key == WXK_BACK) || (Key == WXK_DELETE) || + (Key == WXK_LEFT) || (Key == WXK_RIGHT) || + (Key == WXK_UP) || (Key == WXK_DOWN) || + (Key == WXK_HOME) || (Key == WXK_END) || + (Key == WXK_INSERT) || + (Key >= 1 && Key <= 26)) + { + wxTextCtrl::OnChar(Event); + } + + // Limit the number of characters allowed. + wxString ValueString = GetValue(); + if (ValueString.Length() >= eStringLength) + { + return; + } + + // Only allow certain keys. + if ((Key >= '0' && Key <= '9') || Key == '-') + { + wxTextCtrl::OnChar(Event); + } +} Property changes on: trunk/jazz/src/Dialogs/IntegerEdit.cpp ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/jazz/src/Dialogs/IntegerEdit.h =================================================================== --- trunk/jazz/src/Dialogs/IntegerEdit.h (rev 0) +++ trunk/jazz/src/Dialogs/IntegerEdit.h 2009-01-01 03:12:31 UTC (rev 667) @@ -0,0 +1,79 @@ +//***************************************************************************** +// The JAZZ++ Midi Sequencer +// +// Copyright (C) 2008 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 TRC_INTEGEREDIT_H +#define TRC_INTEGEREDIT_H + +#include <wx/textctrl.h> + +#include <string> + +//***************************************************************************** +// Description: +// This is the integer edit class declaration. This is a control class +// that is used to edit integer values with minimum and maximum value +// checking. +//***************************************************************************** +class JZIntegerEdit : public wxTextCtrl +{ + public: + + enum TEConstants + { + eStringLength = 11 + }; + + JZIntegerEdit( + wxWindow* pParent, + wxWindowID Id, + const wxPoint& Position = wxDefaultPosition, + const wxSize& Size = wxDefaultSize, + long WindowStyle = 0, + const wxValidator& Validator = wxDefaultValidator, + const wxString& Name = wxTextCtrlNameStr); + + void SetMinAndMax(int Min, int Max); + + void SetValueName(const std::string& ValueName); + + virtual bool GetNumber(int& Value); + + virtual void SetNumber(int Value); + + virtual bool IsValueValid(bool DisplayErrorMessage = true); + + protected: + + void OnChar(wxKeyEvent& Event); + + bool UnlimitedGetNumber(int& Value); + + protected: + + int mMin; + + int mMax; + + std::string mValueName; + + DECLARE_EVENT_TABLE() +}; + +#endif // !defined(TRC_INTEGEREDIT_H) Property changes on: trunk/jazz/src/Dialogs/IntegerEdit.h ___________________________________________________________________ Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2009-01-19 17:58:19
|
Revision: 686 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=686&view=rev Author: pstieber Date: 2009-01-19 17:58:10 +0000 (Mon, 19 Jan 2009) Log Message: ----------- Made the parent an event window instead of an event frame. Still haven't hooked up the actual command. This is a WIP. Modified Paths: -------------- trunk/jazz/src/Dialogs/ShiftDialog.cpp trunk/jazz/src/Dialogs/ShiftDialog.h Modified: trunk/jazz/src/Dialogs/ShiftDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/ShiftDialog.cpp 2009-01-19 17:56:29 UTC (rev 685) +++ trunk/jazz/src/Dialogs/ShiftDialog.cpp 2009-01-19 17:58:10 UTC (rev 686) @@ -20,7 +20,9 @@ #include "ShiftDialog.h" +#include "../Command.h" #include "../Filter.h" +#include "../ProjectManager.h" #include "IntegerEdit.h" #include <wx/button.h> @@ -47,7 +49,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- JZShiftDialog::JZShiftDialog( - JZEventFrame& EventWindow, + JZEventWindow& EventWindow, JZFilter& Filter, wxWindow* pParent) : wxDialog(pParent, wxID_ANY, wxString("Shift")), @@ -526,6 +528,11 @@ mFilter.SetFilterOther(mpOtherBox->GetValue()); +// tCmdShift ShiftCommand(&mFilter, mSteps * mUnit); +// ShiftCommand.Execute(); + + JZProjectManager::Instance()->UpdateAllViews(); + return true; } Modified: trunk/jazz/src/Dialogs/ShiftDialog.h =================================================================== --- trunk/jazz/src/Dialogs/ShiftDialog.h 2009-01-19 17:56:29 UTC (rev 685) +++ trunk/jazz/src/Dialogs/ShiftDialog.h 2009-01-19 17:58:10 UTC (rev 686) @@ -23,7 +23,7 @@ #include <wx/dialog.h> -class JZEventFrame; +class JZEventWindow; class JZFilter; class JZIntegerEdit; class wxCheckBox; @@ -36,7 +36,7 @@ public: JZShiftDialog( - JZEventFrame& EventWindow, + JZEventWindow& EventWindow, JZFilter& Filter, wxWindow* pParent); @@ -89,5 +89,4 @@ DECLARE_EVENT_TABLE(); }; - #endif // !defined(JZ_SHIFTDIALOG_H) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2009-02-17 02:10:45
|
Revision: 713 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=713&view=rev Author: pstieber Date: 2009-02-17 02:08:49 +0000 (Tue, 17 Feb 2009) Log Message: ----------- Added a new length dialog. Added Paths: ----------- trunk/jazz/src/Dialogs/LengthDialog.cpp trunk/jazz/src/Dialogs/LengthDialog.h Added: trunk/jazz/src/Dialogs/LengthDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/LengthDialog.cpp (rev 0) +++ trunk/jazz/src/Dialogs/LengthDialog.cpp 2009-02-17 02:08:49 UTC (rev 713) @@ -0,0 +1,250 @@ +//***************************************************************************** +// The JAZZ++ Midi Sequencer +// +// Copyright (C) 2009 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. +//***************************************************************************** + +#include "LengthDialog.h" + +#include "../Globals.h" +#include "../Help.h" +#include "../Knob.h" +#include "../Resources.h" + +#include <wx/button.h> +#include <wx/radiobox.h> +#include <wx/sizer.h> +#include <wx/stattext.h> + +#include <sstream> + +using namespace std; + +//***************************************************************************** +//***************************************************************************** +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +BEGIN_EVENT_TABLE(JZLengthDialog, wxDialog) + + EVT_KNOB_CHANGED( + IDC_KB_LENGTH_START, + JZLengthDialog::OnLengthStartChange) + + EVT_KNOB_CHANGED( + IDC_KB_LENGTH_STOP, + JZLengthDialog::OnLengthStopChange) + + EVT_BUTTON(wxID_HELP, JZLengthDialog::OnHelp) + +END_EVENT_TABLE() + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +JZLengthDialog::JZLengthDialog( + wxWindow* pParent, + int TicksPerQuarter, + int& FromValue, + int& ToValue, + JEValueAlterationMode& Mode) + : wxDialog(pParent, wxID_ANY, wxString("Length")), + mFromValue(FromValue), + mToValue(ToValue), + mMode(Mode), + mpLengthStartKnob(0), + mpLengthStartValue(0), + mpLengthStopKnob(0), + mpLengthStopValue(0), + mpModeRadioBox(0) +{ + mpLengthStartKnob = new JZKnob( + this, + IDC_KB_LENGTH_START, + 0, + 0, + 4 * TicksPerQuarter); + mpLengthStartValue = new wxStaticText(this, wxID_ANY, "000"); + + mpLengthStopKnob = new JZKnob( + this, + IDC_KB_LENGTH_STOP, + 0, + 0, + 4 * TicksPerQuarter); + mpLengthStopValue = new wxStaticText(this, wxID_ANY, "000"); + + wxString Choices[] = + { + "Set Values", + "Add To Value", + "Subtract From Values" + }; + mpModeRadioBox = new wxRadioBox( + this, + wxID_ANY, + "Value Application Mode", + wxDefaultPosition, + wxDefaultSize, + 3, + Choices, + 1, + wxRA_SPECIFY_COLS); + + 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); + + wxString String; + + String << "Ticks per Quarter: " << TicksPerQuarter; + + pTopSizer->Add( + new wxStaticText(this, wxID_ANY, String), + 0, + wxALIGN_CENTER | wxALL, + 5); + + wxFlexGridSizer* pFlexGridSizer = new wxFlexGridSizer(2, 3, 4, 2); + + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "Start Length:"), + 0, + wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpLengthStartValue, + 0, + wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE); + pFlexGridSizer->Add(mpLengthStartKnob, 0, wxALIGN_CENTER_VERTICAL); + + pFlexGridSizer->Add( + new wxStaticText(this, wxID_ANY, "Stop Length:"), + 0, + wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add( + mpLengthStopValue, + 0, + wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE); + pFlexGridSizer->Add(mpLengthStopKnob, 0, wxALIGN_CENTER_VERTICAL); + + pTopSizer->Add(pFlexGridSizer, 0, wxALIGN_CENTER); + + pTopSizer->Add( + mpModeRadioBox, + 0, + wxALIGN_CENTER | wxALL, + 5); + + 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); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +bool JZLengthDialog::TransferDataToWindow() +{ + ostringstream Oss; + + Oss << mFromValue; + mpLengthStartValue->SetLabel(Oss.str().c_str()); + + mpLengthStartKnob->SetValue(mFromValue); + + Oss.str(""); + Oss << mToValue; + mpLengthStopValue->SetLabel(Oss.str().c_str()); + + mpLengthStopKnob->SetValue(mToValue); + + switch (mMode) + { + case eSetValues: + mpModeRadioBox->SetSelection(0); + break; + case eAddValues: + mpModeRadioBox->SetSelection(1); + break; + case eSubtractValues: + mpModeRadioBox->SetSelection(2); + break; + } + + return true; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +bool JZLengthDialog::TransferDataFromWindow() +{ + mFromValue = mpLengthStartKnob->GetValue(); + + mToValue = mpLengthStopKnob->GetValue(); + + int Selection = mpModeRadioBox->GetSelection(); + if (Selection == 1) + { + mMode = eAddValues; + } + else if (Selection == 2) + { + mMode = eSubtractValues; + } + else + { + mMode = eSetValues; + } + + return true; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZLengthDialog::OnLengthStartChange(JZKnobEvent& Event) +{ + int Value = Event.GetValue(); + ostringstream Oss; + Oss << Value; + mpLengthStartValue->SetLabel(Oss.str().c_str()); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZLengthDialog::OnLengthStopChange(JZKnobEvent& Event) +{ + int Value = Event.GetValue(); + ostringstream Oss; + Oss << Value; + mpLengthStopValue->SetLabel(Oss.str().c_str()); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZLengthDialog::OnHelp(wxCommandEvent& Event) +{ + gpHelpInstance->ShowTopic("Length"); +} Property changes on: trunk/jazz/src/Dialogs/LengthDialog.cpp ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/jazz/src/Dialogs/LengthDialog.h =================================================================== --- trunk/jazz/src/Dialogs/LengthDialog.h (rev 0) +++ trunk/jazz/src/Dialogs/LengthDialog.h 2009-02-17 02:08:49 UTC (rev 713) @@ -0,0 +1,74 @@ +//***************************************************************************** +// The JAZZ++ Midi Sequencer +// +// Copyright (C) 2009 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_LENGTHDIALOG_H +#define JZ_LENGTHDIALOG_H + +#include "../CommandUtilities.h" + +#include <wx/dialog.h> + +class JZKnob; +class JZKnobEvent; +class wxRadioBox; +class wxStaticText; + +//***************************************************************************** +//***************************************************************************** +class JZLengthDialog : public wxDialog +{ + public: + + JZLengthDialog( + wxWindow* pParent, + int TicksPerQuarter, + int& FromValue, + int& ToValue, + JEValueAlterationMode& Mode); + + private: + + virtual bool TransferDataToWindow(); + + virtual bool TransferDataFromWindow(); + + void OnLengthStartChange(JZKnobEvent& Event); + + void OnLengthStopChange(JZKnobEvent& Event); + + void OnHelp(wxCommandEvent& Event); + + private: + + int& mFromValue; + int& mToValue; + JEValueAlterationMode& mMode; + + JZKnob* mpLengthStartKnob; + wxStaticText* mpLengthStartValue; + JZKnob* mpLengthStopKnob; + wxStaticText* mpLengthStopValue; + + wxRadioBox* mpModeRadioBox; + + DECLARE_EVENT_TABLE(); +}; + +#endif // !defined(JZ_LENGTHDIALOG_H) Property changes on: trunk/jazz/src/Dialogs/LengthDialog.h ___________________________________________________________________ Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2010-04-25 23:59:49
|
Revision: 756 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=756&view=rev Author: pstieber Date: 2010-04-25 23:59:43 +0000 (Sun, 25 Apr 2010) Log Message: ----------- Started adding SysEx specific controls. Modified Paths: -------------- trunk/jazz/src/Dialogs/SysexDialog.cpp trunk/jazz/src/Dialogs/SysexDialog.h Modified: trunk/jazz/src/Dialogs/SysexDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/SysexDialog.cpp 2010-04-25 16:42:19 UTC (rev 755) +++ trunk/jazz/src/Dialogs/SysexDialog.cpp 2010-04-25 23:59:43 UTC (rev 756) @@ -22,8 +22,7 @@ #include "../Events.h" #include "../Globals.h" -#include "../KeyStringConverters.h" -#include "../Knob.h" +#include "../Help.h" #include "../Project.h" #include "../Resources.h" @@ -42,47 +41,20 @@ //----------------------------------------------------------------------------- BEGIN_EVENT_TABLE(JZSysexDialog, wxDialog) - EVT_KNOB_CHANGED(IDC_KB_VELOCITY, JZSysexDialog::OnVelocityChange) - - EVT_KNOB_CHANGED(IDC_KB_OFF_VELOCITY, JZSysexDialog::OnOffVelocityChange) - - EVT_KNOB_CHANGED(IDC_KB_CHANNEL, JZSysexDialog::OnChannelChange) - EVT_BUTTON(wxID_HELP, JZSysexDialog::OnHelp) END_EVENT_TABLE() //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -JZSysexDialog::JZSysexDialog(tKeyOn* pEvent, wxWindow* pParent) - : wxDialog(pParent, wxID_ANY, wxString("Key On")), - mpEvent(pEvent), - mpPitchEdit(0), - mpVelocityValue(0), - mpVelocityKnob(0), - mpOffVelocityValue(0), - mpOffVelocityKnob(0), - mpLengthEdit(0), - mpChannelValue(0), - mpChannelKnob(0), +JZSysexDialog::JZSysexDialog(tSysEx* pEvent, wxWindow* pParent) + : wxDialog(pParent, wxID_ANY, wxString("System Exclusive")), + mpSysExEvent(pEvent), + mpSysExEdit(0), mpClockEdit(0) { - mpPitchEdit = new wxTextCtrl(this, wxID_ANY); + mpSysExEdit = new wxTextCtrl(this, wxID_ANY); - mpVelocityValue = new wxStaticText(this, wxID_ANY, "000"); - - mpVelocityKnob = new JZKnob(this, IDC_KB_VELOCITY, 0, 0, 127); - - mpOffVelocityValue = new wxStaticText(this, wxID_ANY, "000"); - - mpOffVelocityKnob = new JZKnob(this, IDC_KB_OFF_VELOCITY, 0, 0, 127); - - mpLengthEdit = new wxTextCtrl(this, wxID_ANY); - - mpChannelValue = new wxStaticText(this, wxID_ANY, "00"); - - mpChannelKnob = new JZKnob(this, IDC_KB_CHANNEL, 0, 1, 16); - mpClockEdit = new wxTextCtrl(this, wxID_ANY); wxButton* pOkButton = new wxButton(this, wxID_OK, "&OK"); @@ -92,72 +64,38 @@ wxBoxSizer* pTopSizer = new wxBoxSizer(wxVERTICAL); - wxFlexGridSizer* pFlexGridSizer; - - pFlexGridSizer = new wxFlexGridSizer(1, 2, 4, 2); - - pFlexGridSizer->Add( - new wxStaticText(this, wxID_ANY, "Pitch:"), + pTopSizer->Add( + new wxStaticText( + this, + wxID_ANY, + "Example input: f0 7f 7f 04 01 00 7f f7"), 0, - wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - pFlexGridSizer->Add(mpPitchEdit, 0, wxALIGN_CENTER_VERTICAL); + wxCENTER | wxALL, + 5); - pTopSizer->Add(pFlexGridSizer, 0, wxCENTER | wxALL, 2); - - pFlexGridSizer = new wxFlexGridSizer(2, 3, 4, 2); - - pFlexGridSizer->Add( - new wxStaticText(this, wxID_ANY, "Velocity:"), + pTopSizer->Add( + new wxStaticText( + this, + wxID_ANY, + "Any DT1/RQ1 checksums will be corrected"), 0, - wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - pFlexGridSizer->Add( - mpVelocityValue, - 0, - wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE); - pFlexGridSizer->Add(mpVelocityKnob, 0, wxALIGN_CENTER_VERTICAL); + wxCENTER | wxALL, + 5); - pFlexGridSizer->Add( - new wxStaticText(this, wxID_ANY, "Off Velocity:"), - 0, - wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - pFlexGridSizer->Add( - mpOffVelocityValue, - 0, - wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE); - pFlexGridSizer->Add(mpOffVelocityKnob, 0, wxALIGN_CENTER_VERTICAL); + wxFlexGridSizer* pFlexGridSizer; - pTopSizer->Add(pFlexGridSizer, 0, wxALIGN_CENTER); + pFlexGridSizer = new wxFlexGridSizer(2, 2, 4, 2); - pFlexGridSizer = new wxFlexGridSizer(1, 2, 4, 2); - pFlexGridSizer->Add( - new wxStaticText(this, wxID_ANY, "Length:"), + new wxStaticText(this, wxID_ANY, "SysEx (hex):"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - pFlexGridSizer->Add(mpLengthEdit, 0, wxALIGN_CENTER_VERTICAL); + pFlexGridSizer->Add(mpSysExEdit, 0, wxALIGN_CENTER_VERTICAL); - pTopSizer->Add(pFlexGridSizer, 0, wxCENTER | wxALL, 2); - - pFlexGridSizer = new wxFlexGridSizer(1, 3, 4, 2); - pFlexGridSizer->Add( - new wxStaticText(this, wxID_ANY, "Channel:"), + new wxStaticText(this, wxID_ANY, "Time:"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - pFlexGridSizer->Add( - mpChannelValue, - 0, - wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE); - pFlexGridSizer->Add(mpChannelKnob, 0, wxALIGN_CENTER_VERTICAL); - - pTopSizer->Add(pFlexGridSizer, 0, wxCENTER | wxALL, 2); - - pFlexGridSizer = new wxFlexGridSizer(1, 2, 4, 2); - - pFlexGridSizer->Add( - new wxStaticText(this, wxID_ANY, "Clock:"), - 0, - wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); pFlexGridSizer->Add(mpClockEdit, 0, wxALIGN_CENTER_VERTICAL); pTopSizer->Add(pFlexGridSizer, 0, wxCENTER | wxALL, 2); @@ -180,35 +118,24 @@ //----------------------------------------------------------------------------- bool JZSysexDialog::TransferDataToWindow() { - string KeyString; - KeyToString(mpEvent->GetKey(), KeyString); - mpPitchEdit->ChangeValue(KeyString.c_str()); + const unsigned char* pSysExData = mpSysExEvent->GetData(); + unsigned short Length = mpSysExEvent->GetDataLength(); ostringstream Oss; - Oss << (int)mpEvent->GetVelocity(); - mpVelocityValue->SetLabel(Oss.str().c_str()); + for (unsigned short i = 0; i < Length; ++i) + { + Oss << hex << pSysExData[i]; + if (i < Length - 1) + { + Oss << ' '; + } + } - mpVelocityKnob->SetValue(mpEvent->GetVelocity()); + mpSysExEdit->ChangeValue(Oss.str().c_str()); - Oss.str(""); - Oss << (int)mpEvent->GetOffVelocity(); - mpOffVelocityValue->SetLabel(Oss.str().c_str()); - - mpOffVelocityKnob->SetValue(mpEvent->GetOffVelocity()); - - wxString LengthString; - LengthString << mpEvent->GetEventLength(); - mpLengthEdit->ChangeValue(LengthString); - - Oss.str(""); - Oss << (int)mpEvent->GetChannel() + 1; - mpChannelValue->SetLabel(Oss.str().c_str()); - - mpChannelKnob->SetValue(mpEvent->GetChannel() + 1); - string ClockString; - gpProject->ClockToString(mpEvent->GetClock(), ClockString); + gpProject->ClockToString(mpSysExEvent->GetClock(), ClockString); mpClockEdit->ChangeValue(ClockString.c_str()); return true; @@ -218,61 +145,62 @@ //----------------------------------------------------------------------------- bool JZSysexDialog::TransferDataFromWindow() { - wxString KeyString = mpPitchEdit->GetValue(); - mpEvent->SetKey(StringToKey(KeyString.c_str())); + wxString KeyString = mpSysExEdit->GetValue(); - mpEvent->SetVelocity(mpVelocityKnob->GetValue()); + //TODO Need to validate the SysEx message. The Roland SysEx message is + // made up of nine parts. All notation is in hex. + // + // [1] [2] [3] [4] [5] [6] [7] [8] [9] + // F0 41 10 42 12 40007F 00 41 F7 + // + // Parts [1], [2] and [9] are part of the MIDI specification and are + // required by all SysEx messages. What is in between is specific to the + // manufacturer, identified by part [2], which is 41h in Roland's case. + // + // Part [3] is known as the Device ID. Most Roland MIDI devices use the + // default of 10h, but is provided for us to change as we see fit. The idea + // behind the Device ID is that if you have more than one MIDI device of the + // same type in a daisy chain (connected to one another) you can change the + // Device ID on each of them so that you can send SysEx messages that will + // be accepted by only one of them, not all. + // + // Part [4] is the Model ID. GS synthesizers will all respond to SysEx with + // a Model ID of 42h, however they generally have their own Model ID as well. + // + // Part [5] specifies whether we are sending (12h) or requesting (11h) + // information. If a synth receives a SysEx message it recognizes, it will + // look this part to determine whether it needs to change an internal + // setting or reply (with its own SysEx message) with the value of a + // setting. + // + // Part [6] is the start address on which the SysEx intends to act. It is + // at this address that you may wish to put a value (or values) or retrieve + // the current value(s). It always contains three bytes. Most synthesizer + // manuals will provide you with a long "address map" table which explains + // what lives at each address. Although daunting on a first perusal, once + // you understand its function it becomes a wonderful resource. + // + // Part [7] has two functions. If part [5] is 12h (sending data) then part + // [7] contains the data we are sending and can be one byte or many bytes + // in length. If it is 11h (requesting data) then it is the number of bytes + // we want the synth to send us. + // + // Part [8] is the Roland checksum. + // + // Also need a function to set SysEx event data. +// gpSynth->FixSysexCheckSum(Copy->IsSysEx()); +// mpSysExEvent->SetData(???); - mpEvent->SetOffVelocity(mpOffVelocityKnob->GetValue()); - - wxString LengthString = mpLengthEdit->GetValue(); - istringstream Iss(LengthString.c_str()); - unsigned short Length; - Iss >> Length; - mpEvent->SetLength(Length); - - mpEvent->SetChannel(mpChannelKnob->GetValue() - 1); - wxString ClockString = mpClockEdit->GetValue(); int Clock = gpProject->StringToClock(ClockString.c_str()); - mpEvent->SetClock(Clock); + mpSysExEvent->SetClock(Clock); return true; } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void JZSysexDialog::OnVelocityChange(JZKnobEvent& Event) -{ - int Value = Event.GetValue(); - ostringstream Oss; - Oss << Value; - mpVelocityValue->SetLabel(Oss.str().c_str()); -} - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -void JZSysexDialog::OnOffVelocityChange(JZKnobEvent& Event) -{ - int Value = Event.GetValue(); - ostringstream Oss; - Oss << Value; - mpOffVelocityValue->SetLabel(Oss.str().c_str()); -} - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -void JZSysexDialog::OnChannelChange(JZKnobEvent& Event) -{ - int Value = Event.GetValue(); - ostringstream Oss; - Oss << Value; - mpChannelValue->SetLabel(Oss.str().c_str()); -} - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- void JZSysexDialog::OnHelp(wxCommandEvent& Event) { -// gpHelpInstance->ShowTopic("Sysex Dialog"); + gpHelpInstance->ShowTopic("Sysex Dialog"); } Modified: trunk/jazz/src/Dialogs/SysexDialog.h =================================================================== --- trunk/jazz/src/Dialogs/SysexDialog.h 2010-04-25 16:42:19 UTC (rev 755) +++ trunk/jazz/src/Dialogs/SysexDialog.h 2010-04-25 23:59:43 UTC (rev 756) @@ -25,7 +25,7 @@ class JZKnob; class JZKnobEvent; -class tKeyOn; +class tSysEx; class wxStaticText; class wxTextCtrl; @@ -35,7 +35,7 @@ { public: - JZSysexDialog(tKeyOn* pEvent, wxWindow* pParent); + JZSysexDialog(tSysEx* pEvent, wxWindow* pParent); private: @@ -43,26 +43,13 @@ virtual bool TransferDataFromWindow(); - void OnVelocityChange(JZKnobEvent& Event); - - void OnOffVelocityChange(JZKnobEvent& Event); - - void OnChannelChange(JZKnobEvent& Event); - void OnHelp(wxCommandEvent& Event); private: - tKeyOn* mpEvent; + tSysEx* mpSysExEvent; - wxTextCtrl* mpPitchEdit; - wxStaticText* mpVelocityValue; - JZKnob* mpVelocityKnob; - wxStaticText* mpOffVelocityValue; - JZKnob* mpOffVelocityKnob; - wxTextCtrl* mpLengthEdit; - wxStaticText* mpChannelValue; - JZKnob* mpChannelKnob; + wxTextCtrl* mpSysExEdit; wxTextCtrl* mpClockEdit; DECLARE_EVENT_TABLE(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2010-07-17 19:13:54
|
Revision: 806 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=806&view=rev Author: pstieber Date: 2010-07-17 19:13:48 +0000 (Sat, 17 Jul 2010) Log Message: ----------- Added a check box to set an audio track. Modified Paths: -------------- trunk/jazz/src/Dialogs/TrackDialog.cpp trunk/jazz/src/Dialogs/TrackDialog.h Modified: trunk/jazz/src/Dialogs/TrackDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/TrackDialog.cpp 2010-07-17 18:35:01 UTC (rev 805) +++ trunk/jazz/src/Dialogs/TrackDialog.cpp 2010-07-17 19:13:48 UTC (rev 806) @@ -27,6 +27,7 @@ #include "../Track.h" #include <wx/button.h> +#include <wx/checkbox.h> #include <wx/listbox.h> #include <wx/sizer.h> #include <wx/stattext.h> @@ -57,7 +58,8 @@ mpTrackNameEdit(0), mpPatchListBox(0), mpChannelValue(0), - mpChannelKnob(0) + mpChannelKnob(0), + mpAudioModeCheckBox(0) { mpTrackNameEdit = new wxTextCtrl(this, wxID_ANY); @@ -68,6 +70,8 @@ mpChannelKnob = new JZKnob(this, IDC_KB_CHANNEL, 0, 1, 16); + mpAudioModeCheckBox = new wxCheckBox(this, wxID_ANY, "Audio Track"); + wxButton* pOkButton = new wxButton(this, wxID_OK, "&OK"); wxButton* pCancelButton = new wxButton(this, wxID_CANCEL, "Cancel"); wxButton* pHelpButton = new wxButton(this, wxID_HELP, "Help"); @@ -103,6 +107,7 @@ pTopSizer->Add(pFlexGridSizer, 0, wxCENTER | wxALL, 2); + pTopSizer->Add(mpAudioModeCheckBox, 0, wxALL, 2); wxBoxSizer* pButtonSizer = new wxBoxSizer(wxHORIZONTAL); pButtonSizer->Add(pOkButton, 0, wxALL, 5); @@ -176,6 +181,8 @@ mpChannelKnob->SetValue(mTrack.Channel); + mpAudioModeCheckBox->SetValue(mTrack.GetAudioMode()); + return true; } @@ -194,6 +201,7 @@ mTrack.SetPatch(Patch); mTrack.SetBank(Bank); mTrack.Channel = mpChannelKnob->GetValue(); + mTrack.SetAudioMode(mpAudioModeCheckBox->GetValue()); } return true; Modified: trunk/jazz/src/Dialogs/TrackDialog.h =================================================================== --- trunk/jazz/src/Dialogs/TrackDialog.h 2010-07-17 18:35:01 UTC (rev 805) +++ trunk/jazz/src/Dialogs/TrackDialog.h 2010-07-17 19:13:48 UTC (rev 806) @@ -26,6 +26,7 @@ class JZKnob; class JZKnobEvent; class JZTrack; +class wxCheckBox; class wxListBox; class wxStaticText; class wxTextCtrl; @@ -64,6 +65,8 @@ JZKnob* mpChannelKnob; + wxCheckBox* mpAudioModeCheckBox; + DECLARE_EVENT_TABLE(); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2011-08-04 20:00:29
|
Revision: 862 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=862&view=rev Author: pstieber Date: 2011-08-04 20:00:23 +0000 (Thu, 04 Aug 2011) Log Message: ----------- Removed unneeded .c_str() calls. Modified Paths: -------------- trunk/jazz/src/Dialogs/SetTempoDialog.cpp trunk/jazz/src/Dialogs/SysexDialog.cpp trunk/jazz/src/Dialogs/TextDialog.cpp Modified: trunk/jazz/src/Dialogs/SetTempoDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/SetTempoDialog.cpp 2011-08-04 17:55:07 UTC (rev 861) +++ trunk/jazz/src/Dialogs/SetTempoDialog.cpp 2011-08-04 20:00:23 UTC (rev 862) @@ -112,7 +112,7 @@ string ClockString; gpProject->ClockToString(mpSetTempoEvent->GetClock(), ClockString); - mpClockEdit->ChangeValue(ClockString.c_str()); + mpClockEdit->ChangeValue(ClockString); return true; } @@ -127,7 +127,7 @@ mpSetTempoEvent->SetBPM(BeatsPerMinute); wxString ClockString = mpClockEdit->GetValue(); - int Clock = gpProject->StringToClock(ClockString.c_str()); + int Clock = gpProject->StringToClock(ClockString); mpSetTempoEvent->SetClock(Clock); return true; Modified: trunk/jazz/src/Dialogs/SysexDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/SysexDialog.cpp 2011-08-04 17:55:07 UTC (rev 861) +++ trunk/jazz/src/Dialogs/SysexDialog.cpp 2011-08-04 20:00:23 UTC (rev 862) @@ -135,11 +135,11 @@ } } - mpSysExEdit->ChangeValue(Oss.str().c_str()); + mpSysExEdit->ChangeValue(Oss.str()); string ClockString; gpProject->ClockToString(mpSysExEvent->GetClock(), ClockString); - mpClockEdit->ChangeValue(ClockString.c_str()); + mpClockEdit->ChangeValue(ClockString); return true; } @@ -195,7 +195,7 @@ // mpSysExEvent->SetData(???); wxString ClockString = mpClockEdit->GetValue(); - int Clock = gpProject->StringToClock(ClockString.c_str()); + int Clock = gpProject->StringToClock(ClockString); mpSysExEvent->SetClock(Clock); return true; Modified: trunk/jazz/src/Dialogs/TextDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/TextDialog.cpp 2011-08-04 17:55:07 UTC (rev 861) +++ trunk/jazz/src/Dialogs/TextDialog.cpp 2011-08-04 20:00:23 UTC (rev 862) @@ -107,7 +107,7 @@ string ClockString; gpProject->ClockToString(mpTextEvent->GetClock(), ClockString); - mpClockEdit->ChangeValue(ClockString.c_str()); + mpClockEdit->ChangeValue(ClockString); return true; } @@ -117,10 +117,10 @@ bool JZTextDialog::TransferDataFromWindow() { wxString Text = mpTextEdit->GetValue(); - mpTextEvent->SetText(Text.c_str()); + mpTextEvent->SetText(Text); wxString ClockString = mpClockEdit->GetValue(); - int Clock = gpProject->StringToClock(ClockString.c_str()); + int Clock = gpProject->StringToClock(ClockString); mpTextEvent->SetClock(Clock); return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |