last push faux paux, update shortcuts doc, period/comma alt shortcuts, popup deactiva...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / awindowgui.h
index e8bd76f542c52623a5beb977be8aedf719974d45..703c976422e535c81acb3727989ca6b88d49381e 100644 (file)
@@ -27,6 +27,7 @@
 #include "assetpopup.inc"
 #include "asset.inc"
 #include "assets.inc"
+#include "audiodevice.inc"
 #include "awindow.inc"
 #include "awindowgui.inc"
 #include "clippopup.inc"
@@ -55,6 +56,9 @@ public:
 
        void create_objects();
        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);
 
        MWindow *mwindow;
        AWindowGUI *gui;
@@ -71,7 +75,7 @@ public:
        EDL *edl;
 
        int in_use;
-
+       time_t mtime;
 
        int persistent;
        PluginServer *plugin;
@@ -79,6 +83,25 @@ public:
        VIcon *vicon;
 };
 
+typedef int16_t vicon_audio_t;
+
+class AssetVIconAudio : public Thread
+{
+public:
+       AssetVIconAudio(AWindowGUI *gui);
+       ~AssetVIconAudio();
+
+       void run();
+       void start(AssetVIcon *vicon);
+       void stop(int wait);
+
+       AWindowGUI *gui;
+       AudioDevice *audio;
+       AssetVIcon *vicon;
+       int interrupted;
+       int audio_pos;
+};
+
 class AssetVIcon : public VIcon {
 public:
        AssetPicon *picon;
@@ -89,6 +112,9 @@ public:
        int64_t set_seq_no(int64_t no);
        int get_vx();
        int get_vy();
+       void load_audio();
+       void start_audio();
+       void stop_audio();
 
        AssetVIcon(AssetPicon *picon, int w, int h, double framerate, int64_t length);
        ~AssetVIcon();
@@ -138,7 +164,7 @@ public:
        int keypress_event();
        void async_update_assets();     // Sends update asset event
        void update_effects();
-       void sort_assets();
+       void sort_assets(int use_mtime);
        void sort_folders();
        void reposition_objects();
        static int folder_number(const char *name);
@@ -155,7 +181,7 @@ public:
        void create_label_folder();
        void copy_picons(ArrayList<BC_ListBoxItem*> *dst,
                ArrayList<BC_ListBoxItem*> *src, int folder);
-       void sort_picons(ArrayList<BC_ListBoxItem*> *src);
+       void sort_picons(ArrayList<BC_ListBoxItem*> *src, int use_mtime=0);
 // Return the selected asset in asset_list
        Indexable* selected_asset();
        PluginServer* selected_plugin();
@@ -179,6 +205,7 @@ public:
        AWindowAssets *asset_list;
        AWindowFolders *folder_list;
        AWindowDivider *divider;
+       AWindowSearchText *search_text;
 
 // Store data to speed up responses
 // Persistant data for listboxes
@@ -238,6 +265,7 @@ public:
 // Temporary for reading picons from files
        VFrame *temp_picon;
        VIconThread *vicon_thread;
+       AssetVIconAudio *vicon_audio;
 
        int64_t plugin_visibility;
        AWindowRemovePlugin *remove_plugin;
@@ -309,6 +337,35 @@ public:
        AWindowGUI *gui;
 };
 
+class AWindowSearchTextBox : public BC_TextBox
+{
+public:
+       AWindowSearchTextBox(AWindowSearchText *search_text, int x, int y, int w);
+       int handle_event();
+
+       AWindowSearchText *search_text;
+};
+
+class AWindowSearchText
+{
+public:
+       AWindowSearchText(MWindow *mwindow, AWindowGUI *gui, int x, int y);
+
+       int handle_event();
+       void create_objects();
+       int get_w();
+       int get_h();
+       void reposition_window(int x, int y, int w);
+       const char *get_text();
+       void clear();
+
+       MWindow *mwindow;
+       AWindowGUI *gui;
+       int x, y;
+       BC_Title *text_title;
+       BC_TextBox *text_box;
+};
+
 class AWindowNewFolder : public BC_Button
 {
 public: