X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fawindowgui.h;h=99db0753ceaa9e0f7eec56c016a9c73e68b574d3;hp=436965c9b5cffeaffd2df12a66473b3c7a842620;hb=debf38f78ae5ce154f54183b1638278bf8a24736;hpb=5a46f81a504562b7c8a0c4ff940e2b5b5c068ded diff --git a/cinelerra-5.1/cinelerra/awindowgui.h b/cinelerra-5.1/cinelerra/awindowgui.h index 436965c9..99db0753 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.h +++ b/cinelerra-5.1/cinelerra/awindowgui.h @@ -49,6 +49,17 @@ #include "samples.inc" #include "vicon.h" +#define SELECT_ALL 0 +#define SELECT_USED 1 +#define SELECT_UNUSED 2 +#define SELECT_NONE 3 + +// in percent view_h +#define VIEW_POPUP_BAR_H 15 + +#define ASSET_DRAW_IMAGE 0 +#define ASSET_DRAW_MEDIA_MAP 1 + class AWindowFolderItem : public BC_ListBoxItem { public: @@ -77,7 +88,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); @@ -149,6 +165,37 @@ public: ~AssetVIcon(); }; +class AssetViewPopup : public ViewPopup +{ +public: + AssetViewPopup(VIconThread *vt, int draw_mode, + VFrame *frame, 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(AWindowAssets *asset_list); + ~AssetVIconThread(); + + void set_view_popup(AssetVIcon *vicon, int draw_mode=-1); + ViewPopup *new_view_window(VFrame *frame); + + int draw_mode; +}; + + class AWindowRemovePlugin; class AWindowRemovePluginGUI : public BC_Window { @@ -294,14 +341,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 @@ -337,8 +385,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); @@ -548,4 +594,23 @@ public: AWindowGUI *gui; }; +class AssetSelectUsedItem : public BC_MenuItem +{ +public: + AssetSelectUsedItem(AssetSelectUsed *select_used, const char *text, int action); + int handle_event(); + + int action; + AssetSelectUsed *select_used; +}; + +class AssetSelectUsed : public BC_MenuItem +{ +public: + AssetSelectUsed(MWindow *mwindow, AWindowGUI *gui); + + MWindow *mwindow; + AWindowGUI *gui; +}; + #endif