Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv15727

Modified Files:
      Tag: Audacity_UmixIt
        Project.cpp TrackArtist.cpp TrackPanel.cpp Menus.h 
        MixerBoard.h 
Log Message:
branding, cleanup, and beginnings of MixerBoard changes to be modal with 
TrackPanel

Index: MixerBoard.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Attic/MixerBoard.h,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -d -r1.1.2.5 -r1.1.2.6
--- MixerBoard.h        26 Feb 2007 23:08:56 -0000      1.1.2.5
+++ MixerBoard.h        22 Mar 2007 02:21:57 -0000      1.1.2.6
@@ -104,7 +104,9 @@
 
 class MixerBoard : public wxFrame { 
 public:
-   MixerBoard(AudacityProject* parent);
+   MixerBoard(AudacityProject* parent, 
+               const wxPoint& pos = wxDefaultPosition, 
+               const wxSize& size = wxDefaultSize);
    ~MixerBoard();
 
    void AddTrackClusters(); // Add clusters for any tracks we're not yet 
showing.

Index: TrackArtist.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackArtist.cpp,v
retrieving revision 1.57.2.8.2.1
retrieving revision 1.57.2.8.2.2
diff -u -d -r1.57.2.8.2.1 -r1.57.2.8.2.2
--- TrackArtist.cpp     23 Nov 2006 03:45:43 -0000      1.57.2.8.2.1
+++ TrackArtist.cpp     22 Mar 2007 02:21:56 -0000      1.57.2.8.2.2
@@ -137,11 +137,14 @@
       else {
          muted = (hasSolo || t->GetMute()) && !t->GetSolo();
          linkFlag = t->GetLinked();
-         if (!muted) { //vvv UmixIt
-            wxColour trackColor = AColor::GetTrackColor((void*)t);
-            samplePen.SetColour(trackColor);
-            rmsPen.SetColour(trackColor.Red() * 4/5, trackColor.Green() * 4/5, 
trackColor.Blue() * 4/5);
-         }
+         #if (AUDACITY_BRANDING == BRAND_UMIXIT)
+            // per track coloring for UmixIt
+            if (!muted) { 
+               wxColour trackColor = AColor::GetTrackColor((void*)t);
+               samplePen.SetColour(trackColor);
+               rmsPen.SetColour(trackColor.Red() * 4/5, trackColor.Green() * 
4/5, trackColor.Blue() * 4/5);
+            }
+         #endif
       }
 
       trackRect.height = t->GetHeight();
@@ -194,7 +197,7 @@
 void TrackArtist::DrawVRuler(Track *t, wxDC * dc, wxRect & r)
 {
    if (t->GetKind() == Track::Wave
-       && ((WaveTrack *) t)->GetDisplay() == 0) {
+       && ((WaveTrack *) t)->GetDisplay() == WaveTrack::WaveformDisplay) {
       wxRect bev = r;
       bev.Inflate(-1, -1);
       AColor::Bevel(*dc, true, bev);
@@ -210,7 +213,7 @@
    }
 
    if (t->GetKind() == Track::Wave
-       && ((WaveTrack *) t)->GetDisplay() == 1) {
+       && ((WaveTrack *) t)->GetDisplay() == WaveTrack::WaveformDBDisplay) {
       // Waveform (db)
       wxRect bev = r;
       bev.Inflate(-1, -1);
@@ -255,7 +258,7 @@
    }
 
    if (t->GetKind() == Track::Wave
-       && ((WaveTrack *) t)->GetDisplay() == 2) {
+       && ((WaveTrack *) t)->GetDisplay() == WaveTrack::SpectrumDisplay) {
       // Spectrum
       wxRect bev = r;
       bev.Inflate(-1, -1);
@@ -296,7 +299,7 @@
    }
 
    if (t->GetKind() == Track::Wave
-       && ((WaveTrack *) t)->GetDisplay() == 3) {
+       && ((WaveTrack *) t)->GetDisplay() == WaveTrack::PitchDisplay) {
       // Pitch
       wxRect bev = r;
       bev.Inflate(-1, -1);

Index: TrackPanel.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.cpp,v
retrieving revision 1.212.2.15.2.6
retrieving revision 1.212.2.15.2.7
diff -u -d -r1.212.2.15.2.6 -r1.212.2.15.2.7
--- TrackPanel.cpp      20 Feb 2007 07:20:27 -0000      1.212.2.15.2.6
+++ TrackPanel.cpp      22 Mar 2007 02:21:56 -0000      1.212.2.15.2.7
@@ -4725,15 +4725,11 @@
    wxRect bev;
    GetTitleBarRect(r, bev);
    bev.Inflate(-1, -1);
-   //vvv This doesn't work right when switching back and forth between two 
projects 
-   // when one is branded and the other is not, because for some reason, 
OnActivate 
-   // isn't always called, so gActiveProject isn't updated. 
-   AudacityProject* pProject = GetActiveProject();
-   Branding* pBranding = pProject->GetBranding();
-   if (pBranding && (pBranding->GetBrandColorScheme() == "UmixIt")) { //vvv 
UmixIt 
+   #if (AUDACITY_BRANDING == BRAND_UMIXIT)
+      // per track coloring for UmixIt
       dc->SetBrush(wxBrush(AColor::GetTrackColor((void*)t), wxSOLID)); 
       dc->DrawRectangle(bev);
-   }
+   #endif
    AColor::Bevel(*dc, true, bev);
 
    // Draw title text

Index: Project.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v
retrieving revision 1.178.2.17.2.13
retrieving revision 1.178.2.17.2.14
diff -u -d -r1.178.2.17.2.13 -r1.178.2.17.2.14
--- Project.cpp 27 Feb 2007 10:32:42 -0000      1.178.2.17.2.13
+++ Project.cpp 22 Mar 2007 02:21:55 -0000      1.178.2.17.2.14
@@ -545,9 +545,6 @@
 
    // MM: Give track panel the focus to ensure keyboard commands work
    mTrackPanel->SetFocus();
-   //v UmixIt mTrackPanel->Hide();     // This works okay except that each 
added track updates the 
-                                       // scroll bars. They probably shouldn't 
even be visible, i.e., 
-                                       // should be owned by the TrackPanel?
 
 #if defined __WXMAC__ 
    width++;
@@ -568,6 +565,22 @@
                               height - sbarSpaceWidth - voffset +
                               sbarExtraLen), wxSB_VERTICAL);
 
+
+   #if (AUDACITY_BRANDING == BRAND_UMIXIT)
+      // Usually, mMixerBoard is created only when the View > Mixer Board 
+      // command is given, but we always want it for UmixIt, and not the Track 
Panel.
+      //vvvvv EXCEPT THE RULER!
+      //mTrackPanel->Hide();
+      //mHsbar->Hide();
+      //mVsbar->Hide();
+
+      // Position and size the MixerBoard where TrackPanel would be (but must 
specify in global coords).
+      wxPoint mixerPos = this->ClientToScreen(wxPoint(left, top + voffset));
+      mMixerBoard = new MixerBoard(this, mixerPos, wxSize(width, height - 
voffset));
+
+      mMixerBoard->Show();
+   #endif
+
    InitialState();
    FixScrollbars();
 
@@ -2518,8 +2531,8 @@
    UpdateMenus();
    UpdateLyrics();
 
-   if (mMixerBoard) // All the different ways to add tracks funnel through 
here.
-      mMixerBoard->AddTrackClusters();
+   // All the different ways to add tracks funnel through here.
+   mMixerBoard->AddTrackClusters();
    UpdateMixerBoard();
 }
 
@@ -2587,7 +2600,7 @@
    if (mLyricsWindow == NULL) {
       mLyricsWindow = new LyricsWindow(this);
       wxASSERT(mLyricsWindow);
-      mLyricsWindow->Show(true);
+      mLyricsWindow->Show();
    }
 
    Lyrics *lyrics = mLyricsWindow->GetLyricsPanel();
@@ -2605,15 +2618,11 @@
    if (mTracks->IsEmpty())
       return;
 
-   if (mMixerBoard == NULL) {
+   if (!mMixerBoard)
       mMixerBoard = new MixerBoard(this);
-      if (mMixerBoard)
-      {
-         mMixerBoard->AddTrackClusters();
-         mMixerBoard->Show(true);
-      }
-   }
 
+   mMixerBoard->AddTrackClusters();
+   mMixerBoard->Show();
    mMixerBoard->UpdateMeters(gAudioIO->GetStreamTime()); 
 }
 

Index: Menus.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.h,v
retrieving revision 1.53.2.4.2.2
retrieving revision 1.53.2.4.2.3
diff -u -d -r1.53.2.4.2.2 -r1.53.2.4.2.3
--- Menus.h     2 Feb 2007 01:36:07 -0000       1.53.2.4.2.2
+++ Menus.h     22 Mar 2007 02:21:57 -0000      1.53.2.4.2.3
@@ -150,6 +150,7 @@
 
 void OnLyrics();
 void OnMixerBoard();
+void OnTrackPanel();
 
         // Project Menu
 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to