terminate keyframe string in edl output
[goodguy/history.git] / cinelerra-5.1 / cinelerra / mainsession.C
index 251d82b706ffb81947f659f0cd82c666eb57df98..4bfda7b05dcd5b17339ec7bc02c788126c62f5ac 100644 (file)
  *
  */
 
+#include "auto.h"
 #include "bcdisplayinfo.h"
 #include "clip.h"
 #include "bchash.h"
+#include "edit.h"
+#include "edits.h"
 #include "edl.h"
 #include "edlsession.h"
 #include "guicast.h"
@@ -30,7 +33,7 @@
 #include "meterpanel.h"
 #include "mwindow.h"
 #include "mwindowgui.h"
-#include "auto.h"
+#include "plugin.h"
 
 MainSession::MainSession(MWindow *mwindow)
 {
@@ -49,7 +52,6 @@ MainSession::MainSession(MWindow *mwindow)
        drag_assets = new ArrayList<Indexable*>;
        drag_auto_gang = new ArrayList<Auto*>;
        drag_clips = new ArrayList<EDL*>;
-       drag_proxy = new ArrayList<EDL*>;
        drag_edits = new ArrayList<Edit*>;
        drag_edit = 0;
        clip_number = 1;
@@ -115,12 +117,10 @@ MainSession::MainSession(MWindow *mwindow)
 
 MainSession::~MainSession()
 {
-       clear_drag_proxy();
        delete drag_pluginservers;
        delete drag_assets;
        delete drag_auto_gang;
        delete drag_clips;
-       delete drag_proxy;
        delete drag_edits;
 }
 
@@ -145,13 +145,6 @@ void MainSession::boundaries()
        CLAMP(cwindow_controls, 0, 1);
 }
 
-void MainSession::clear_drag_proxy()
-{
-       for( int i=drag_proxy->size(); --i>=0; )
-               drag_proxy->get(i)->remove_user();
-       drag_proxy->remove_all();
-}
-
 void MainSession::save_x11_host(int play_config, const char *x11_host)
 {
        strcpy(!play_config ? a_x11_host : b_x11_host, x11_host);
@@ -263,8 +256,8 @@ void MainSession::default_window_positions(int window_config)
        awindow_w = root_x + root_w - awindow_x - border_left - border_right;
        awindow_h = mwindow_h;
 
-       bwindow_w = 520;
-       bwindow_h = 340;
+       bwindow_w = 600;
+       bwindow_h = 360;
 
        ewindow_w = 640;
        ewindow_h = 240;
@@ -579,3 +572,20 @@ int MainSession::save_defaults(BC_Hash *defaults)
 
        return 0;
 }
+
+Track *MainSession::drag_handle_track()
+{
+       Track *track = 0;
+       switch( current_operation ) {
+       case DRAG_EDITHANDLE1:
+       case DRAG_EDITHANDLE2:
+               track = drag_edit->edits->track;
+               break;
+       case DRAG_PLUGINHANDLE1:
+       case DRAG_PLUGINHANDLE2:
+               track = drag_plugin->edits->track;
+               break;
+       }
+       return track;
+}
+