From: <pst...@us...> - 2009-02-16 22:22:25
|
Revision: 702 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=702&view=rev Author: pstieber Date: 2009-02-16 21:36:54 +0000 (Mon, 16 Feb 2009) Log Message: ----------- 1. Moved dialog creation for from the event frame to the event window. This allowed the removal of the filter from the frame class. 2. Removed the mixer dialog and character handling code from the event frame class. 3. Changed the passed parent window from an event frame to an event window in several dialog box classes. Modified Paths: -------------- trunk/jazz/src/Dialogs.cpp trunk/jazz/src/Dialogs.h trunk/jazz/src/EventFrame.cpp trunk/jazz/src/EventFrame.h trunk/jazz/src/EventWindow.cpp trunk/jazz/src/EventWindow.h Modified: trunk/jazz/src/Dialogs.cpp =================================================================== --- trunk/jazz/src/Dialogs.cpp 2009-02-16 21:03:09 UTC (rev 701) +++ trunk/jazz/src/Dialogs.cpp 2009-02-16 21:36:54 UTC (rev 702) @@ -111,7 +111,7 @@ -tCleanupDlg::tCleanupDlg(JZEventFrame *w, JZFilter *f) +tCleanupDlg::tCleanupDlg(JZEventWindow* w, JZFilter *f) : tPropertyListDlg( "Clean up events" ) { Filter = f; @@ -191,7 +191,7 @@ int tSearchReplaceDlg::frCtrl = 1; int tSearchReplaceDlg::toCtrl = 1; -tSearchReplaceDlg::tSearchReplaceDlg(JZEventFrame *w, JZFilter *f) +tSearchReplaceDlg::tSearchReplaceDlg(JZEventWindow* w, JZFilter *f) : tPropertyListDlg("Search and replace controller types" ) { Filter = f; @@ -239,7 +239,7 @@ int tTransposeDlg::Scale = gScaleChromatic; bool tTransposeDlg::FitIntoScale = 0; -tTransposeDlg::tTransposeDlg(JZEventFrame *w, JZFilter *f) +tTransposeDlg::tTransposeDlg(JZEventWindow* w, JZFilter *f) : tPropertyListDlg("Transpose") { Filter = f; @@ -390,7 +390,7 @@ int tLengthDlg::Mode; -tLengthDlg::tLengthDlg(JZEventFrame *w, JZFilter *f) +tLengthDlg::tLengthDlg(JZEventWindow* w, JZFilter *f) : tPropertyListDlg("Length") { Filter = f; @@ -553,7 +553,7 @@ bool tDeleteDlg::LeaveSpace = 1; -tDeleteDlg::tDeleteDlg(JZEventFrame *w, JZFilter *f) +tDeleteDlg::tDeleteDlg(JZEventWindow* w, JZFilter *f) : tPropertyListDlg("Delete" ) { Filter = f; Modified: trunk/jazz/src/Dialogs.h =================================================================== --- trunk/jazz/src/Dialogs.h 2009-02-16 21:03:09 UTC (rev 701) +++ trunk/jazz/src/Dialogs.h 2009-02-16 21:36:54 UTC (rev 702) @@ -59,7 +59,7 @@ JZFilter *Filter; JZSong *Song; - tCleanupDlg(JZEventFrame *w, JZFilter *f); + tCleanupDlg(JZEventWindow* w, JZFilter *f); void AddProperties(); //tNamedChoice Steps; bool OnClose(); @@ -78,7 +78,7 @@ JZFilter *Filter; JZSong *Song; - tSearchReplaceDlg(JZEventFrame *w, JZFilter *f); + tSearchReplaceDlg(JZEventWindow* w, JZFilter *f); void AddProperties(); bool OnClose(); void OnHelp(); @@ -97,7 +97,7 @@ JZSong *Song; //tNamedChoice ScaleDlg; - tTransposeDlg(JZEventFrame *w, JZFilter *f); + tTransposeDlg(JZEventWindow* w, JZFilter *f); void AddProperties(); bool OnClose(); void OnHelp(); @@ -147,7 +147,7 @@ JZFilter *Filter; JZSong *Song; - tLengthDlg(JZEventFrame *win, JZFilter *f); + tLengthDlg(JZEventWindow* win, JZFilter *f); void AddProperties(); bool OnClose(); void OnHelp(); @@ -195,7 +195,7 @@ public: static bool LeaveSpace; // 1 - tDeleteDlg(JZEventFrame *w, JZFilter *f); + tDeleteDlg(JZEventWindow* w, JZFilter *f); void AddProperties(); bool OnClose(); void OnHelp(); Modified: trunk/jazz/src/EventFrame.cpp =================================================================== --- trunk/jazz/src/EventFrame.cpp 2009-02-16 21:03:09 UTC (rev 701) +++ trunk/jazz/src/EventFrame.cpp 2009-02-16 21:36:54 UTC (rev 702) @@ -1,15 +1,9 @@ #include "EventFrame.h" -#include "Command.h" -#include "Dialogs.h" #include "EventWindow.h" -#include "Filter.h" #include "Resources.h" #include "ToolBar.h" -#include <wx/dc.h> -#include <wx/msgdlg.h> - #include <iostream> using namespace std; @@ -37,26 +31,16 @@ const wxSize& Size, long WindowStyle) : wxFrame(pParent, wxID_ANY, Title, Position, Size, WindowStyle), - mpFilter(0), - MixerForm(0), mpToolBar(0), mpEventWindow(0) { - mpFilter = new JZFilter(pSong); } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- JZEventFrame::~JZEventFrame() { - delete mpFilter; - delete mpToolBar; - - if (MixerForm) - { - delete MixerForm; - } } //----------------------------------------------------------------------------- @@ -70,13 +54,6 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -bool JZEventFrame::OnKeyEvent(wxKeyEvent& KeyEvent) -{ - return false; -} - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- bool JZEventFrame::OnClose() { return false; @@ -102,13 +79,6 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -bool JZEventFrame::OnCharHook(wxKeyEvent& KeyEvent) -{ - return OnKeyEvent(KeyEvent); -} - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- void JZEventFrame::OnUpdateEventsSelected(wxUpdateUIEvent& Event) { if (mpEventWindow) @@ -147,11 +117,8 @@ { if (!mpEventWindow || !mpEventWindow->AreEventsSelected()) { - return; + mpEventWindow->SetChannel(); } - - tSetChannelDlg * dlg = new tSetChannelDlg(mpFilter); - dlg->Create(); } //----------------------------------------------------------------------------- @@ -160,11 +127,8 @@ { if (!mpEventWindow || !mpEventWindow->AreEventsSelected()) { - return; + mpEventWindow->Transpose(); } - - tTransposeDlg * dlg = new tTransposeDlg(this, mpFilter); - dlg->Create(); } //----------------------------------------------------------------------------- @@ -173,11 +137,8 @@ { if (!mpEventWindow || !mpEventWindow->AreEventsSelected()) { - return; + mpEventWindow->Delete(); } - - tDeleteDlg * dlg = new tDeleteDlg(this, mpFilter); - dlg->Create(); } //----------------------------------------------------------------------------- @@ -186,11 +147,8 @@ { if (!mpEventWindow || !mpEventWindow->AreEventsSelected()) { - return; + mpEventWindow->Velocity(); } - - tVelocityDlg * dlg = new tVelocityDlg(mpFilter); - dlg->Create(); } //----------------------------------------------------------------------------- @@ -199,11 +157,8 @@ { if (!mpEventWindow || !mpEventWindow->AreEventsSelected()) { - return; + mpEventWindow->Length(); } - - tLengthDlg * dlg = new tLengthDlg(this, mpFilter); - dlg->Create(); } //----------------------------------------------------------------------------- @@ -212,12 +167,8 @@ { if (!mpEventWindow || !mpEventWindow->AreEventsSelected()) { - return; + mpEventWindow->ConvertToModulation(); } - - tCmdConvertToModulation cmd(mpFilter); - cmd.Execute(); - Redraw(); } //----------------------------------------------------------------------------- @@ -226,11 +177,8 @@ { if (!mpEventWindow || !mpEventWindow->AreEventsSelected()) { - return; + mpEventWindow->Cleanup(); } - - tCleanupDlg * dlg = new tCleanupDlg(this, mpFilter); - dlg->Create(); } //----------------------------------------------------------------------------- @@ -239,11 +187,8 @@ { if (!mpEventWindow || !mpEventWindow->AreEventsSelected()) { - return; + mpEventWindow->SearchReplace(); } - - tSearchReplaceDlg * dlg = new tSearchReplaceDlg(this, mpFilter); - dlg->Create(); } //----------------------------------------------------------------------------- Modified: trunk/jazz/src/EventFrame.h =================================================================== --- trunk/jazz/src/EventFrame.h 2009-02-16 21:03:09 UTC (rev 701) +++ trunk/jazz/src/EventFrame.h 2009-02-16 21:36:54 UTC (rev 702) @@ -26,7 +26,6 @@ #include <wx/frame.h> class JZEventWindow; -class JZFilter; class JZSong; class JZToolBar; class wxDialog; @@ -56,23 +55,13 @@ virtual void SetEventWindow(JZEventWindow* pEventWindow); - // Events - virtual bool OnKeyEvent(wxKeyEvent& Event); // true = processed by eventwin virtual bool OnClose(); // Redraw - nach Aenderungen von Parametern, kein GUI-Event virtual void Redraw(); - - JZFilter* mpFilter; - - // Mixer-Dialog - wxDialog* MixerForm; - private: - bool OnCharHook(wxKeyEvent& Event); - void OnUpdateEventsSelected(wxUpdateUIEvent& Event); void OnShift(wxCommandEvent& Event); Modified: trunk/jazz/src/EventWindow.cpp =================================================================== --- trunk/jazz/src/EventWindow.cpp 2009-02-16 21:03:09 UTC (rev 701) +++ trunk/jazz/src/EventWindow.cpp 2009-02-16 21:36:54 UTC (rev 702) @@ -170,6 +170,71 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- +void JZEventWindow::SetChannel() +{ + tSetChannelDlg * dlg = new tSetChannelDlg(mpFilter); + dlg->Create(); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZEventWindow::Transpose() +{ + tTransposeDlg * dlg = new tTransposeDlg(this, mpFilter); + dlg->Create(); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZEventWindow::Delete() +{ + tDeleteDlg * dlg = new tDeleteDlg(this, mpFilter); + dlg->Create(); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZEventWindow::Velocity() +{ + tVelocityDlg * dlg = new tVelocityDlg(mpFilter); + dlg->Create(); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZEventWindow::Length() +{ + tLengthDlg * dlg = new tLengthDlg(this, mpFilter); + dlg->Create(); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZEventWindow::ConvertToModulation() +{ + tCmdConvertToModulation cmd(mpFilter); + cmd.Execute(); + Refresh(); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZEventWindow::Cleanup() +{ + tCleanupDlg * dlg = new tCleanupDlg(this, mpFilter); + dlg->Create(); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZEventWindow::SearchReplace() +{ + tSearchReplaceDlg * dlg = new tSearchReplaceDlg(this, mpFilter); + dlg->Create(); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZEventWindow::EditMeter() { if (!IsEditingMeter()) Modified: trunk/jazz/src/EventWindow.h =================================================================== --- trunk/jazz/src/EventWindow.h 2009-02-16 21:03:09 UTC (rev 701) +++ trunk/jazz/src/EventWindow.h 2009-02-16 21:36:54 UTC (rev 702) @@ -59,6 +59,22 @@ void Quantize(); + void SetChannel(); + + void Transpose(); + + void Delete(); + + void Velocity(); + + void Length(); + + void ConvertToModulation(); + + void Cleanup(); + + void SearchReplace(); + void EditMeter(); bool IsEditingMeter() const; void FinishMeterEdit(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |