add refresh rate to vicons + a bunch of bug fixes
[goodguy/history.git] / cinelerra-5.0 / cinelerra / awindowgui.h
index d925572a4b70f8aa38dce46c6e42a9df154dcfb7..d1c2455bc937073c7674fe261e2ecb91d9b6e827 100644 (file)
@@ -35,6 +35,7 @@
 #include "mwindow.inc"
 #include "newfolder.inc"
 #include "pluginserver.inc"
+#include "vicon.h"
 
 class AWindowAssets;
 class AWindowFolders;
@@ -52,7 +53,10 @@ class AWindowView;
 class AddTools;
 class AddPluginsMenu;
 class AddPluginItem;
+class AVIconDrawing;
 
+class AssetPicon;
+class AssetVIcon;
 class AWindowGUI;
 
 class AssetPicon : public BC_ListBoxItem
@@ -85,6 +89,22 @@ public:
 
        int persistent;
        PluginServer *plugin;
+       VIcon *vicon;
+};
+
+class AssetVIcon : public VIcon {
+public:
+       AssetPicon *picon;
+       VFrame *temp;
+       int64_t length;
+
+       VFrame *frame();
+       int64_t set_seq_no(int64_t no);
+       int get_vx();
+       int get_vy();
+
+       AssetVIcon(AssetPicon *picon, int w, int h, double framerate, int64_t length);
+       ~AssetVIcon();
 };
 
 class AWindowRemovePlugin;
@@ -154,6 +174,10 @@ public:
        PluginServer* selected_plugin();
        AssetPicon* selected_folder();
        bool protected_pixmap(BC_Pixmap *pixmap);
+       int save_defaults(BC_Hash *defaults);
+       int load_defaults(BC_Hash *defaults);
+       void start_vicon_drawing();
+       void stop_vicon_drawing();
 
        MWindow *mwindow;
        AWindow *awindow;
@@ -161,7 +185,6 @@ public:
        AWindowAssets *asset_list;
        AWindowFolders *folder_list;
        AWindowDivider *divider;
-       uint32_t plugin_visibility;
 
 // Store data to speed up responses
 // Persistant data for listboxes
@@ -179,6 +202,7 @@ public:
 
        const char *asset_titles[ASSET_COLUMNS];
 
+       BC_Hash *defaults;
 // Persistent icons
        BC_Pixmap *folder_icon;
        BC_Pixmap *file_icon;
@@ -189,6 +213,8 @@ public:
        BC_Pixmap *vtransition_icon;  VFrame *vtransition_vframe;
        BC_Pixmap *aeffect_icon;      VFrame *aeffect_vframe;
        BC_Pixmap *ladspa_icon;       VFrame *ladspa_vframe;
+       BC_Pixmap *ff_aud_icon;       VFrame *ff_aud_vframe;
+       BC_Pixmap *ff_vid_icon;       VFrame *ff_vid_vframe;
        BC_Pixmap *veffect_icon;      VFrame *veffect_vframe;
        NewFolderThread *newfolder_thread;
 
@@ -199,8 +225,13 @@ public:
        AddTools *add_tools;
 // Temporary for reading picons from files
        VFrame *temp_picon;
+       VIconThread *vicon_thread;
 
+       int64_t plugin_visibility;
        AWindowRemovePlugin *remove_plugin;
+
+       AVIconDrawing *avicon_drawing;
+       int avicon_w, avicon_h, vicon_drawing;
 private:
        void update_folder_list();
        void update_asset_list();
@@ -221,6 +252,8 @@ public:
        int drag_stop_event();
        int button_press_event();
        int column_resize_event();
+       int cursor_enter_event();
+       int cursor_leave_event();
 
        MWindow *mwindow;
        AWindowGUI *gui;
@@ -384,4 +417,16 @@ public:
        int idx;
 };
 
+class AVIconDrawing : public BC_Toggle
+{
+public:
+       AWindowGUI *agui;
+
+       int handle_event();
+       static void calculate_geometry(AWindowGUI *agui, VFrame **images, int *ww, int *hh);
+
+       AVIconDrawing(AWindowGUI *agui, int x, int y, VFrame **images);
+       ~AVIconDrawing();
+};
+
 #endif