+// *** CONTEXT_HELP ***
+int AWindowAssets::keypress_event()
+{
+ int item;
+ char title[BCTEXTLEN];
+ AssetPicon *picon = 0;
+ PluginServer *plugin = 0;
+
+// printf("AWindowAssets::keypress_event: %d\n", get_keypress());
+
+ // If not our context help keystroke, redispatch it
+ // to the event handler of the base class
+ if (get_keypress() != 'h' || ! alt_down() ||
+ ! is_tooltip_event_win() || ! cursor_inside())
+ return BC_ListBox::keypress_event();
+
+ switch (mwindow->edl->session->awindow_folder) {
+
+ case AW_AEFFECT_FOLDER:
+ case AW_VEFFECT_FOLDER:
+ case AW_ATRANSITION_FOLDER:
+ case AW_VTRANSITION_FOLDER:
+ // If plugin tips activated, show help for plugin under mouse
+ // Otherwise show help for the selected plugin
+ if (gui->tip_info) {
+ item = BC_ListBox::get_highlighted_item();
+ if (item >= 0 && item < gui->displayed_assets[0].size()) {
+ picon = (AssetPicon *) gui->displayed_assets[0][item];
+ if (picon) plugin = picon->plugin;
+ }
+ }
+ else plugin = gui->selected_plugin();
+ // If some plugin is highlighted or selected, show its help
+ // Otherwise show more general help
+ if (plugin) {
+ strcpy(title, plugin->title);
+ if (! strcmp(title, "Overlay")) {
+ // "Overlay" plugin title is ambiguous
+ if (plugin->audio)
+ strcat(title, " \\(Audio\\)");
+ if (plugin->video)
+ strcat(title, " \\(Video\\)");
+ }
+ if (plugin->is_ffmpeg()) {
+ // FFmpeg plugins can be audio or video
+ if (plugin->audio)
+ strcpy(title, "FFmpeg Audio Plugins");
+ if (plugin->video)
+ strcpy(title, "FFmpeg Video Plugins");
+ }
+ context_help_show(title);
+ return 1;
+ }
+ else {
+ switch (mwindow->edl->session->awindow_folder) {
+ case AW_AEFFECT_FOLDER:
+ context_help_show("Audio Effects");
+ return 1;
+ case AW_VEFFECT_FOLDER:
+ context_help_show("Video Effects");
+ return 1;
+ case AW_ATRANSITION_FOLDER:
+ context_help_show("Audio Transitions");
+ return 1;
+ case AW_VTRANSITION_FOLDER:
+ context_help_show("Video Transitions");
+ return 1;
+ default:
+ context_help_show("Resources Window");
+ return 1;
+ }
+ context_help_show("Resources Window");
+ return 1;
+ }
+
+ case AW_LABEL_FOLDER:
+ context_help_show("Labels");
+ return 1;
+
+ case AW_CLIP_FOLDER:
+ context_help_show("Nested Clips");
+ return 1;
+
+ case AW_PROXY_FOLDER:
+ context_help_show("Proxy");
+ return 1;
+
+ default:
+ context_help_show("Resources Window");
+ return 1;
+ }
+
+ context_help_show("Resources Window");
+ return 1;
+}
+