From: <pst...@us...> - 2008-03-31 04:10:31
|
Revision: 378 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=378&view=rev Author: pstieber Date: 2008-03-30 21:10:22 -0700 (Sun, 30 Mar 2008) Log Message: ----------- 1. Prefixed shift dialog data members with m, and changed EventWin to mpEventWindow in every class. 2. Made some cosmetic changes. Modified Paths: -------------- trunk/jazz/src/Dialogs.cpp trunk/jazz/src/Dialogs.h Modified: trunk/jazz/src/Dialogs.cpp =================================================================== --- trunk/jazz/src/Dialogs.cpp 2008-03-31 04:07:20 UTC (rev 377) +++ trunk/jazz/src/Dialogs.cpp 2008-03-31 04:10:22 UTC (rev 378) @@ -48,57 +48,54 @@ // ************************************************************************** // Shift // ************************************************************************* - - -//long tShiftDlg::Steps = 0; - -tShiftDlg::tShiftDlg(JZEventFrame *w, JZFilter *f, long unit) -: tPropertyListDlg( "Shift events left/right" ) +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +tShiftDlg::tShiftDlg(JZEventFrame* pEventWindow, JZFilter* pFilter, long unit) + : tPropertyListDlg("Shift events left/right"), + mSteps(0), + mUnit(unit), + mpEventWindow(pEventWindow), + mpFilter(pFilter), + mpSong(pFilter->mpSong) { - Filter = f; - Song = f->mpSong; - Unit = unit; - EventWin = w; - Steps=0; } - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- bool tShiftDlg::OnClose() { - cout << "tShiftDlg::OnClose "<<Steps<<endl; - tCmdShift cmd(Filter, Steps * Unit); + cout << "tShiftDlg::OnClose " << mSteps << endl; + tCmdShift cmd(mpFilter, mSteps * mUnit); cmd.Execute(); - EventWin->Redraw(); - if (EventWin->NextWin) + mpEventWindow->Refresh(); + if (mpEventWindow->NextWin) { - EventWin->NextWin->Redraw(); + mpEventWindow->NextWin->Refresh(); } // wxForm::OnOk(); return false; } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tShiftDlg::OnHelp() { gpHelpInstance->ShowTopic("Shift"); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tShiftDlg::AddProperties() { - //send wxPropertyValue REFERENCE not POINTER - sheet->AddProperty(new wxProperty("Snaps", wxPropertyValue(&Steps), "integer", new wxIntegerListValidator(-16, 16))); - sheet->AddProperty(new wxProperty("clocks per snap", (long)Unit, "integer"));//informational only - + sheet->AddProperty(new wxProperty("Snaps", wxPropertyValue(&mSteps), "integer", new wxIntegerListValidator(-16, 16))); + sheet->AddProperty(new wxProperty("clocks per snap", (long)mUnit, "integer"));//informational only } - // ************************************************************************** // Cleanup // ************************************************************************* @@ -113,7 +110,7 @@ { Filter = f; Song = f->mpSong; - EventWin = w; + mpEventWindow = w; } @@ -126,10 +123,10 @@ << endl; tCmdCleanup cln(Filter, limit, shortenOverlaps); cln.Execute(); - EventWin->Redraw(); - if (EventWin->NextWin) + mpEventWindow->Refresh(); + if (mpEventWindow->NextWin) { - EventWin->NextWin->Redraw(); + mpEventWindow->NextWin->Refresh(); } //wxForm::OnOk(); @@ -197,16 +194,18 @@ { Filter = f; Song = f->mpSong; - EventWin = w; + mpEventWindow = w; } bool tSearchReplaceDlg::OnClose() { tCmdSearchReplace sr(Filter, frCtrl - 1, toCtrl-1); sr.Execute(); - EventWin->Redraw(); - if (EventWin->NextWin) - EventWin->NextWin->Redraw(); + mpEventWindow->Refresh(); + if (mpEventWindow->NextWin) + { + mpEventWindow->NextWin->Refresh(); + } return false; } @@ -245,7 +244,7 @@ tTransposeDlg::tTransposeDlg(JZEventFrame *w, JZFilter *f) : tPropertyListDlg("Transpose") { - EventWin = w; + mpEventWindow = w; Filter = f; Song = f->mpSong; } @@ -255,13 +254,13 @@ { tCmdTranspose trn(Filter, Notes, Scale, FitIntoScale); trn.Execute(); - if (EventWin->NextWin) + if (mpEventWindow->NextWin) { - EventWin->NextWin->Redraw(); + mpEventWindow->NextWin->Refresh(); } else { - EventWin->Redraw(); + mpEventWindow->Refresh(); } return false; @@ -405,7 +404,7 @@ { Filter = f; Song = f->mpSong; - EventWin = w; + mpEventWindow = w; } @@ -414,10 +413,10 @@ tCmdLength cmd(Filter, FromValue, ToValue, Mode); cmd.Execute(); - EventWin->Redraw(); - if (EventWin->NextWin) + mpEventWindow->Refresh(); + if (mpEventWindow->NextWin) { - EventWin->NextWin->Redraw(); + mpEventWindow->NextWin->Refresh(); } //tPropertyListDlg::OnClose(); @@ -470,7 +469,7 @@ { Filter = f; Song = f->mpSong; - EventWin = w; + mpEventWindow = w; } @@ -478,11 +477,12 @@ { tCmdSeqLength cmd(Filter, scale); cmd.Execute(); - EventWin->Redraw(); - if (EventWin->NextWin) + mpEventWindow->Refresh(); + if (mpEventWindow->NextWin) { - EventWin->NextWin->Redraw(); + mpEventWindow->NextWin->Refresh(); } + //tPropertyListDlg::OnClose(); return false; } @@ -516,7 +516,7 @@ { Filter = f; Song = f->mpSong; - EventWin = w; + mpEventWindow = w; } @@ -525,9 +525,12 @@ tCmdMidiDelay cmd(Filter, scale,clockDelay,repeat); cmd.Execute(); - EventWin->Redraw(); - if (EventWin->NextWin) - EventWin->NextWin->Redraw(); + mpEventWindow->Refresh(); + if (mpEventWindow->NextWin) + { + mpEventWindow->NextWin->Refresh(); + } + //tPropertyListDlg::OnClose(); return false; } @@ -576,7 +579,7 @@ : tPropertyListDlg("Delete" ) { Filter = f; - EventWin = w; + mpEventWindow = w; } @@ -584,10 +587,10 @@ { tCmdErase cmd(Filter, LeaveSpace); cmd.Execute(); - EventWin->Redraw(); - if (EventWin->NextWin) + mpEventWindow->Refresh(); + if (mpEventWindow->NextWin) { - EventWin->NextWin->Redraw(); + mpEventWindow->NextWin->Refresh(); } // tPropertyListDlg::OnClose(); @@ -671,7 +674,7 @@ { Filter = f; Song = f->mpSong; - EventWin = w; + mpEventWindow = w; } @@ -684,16 +687,19 @@ qnt.NoteStart = NoteStart; qnt.NoteLength = NoteLength; qnt.Execute(); - EventWin->Redraw(); - if (EventWin->NextWin) - EventWin->NextWin->Redraw(); + mpEventWindow->Refresh(); + if (mpEventWindow->NextWin) + { + mpEventWindow->NextWin->Refresh(); + } + //tPropertyListDlg::OnClose(); return false; } void tQuantizeDlg::OnHelp() { - if (EventWin->NextWin) + if (mpEventWindow->NextWin) { gpHelpInstance->ShowTopic("Quantize"); } @@ -751,7 +757,7 @@ tEventDlg::tEventDlg(JZEvent *e, JZPianoWindow* w, JZTrack *t) : tPropertyListDlg( "Event" ), - ClockDlg(w->mpSong, "Time ", e->GetClock()) + ClockDlg(w->GetSong(), "Time ", e->GetClock()) { Win = w; Track = t; @@ -1497,7 +1503,7 @@ case StatSetTempo: str = "Set Tempo (for track 0)"; - dlg = new tSetTempoDlg(e->IsSetTempo(), pPianoWindow, pPianoWindow->mpSong->GetTrack(0) ); + dlg = new tSetTempoDlg(e->IsSetTempo(), pPianoWindow, pPianoWindow->GetSong()->GetTrack(0) ); break; case StatSysEx: Modified: trunk/jazz/src/Dialogs.h =================================================================== --- trunk/jazz/src/Dialogs.h 2008-03-31 04:07:20 UTC (rev 377) +++ trunk/jazz/src/Dialogs.h 2008-03-31 04:10:22 UTC (rev 378) @@ -29,23 +29,25 @@ class JZFilter; class JZSong; class JZEventFrame; +class JZEventWindow; class JZTrack; class JZEvent; class tShiftDlg : public tPropertyListDlg { - public: - long Steps; // 0 was static - long Unit; + public: + + long mSteps; // 0 was static + long mUnit; - JZFilter* Filter; - JZSong* Song; - JZEventFrame* EventWin; + JZEventFrame* mpEventWindow; + JZFilter* mpFilter; + JZSong* mpSong; - tShiftDlg(JZEventFrame *w, JZFilter *f, long Unit); - void AddProperties(); - bool OnClose(); - void OnHelp(); + tShiftDlg(JZEventFrame* pEventWindow, JZFilter* pFilter, long Unit); + void AddProperties(); + bool OnClose(); + void OnHelp(); }; class tCleanupDlg : public tPropertyListDlg @@ -57,7 +59,7 @@ JZFilter *Filter; JZSong *Song; - JZEventFrame *EventWin; + JZEventFrame* mpEventWindow; tCleanupDlg(JZEventFrame *w, JZFilter *f); void AddProperties(); @@ -77,7 +79,7 @@ JZFilter *Filter; JZSong *Song; - JZEventFrame *EventWin; + JZEventFrame* mpEventWindow; tSearchReplaceDlg(JZEventFrame *w, JZFilter *f); void AddProperties(); @@ -94,7 +96,7 @@ static bool FitIntoScale; static int Scale; - JZEventFrame *EventWin; + JZEventFrame* mpEventWindow; JZFilter *Filter; JZSong *Song; @@ -148,7 +150,7 @@ JZFilter *Filter; JZSong *Song; - JZEventFrame *EventWin; + JZEventFrame* mpEventWindow; tLengthDlg(JZEventFrame *win, JZFilter *f); void AddProperties(); @@ -166,7 +168,7 @@ JZFilter *Filter; JZSong *Song; - JZEventFrame *EventWin; + JZEventFrame* mpEventWindow; tSeqLengthDlg(JZEventFrame *win, JZFilter *f); void AddProperties(); @@ -185,7 +187,7 @@ JZFilter *Filter; JZSong *Song; - JZEventFrame *EventWin; + JZEventFrame* mpEventWindow; tMidiDelayDlg(JZEventFrame *win, JZFilter *f); void AddProperties(); @@ -196,7 +198,7 @@ class tDeleteDlg : public tPropertyListDlg { JZFilter *Filter; - JZEventFrame *EventWin; + JZEventFrame* mpEventWindow; public: static bool LeaveSpace; // 1 @@ -241,7 +243,7 @@ JZFilter *Filter; JZSong *Song; - JZEventFrame *EventWin; + JZEventFrame* mpEventWindow; long Quantize(long); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |