inter-view tweaks, add clip preview, fix for dupl proxy vicon refs, fix track drag...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / awindowgui.h
index 93d6fa27608d2a540ff992555017f7eeee37e147..388ae622fcc730fb72497db5b9849d8e84683e36 100644 (file)
@@ -44,6 +44,7 @@
 #include "mwindow.inc"
 #include "mutex.inc"
 #include "pluginserver.inc"
+#include "preferences.inc"
 #include "proxypopup.inc"
 #include "renderengine.inc"
 #include "samples.inc"
 #define SELECT_UNUSED 2
 #define SELECT_NONE 3
 
+// in percent view_h
+#define VIEW_POPUP_BAR_H 15
+
+#define ASSET_VIEW_NONE 0
+#define ASSET_VIEW_ICON 1
+#define ASSET_VIEW_MEDIA 2
+#define ASSET_VIEW_MEDIA_MAP 3
+
 class AWindowFolderItem : public BC_ListBoxItem
 {
 public:
@@ -82,7 +91,12 @@ public:
        void reset();
        static void draw_hue_bar(VFrame *frame, double t);
        static void draw_wave(VFrame *frame, double *dp, int len,
-               int base_color, int line_color);
+               int base_color, int line_color, int x, int y, int w, int h);
+       static void draw_wave(VFrame *frame, double *dp, int len,
+               int base_color, int line_color, int x=0, int y=0) {
+         draw_wave(frame, dp, len, base_color, line_color,
+               x,y,frame->get_w(),frame->get_h());
+       }
        void open_render_engine(EDL *edl, int is_audio);
        void close_render_engine();
        void render_video(int64_t pos, VFrame *vfrm);
@@ -154,6 +168,39 @@ public:
        ~AssetVIcon();
 };
 
+class AssetViewPopup : public ViewPopup
+{
+public:
+       AssetViewPopup(VIconThread *vt, int draw_mode,
+                       int x, int y, int w, int h);
+       ~AssetViewPopup();
+
+       int button_press_event();
+       int button_release_event();
+       int cursor_motion_event();
+
+       void draw_vframe(VFrame *frame);
+
+       int bar_h;
+       int draw_mode;
+       int dragging;
+};
+
+class AssetVIconThread : public VIconThread
+{
+public:
+       AssetVIconThread(AWindowGUI *gui, Preferences *preferences);
+       ~AssetVIconThread();
+
+       void set_view_popup(AssetVIcon *v, int draw_mode=-1);
+       ViewPopup *new_view_window();
+
+       AWindowGUI *gui;
+       int draw_mode;
+       int vicon_cmodel;
+};
+
+
 class AWindowRemovePlugin;
 
 class AWindowRemovePluginGUI : public BC_Window {
@@ -299,14 +346,15 @@ public:
        AddTools *add_tools;
 // Temporary for reading picons from files
        VFrame *temp_picon;
-       VIconThread *vicon_thread;
+       AssetVIconThread *vicon_thread;
        AssetVIconAudio *vicon_audio;
 
        int64_t plugin_visibility;
        AWindowRemovePlugin *remove_plugin;
 
        AVIconDrawing *avicon_drawing;
-       int avicon_w, avicon_h, vicon_drawing;
+       int avicon_w, avicon_h;
+       int vicon_drawing;
        int allow_iconlisting;
 
 // Create custom atoms to be used for async messages between windows
@@ -342,8 +390,6 @@ public:
        int column_resize_event();
        int focus_in_event();
        int focus_out_event();
-       int cursor_enter_event();
-       int cursor_leave_event();
        void update_vicon_area();
        int mouse_over_event(int no);