From: <pst...@us...> - 2009-01-19 17:47:21
|
Revision: 683 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=683&view=rev Author: pstieber Date: 2009-01-19 17:47:16 +0000 (Mon, 19 Jan 2009) Log Message: ----------- Changed a constant from a long to an integer. Modified Paths: -------------- trunk/jazz/src/PianoWindow.cpp Modified: trunk/jazz/src/PianoWindow.cpp =================================================================== --- trunk/jazz/src/PianoWindow.cpp 2009-01-19 17:45:14 UTC (rev 682) +++ trunk/jazz/src/PianoWindow.cpp 2009-01-19 17:47:16 UTC (rev 683) @@ -2299,7 +2299,7 @@ //----------------------------------------------------------------------------- int JZPianoWindow::SnapClocks() { - int Clock = mpSong->GetTicksPerQuarter() * 4L / mSnapDenomiator; + int Clock = mpSong->GetTicksPerQuarter() * 4 / mSnapDenomiator; if (Clock < 1) { return 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2009-02-16 20:49:59
|
Revision: 700 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=700&view=rev Author: pstieber Date: 2009-02-16 20:49:52 +0000 (Mon, 16 Feb 2009) Log Message: ----------- 1. Removed the long specifier from an int constant. 2. reduced the scope of a loop variable and used pre-increment. 3. Renamed some local variables for clarity. Modified Paths: -------------- trunk/jazz/src/PianoWindow.cpp Modified: trunk/jazz/src/PianoWindow.cpp =================================================================== --- trunk/jazz/src/PianoWindow.cpp 2009-02-16 19:59:58 UTC (rev 699) +++ trunk/jazz/src/PianoWindow.cpp 2009-02-16 20:49:52 UTC (rev 700) @@ -1117,14 +1117,14 @@ if (mTrackIndex > 0) { --mTrackIndex; - NewPosition(mTrackIndex, -1L); + NewPosition(mTrackIndex, -1); } return true; case WXK_DOWN: if (mTrackIndex < mpSong->GetTrackCount() - 1) { ++mTrackIndex; - NewPosition(mTrackIndex, -1L); + NewPosition(mTrackIndex, -1); } return true; } @@ -2148,14 +2148,14 @@ int Clock = x2Clock(x); int Pitch = y2Pitch(y); - JZEvent *m = FindEvent(mpTrack, Clock, Pitch); + JZEvent* pEvent = FindEvent(mpTrack, Clock, Pitch); tKeyOn* pKeyOn = 0; - tPlayTrack *p = 0; - if (m) + tPlayTrack* pPlayTrack = 0; + if (pEvent) { // both these events are drag length - pKeyOn = m->IsKeyOn(); - p = m->IsPlayTrack(); + pKeyOn = pEvent->IsKeyOn(); + pPlayTrack = pEvent->IsPlayTrack(); } switch (action) { @@ -2177,20 +2177,19 @@ } else { - if(p) + if (pPlayTrack) { - mpMouseAction = new tPlayTrackLengthDragger(p, this); + mpMouseAction = new tPlayTrackLengthDragger(pPlayTrack, this); } else if (mVisibleAllTracks) { // event not found, maybe change to another Track - int i; - for (i = 0; i < mpSong->GetTrackCount(); i++) + for (int i = 0; i < mpSong->GetTrackCount(); ++i) { JZTrack* pTrack = mpSong->GetTrack(i); if (IsVisible(pTrack) && FindEvent(pTrack, Clock, Pitch)) { - NewPosition(i, -1L); + NewPosition(i, -1); break; } } @@ -2200,7 +2199,7 @@ case MA_DIALOG: - EventDialog(m, this, mpTrack, Clock, mpTrack->Channel - 1, Pitch); + EventDialog(pEvent, this, mpTrack, Clock, mpTrack->Channel - 1, Pitch); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2009-10-15 13:37:12
|
Revision: 736 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=736&view=rev Author: pstieber Date: 2009-10-15 13:37:04 +0000 (Thu, 15 Oct 2009) Log Message: ----------- 1. Removed SN++ from comments. I don't know what these represented. 2. Changed allways to always. 3. Wrapped lines longer than 80 columns. 4. Changed the style of some comments and translated others. 5. Put curly brackets around single line conditional statement. Modified Paths: -------------- trunk/jazz/src/PianoWindow.cpp Modified: trunk/jazz/src/PianoWindow.cpp =================================================================== --- trunk/jazz/src/PianoWindow.cpp 2009-08-13 22:43:48 UTC (rev 735) +++ trunk/jazz/src/PianoWindow.cpp 2009-10-15 13:37:04 UTC (rev 736) @@ -240,7 +240,7 @@ Copy = pKeyOn->Copy()->IsKeyOn(); Win = pPianoWindow; - // SN++ BUG FIX: undo/redo + // BUG FIX: undo/redo Win->GetSong()->NewUndoBuffer(); wxClientDC Dc(Win); @@ -301,7 +301,7 @@ int ScrolledX, int ScrolledY) { - // SN++ Key_Aftertouch + // Key_Aftertouch if (Copy->GetEventLength() < mpKeyOn->GetEventLength()) { int key, channel; @@ -336,10 +336,10 @@ Win->mpMouseAction = 0; - // SN++ Veloc- oder Aftertouch-Editor updaten + // Velocity or aftertouch editor update. Win->UpdateControl(); - // allways repaint + // always repaint Win->Refresh(); delete this; @@ -389,7 +389,7 @@ Copy = k->Copy()->IsPlayTrack(); Win = pPianoWindow; - // SN++ BUG FIX: undo/redo + // BUG FIX: undo/redo Win->GetSong()->NewUndoBuffer(); // wxClientDC Dc(Win); @@ -454,10 +454,10 @@ Win->mpMouseAction = 0; - // SN++ Veloc- oder Aftertouch-Editor updaten + // Velocity or aftertouch editor update. Win->UpdateControl(); - // allways repaint + // always repaint Win->Refresh(); delete this; @@ -478,7 +478,7 @@ Win = pPianoWindow; mpKeyOn = pKeyOn; - // SN++ BUG FIX: undo/redo + // BUG FIX: undo/redo Win->GetSong()->NewUndoBuffer(); // wxClientDC Dc(Win); @@ -809,7 +809,7 @@ mFromClock = mScrolledX * mClockTicsPerPixel; mToClock = x2Clock(mCanvasWidth); - // SN++ Because jazz has a ReDo function. Fixes simultaneously update a + // Because jazz has a ReDo function. Fixes simultaneously update a // small problem when multiple ZoomOut. Active Ctrl draw new windows or // reinitialize. @@ -1218,12 +1218,13 @@ SetXScrollPosition(x); } -// SN++ Is changed. OnPaint always draws new -> Bug Fix for ZoomOut! -/* + // Is changed. OnPaint always draws new -> Bug Fix for ZoomOut! // OnPaint() redraws only if clock has changed - if (mpCtrlEdit && TrackIndex >= 0) - mpCtrlEdit->ReInit(mpTrack, mFromClock, mClockTicsPerPixel); -*/ +// if (mpCtrlEdit && TrackIndex >= 0) +// { +// mpCtrlEdit->ReInit(mpTrack, mFromClock, mClockTicsPerPixel); +// } + Refresh(); } @@ -1294,9 +1295,17 @@ if (IsBlack(Pitch)) { Dc.DrawRectangle(0, y, wBlack, mTrackHeight); - Dc.DrawLine(wBlack, y + mTrackHeight/2, mPianoWidth, y + mTrackHeight/2); + Dc.DrawLine( + wBlack, + y + mTrackHeight / 2, + mPianoWidth, + y + mTrackHeight / 2); Dc.SetPen(*wxWHITE_PEN); - Dc.DrawLine(wBlack + 1, y + mTrackHeight/2+1, mPianoWidth, y + mTrackHeight/2+1); + Dc.DrawLine( + wBlack + 1, + y + mTrackHeight / 2 + 1, + mPianoWidth, + y + mTrackHeight / 2 + 1); Dc.DrawLine(0, y, wBlack, y); Dc.SetPen(*wxBLACK_PEN); } @@ -1475,7 +1484,7 @@ int FromPitch = 127 - mToLine; int ToPitch = 127 - mFromLine; - // Coordinate for Linien + // Coordinate lines. int x0 = Clock2x(0); int y0 = TrackIndex2y(64); @@ -1499,17 +1508,21 @@ // y1 = TrackIndex2y(127 - pEvent->IsPlayTrack()->track); // // use pitch instead // } - // event partially visible? - if (Clock + Length >= mFromClock && FromPitch < Pitch && Pitch <= ToPitch) + + // Test to determine if the event is partially visible. + if ( + Clock + Length >= mFromClock && + FromPitch < Pitch && Pitch <= ToPitch) { int DrawLength = Length / mClockTicsPerPixel; - // do clipping ourselves + // Perform manual clipping. if (x1 < mEventsX) { DrawLength -= mEventsX - x1; x1 = mEventsX; } + // Always draw at least two pixels to avoid invisible (behind a // vertical line) or zero-length events: if (DrawLength < 3) @@ -1517,7 +1530,7 @@ DrawLength = 3; } - // show velocity as colors + // Show velocity as colors. if (!force_color && mUseColors && pEvent->IsKeyOn()) { int vel = pEvent->IsKeyOn()->GetVelocity(); @@ -1527,9 +1540,12 @@ { Dc.SetBrush(*Brush); } - // end velocity colors - Dc.DrawRectangle(x1, y1 + mLittleBit, DrawLength, mTrackHeight - 2 * mLittleBit); + Dc.DrawRectangle( + x1, + y1 + mLittleBit, + DrawLength, + mTrackHeight - 2 * mLittleBit); //shouldnt it be in drawevent? odd. if (pEvent->IsPlayTrack()) @@ -1571,8 +1587,15 @@ // Draw text labels drawn at top. int textlabely = mTopInfoHeight; - Dc.DrawRectangle(x1-textX, textlabely + mLittleBit, textX, textY);//mTrackHeight - 2 * mLittleBit); - Dc.DrawText(pEvent->IsText()->GetText(), x1-textX, textlabely + mLittleBit); + Dc.DrawRectangle( + x1 - textX, + textlabely + mLittleBit, + textX, + textY); //mTrackHeight - 2 * mLittleBit); + Dc.DrawText( + pEvent->IsText()->GetText(), + x1 - textX, + textlabely + mLittleBit); } } @@ -1915,7 +1938,7 @@ mpSnapSel->GetRectangle().x + mpSnapSel->GetRectangle().width + 1))); } - // SN++ Veloc- oder Aftertouch-Editor updaten + // Velocity or aftertouch editor update. if (mpCtrlEdit) { mpCtrlEdit->UpDate(); @@ -2016,7 +2039,9 @@ if (!mpSnapSel->IsSelected()) { if (msg == 0) + { msg = "please select some events first"; + } wxMessageBox((char *)msg, "Error", wxOK); return 0; } @@ -2181,7 +2206,7 @@ Paste(mpTrack, SnapClock(Clock), Pitch); } - // allways redraw + // always redraw Refresh(); } @@ -2349,8 +2374,8 @@ return pTrack == mpTrack; } - return ( - mpTrack->Channel == gpConfig->GetValue(C_DrumChannel)) == + return + (mpTrack->Channel == gpConfig->GetValue(C_DrumChannel)) == (pTrack->Channel == gpConfig->GetValue(C_DrumChannel)); } @@ -2438,9 +2463,10 @@ { if (pEvent->GetClock() <= Clock) { - if ((pEvent->GetClock() + pEvent->GetLength() >= Clock) - && (pEvent->GetPitch() == Pitch || Pitch == -1) - && IsVisible(pEvent)) + if ( + (pEvent->GetClock() + pEvent->GetLength() >= Clock) && + (pEvent->GetPitch() == Pitch || Pitch == -1) && + IsVisible(pEvent)) { return pEvent; } @@ -3043,7 +3069,7 @@ // Need a guitar window hint here. JZProjectManager::Instance()->UpdateAllViews(); - // SN++ Veloc- oder Aftertouch-Editor updaten + // Velocity or aftertouch editor update. if (mpCtrlEdit) { mpCtrlEdit->UpDate(); @@ -3064,7 +3090,7 @@ tKeyOn* pEvent = new tKeyOn(0, 0, 64, 64, len); mPasteBuffer.Put(pEvent); } - // SN++ + if (GetKeyOnEventCount() > 1) { // don't change Pitch @@ -3076,7 +3102,6 @@ JZEvent* pEvent = Iterator.First(); if (pEvent) { - // SN++ JZEvent *a = pEvent; while (a) { @@ -3130,7 +3155,8 @@ pEvent = Iterator.Next(); } pTrack->Cleanup(); - // SN++ Veloc- oder Aftertouch-Editor updaten + + // Velocity or aftertouch editor update. if (mpCtrlEdit) { mpCtrlEdit->UpDate(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2010-07-17 23:38:18
|
Revision: 813 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=813&view=rev Author: pstieber Date: 2010-07-17 23:38:12 +0000 (Sat, 17 Jul 2010) Log Message: ----------- 1. Made an end-of-line comment and above-line comment. 2. Used pre-increment instead of post-increment. Modified Paths: -------------- trunk/jazz/src/PianoWindow.cpp Modified: trunk/jazz/src/PianoWindow.cpp =================================================================== --- trunk/jazz/src/PianoWindow.cpp 2010-07-17 21:29:09 UTC (rev 812) +++ trunk/jazz/src/PianoWindow.cpp 2010-07-17 23:38:12 UTC (rev 813) @@ -681,9 +681,10 @@ mpTrack = mpProject->GetTrack(mTrackIndex); - mFontSize = mPianoFontSizes[1]; // Must be an entry in the array. + // Must be an entry in the array. + mFontSize = mPianoFontSizes[1]; - for (int i = 0; i < eMaxTrackCount; i++) + for (int i = 0; i < eMaxTrackCount; ++i) { mFromLines[i] = 64; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2010-08-28 15:37:41
|
Revision: 825 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=825&view=rev Author: pstieber Date: 2010-08-28 15:37:35 +0000 (Sat, 28 Aug 2010) Log Message: ----------- Added a screen refresh after using the event dialog. Modified Paths: -------------- trunk/jazz/src/PianoWindow.cpp Modified: trunk/jazz/src/PianoWindow.cpp =================================================================== --- trunk/jazz/src/PianoWindow.cpp 2010-07-19 14:12:52 UTC (rev 824) +++ trunk/jazz/src/PianoWindow.cpp 2010-08-28 15:37:35 UTC (rev 825) @@ -2271,6 +2271,7 @@ case MA_DIALOG: EventDialog(pEvent, this, mpTrack, Clock, mpTrack->Channel - 1, Pitch); + Refresh(); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2011-08-07 21:49:28
|
Revision: 900 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=900&view=rev Author: pstieber Date: 2011-08-07 21:49:22 +0000 (Sun, 07 Aug 2011) Log Message: ----------- 1. Removed commented code. 2. Cleaned up the JZListen singleton in the destructor. Modified Paths: -------------- trunk/jazz/src/PianoWindow.cpp Modified: trunk/jazz/src/PianoWindow.cpp =================================================================== --- trunk/jazz/src/PianoWindow.cpp 2011-08-06 22:29:04 UTC (rev 899) +++ trunk/jazz/src/PianoWindow.cpp 2011-08-07 21:49:22 UTC (rev 900) @@ -659,10 +659,6 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -//JZListen JZPianoWindow::mListen; - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- JZPianoWindow::JZPianoWindow( JZPianoFrame* pPianoFrame, JZProject* pProject, @@ -731,6 +727,7 @@ delete mpFixedFont; delete mpDrumFont; delete mpFrameBuffer; + JZListen::Destroy(); } //----------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2011-08-07 23:15:51
|
Revision: 901 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=901&view=rev Author: pstieber Date: 2011-08-07 23:15:45 +0000 (Sun, 07 Aug 2011) Log Message: ----------- Made a bunch of cosmetic updates. Modified Paths: -------------- trunk/jazz/src/PianoWindow.cpp Modified: trunk/jazz/src/PianoWindow.cpp =================================================================== --- trunk/jazz/src/PianoWindow.cpp 2011-08-07 21:49:22 UTC (rev 900) +++ trunk/jazz/src/PianoWindow.cpp 2011-08-07 23:15:45 UTC (rev 901) @@ -3,7 +3,7 @@ // // Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. // Modifications Copyright (C) 2004 Patrick Earl -// Modifications Copyright (C) 2008-2010 Peter J. Stieber +// Modifications Copyright (C) 2008-2011 Peter J. Stieber // // 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 @@ -216,7 +216,8 @@ if (!mPitch) { - return 1; // done + // Done. + return 1; } return 0; } @@ -865,9 +866,17 @@ /////////////////////////////////////////////////////////////// // horizontal lines(ripped from drawpianoroll code) -// for (y = TrackIndex2y(mFromLine); y < mEventsY + mEventsHeight; y += mTrackHeight) -// if (y > mEventsY) // cheaper than clipping -// LocalDc.DrawLine(mEventsX+1, y, mEventsX + mEventsWidth, y); +// for ( +// y = TrackIndex2y(mFromLine); +// y < mEventsY + mEventsHeight; +// y += mTrackHeight) +// { +// // cheaper than clipping +// if (y > mEventsY) +// { +// LocalDc.DrawLine(mEventsX+1, y, mEventsX + mEventsWidth, y); +// } +// } LocalDc.SetPen(*wxGREY_PEN); wxBrush blackKeysBrush = wxBrush(wxColor(250, 240, 240), wxSOLID); @@ -928,9 +937,16 @@ Oss << BarInfo.GetBarIndex() + 1 - intro; if (x > mEventsX) { - LocalDc.DrawText(Oss.str().c_str(), x + mLittleBit, mEventsY - mFixedFontHeight - 2); + LocalDc.DrawText( + Oss.str().c_str(), + x + mLittleBit, + mEventsY - mFixedFontHeight - 2); LocalDc.SetPen(*wxGREY_PEN); - LocalDc.DrawLine(x, mEventsY - mFixedFontHeight, x, mEventsY + mEventsHeight); + LocalDc.DrawLine( + x, + mEventsY - mFixedFontHeight, + x, + mEventsY + mEventsHeight); } LocalDc.SetPen(*wxLIGHT_GREY_PEN); @@ -967,7 +983,11 @@ sbrush.SetColour(230,255,230); #endif -// LocalDc.SetClippingRegion(mEventsX, mEventsY, mEventsWidth, mEventsHeight); +// LocalDc.SetClippingRegion( +// mEventsX, +// mEventsY, +// mEventsWidth, +// mEventsHeight); LocalDc.SetLogicalFunction(wxXOR); LocalDc.SetPen(*wxTRANSPARENT_PEN); @@ -1013,7 +1033,9 @@ while (pitch < 127) { int y = Pitch2y(pitch); - if (y >= mEventsY && y <= mEventsY + mEventsHeight - h) // y-clipping + + // Perform y-clipping. + if (y >= mEventsY && y <= mEventsY + mEventsHeight - h) { LocalDc.DrawRectangle(x, y, w, h); } @@ -1330,17 +1352,28 @@ { Dc.DrawLine(0, y + mTrackHeight, mPianoWidth, y + mTrackHeight); Dc.SetPen(*wxWHITE_PEN); - Dc.DrawLine(0, y + mTrackHeight + 1, mPianoWidth, y + mTrackHeight + 1); + Dc.DrawLine( + 0, + y + mTrackHeight + 1, + mPianoWidth, + y + mTrackHeight + 1); Dc.SetPen(*wxBLACK_PEN); ostringstream Oss; Oss << Pitch / 12; - Dc.DrawText(Oss.str().c_str(), wBlack + mLittleBit, y + mTrackHeight / 2); + Dc.DrawText( + Oss.str().c_str(), + wBlack + mLittleBit, + y + mTrackHeight / 2); } else if (!IsBlack(Pitch - 1)) { Dc.DrawLine(0, y + mTrackHeight, mPianoWidth, y + mTrackHeight); Dc.SetPen(*wxWHITE_PEN); - Dc.DrawLine(0, y + mTrackHeight + 1, mPianoWidth, y + mTrackHeight + 1); + Dc.DrawLine( + 0, + y + mTrackHeight + 1, + mPianoWidth, + y + mTrackHeight + 1); Dc.SetPen(*wxBLACK_PEN); } @@ -1631,8 +1664,9 @@ } //----------------------------------------------------------------------------- -// Draws the a 3D button with text in it. Used to draw the little area in the -// top left of the window. +// Description: +// Draws the a 3D button with text in it. Used to draw the little area in +// the top left of the window. //----------------------------------------------------------------------------- void JZPianoWindow::LineText( wxDC& Dc, @@ -1917,7 +1951,8 @@ } //----------------------------------------------------------------------------- -// Snapper +// Description: +// Snapper //----------------------------------------------------------------------------- void JZPianoWindow::SnapSelectionStop(wxMouseEvent& MouseEvent) { @@ -2314,12 +2349,12 @@ r.SetWidth(mPianoWidth - 2 * mLittleBit); r.SetHeight(mTopInfoHeight); - JZVelocityCounter *VelocCounter = new JZVelocityCounter(this, &r, pKeyOn); - VelocCounter->ProcessMouseEvent(MouseEvent, mScrolledX, mScrolledY); - mpMouseAction = VelocCounter; + JZVelocityCounter* pVelocCounter = + new JZVelocityCounter(this, &r, pKeyOn); + pVelocCounter->ProcessMouseEvent(MouseEvent, mScrolledX, mScrolledY); + mpMouseAction = pVelocCounter; } break; - } } } @@ -2342,7 +2377,8 @@ } //----------------------------------------------------------------------------- -// This is an event handler for JZMouseCounter. +// Description: +// This is an event handler for JZMouseCounter. //----------------------------------------------------------------------------- void JZPianoWindow::ButtonLabelDisplay(const wxString& Text, bool IsButtonDown) { @@ -2397,9 +2433,9 @@ (pTrack->Channel == gpConfig->GetValue(C_DrumChannel)); } -// ******************************************************************** +//============================================================================= // Utilities -// ******************************************************************** +//============================================================================= //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- @@ -2471,7 +2507,8 @@ } //----------------------------------------------------------------------------- -// If Pitch == -1: search for any pitches. +// Description: +// If Pitch == -1: search for any pitches. //----------------------------------------------------------------------------- JZEvent *JZPianoWindow::FindEvent(JZTrack* pTrack, int Clock, int Pitch) { @@ -2603,13 +2640,15 @@ } //----------------------------------------------------------------------------- -// positions for controller editor +// Description: +// Positions for controller editor. //----------------------------------------------------------------------------- #define CtrlH(h) ((h)/4) #define CtrlY(h) (h - CtrlH(h)) //----------------------------------------------------------------------------- -// Activate velocity edit. +// Description: +// Activate velocity edit. //----------------------------------------------------------------------------- void JZPianoWindow::CtrlVelocity() { @@ -2841,7 +2880,8 @@ } //----------------------------------------------------------------------------- -// Undo actions +// Description: +// Undo actions //----------------------------------------------------------------------------- void JZPianoWindow::Undo() { @@ -2854,20 +2894,28 @@ } //----------------------------------------------------------------------------- -// Quantize selected events. +// Description: +// Quantize selected events. //----------------------------------------------------------------------------- void JZPianoWindow::Quantize() { if (EventsSelected()) { - JZCommandQuantize QuantizeCommand(mpFilter, SnapClocks(), true, false, 0, 0); + JZCommandQuantize QuantizeCommand( + mpFilter, + SnapClocks(), + true, + false, + 0, + 0); QuantizeCommand.Execute(1); Refresh(); } } //----------------------------------------------------------------------------- -// Flip events up and down. +// Description: +// Flip events up and down. //----------------------------------------------------------------------------- void JZPianoWindow::ExchangeUpDown() { @@ -2880,7 +2928,8 @@ } //----------------------------------------------------------------------------- -// Flip events left to right. +// Description: +// Flip events left to right. //----------------------------------------------------------------------------- void JZPianoWindow::ExchangeLeftRight() { @@ -2893,7 +2942,8 @@ } //----------------------------------------------------------------------------- -// Shift events snapclock clocks to left. +// Description: +// Shift events snapclock clocks to left. //----------------------------------------------------------------------------- void JZPianoWindow::ShiftLeft() { @@ -2907,7 +2957,8 @@ } //----------------------------------------------------------------------------- -// Shift events snapclock clocks to right. +// Description: +// Shift events snapclock clocks to right. //----------------------------------------------------------------------------- void JZPianoWindow::ShiftRight() { @@ -2921,7 +2972,8 @@ } //----------------------------------------------------------------------------- -// helper for cut and copy events +// Description: +// This is a helper function for cut and copy events. //----------------------------------------------------------------------------- void JZPianoWindow::CutOrCopy(int Id) { @@ -3228,77 +3280,72 @@ //----------------------------------------------------------------------------- void JZPianoWindow::ActivateSettingsDialog() { -/* - jppResourceDialog Dialog(this, "windowSettings"); - - Dialog.Attach("use_colours", &mUseColors); - Dialog.Attach("font_size", &mFontSize, mPianoFontSizes); - - if (Dialog.ShowModal() == wxID_OK) - { - Setup(); - SetScrollRanges(); - Refresh(); - } -*/ +// jppResourceDialog Dialog(this, "windowSettings"); +// +// Dialog.Attach("use_colours", &mUseColors); +// Dialog.Attach("font_size", &mFontSize, mPianoFontSizes); +// +// if (Dialog.ShowModal() == wxID_OK) +// { +// Setup(); +// SetScrollRanges(); +// Refresh(); +// } } //----------------------------------------------------------------------------- -// This is a test to see how to implement a dialog with Patrick's system. +// Description: +// This is a test to see how to implement a dialog with Patrick's system. // It replaces JZMidiDelayDlg, which isnt necesarily a good idea. //----------------------------------------------------------------------------- void JZPianoWindow::ActivateMidiDelayDialog() { -/* - if (!EventsSelected()) - { - return; - } - - int scale = 50; //in percent - int clockDelay = 10; - int repeat = 6; - - jppResourceDialog dialog(this, "midiDelay"); - - dialog.Attach("scale", &scale); - dialog.Attach("clockDelay", &clockDelay); - dialog.Attach("repeat", &repeat); - - if (dialog.ShowModal() == wxID_OK) - { - //execute the command - JZCommandMidiDelay cmd(mpFilter, scale / 100.0, clockDelay, repeat); - cmd.Execute(); - SetScrollRanges(); - Refresh(); - } -*/ +// if (!EventsSelected()) +// { +// return; +// } +// +// int scale = 50; //in percent +// int clockDelay = 10; +// int repeat = 6; +// +// jppResourceDialog dialog(this, "midiDelay"); +// +// dialog.Attach("scale", &scale); +// dialog.Attach("clockDelay", &clockDelay); +// dialog.Attach("repeat", &repeat); +// +// if (dialog.ShowModal() == wxID_OK) +// { +// //execute the command +// JZCommandMidiDelay cmd(mpFilter, scale / 100.0, clockDelay, repeat); +// cmd.Execute(); +// SetScrollRanges(); +// Refresh(); +// } } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- void JZPianoWindow::ActivateSequenceLengthDialog() { -/* - if (!EventsSelected()) - { - return; - } - - int scale = 100; //in percent - - jppResourceDialog dialog(this, "sequenceLength"); - - dialog.Attach("scale", &scale); - - if (dialog.ShowModal() == wxID_OK) - { - //execute the command - JZCommandSequenceLength cmd(mpFilter, scale / 100.0); - cmd.Execute(); - SetScrollRanges(); - Refresh(); - } -*/ +// if (!EventsSelected()) +// { +// return; +// } +// +// int scale = 100; //in percent +// +// jppResourceDialog dialog(this, "sequenceLength"); +// +// dialog.Attach("scale", &scale); +// +// if (dialog.ShowModal() == wxID_OK) +// { +// //execute the command +// JZCommandSequenceLength cmd(mpFilter, scale / 100.0); +// cmd.Execute(); +// SetScrollRanges(); +// Refresh(); +// } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2013-01-02 17:30:04
|
Revision: 928 http://sourceforge.net/p/jazzplusplus/code/928 Author: pstieber Date: 2013-01-02 17:30:00 +0000 (Wed, 02 Jan 2013) Log Message: ----------- Commented out unused variables. Modified Paths: -------------- trunk/jazz/src/PianoWindow.cpp Modified: trunk/jazz/src/PianoWindow.cpp =================================================================== --- trunk/jazz/src/PianoWindow.cpp 2013-01-02 17:07:59 UTC (rev 927) +++ trunk/jazz/src/PianoWindow.cpp 2013-01-02 17:30:00 UTC (rev 928) @@ -1536,8 +1536,8 @@ // Coordinate lines. - int x0 = Clock2x(0); - int y0 = TrackIndex2y(64); +// int x0 = Clock2x(0); +// int y0 = TrackIndex2y(64); while (pEvent) { @@ -1649,8 +1649,8 @@ } } - x0 = x1; - y0 = y1; +// x0 = x1; +// y0 = y1; if (Clock > mToClock) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |