Rename TimelineTextContentView -> ContentTimelineTextView.
authorCarl Hetherington <cth@carlh.net>
Fri, 15 Dec 2023 00:32:41 +0000 (01:32 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 11 Mar 2024 23:43:51 +0000 (00:43 +0100)
src/wx/content_timeline.cc
src/wx/content_timeline_text_view.cc [new file with mode: 0644]
src/wx/content_timeline_text_view.h [new file with mode: 0644]
src/wx/timeline_text_content_view.cc [deleted file]
src/wx/timeline_text_content_view.h [deleted file]
src/wx/wscript

index 5e104f3b7e4270c3e874c131dc87a7f0c1f2ac69..7257f3587df1570733356aa58636786aca0b0683 100644 (file)
 #include "film_viewer.h"
 #include "content_timeline_atmos_view.h"
 #include "content_timeline_audio_view.h"
+#include "content_timeline_text_view.h"
 #include "content_timeline_video_view.h"
 #include "timeline_labels_view.h"
 #include "timeline_reels_view.h"
-#include "timeline_text_content_view.h"
 #include "timeline_time_axis_view.h"
 #include "wx_util.h"
 #include "lib/atmos_mxf_content.h"
@@ -311,7 +311,7 @@ ContentTimeline::recreate_views()
                }
 
                for (auto j: i->text) {
-                       _views.push_back (make_shared<TimelineTextContentView>(*this, i, j));
+                       _views.push_back(make_shared<ContentTimelineTextView>(*this, i, j));
                }
 
                if (i->atmos) {
@@ -451,7 +451,7 @@ ContentTimeline::assign_tracks()
        }
 
        int const video_tracks = place<ContentTimelineVideoView>(film, _views, _tracks);
-       int const text_tracks = place<TimelineTextContentView> (film, _views, _tracks);
+       int const text_tracks = place<ContentTimelineTextView>(film, _views, _tracks);
 
        /* Atmos */
 
diff --git a/src/wx/content_timeline_text_view.cc b/src/wx/content_timeline_text_view.cc
new file mode 100644 (file)
index 0000000..3b7eeeb
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+    Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
+
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    DCP-o-matic is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "content_timeline_text_view.h"
+#include "lib/text_content.h"
+#include "lib/content.h"
+
+
+using std::shared_ptr;
+
+
+ContentTimelineTextView::ContentTimelineTextView(ContentTimeline& tl, shared_ptr<Content> c, shared_ptr<TextContent> caption)
+       : TimelineContentView (tl, c)
+       , _caption (caption)
+{
+
+}
+
+wxColour
+ContentTimelineTextView::background_colour() const
+{
+       if (!active ()) {
+               return wxColour (210, 210, 210, 128);
+       }
+
+       return wxColour (163, 255, 154, 255);
+}
+
+wxColour
+ContentTimelineTextView::foreground_colour() const
+{
+       if (!active ()) {
+               return wxColour (180, 180, 180, 128);
+       }
+
+       return wxColour (0, 0, 0, 255);
+}
+
+bool
+ContentTimelineTextView::active() const
+{
+       return _caption->use();
+}
diff --git a/src/wx/content_timeline_text_view.h b/src/wx/content_timeline_text_view.h
new file mode 100644 (file)
index 0000000..8d37ad4
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
+
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    DCP-o-matic is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "timeline_content_view.h"
+
+
+class TextContent;
+
+
+/** @class ContentTimelineTextView
+ *  @brief Content timeline view for TextContent.
+ */
+class ContentTimelineTextView : public TimelineContentView
+{
+public:
+       ContentTimelineTextView(ContentTimeline& tl, std::shared_ptr<Content>, std::shared_ptr<TextContent>);
+
+private:
+       bool active () const override;
+       wxColour background_colour () const override;
+       wxColour foreground_colour () const override;
+
+       std::shared_ptr<TextContent> _caption;
+};
diff --git a/src/wx/timeline_text_content_view.cc b/src/wx/timeline_text_content_view.cc
deleted file mode 100644 (file)
index bc099d4..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-    Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
-
-    This file is part of DCP-o-matic.
-
-    DCP-o-matic is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    DCP-o-matic is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-
-#include "timeline_text_content_view.h"
-#include "lib/text_content.h"
-#include "lib/content.h"
-
-
-using std::shared_ptr;
-
-
-TimelineTextContentView::TimelineTextContentView(ContentTimeline& tl, shared_ptr<Content> c, shared_ptr<TextContent> caption)
-       : TimelineContentView (tl, c)
-       , _caption (caption)
-{
-
-}
-
-wxColour
-TimelineTextContentView::background_colour () const
-{
-       if (!active ()) {
-               return wxColour (210, 210, 210, 128);
-       }
-
-       return wxColour (163, 255, 154, 255);
-}
-
-wxColour
-TimelineTextContentView::foreground_colour () const
-{
-       if (!active ()) {
-               return wxColour (180, 180, 180, 128);
-       }
-
-       return wxColour (0, 0, 0, 255);
-}
-
-bool
-TimelineTextContentView::active () const
-{
-       return _caption->use();
-}
diff --git a/src/wx/timeline_text_content_view.h b/src/wx/timeline_text_content_view.h
deleted file mode 100644 (file)
index c33c266..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
-
-    This file is part of DCP-o-matic.
-
-    DCP-o-matic is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    DCP-o-matic is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-
-#include "timeline_content_view.h"
-
-
-class TextContent;
-
-
-/** @class TimelineTextContentView
- *  @brief Timeline view for TextContent.
- */
-class TimelineTextContentView : public TimelineContentView
-{
-public:
-       TimelineTextContentView(ContentTimeline& tl, std::shared_ptr<Content>, std::shared_ptr<TextContent>);
-
-private:
-       bool active () const override;
-       wxColour background_colour () const override;
-       wxColour foreground_colour () const override;
-
-       std::shared_ptr<TextContent> _caption;
-};
index a3e3c06ed0663b78ba8d7f3f9047e4fdb621bfee..c644af96c90070dec7150026205a17083d8a0257 100644 (file)
@@ -52,6 +52,7 @@ sources = """
           content_timeline_atmos_view.cc
           content_timeline_audio_view.cc
           content_timeline_dialog.cc
+          content_timeline_text_view.cc
           content_timeline_video_view.cc
           content_timeline_view.cc
           content_version_dialog.cc
@@ -169,7 +170,6 @@ sources = """
           timeline.cc
           timeline_content_view.cc
           timeline_labels_view.cc
-          timeline_text_content_view.cc
           timeline_reels_view.cc
           timeline_time_axis_view.cc
           timing_panel.cc