From: <pst...@us...> - 2009-01-19 17:53:41
|
Revision: 684 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=684&view=rev Author: pstieber Date: 2009-01-19 17:53:36 +0000 (Mon, 19 Jan 2009) Log Message: ----------- 1. Moved the declaration of the snap selection and filter data members. 2. Added code for determining if events are selected and shifting events. This is a WIP. Modified Paths: -------------- trunk/jazz/src/EventWindow.cpp trunk/jazz/src/EventWindow.h Modified: trunk/jazz/src/EventWindow.cpp =================================================================== --- trunk/jazz/src/EventWindow.cpp 2009-01-19 17:47:16 UTC (rev 683) +++ trunk/jazz/src/EventWindow.cpp 2009-01-19 17:53:36 UTC (rev 684) @@ -22,6 +22,7 @@ #include "EventWindow.h" +#include "Dialogs/ShiftDialog.h" #include "EventFrame.h" #include "Filter.h" #include "MouseAction.h" @@ -104,6 +105,13 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- +bool JZEventWindow::AreEventsSelected() +{ + return mpSnapSel->IsSelected(); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- bool JZEventWindow::EventsSelected(const wxString& Message) const { if (!mpSnapSel->IsSelected()) @@ -116,6 +124,22 @@ //----------------------------------------------------------------------------- // Description: +// Display the "shift events" dialog. +//----------------------------------------------------------------------------- +void JZEventWindow::Shift(int Units) +{ + if (AreEventsSelected()) + { + JZShiftDialog ShiftDialog(*this, *mpFilter, this); + + if (ShiftDialog.ShowModal() == wxID_OK) + { + } + } +} + +//----------------------------------------------------------------------------- +// Description: // Only consider the event portion of the window when computing the virtual // size. Do not consider the static information of the left or top portion of // the screen. Modified: trunk/jazz/src/EventWindow.h =================================================================== --- trunk/jazz/src/EventWindow.h 2009-01-19 17:47:16 UTC (rev 683) +++ trunk/jazz/src/EventWindow.h 2009-01-19 17:53:36 UTC (rev 684) @@ -38,10 +38,6 @@ { public: - JZSnapSelection* mpSnapSel; - - JZFilter* mpFilter; - JZEventWindow( wxFrame* pParent, JZSong* pSong, @@ -53,8 +49,12 @@ // WARNING: non-constant access. JZSong* GetSong() const; + bool AreEventsSelected(); + bool EventsSelected(const wxString& Message) const; + void Shift(int Units); + void LineText( wxDC& Dc, int x, @@ -92,6 +92,12 @@ int y2yLine(int y, int Up = 0); + public: + + JZSnapSelection* mpSnapSel; + + JZFilter* mpFilter; + protected: JZSong* mpSong; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |