diff --git a/aegisub/build/Aegisub/Aegisub.vcxproj b/aegisub/build/Aegisub/Aegisub.vcxproj
index 65212ce3d..10152cc75 100644
--- a/aegisub/build/Aegisub/Aegisub.vcxproj
+++ b/aegisub/build/Aegisub/Aegisub.vcxproj
@@ -220,7 +220,6 @@
-
@@ -417,7 +416,6 @@
-
diff --git a/aegisub/build/Aegisub/Aegisub.vcxproj.filters b/aegisub/build/Aegisub/Aegisub.vcxproj.filters
index 43241956a..8d778257d 100644
--- a/aegisub/build/Aegisub/Aegisub.vcxproj.filters
+++ b/aegisub/build/Aegisub/Aegisub.vcxproj.filters
@@ -516,9 +516,6 @@
Main UI\Edit box
-
- Main UI\Grid
-
Features\Import
@@ -1073,9 +1070,6 @@
Main UI\Edit box
-
- Main UI\Grid
-
Features\Import
diff --git a/aegisub/src/Makefile b/aegisub/src/Makefile
index 02ca9a4f2..c7acc3f58 100644
--- a/aegisub/src/Makefile
+++ b/aegisub/src/Makefile
@@ -214,7 +214,6 @@ SRC += \
subs_controller.cpp \
subs_edit_box.cpp \
subs_edit_ctrl.cpp \
- subs_grid.cpp \
subs_preview.cpp \
subtitle_format.cpp \
subtitle_format_ass.cpp \
diff --git a/aegisub/src/command/edit.cpp b/aegisub/src/command/edit.cpp
index 66b437fa2..8c55349c8 100644
--- a/aegisub/src/command/edit.cpp
+++ b/aegisub/src/command/edit.cpp
@@ -50,9 +50,9 @@
#include "../initial_line_state.h"
#include "../options.h"
#include "../search_replace_engine.h"
+#include "../selection_controller.h"
#include "../subs_controller.h"
#include "../subs_edit_ctrl.h"
-#include "../subs_grid.h"
#include "../text_selection_controller.h"
#include "../utils.h"
#include "../video_context.h"
diff --git a/aegisub/src/command/time.cpp b/aegisub/src/command/time.cpp
index 76aef03c1..70c8c8461 100644
--- a/aegisub/src/command/time.cpp
+++ b/aegisub/src/command/time.cpp
@@ -47,7 +47,6 @@
#include "../include/aegisub/context.h"
#include "../options.h"
#include "../selection_controller.h"
-#include "../subs_grid.h"
#include "../video_context.h"
#include
diff --git a/aegisub/src/frame_main.cpp b/aegisub/src/frame_main.cpp
index 12c48c065..f9500959c 100644
--- a/aegisub/src/frame_main.cpp
+++ b/aegisub/src/frame_main.cpp
@@ -49,6 +49,7 @@
#include "audio_controller.h"
#include "audio_box.h"
#include "auto4_base.h"
+#include "base_grid.h"
#include "compat.h"
#include "command/command.h"
#include "dialog_detached_video.h"
@@ -63,7 +64,6 @@
#include "subs_controller.h"
#include "subs_edit_box.h"
#include "subs_edit_ctrl.h"
-#include "subs_grid.h"
#include "utils.h"
#include "version.h"
#include "video_box.h"
@@ -366,7 +366,7 @@ void FrameMain::InitContents() {
wxPanel *Panel = new wxPanel(this,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL | wxCLIP_CHILDREN);
StartupLog("Create subtitles grid");
- context->subsGrid = SubsGrid = new SubtitlesGrid(Panel, context.get());
+ context->subsGrid = SubsGrid = new BaseGrid(Panel, context.get(), wxDefaultSize, wxWANTS_CHARS | wxSUNKEN_BORDER);
context->selectionController = context->subsGrid;
context->search = new SearchReplaceEngine(context.get());
context->initialLineState = new InitialLineState(context.get());
diff --git a/aegisub/src/frame_main.h b/aegisub/src/frame_main.h
index 374b1168a..a51060682 100644
--- a/aegisub/src/frame_main.h
+++ b/aegisub/src/frame_main.h
@@ -49,7 +49,7 @@ class AegisubApp;
class AegisubFileDropTarget;
class AudioBox;
class AudioProvider;
-class SubtitlesGrid;
+class BaseGrid;
class VideoBox;
namespace agi { struct Context; class OptionValue; }
@@ -98,7 +98,7 @@ class FrameMain: public wxFrame {
void EnableToolBar(agi::OptionValue const& opt);
- SubtitlesGrid *SubsGrid; ///< The subtitle editing area
+ BaseGrid *SubsGrid; ///< The subtitle editing area
AudioBox *audioBox; ///< The audio area
VideoBox *videoBox; ///< The video area
diff --git a/aegisub/src/include/aegisub/context.h b/aegisub/src/include/aegisub/context.h
index c29035ee8..0d2a3b897 100644
--- a/aegisub/src/include/aegisub/context.h
+++ b/aegisub/src/include/aegisub/context.h
@@ -9,7 +9,7 @@ class InitialLineState;
template class SelectionController;
class SubsController;
class SubsTextEditCtrl;
-class SubtitlesGrid;
+class BaseGrid;
class TextSelectionController;
class VideoContext;
class VideoDisplay;
@@ -42,7 +42,7 @@ struct Context {
AudioBox *audioBox;
AudioKaraoke *karaoke;
DialogManager *dialog;
- SubtitlesGrid *subsGrid;
+ BaseGrid *subsGrid;
VideoDisplay *videoDisplay;
};
diff --git a/aegisub/src/subs_edit_box.cpp b/aegisub/src/subs_edit_box.cpp
index 82cf76e55..9bff32489 100644
--- a/aegisub/src/subs_edit_box.cpp
+++ b/aegisub/src/subs_edit_box.cpp
@@ -38,6 +38,7 @@
#include "ass_dialogue.h"
#include "ass_file.h"
+#include "base_grid.h"
#include "command/command.h"
#include "compat.h"
#include "include/aegisub/context.h"
@@ -48,7 +49,6 @@
#include "placeholder_ctrl.h"
#include "scintilla_text_selection_controller.h"
#include "subs_edit_ctrl.h"
-#include "subs_grid.h"
#include "timeedit_ctrl.h"
#include "tooltip_manager.h"
#include "utils.h"
diff --git a/aegisub/src/subs_grid.cpp b/aegisub/src/subs_grid.cpp
deleted file mode 100644
index 5b6533bac..000000000
--- a/aegisub/src/subs_grid.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2006, Rodrigo Braz Monteiro
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// * Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following disclaimer in the documentation
-// and/or other materials provided with the distribution.
-// * Neither the name of the Aegisub Group nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Aegisub Project http://www.aegisub.org/
-
-/// @file subs_grid.cpp
-/// @brief Subtitles grid control in main window
-/// @ingroup main_ui
-///
-
-#include "config.h"
-
-#include "subs_grid.h"
-
-SubtitlesGrid::SubtitlesGrid(wxWindow *parent, agi::Context *context)
-: BaseGrid(parent, context, wxDefaultSize, wxWANTS_CHARS | wxSUNKEN_BORDER)
-{
-}
diff --git a/aegisub/src/subs_grid.h b/aegisub/src/subs_grid.h
deleted file mode 100644
index e6b7fa443..000000000
--- a/aegisub/src/subs_grid.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2005, Rodrigo Braz Monteiro
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// * Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following disclaimer in the documentation
-// and/or other materials provided with the distribution.
-// * Neither the name of the Aegisub Group nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Aegisub Project http://www.aegisub.org/
-
-/// @file subs_grid.h
-/// @see subs_grid.cpp
-/// @ingroup main_ui
-///
-
-#include "base_grid.h"
-
-class SubtitlesGrid: public BaseGrid {
-public:
- SubtitlesGrid(wxWindow *parent, agi::Context *context);
-};
diff --git a/aegisub/src/video_slider.cpp b/aegisub/src/video_slider.cpp
index 05da82f77..860e1d41c 100644
--- a/aegisub/src/video_slider.cpp
+++ b/aegisub/src/video_slider.cpp
@@ -34,16 +34,17 @@
#include "config.h"
-#include
-#include
+#include "video_slider.h"
+#include "base_grid.h"
#include "include/aegisub/context.h"
#include "include/aegisub/hotkey.h"
#include "options.h"
-#include "subs_grid.h"
#include "utils.h"
#include "video_context.h"
-#include "video_slider.h"
+
+#include
+#include
VideoSlider::VideoSlider (wxWindow* parent, agi::Context *c)
: wxWindow(parent, -1, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE)