X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fawindowgui.h;h=985b4a0ea99e42ca3ecaf492d863e1d148292501;hp=a1d2b5e5ea6355699852327b84139ca715810493;hb=7b25542808937e46959c104a706b75f04b1215be;hpb=8b3b351f3703224915cf26d1b01d1d8ee632a178 diff --git a/cinelerra-5.1/cinelerra/awindowgui.h b/cinelerra-5.1/cinelerra/awindowgui.h index a1d2b5e5..985b4a0e 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.h +++ b/cinelerra-5.1/cinelerra/awindowgui.h @@ -28,9 +28,14 @@ #include "asset.inc" #include "assets.inc" #include "awindow.inc" -#include "awindowmenu.inc" +#include "awindowgui.inc" +#include "clippopup.inc" #include "edl.inc" +#include "effectlist.inc" +#include "folderlistmenu.inc" #include "guicast.h" +#include "labeledit.inc" +#include "labelpopup.inc" #include "labels.h" #include "indexable.inc" #include "mwindow.inc" @@ -38,30 +43,6 @@ #include "pluginserver.inc" #include "vicon.h" -class AWindowAssets; -class AWindowFolders; -class AWindowNewFolder; -class AWindowDeleteFolder; -class AWindowRenameFolder; -class AWindowDeleteDisk; -class AWindowDeleteProject; -class AWindowDivider; -class AWindowInfo; -class AWindowRedrawIndex; -class AWindowPaste; -class AWindowAppend; -class AWindowView; -class AddTools; -class AddPluginsMenu; -class AddPluginItem; -class AVIconDrawing; - -class AssetPicon; -class AssetVIcon; -class LabelPopup; -class LabelPopupEdit; -class AWindowGUI; - class AssetPicon : public BC_ListBoxItem { public: @@ -69,16 +50,19 @@ public: AssetPicon(MWindow *mwindow, AWindowGUI *gui, EDL *edl); AssetPicon(MWindow *mwindow, AWindowGUI *gui, PluginServer *plugin); AssetPicon(MWindow *mwindow, AWindowGUI *gui, Label *plugin); - AssetPicon(MWindow *mwindow, AWindowGUI *gui, const char *folder); + AssetPicon(MWindow *mwindow, AWindowGUI *gui, int folder, int persist); virtual ~AssetPicon(); void create_objects(); void reset(); + void draw_wave(VFrame *frame, double *dp, int len, + int base_color, int line_color); MWindow *mwindow; AWindowGUI *gui; BC_Pixmap *icon; VFrame *icon_vframe; + int foldernum; // ID of thing pointed to int id; @@ -89,7 +73,7 @@ public: EDL *edl; int in_use; - + time_t mtime; int persistent; PluginServer *plugin; @@ -156,9 +140,10 @@ 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(); - int current_folder_number(); + static int folder_number(const char *name); // Call back for MWindow entry point int drag_motion(); int drag_stop(); @@ -171,10 +156,8 @@ public: int is_transition); void create_label_folder(); void copy_picons(ArrayList *dst, - ArrayList *src, - char *folder); - void sort_picons(ArrayList *src, - char *folder); + ArrayList *src, int folder); + void sort_picons(ArrayList *src, int use_mtime=0); // Return the selected asset in asset_list Indexable* selected_asset(); PluginServer* selected_plugin(); @@ -184,6 +167,13 @@ public: int load_defaults(BC_Hash *defaults); void start_vicon_drawing(); void stop_vicon_drawing(); + void update_picon(Indexable *indexable); + + VFrame *get_picon(const char *name, const char *plugin_icons); + VFrame *get_picon(const char *name); + void resource_icon(VFrame *&vfrm, BC_Pixmap *&icon, const char *fn, int idx); + void theme_icon(VFrame *&vfrm, BC_Pixmap *&icon, const char *fn); + void plugin_icon(VFrame *&vfrm, BC_Pixmap *&icon, const char *fn, unsigned char *png); MWindow *mwindow; AWindow *awindow; @@ -191,6 +181,7 @@ public: AWindowAssets *asset_list; AWindowFolders *folder_list; AWindowDivider *divider; + AWindowSearchText *search_text; // Store data to speed up responses // Persistant data for listboxes @@ -206,29 +197,45 @@ public: // Currently displayed data for listboxes // Currently displayed assets + comments ArrayList displayed_assets[2]; - const char *asset_titles[ASSET_COLUMNS]; + int displayed_folder; BC_Hash *defaults; // Persistent icons - BC_Pixmap *folder_icon; - BC_Pixmap *file_icon; - BC_Pixmap *audio_icon; - BC_Pixmap *video_icon; + BC_Pixmap *aeffect_folder_icon; VFrame *aeffect_folder_vframe; + BC_Pixmap *atransition_folder_icon; VFrame *atransition_folder_vframe; + BC_Pixmap *clip_folder_icon; VFrame *clip_folder_vframe; + BC_Pixmap *label_folder_icon; VFrame *label_folder_vframe; + BC_Pixmap *media_folder_icon; VFrame *media_folder_vframe; + BC_Pixmap *proxy_folder_icon; VFrame *proxy_folder_vframe; + BC_Pixmap *veffect_folder_icon; VFrame *veffect_folder_vframe; + BC_Pixmap *vtransition_folder_icon; VFrame *vtransition_folder_vframe; + BC_Pixmap *folder_icons[AWINDOW_FOLDERS]; + + BC_Pixmap *folder_icon; VFrame *folder_vframe; + BC_Pixmap *file_icon; VFrame *file_vframe; + BC_Pixmap *audio_icon; VFrame *audio_vframe; + BC_Pixmap *video_icon; VFrame *video_vframe; + BC_Pixmap *label_icon; VFrame *label_vframe; BC_Pixmap *clip_icon; VFrame *clip_vframe; BC_Pixmap *atransition_icon; VFrame *atransition_vframe; BC_Pixmap *vtransition_icon; VFrame *vtransition_vframe; BC_Pixmap *aeffect_icon; VFrame *aeffect_vframe; + BC_Pixmap *veffect_icon; VFrame *veffect_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; // Popup menus AssetPopup *asset_menu; + ClipPopup *clip_menu; LabelPopup *label_menu; + EffectListMenu *effectlist_menu; AssetListMenu *assetlist_menu; + ClipListMenu *cliplist_menu; + LabelListMenu *labellist_menu; FolderListMenu *folderlist_menu; AddTools *add_tools; // Temporary for reading picons from files @@ -246,6 +253,7 @@ public: int create_custom_xatoms(); // Function to overload to recieve customly defined atoms virtual int recieve_custom_xatoms(xatom_event *event); + static const char *folder_names[]; private: void update_folder_list(); @@ -304,6 +312,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: @@ -404,34 +441,6 @@ public: int x, y; }; -class LabelPopup : public BC_PopupMenu -{ -public: - LabelPopup(MWindow *mwindow, AWindowGUI *gui); - ~LabelPopup(); - - void create_objects(); -// Set mainsession with the current selections - int update(); - - MWindow *mwindow; - AWindowGUI *gui; - - LabelPopupEdit *editlabel; -}; - -class LabelPopupEdit : public BC_MenuItem -{ -public: - LabelPopupEdit(MWindow *mwindow, LabelPopup *popup); - ~LabelPopupEdit(); - - int handle_event(); - - MWindow *mwindow; - LabelPopup *popup; -}; - class AddTools : public BC_PopupMenu { public: @@ -440,7 +449,6 @@ public: MWindow *mwindow; AWindowGUI *gui; - AddPluginsMenu *add_plugins; }; class AddPluginItem : public BC_MenuItem @@ -465,4 +473,28 @@ public: ~AVIconDrawing(); }; + +class AWindowListFormat : public BC_MenuItem +{ +public: + AWindowListFormat(MWindow *mwindow, AWindowGUI *gui); + + void update(); + int handle_event(); + MWindow *mwindow; + AWindowGUI *gui; +}; + + +class AWindowListSort : public BC_MenuItem +{ +public: + AWindowListSort(MWindow *mwindow, AWindowGUI *gui); + + void update(); + int handle_event(); + MWindow *mwindow; + AWindowGUI *gui; +}; + #endif