From: Good Guy Date: Mon, 10 May 2021 19:40:26 +0000 (-0600) Subject: Exciting new Alt/h help key provided by sge (Georgy) with many thanks! X-Git-Tag: 2021-05~3 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=b104b77f5296719bd5e6de8472eb71542ddaedec;p=goodguy%2Fcinelerra.git Exciting new Alt/h help key provided by sge (Georgy) with many thanks! --- diff --git a/cinelerra-5.1/cinelerra/aboutprefs.C b/cinelerra-5.1/cinelerra/aboutprefs.C index f6fdde4a..03a6f9d0 100644 --- a/cinelerra-5.1/cinelerra/aboutprefs.C +++ b/cinelerra-5.1/cinelerra/aboutprefs.C @@ -36,6 +36,8 @@ const char *AboutPrefs::build_timestamp = COMPILEDATE; AboutPrefs::AboutPrefs(MWindow *mwindow, PreferencesWindow *pwindow) : PreferencesDialog(mwindow, pwindow) { +// *** CONTEXT_HELP *** + context_help_set_keyword("About"); } AboutPrefs::~AboutPrefs() diff --git a/cinelerra-5.1/cinelerra/adeviceprefs.C b/cinelerra-5.1/cinelerra/adeviceprefs.C index 78cef42d..74d62d8d 100644 --- a/cinelerra-5.1/cinelerra/adeviceprefs.C +++ b/cinelerra-5.1/cinelerra/adeviceprefs.C @@ -117,6 +117,7 @@ int ADevicePrefs::initialize(int creation) dialog->add_subwindow(menu = new ADriverMenu(x, y + yS(10), this, (mode == MODERECORD), driver)); menu->create_objects(); + menu->context_help_set_keyword("Audio Out section"); } switch(*driver) { @@ -321,11 +322,13 @@ int ADevicePrefs::create_oss_objs() path_title = new BC_Title(x1, y, _("Device path:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(path_title); + path_title->context_help_set_keyword("Audio Out section"); } oss_path[i] = new ADeviceTextBox( x1, y1 + path_title->get_h() + margin, output_char); dialog->add_subwindow(oss_path[i]); + oss_path[i]->context_help_set_keyword("Audio Out section"); x1 += oss_path[i]->get_w() + margin; if(i == 0) { switch(mode) { @@ -342,6 +345,7 @@ int ADevicePrefs::create_oss_objs() bits_title = new BC_Title(x1, y, _("Bits:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(bits_title); + bits_title->context_help_set_keyword("Audio Out section"); oss_bits = new BitsPopup(dialog, x1, y1 + bits_title->get_h() + margin, output_int, 0, 0, 0, 0, 1); @@ -392,6 +396,7 @@ int ADevicePrefs::create_alsa_objs() path_title = new BC_Title(x1, y, _("Device:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(path_title); + path_title->context_help_set_keyword("Audio Out section"); y1 += path_title->get_h() + margin; alsa_device = new ALSADevice(dialog, x1, y1, output_char, alsa_drivers); @@ -413,6 +418,7 @@ int ADevicePrefs::create_alsa_objs() bits_title = new BC_Title(x1, y, _("Bits:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(bits_title); + bits_title->context_help_set_keyword("Audio Out section"); y1 = y + bits_title->get_h() + margin; alsa_bits = new BitsPopup(dialog, x1, y1, output_int, 0, 0, 0, 0, 1); @@ -426,6 +432,7 @@ int ADevicePrefs::create_alsa_objs() &out_config->interrupt_workaround, _("Stop playback locks up.")); dialog->add_subwindow(alsa_workaround); + alsa_workaround->context_help_set_keyword("Audio Out section"); } #endif return 0; @@ -452,8 +459,10 @@ int ADevicePrefs::create_esound_objs() server_title = new BC_Title(x1, y, _("Server:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(server_title); + server_title->context_help_set_keyword("Audio Out section"); server = new ADeviceTextBox(x1, y + yS(20), output_char); dialog->add_subwindow(server); + server->context_help_set_keyword("Audio Out section"); switch(mode) { case MODEPLAY: @@ -470,8 +479,10 @@ int ADevicePrefs::create_esound_objs() port_title = new BC_Title(x1, y, _("Port:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(port_title); + port_title->context_help_set_keyword("Audio Out section"); port = new ADeviceIntBox(x1, y + yS(20), output_int); dialog->add_subwindow(port); + port->context_help_set_keyword("Audio Out section"); return 0; } @@ -501,7 +512,9 @@ int ADevicePrefs::create_firewire_objs() if(output_char) { dialog->add_subwindow(path_title = new BC_Title(x1, y, _("Device Path:"), MEDIUMFONT, resources->text_default)); + path_title->context_help_set_keyword("Audio Out section"); dialog->add_subwindow(firewire_path = new ADeviceTextBox(x1, y + ys20, output_char)); + firewire_path->context_help_set_keyword("Audio Out section"); x1 += firewire_path->get_w() + xs5; } @@ -523,8 +536,10 @@ int ADevicePrefs::create_firewire_objs() port_title = new BC_Title(x1, y, _("Port:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(port_title); + port_title->context_help_set_keyword("Audio Out section"); firewire_port = new ADeviceIntBox(x1, y + ys20, output_int); dialog->add_subwindow(firewire_port); + firewire_port->context_help_set_keyword("Audio Out section"); x1 += firewire_port->get_w() + xs5; @@ -543,8 +558,10 @@ int ADevicePrefs::create_firewire_objs() channel_title = new BC_Title(x1, y, _("Channel:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(channel_title); + channel_title->context_help_set_keyword("Audio Out section"); firewire_channel = new ADeviceIntBox(x1, y + ys20, output_int); dialog->add_subwindow(firewire_channel); + firewire_channel->context_help_set_keyword("Audio Out section"); x1 += firewire_channel->get_w() + xs5; // Syt offset @@ -567,8 +584,10 @@ int ADevicePrefs::create_firewire_objs() syt_title = new BC_Title(x1, y, _("Syt Offset:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(syt_title); + syt_title->context_help_set_keyword("Audio Out section"); firewire_syt = new ADeviceIntBox(x1, y + ys20, output_int); dialog->add_subwindow(firewire_syt); + firewire_syt->context_help_set_keyword("Audio Out section"); x1 += firewire_syt->get_w() + xs5; } @@ -587,12 +606,15 @@ int ADevicePrefs::create_dvb_objs() dvb_adapter_title = new BC_Title(x1, y2, _("DVB Adapter:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(dvb_adapter_title); + dvb_adapter_title->context_help_set_keyword("Audio Out section"); dvb_adapter_path = new ADeviceTextBox(x1, y1, output_char); dialog->add_subwindow(dvb_adapter_path); + dvb_adapter_path->context_help_set_keyword("Audio Out section"); int x2 = x1 + dvb_adapter_path->get_w() + xS(5); dvb_device_title = new BC_Title(x2, y2, _("dev:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(dvb_device_title); + dvb_device_title->context_help_set_keyword("Audio Out section"); int *output_int = &in_config->dvb_in_device; dvb_adapter_device = new ADeviceTumbleBox(this, x2, y1, output_int, 0, 9, xS(20)); dvb_adapter_device->create_objects(); @@ -600,6 +622,7 @@ int ADevicePrefs::create_dvb_objs() bits_title = new BC_Title(x2, y2, _("Bits:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(bits_title); + bits_title->context_help_set_keyword("Audio Out section"); output_int = &in_config->dvb_in_bits; dvb_bits = new BitsPopup(dialog, x2, y1, output_int, 0, 0, 0, 0, 1); dvb_bits->create_objects(); @@ -607,6 +630,7 @@ int ADevicePrefs::create_dvb_objs() output_int = &in_config->follow_audio; follow_audio_config = new BC_CheckBox(x1, y1, output_int, _("Follow audio config")); dialog->add_subwindow(follow_audio_config); + follow_audio_config->context_help_set_keyword("Audio Out section"); return 0; } @@ -619,6 +643,7 @@ int ADevicePrefs::create_v4l2mpeg_objs() bits_title = new BC_Title(x1, y2, _("Bits:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(bits_title); + bits_title->context_help_set_keyword("Audio Out section"); int *output_int = &in_config->v4l2_in_bits; v4l2_bits = new BitsPopup(dialog, x1, y1, output_int, 0, 0, 0, 0, 1); v4l2_bits->create_objects(); @@ -626,6 +651,7 @@ int ADevicePrefs::create_v4l2mpeg_objs() follow_audio_config = new BC_CheckBox(x1, y1, &in_config->follow_audio, _("Follow audio config")); dialog->add_subwindow(follow_audio_config); + follow_audio_config->context_help_set_keyword("Audio Out section"); return 0; } @@ -646,8 +672,10 @@ int ADevicePrefs::create_pulse_objs() x1 += menu->get_w() + xS(5); dialog->add_subwindow(server_title = new BC_Title(x1, y1, _("Server (blank for default):"))); + server_title->context_help_set_keyword("Audio Out section"); y1 += server_title->get_h() + yS(5); dialog->add_subwindow(server = new ADeviceTextBox(x1, y1, output_char)); + server->context_help_set_keyword("Audio Out section"); #endif return 0; } diff --git a/cinelerra-5.1/cinelerra/apatchgui.C b/cinelerra-5.1/cinelerra/apatchgui.C index d44b584b..678254ab 100644 --- a/cinelerra-5.1/cinelerra/apatchgui.C +++ b/cinelerra-5.1/cinelerra/apatchgui.C @@ -390,6 +390,8 @@ AMixPatch::AMixPatch(MWindow *mwindow, APatchGUI *patch, int x, int y) : MixPatch(mwindow, patch, x, y) { set_tooltip(_("Mixer")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Recover Mixer Windows"); } AMixPatch::~AMixPatch() diff --git a/cinelerra-5.1/cinelerra/appearanceprefs.C b/cinelerra-5.1/cinelerra/appearanceprefs.C index c80ee26b..356fe206 100644 --- a/cinelerra-5.1/cinelerra/appearanceprefs.C +++ b/cinelerra-5.1/cinelerra/appearanceprefs.C @@ -47,6 +47,8 @@ AppearancePrefs::AppearancePrefs(MWindow *mwindow, PreferencesWindow *pwindow) thumbnails = 0; thumbnail_size = 0; vicon_size = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Appearance"); } AppearancePrefs::~AppearancePrefs() @@ -80,46 +82,58 @@ void AppearancePrefs::create_objects() BC_Title *title; add_subwindow(title = new BC_Title(x, y, _("Layout:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Layout section"); y += title->get_h() + ys10; int y1 = y; ViewTheme *theme; - add_subwindow(new BC_Title(x, y, _("Theme:"))); + add_subwindow(title = new BC_Title(x, y, _("Theme:"))); + title->context_help_set_keyword("Layout section"); add_subwindow(theme = new ViewTheme(x1, y, pwindow)); theme->create_objects(); + theme->context_help_set_keyword("Layout section"); y += theme->get_h() + ys5; x = x0; ViewPluginIcons *plugin_icons; - add_subwindow(new BC_Title(x, y, _("Plugin Icons:"))); + add_subwindow(title = new BC_Title(x, y, _("Plugin Icons:"))); + title->context_help_set_keyword("Updatable Icon Image Support"); add_subwindow(plugin_icons = new ViewPluginIcons(x1, y, pwindow)); plugin_icons->create_objects(); + plugin_icons->context_help_set_keyword("Updatable Icon Image Support"); y += plugin_icons->get_h() + ys10; - add_subwindow(new BC_Title(x, y, _("Language:"))); + add_subwindow(title = new BC_Title(x, y, _("Language:"))); + title->context_help_set_keyword("Layout section"); LayoutLocale *layout_locale; add_subwindow(layout_locale = new LayoutLocale(x1, y, pwindow)); layout_locale->create_objects(); + layout_locale->context_help_set_keyword("Layout section"); y += layout_locale->get_h() + ys15; x1 = get_w()/2; int x2 = x1 + xS(160), y2 = y; y = y1; - add_subwindow(new BC_Title(x1, y, _("Layout Scale:"))); + add_subwindow(title = new BC_Title(x1, y, _("Layout Scale:"))); + title->context_help_set_keyword("Layout section"); layout_scale = new ViewLayoutScale(pwindow, this, x2, y); layout_scale->create_objects(); y += layout_scale->get_h() + ys5; - add_subwindow(new BC_Title(x1, y, _("View thumbnail size:"))); + add_subwindow(title = new BC_Title(x1, y, _("View thumbnail size:"))); + title->context_help_set_keyword("Layout section"); thumbnail_size = new ViewThumbnailSize(pwindow, this, x2, y); thumbnail_size->create_objects(); y += thumbnail_size->get_h() + ys5; - add_subwindow(new BC_Title(x1, y, _("Vicon quality:"))); + add_subwindow(title = new BC_Title(x1, y, _("Vicon quality:"))); + title->context_help_set_keyword("Layout section"); vicon_size = new ViewViconSize(pwindow, this, x2, y); vicon_size->create_objects(); y += vicon_size->get_h() + ys5; - add_subwindow(new BC_Title(x1, y, _("Vicon color mode:"))); + add_subwindow(title = new BC_Title(x1, y, _("Vicon color mode:"))); + title->context_help_set_keyword("Layout section"); add_subwindow(vicon_color_mode = new ViewViconColorMode(pwindow, x2, y)); vicon_color_mode->create_objects(); + vicon_color_mode->context_help_set_keyword("Layout section"); y += vicon_color_mode->get_h() + ys5; y = bmax(y, y2); y += ys10; @@ -129,36 +143,45 @@ void AppearancePrefs::create_objects() y1 = y; add_subwindow(title = new BC_Title(x, y, _("Time Format:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Time Format section"); y += title->get_h() + ys10; add_subwindow(hms = new TimeFormatHMS(pwindow, this, pwindow->thread->edl->session->time_format == TIME_HMS, x, y)); + hms->context_help_set_keyword("Time Format section"); y += ys20; add_subwindow(hmsf = new TimeFormatHMSF(pwindow, this, pwindow->thread->edl->session->time_format == TIME_HMSF, x, y)); + hmsf->context_help_set_keyword("Time Format section"); y += ys20; add_subwindow(timecode = new TimeFormatTimecode(pwindow, this, pwindow->thread->edl->session->time_format == TIME_TIMECODE, x, y)); + timecode->context_help_set_keyword("Time Format section"); y += ys20; add_subwindow(samples = new TimeFormatSamples(pwindow, this, pwindow->thread->edl->session->time_format == TIME_SAMPLES, x, y)); + samples->context_help_set_keyword("Time Format section"); y += ys20; add_subwindow(hex = new TimeFormatHex(pwindow, this, pwindow->thread->edl->session->time_format == TIME_SAMPLES_HEX, x, y)); + hex->context_help_set_keyword("Time Format section"); y += ys20; add_subwindow(frames = new TimeFormatFrames(pwindow, this, pwindow->thread->edl->session->time_format == TIME_FRAMES, x, y)); + frames->context_help_set_keyword("Time Format section"); y += ys20; add_subwindow(feet = new TimeFormatFeet(pwindow, this, pwindow->thread->edl->session->time_format == TIME_FEET_FRAMES, x, y)); + feet->context_help_set_keyword("Time Format section"); x += feet->get_w() + xS(15); add_subwindow(title = new BC_Title(x, y, _("Frames per foot:"))); + title->context_help_set_keyword("Time Format section"); x += title->get_w() + margin; sprintf(string, "%0.2f", pwindow->thread->edl->session->frames_per_foot); add_subwindow(new TimeFormatFeetSetting(pwindow, @@ -168,14 +191,17 @@ void AppearancePrefs::create_objects() add_subwindow(seconds = new TimeFormatSeconds(pwindow, this, pwindow->thread->edl->session->time_format == TIME_SECONDS, x, y)); + seconds->context_help_set_keyword("Time Format section"); y += ys35; y2 = y; x = x1; y = y1; - add_subwindow(new BC_Title(x, y, _("Color:"), LARGEFONT, + add_subwindow(title = new BC_Title(x, y, _("Color:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Color section"); y += ys35; add_subwindow(title = new BC_Title(x, y, _("Highlighting Inversion color:"))); + title->context_help_set_keyword("Color section"); x += title->get_w() + margin; char hex_color[BCSTRLEN]; sprintf(hex_color, "%06x", preferences->highlight_inverse); @@ -183,24 +209,30 @@ void AppearancePrefs::create_objects() x2 = x; x = x1; y += ys35; add_subwindow(title = new BC_Title(x, y, _("Composer BG Color:"))); + title->context_help_set_keyword("Color section"); int clr_color = pwindow->thread->edl->session->cwindow_clear_color; add_subwindow(cwdw_bg_color = new Composer_BG_Color(pwindow, x2, y, xS(80), yS(24), clr_color)); draw_3d_border(x2-2,y-2, xS(80)+4,xS(24)+4, 1); cwdw_bg_color->create_objects(); + cwdw_bg_color->context_help_set_keyword("Color section"); x2 += cwdw_bg_color->get_w(); y += ys35; add_subwindow(title = new BC_Title(x1, y, _("YUV color space:"))); + title->context_help_set_keyword("Color Space and Color Range"); x = x2 - xS(120); add_subwindow(yuv_color_space = new YuvColorSpace(x, y, pwindow)); yuv_color_space->create_objects(); + yuv_color_space->context_help_set_keyword("Color Space and Color Range"); y += yuv_color_space->get_h() + ys5; add_subwindow(title = new BC_Title(x1, y, _("YUV color range:"))); + title->context_help_set_keyword("Color Space and Color Range"); x = x2 - xS(100); add_subwindow(yuv_color_range = new YuvColorRange(x, y, pwindow)); yuv_color_range->create_objects(); + yuv_color_range->context_help_set_keyword("Color Space and Color Range"); y += yuv_color_range->get_h() + ys35; if( y2 < y ) y2 = y; @@ -210,15 +242,19 @@ void AppearancePrefs::create_objects() x = x0; y1 = y; add_subwindow(title = new BC_Title(x, y, _("Warnings:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Warnings section"); y += title->get_h() + ys10; UseWarnIndecies *idx_warn = new UseWarnIndecies(pwindow, x, y); add_subwindow(idx_warn); + idx_warn->context_help_set_keyword("Warnings section"); y += idx_warn->get_h() + ys5; BD_WarnRoot *bdwr_warn = new BD_WarnRoot(pwindow, x, y); add_subwindow(bdwr_warn); + bdwr_warn->context_help_set_keyword("Blu-ray Workaround for Mount"); y += bdwr_warn->get_h() + ys5; UseWarnFileRef *warn_ref = new UseWarnFileRef(pwindow, x, y); add_subwindow(warn_ref); + warn_ref->context_help_set_keyword("File by Reference"); y += warn_ref->get_h() + ys5; add_subwindow(new BC_Bar(x0, y, warn_ref->get_w()-x0 - xs30)); @@ -226,59 +262,75 @@ void AppearancePrefs::create_objects() add_subwindow(title = new BC_Title(x, y, _("Dangerous:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Dangerous section"); y += title->get_h() + ys10; UseUnsafeGUI *unsafe_gui = new UseUnsafeGUI(pwindow, x, y); add_subwindow(unsafe_gui); + unsafe_gui->context_help_set_keyword("Advanced features"); y += unsafe_gui->get_h() + ys5; OngoingBackups *ongoing_backups = new OngoingBackups(pwindow, x, y); add_subwindow(ongoing_backups); + ongoing_backups->context_help_set_keyword("Backup and Perpetual Session"); y += ongoing_backups->get_h() + ys5; x = get_w() / 3 + xs30; y = y1; add_subwindow(title = new BC_Title(x, y, _("Flags:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Flags section"); y += title->get_h() + ys10; y1 = y; AutocolorAssets *autocolor_assets = new AutocolorAssets(pwindow, x, y); add_subwindow(autocolor_assets); + autocolor_assets->context_help_set_keyword("Color Title Bars and Assets"); y += autocolor_assets->get_h() + ys5; PerpetualSession *perpetual = new PerpetualSession(x, y, pwindow); add_subwindow(perpetual); + perpetual->context_help_set_keyword("Backup and Perpetual Session"); y += perpetual->get_h() + ys5; RectifyAudioToggle *rect_toggle = new RectifyAudioToggle(x, y, pwindow); add_subwindow(rect_toggle); + rect_toggle->context_help_set_keyword("Flags section"); y += rect_toggle->get_h() + ys5; CtrlToggle *ctrl_toggle = new CtrlToggle(x, y, pwindow); add_subwindow(ctrl_toggle); + ctrl_toggle->context_help_set_keyword("Selection Methods"); y += ctrl_toggle->get_h() + ys5; ForwardRenderDisplacement *displacement = new ForwardRenderDisplacement(pwindow, x, y); add_subwindow(displacement); + displacement->context_help_set_keyword("Always Show Next Frame"); y += displacement->get_h() + ys5; UseTipWindow *tip_win = new UseTipWindow(pwindow, x, y); add_subwindow(tip_win); + tip_win->context_help_set_keyword("Flags section"); y += tip_win->get_h() + ys5; x = 2*get_w() / 3 - xs30; y = y1; add_subwindow(thumbnails = new ViewThumbnails(x, y, pwindow)); + thumbnails->context_help_set_keyword("Video Icons \\/ Audio Icons"); y += thumbnails->get_h() + ys5; PopupMenuBtnup *pop_win = new PopupMenuBtnup(pwindow, x, y); add_subwindow(pop_win); + pop_win->context_help_set_keyword("Flags section"); y += pop_win->get_h() + ys5; GrabFocusPolicy *grab_input_focus = new GrabFocusPolicy(pwindow, x, y); add_subwindow(grab_input_focus); + grab_input_focus->context_help_set_keyword("Flags section"); y += grab_input_focus->get_h() + ys5; ActivateFocusPolicy *focus_activate = new ActivateFocusPolicy(pwindow, x, y); add_subwindow(focus_activate); + focus_activate->context_help_set_keyword("Flags section"); y += focus_activate->get_h() + ys5; DeactivateFocusPolicy *focus_deactivate = new DeactivateFocusPolicy(pwindow, x, y); add_subwindow(focus_deactivate); + focus_deactivate->context_help_set_keyword("Flags section"); y += focus_deactivate->get_h() + ys5; AutoRotate *auto_rotate = new AutoRotate(pwindow, x, y); add_subwindow(auto_rotate); + auto_rotate->context_help_set_keyword("Flags section"); y += auto_rotate->get_h() + ys5; } diff --git a/cinelerra-5.1/cinelerra/assetedit.C b/cinelerra-5.1/cinelerra/assetedit.C index e603ad8c..9bdf847f 100644 --- a/cinelerra-5.1/cinelerra/assetedit.C +++ b/cinelerra-5.1/cinelerra/assetedit.C @@ -228,6 +228,8 @@ AssetEditWindow::AssetEditWindow(MWindow *mwindow, AssetEdit *asset_edit) detail_dialog = 0; win_width = 0; win_height = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Info Asset Details"); } @@ -780,6 +782,8 @@ DetailAssetWindow::DetailAssetWindow(MWindow *mwindow, asset->add_user(); info[0] = 0; text = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Info Asset Details"); } DetailAssetWindow::~DetailAssetWindow() diff --git a/cinelerra-5.1/cinelerra/assetpopup.C b/cinelerra-5.1/cinelerra/assetpopup.C index b414455c..bbdf172f 100644 --- a/cinelerra-5.1/cinelerra/assetpopup.C +++ b/cinelerra-5.1/cinelerra/assetpopup.C @@ -685,6 +685,8 @@ AssetCopyWindow::AssetCopyWindow(AssetCopyDialog *copy_dialog) ACW_W, ACW_H, ACW_W, ACW_H, 1, 0, 1) { this->copy_dialog = copy_dialog; +// *** CONTEXT_HELP *** + context_help_set_keyword("Moving clips"); } AssetCopyWindow::~AssetCopyWindow() @@ -818,6 +820,8 @@ AssetPasteWindow::AssetPasteWindow(AssetPasteDialog *paste_dialog) APW_W, APW_H, APW_W, APW_H, 1, 0, 1) { this->paste_dialog = paste_dialog; +// *** CONTEXT_HELP *** + context_help_set_keyword("Moving clips"); } AssetPasteWindow::~AssetPasteWindow() diff --git a/cinelerra-5.1/cinelerra/assetremove.C b/cinelerra-5.1/cinelerra/assetremove.C index 564c18cf..f623bce4 100644 --- a/cinelerra-5.1/cinelerra/assetremove.C +++ b/cinelerra-5.1/cinelerra/assetremove.C @@ -36,6 +36,8 @@ AssetRemoveWindow::AssetRemoveWindow(MWindow *mwindow) { this->mwindow = mwindow; data = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Resources Window"); } AssetRemoveWindow::~AssetRemoveWindow() diff --git a/cinelerra-5.1/cinelerra/avc1394transport.C b/cinelerra-5.1/cinelerra/avc1394transport.C index ba961769..1629ba86 100644 --- a/cinelerra-5.1/cinelerra/avc1394transport.C +++ b/cinelerra-5.1/cinelerra/avc1394transport.C @@ -189,7 +189,7 @@ int AVC1394GUISeekStart::handle_event() int AVC1394GUISeekStart::keypress_event() { if(get_keypress() == HOME) return handle_event(); - return 0; + return context_help_check_and_show(); } @@ -214,7 +214,7 @@ int AVC1394GUIRewind::handle_event() int AVC1394GUIRewind::keypress_event() { if(get_keypress() == KPPLUS) return handle_event(); - return 0; + return context_help_check_and_show(); } AVC1394GUIReverse::AVC1394GUIReverse(MWindow *mwindow, AVC1394Control *avc, int x, int y) @@ -246,7 +246,7 @@ int AVC1394GUIReverse::handle_event() int AVC1394GUIReverse::keypress_event() { if(get_keypress() == KP6) return handle_event(); - return 0; + return context_help_check_and_show(); } AVC1394GUIStop::AVC1394GUIStop(MWindow *mwindow, AVC1394Control *avc, int x, int y) @@ -270,7 +270,7 @@ int AVC1394GUIStop::handle_event() int AVC1394GUIStop::keypress_event() { if(get_keypress() == KPINS) return handle_event(); - return 0; + return context_help_check_and_show(); } AVC1394GUIPlay::AVC1394GUIPlay(MWindow *mwindow, AVC1394Control *avc, int x, int y) @@ -303,7 +303,7 @@ int AVC1394GUIPlay::handle_event() int AVC1394GUIPlay::keypress_event() { if(get_keypress() == KP3) return handle_event(); - return 0; + return context_help_check_and_show(); } AVC1394GUIPause::AVC1394GUIPause(MWindow *mwindow, AVC1394Control *avc, int x, @@ -327,7 +327,7 @@ int AVC1394GUIPause::handle_event() int AVC1394GUIPause::keypress_event() { - return 0; + return context_help_check_and_show(); } AVC1394GUIFForward::AVC1394GUIFForward(MWindow *mwindow, AVC1394Control *avc, int x, int y) @@ -351,7 +351,7 @@ int AVC1394GUIFForward::handle_event() int AVC1394GUIFForward::keypress_event() { if(get_keypress() == KPENTER) return handle_event(); - return 0; + return context_help_check_and_show(); } @@ -379,7 +379,7 @@ int AVC1394GUISeekEnd::handle_event() int AVC1394GUISeekEnd::keypress_event() { if(get_keypress() == END) return handle_event(); - return 0; + return context_help_check_and_show(); } #endif diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index 4dc1ce28..67c75918 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -1322,6 +1322,8 @@ AWindowGUI::AWindowGUI(MWindow *mwindow, AWindow *awindow) new_folder_thread = 0; modify_folder_thread = 0; folder_lock = new Mutex("AWindowGUI::folder_lock"); +// *** CONTEXT_HELP *** + context_help_set_keyword("Resources Window"); } AWindowGUI::~AWindowGUI() @@ -1759,6 +1761,8 @@ AWindowRemovePluginGUI(AWindow *awindow, AWindowRemovePlugin *thread, VFrame *vframe = plugin->get_picon(); icon = vframe ? create_pixmap(vframe) : 0; plugin_list.append(new BC_ListBoxItem(plugin->title, icon)); +// *** CONTEXT_HELP *** + context_help_set_keyword("Delete Plugins to save Resources Space"); } AWindowRemovePluginGUI:: @@ -1872,6 +1876,8 @@ BC_Window* AWindowRemovePlugin::new_gui() int AWindowGUI::keypress_event() { + char title[BCTEXTLEN]; + PluginServer* plugin = 0; switch( get_keypress() ) { case 'w': case 'W': if( ctrl_down() ) { @@ -1893,7 +1899,7 @@ int AWindowGUI::keypress_event() return cycle_assetlist_format(); case DELETE: if( shift_down() && ctrl_down() ) { - PluginServer* plugin = selected_plugin(); + plugin = selected_plugin(); if( !plugin ) break; remove_plugin = new AWindowRemovePlugin(awindow, plugin); unlock_window(); @@ -1922,7 +1928,30 @@ int AWindowGUI::keypress_event() } break; } - return 0; +// *** CONTEXT_HELP *** + if( get_keypress() != 'h' || ! alt_down() ) return 0; + if( ! is_tooltip_event_win() || ! cursor_inside() ) return 0; + // If some plugin is selected, show its help + // Otherwise show general help + plugin = selected_plugin(); + 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); + } + else context_help_show("Resources Window"); + return 1; } @@ -3197,6 +3226,102 @@ void AWindowAssets::hide_tip_info() info_tip = -1; } +// *** 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; +} + AWindowSearchTextBox::AWindowSearchTextBox(AWindowSearchText *search_text, int x, int y, int w) : BC_TextBox(x, y, w, 1, "") diff --git a/cinelerra-5.1/cinelerra/awindowgui.h b/cinelerra-5.1/cinelerra/awindowgui.h index b52add9b..311e3da1 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.h +++ b/cinelerra-5.1/cinelerra/awindowgui.h @@ -412,6 +412,8 @@ public: int mouse_over_event(int no); void show_tip_info(const char *info, int no); void hide_tip_info(); +// *** CONTEXT_HELP *** + int keypress_event(); MWindow *mwindow; AWindowGUI *gui; diff --git a/cinelerra-5.1/cinelerra/batchrender.C b/cinelerra-5.1/cinelerra/batchrender.C index 9e4dbc3c..ace9e562 100644 --- a/cinelerra-5.1/cinelerra/batchrender.C +++ b/cinelerra-5.1/cinelerra/batchrender.C @@ -743,6 +743,8 @@ BatchRenderGUI::BatchRenderGUI(MWindow *mwindow, this->mwindow = mwindow; this->thread = thread; use_renderfarm = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Batch Rendering"); } BatchRenderGUI::~BatchRenderGUI() @@ -1163,7 +1165,7 @@ void BatchRenderSaveList::run() int BatchRenderSaveList::keypress_event() { if( get_keypress() == 's' || get_keypress() == 'S' ) return handle_event(); - return 0; + return context_help_check_and_show(); } @@ -1244,7 +1246,7 @@ void BatchRenderLoadList::run() int BatchRenderLoadList::keypress_event() { if( get_keypress() == 'o' || get_keypress() == 'O' ) return handle_event(); - return 0; + return context_help_check_and_show(); } BatchRenderCurrentEDL::BatchRenderCurrentEDL(BatchRenderThread *thread, @@ -1433,7 +1435,7 @@ int BatchRenderCancel::keypress_event() thread->gui->set_done(1); return 1; } - return 0; + return context_help_check_and_show(); } //new help button diff --git a/cinelerra-5.1/cinelerra/bdcreate.C b/cinelerra-5.1/cinelerra/bdcreate.C index 93794d51..150f835d 100644 --- a/cinelerra-5.1/cinelerra/bdcreate.C +++ b/cinelerra-5.1/cinelerra/bdcreate.C @@ -515,7 +515,7 @@ int CreateBD_OK::button_press_event() int CreateBD_OK::keypress_event() { - return 0; + return context_help_check_and_show(); } @@ -731,6 +731,8 @@ CreateBD_GUI::CreateBD_GUI(CreateBD_Thread *thread, int x, int y, int w, int h) need_farmed = 0; ok = 0; cancel = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("DVD and Bluray Creation"); } CreateBD_GUI::~CreateBD_GUI() diff --git a/cinelerra-5.1/cinelerra/binfolder.C b/cinelerra-5.1/cinelerra/binfolder.C index ff4d0ba6..f7be299a 100644 --- a/cinelerra-5.1/cinelerra/binfolder.C +++ b/cinelerra-5.1/cinelerra/binfolder.C @@ -1674,6 +1674,8 @@ NewFolderGUI::NewFolderGUI(NewFolderThread *thread, int x, int y, int w, int h) x, y, xS(w), yS(h), -1, -1, 0, 0, 1) { this->thread = thread; +// *** CONTEXT_HELP *** + context_help_set_keyword("User Folders"); } NewFolderGUI::~NewFolderGUI() @@ -1748,6 +1750,8 @@ ModifyFolderGUI::ModifyFolderGUI(ModifyFolderThread *thread, int x, int y, int w : BC_Window(_(PROGRAM_NAME ": Modify folder"), x, y, w, h, xS(320), yS(200), 1, 0, 1) { this->thread = thread; +// *** CONTEXT_HELP *** + context_help_set_keyword("User Folders"); } ModifyFolderGUI::~ModifyFolderGUI() @@ -1944,6 +1948,8 @@ ModifyTargetGUI::ModifyTargetGUI(ModifyTargetThread *thread, int allow_resize) -1, -1, allow_resize, 0, 1) { this->thread = thread; +// *** CONTEXT_HELP *** + context_help_set_keyword("User Folders"); } ModifyTargetGUI::~ModifyTargetGUI() diff --git a/cinelerra-5.1/cinelerra/browsebutton.C b/cinelerra-5.1/cinelerra/browsebutton.C index fae5758b..99b356a8 100644 --- a/cinelerra-5.1/cinelerra/browsebutton.C +++ b/cinelerra-5.1/cinelerra/browsebutton.C @@ -136,6 +136,8 @@ BrowseButtonWindow::BrowseButtonWindow(Theme *theme, int x, int y, want_directory, // Want only directories 0, theme->browse_pad) { +// *** CONTEXT_HELP *** + context_help_set_keyword("Loading Files"); } BrowseButtonWindow::~BrowseButtonWindow() diff --git a/cinelerra-5.1/cinelerra/canvas.C b/cinelerra-5.1/cinelerra/canvas.C index ad5e8811..0779224e 100644 --- a/cinelerra-5.1/cinelerra/canvas.C +++ b/cinelerra-5.1/cinelerra/canvas.C @@ -685,7 +685,7 @@ int Canvas::keypress_event(BC_WindowBase *caller) set_fullscreen(0, 1); break; default: - return 0; + return caller->context_help_check_and_show(); } return 1; } diff --git a/cinelerra-5.1/cinelerra/channeledit.C b/cinelerra-5.1/cinelerra/channeledit.C index 57f07856..83e69f7c 100644 --- a/cinelerra-5.1/cinelerra/channeledit.C +++ b/cinelerra-5.1/cinelerra/channeledit.C @@ -172,6 +172,8 @@ ChannelEditWindow::ChannelEditWindow(ChannelEditThread *thread, this->edit_thread = 0; this->picture_thread = 0; this->scan_confirm_thread = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Initial Setup for DVB Capture"); } ChannelEditWindow::~ChannelEditWindow() @@ -625,6 +627,8 @@ ConfirmScan::ConfirmScan(ChannelEditWindow *gui, int x, int y) 0, 0, 0, 0, 1) { this->gui = gui; +// *** CONTEXT_HELP *** + context_help_set_keyword("Initial Setup for DVB Capture"); } void ConfirmScan::create_objects() @@ -961,6 +965,8 @@ ChannelEditEditWindow::ChannelEditEditWindow(ChannelEditEditThread *thread, this->channel_picker = channel_picker; this->window = window; this->thread = thread; +// *** CONTEXT_HELP *** + context_help_set_keyword("Initial Setup for DVB Capture"); } ChannelEditEditWindow::~ChannelEditEditWindow() { @@ -1338,6 +1344,8 @@ ChannelEditPictureWindow::ChannelEditPictureWindow(ChannelEditPictureThread *thr { this->thread = thread; this->channel_picker = channel_picker; +// *** CONTEXT_HELP *** + context_help_set_keyword("Initial Setup for DVB Capture"); } ChannelEditPictureWindow::~ChannelEditPictureWindow() { @@ -1683,7 +1691,7 @@ int ChannelEditCommon::keypress_event() channel_picker->set_picture(device_id, get_value()); return 1; } - return 0; + return context_help_check_and_show(); } diff --git a/cinelerra-5.1/cinelerra/channelinfo.C b/cinelerra-5.1/cinelerra/channelinfo.C index e6e8486e..5c8d9187 100644 --- a/cinelerra-5.1/cinelerra/channelinfo.C +++ b/cinelerra-5.1/cinelerra/channelinfo.C @@ -349,6 +349,8 @@ ChanSearchGUI::ChanSearchGUI(ChanSearch *cswindow) search_column_widths[0] = xS(120); search_column_widths[2] = xS(120); search_column_widths[1] = get_w()-search_column_widths[0]-search_column_widths[2]-xS(32); +// *** CONTEXT_HELP *** + context_help_set_keyword("Capture at some Future Time via Batch"); } ChanSearchGUI::~ChanSearchGUI() @@ -1242,7 +1244,7 @@ int ChannelInfoOK::button_press_event() int ChannelInfoOK::keypress_event() { - return 0; + return context_help_check_and_show(); } @@ -1451,6 +1453,8 @@ ChannelInfoGUI::ChannelInfoGUI(ChannelInfo *iwindow, if( bay_w > max_bay_w ) bay_w = max_bay_w; panel_w = w; panel_h = h - bay_h; +// *** CONTEXT_HELP *** + context_help_set_keyword("Capture at some Future Time via Batch"); } ChannelInfoGUI::~ChannelInfoGUI() diff --git a/cinelerra-5.1/cinelerra/channelpicker.C b/cinelerra-5.1/cinelerra/channelpicker.C index 7880c306..553bd9be 100644 --- a/cinelerra-5.1/cinelerra/channelpicker.C +++ b/cinelerra-5.1/cinelerra/channelpicker.C @@ -587,6 +587,8 @@ ChannelButton::ChannelButton(ChannelPicker *channel_picker, int x, int y) thread = new ChannelEditThread(channel_picker, channel_picker->channeldb); set_tooltip(_("Edit channels")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Initial Setup for DVB Capture"); } ChannelButton::~ChannelButton() @@ -607,7 +609,6 @@ ChannelText::ChannelText(ChannelPicker *channel_picker, int x, int y) channel_picker->current_channel_name(), x, y, 200, 300) { - this->channel_picker = channel_picker; } @@ -654,6 +655,8 @@ ChannelTumbler::ChannelTumbler(ChannelPicker *channel_picker, : BC_Tumbler(x, y) { this->channel_picker = channel_picker; +// *** CONTEXT_HELP *** + context_help_set_keyword("Initial Setup for DVB Capture"); } ChannelTumbler::~ChannelTumbler() { @@ -682,7 +685,7 @@ int ChannelTumbler::keypress_event() return 1; } else - return 0; + return context_help_check_and_show(); } diff --git a/cinelerra-5.1/cinelerra/clipedit.C b/cinelerra-5.1/cinelerra/clipedit.C index e002dd47..f3f81f25 100644 --- a/cinelerra-5.1/cinelerra/clipedit.C +++ b/cinelerra-5.1/cinelerra/clipedit.C @@ -141,6 +141,8 @@ ClipEditWindow::ClipEditWindow(MWindow *mwindow, ClipEdit *thread) { this->mwindow = mwindow; this->thread = thread; +// *** CONTEXT_HELP *** + context_help_set_keyword("Workflow with OpenEDL and Nested Clips"); } ClipEditWindow::~ClipEditWindow() diff --git a/cinelerra-5.1/cinelerra/colorpicker.C b/cinelerra-5.1/cinelerra/colorpicker.C index fd796bfc..b1e2a949 100644 --- a/cinelerra-5.1/cinelerra/colorpicker.C +++ b/cinelerra-5.1/cinelerra/colorpicker.C @@ -109,6 +109,8 @@ ColorWindow::ColorWindow(ColorPicker *thread, int x, int y, int w, int h, const ColorGUI(this) { this->thread = thread; +// *** CONTEXT_HELP *** + context_help_set_keyword("Title"); } ColorWindow::~ColorWindow() diff --git a/cinelerra-5.1/cinelerra/confirmquit.C b/cinelerra-5.1/cinelerra/confirmquit.C index 17bfc989..b0cb9dcf 100644 --- a/cinelerra-5.1/cinelerra/confirmquit.C +++ b/cinelerra-5.1/cinelerra/confirmquit.C @@ -78,7 +78,7 @@ int ConfirmQuitYesButton::keypress_event() { if( toupper(get_keypress()) == *get_text() ) return handle_event(); - return 0; + return context_help_check_and_show(); } ConfirmQuitNoButton::ConfirmQuitNoButton(MWindow *mwindow, @@ -100,7 +100,7 @@ int ConfirmQuitNoButton::keypress_event() { if( toupper(get_keypress()) == *get_text() ) return handle_event(); - return 0; + return context_help_check_and_show(); } ConfirmQuitCancelButton::ConfirmQuitCancelButton(MWindow *mwindow, @@ -120,6 +120,6 @@ int ConfirmQuitCancelButton::handle_event() int ConfirmQuitCancelButton::keypress_event() { if(get_keypress() == ESC) return handle_event(); - return 0; + return context_help_check_and_show(); } diff --git a/cinelerra-5.1/cinelerra/confirmsave.C b/cinelerra-5.1/cinelerra/confirmsave.C index fe89aff8..45d47ac0 100644 --- a/cinelerra-5.1/cinelerra/confirmsave.C +++ b/cinelerra-5.1/cinelerra/confirmsave.C @@ -50,6 +50,7 @@ int ConfirmSave::get_save_path(MWindow *mwindow, char *filename) _(PROGRAM_NAME ": Save"), string); filebox->lock_window("ConfirmSave::get_save_path"); filebox->create_objects(); + filebox->context_help_set_keyword("Saving Project Files"); filebox->unlock_window(); result = filebox->run_window(); mwindow->defaults->update("DIRECTORY", filebox->get_submitted_path()); diff --git a/cinelerra-5.1/cinelerra/convert.C b/cinelerra-5.1/cinelerra/convert.C index 45fff292..a73d5148 100644 --- a/cinelerra-5.1/cinelerra/convert.C +++ b/cinelerra-5.1/cinelerra/convert.C @@ -548,6 +548,8 @@ ConvertWindow::ConvertWindow(MWindow *mwindow, ConvertDialog *dialog, int x, int this->mwindow = mwindow; this->dialog = dialog; format_tools = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Transcode"); } ConvertWindow::~ConvertWindow() diff --git a/cinelerra-5.1/cinelerra/cpanel.C b/cinelerra-5.1/cinelerra/cpanel.C index 5f8dd4d7..1f82e046 100644 --- a/cinelerra-5.1/cinelerra/cpanel.C +++ b/cinelerra-5.1/cinelerra/cpanel.C @@ -151,6 +151,8 @@ CPanelProtect::CPanelProtect(MWindow *mwindow, CPanel *gui, int x, int y) this->mwindow = mwindow; this->gui = gui; set_tooltip(_("Protect video from changes (F1)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Compositor Toolbar"); } CPanelProtect::~CPanelProtect() { @@ -175,6 +177,8 @@ CPanelMask::CPanelMask(MWindow *mwindow, CPanel *gui, int x, int y) this->mwindow = mwindow; this->gui = gui; set_tooltip(_("Edit mask (F3)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Masks"); } CPanelMask::~CPanelMask() { @@ -197,6 +201,8 @@ CPanelRuler::CPanelRuler(MWindow *mwindow, CPanel *gui, int x, int y) this->mwindow = mwindow; this->gui = gui; set_tooltip(_("Ruler (F4)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Compositor Toolbar"); } CPanelRuler::~CPanelRuler() { @@ -219,6 +225,8 @@ CPanelMagnify::CPanelMagnify(MWindow *mwindow, CPanel *gui, int x, int y) this->mwindow = mwindow; this->gui = gui; set_tooltip(_("Zoom view (F2)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Compositor Toolbar"); } CPanelMagnify::~CPanelMagnify() { @@ -239,6 +247,8 @@ CPanelCamera::CPanelCamera(MWindow *mwindow, CPanel *gui, int x, int y) this->mwindow = mwindow; this->gui = gui; set_tooltip(_("Adjust camera automation (F5)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Camera and Projector"); } CPanelCamera::~CPanelCamera() { @@ -259,6 +269,8 @@ CPanelProj::CPanelProj(MWindow *mwindow, CPanel *gui, int x, int y) this->mwindow = mwindow; this->gui = gui; set_tooltip(_("Adjust projector automation (F6)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Camera and Projector"); } CPanelProj::~CPanelProj() { @@ -279,6 +291,8 @@ CPanelCrop::CPanelCrop(MWindow *mwindow, CPanel *gui, int x, int y) this->mwindow = mwindow; this->gui = gui; set_tooltip(_("Crop a layer or output (F7)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Cropping"); } CPanelCrop::~CPanelCrop() @@ -303,6 +317,8 @@ CPanelEyedrop::CPanelEyedrop(MWindow *mwindow, CPanel *gui, int x, int y) this->mwindow = mwindow; this->gui = gui; set_tooltip(_("Get color (F8)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Compositor Toolbar"); } CPanelEyedrop::~CPanelEyedrop() @@ -327,6 +343,8 @@ CPanelToolWindow::CPanelToolWindow(MWindow *mwindow, CPanel *gui, int x, int y) this->mwindow = mwindow; this->gui = gui; set_tooltip(_("Show tool info (F9)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Compositor Toolbar"); } CPanelToolWindow::~CPanelToolWindow() @@ -358,6 +376,8 @@ CPanelTitleSafe::CPanelTitleSafe(MWindow *mwindow, CPanel *gui, int x, int y) this->mwindow = mwindow; this->gui = gui; set_tooltip(_("Show safe regions (F10)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Compositor Toolbar"); } CPanelTitleSafe::~CPanelTitleSafe() { diff --git a/cinelerra-5.1/cinelerra/ctimebar.C b/cinelerra-5.1/cinelerra/ctimebar.C index d7f5b3ff..95166678 100644 --- a/cinelerra-5.1/cinelerra/ctimebar.C +++ b/cinelerra-5.1/cinelerra/ctimebar.C @@ -39,6 +39,8 @@ CTimeBar::CTimeBar(MWindow *mwindow, CWindowGUI *gui, { this->mwindow = mwindow; this->gui = gui; +// *** CONTEXT_HELP *** + context_help_set_keyword("Preview Region Usage"); } int CTimeBar::resize_event() diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index 08fa9ef2..d9738c2c 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -113,6 +113,8 @@ CWindowGUI::CWindowGUI(MWindow *mwindow, CWindow *cwindow) control_out_x = control_out_y = 0; translating_zoom = 0; highlighted = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Compositor Window"); } CWindowGUI::~CWindowGUI() @@ -592,6 +594,9 @@ int CWindowGUI::keypress_event() if( !result ) result = transport->keypress_event(); + if( !result ) + result = context_help_check_and_show(); + return result; } diff --git a/cinelerra-5.1/cinelerra/cwindowtool.C b/cinelerra-5.1/cinelerra/cwindowtool.C index d7a4ec6c..cd331069 100644 --- a/cinelerra-5.1/cinelerra/cwindowtool.C +++ b/cinelerra-5.1/cinelerra/cwindowtool.C @@ -318,7 +318,8 @@ int CWindowToolGUI::keypress_event() result = 1; } - return result; + if( result ) return result; + return context_help_check_and_show(); } int CWindowToolGUI::translation_event() @@ -539,7 +540,7 @@ int CWindowCropApply::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } const char *CWindowCropOpMode::crop_ops[] = { @@ -594,6 +595,8 @@ int CWindowCropOpItem::handle_event() CWindowCropGUI::CWindowCropGUI(MWindow *mwindow, CWindowTool *thread) : CWindowToolGUI(mwindow, thread, _(PROGRAM_NAME ": Crop"), xS(330), yS(100)) { +// *** CONTEXT_HELP *** + context_help_set_keyword("Cropping"); } @@ -705,6 +708,8 @@ void CWindowCropGUI::update() CWindowEyedropGUI::CWindowEyedropGUI(MWindow *mwindow, CWindowTool *thread) : CWindowToolGUI(mwindow, thread, _(PROGRAM_NAME ": Color"), xS(220), yS(290)) { +// *** CONTEXT_HELP *** + context_help_set_keyword("Compositor Toolbar"); } CWindowEyedropGUI::~CWindowEyedropGUI() @@ -953,6 +958,8 @@ int CWindowEyedropCheckBox::handle_event() CWindowCameraGUI::CWindowCameraGUI(MWindow *mwindow, CWindowTool *thread) : CWindowToolGUI(mwindow, thread, _(PROGRAM_NAME ": Camera"), xS(580), yS(200)) { +// *** CONTEXT_HELP *** + context_help_set_keyword("Camera and Projector"); } CWindowCameraGUI::~CWindowCameraGUI() { @@ -1005,8 +1012,10 @@ void CWindowCameraGUI::create_objects() add_subwindow(bar3 = new BC_TitleBar(x1, y, xS(180)-x1, xs5, xs5, _("Justify"))); x1 += bar3->get_w() + xS(35); add_subwindow(bar4 = new BC_TitleBar(x1, y, xS(375)-x1, xs5, xs5, _("Curve type"))); + bar4->context_help_set_keyword("Using Autos"); x1 += bar4->get_w() + xS(25); add_subwindow(bar5 = new BC_TitleBar(x1, y, get_w()-xS(60)-x1, xs5, xs5, _("Keyframe"))); + bar5->context_help_set_keyword("Using Autos"); y += bar3->get_h() + ys10; x1 = x; @@ -1023,21 +1032,29 @@ void CWindowCameraGUI::create_objects() add_subwindow(button = new CWindowCameraBottom(mwindow, this, x1, y)); x1 += button->get_w() + xS(35); add_subwindow(t_smooth = new CWindowCurveToggle(Camera_Crv_Smooth, mwindow, this, x1, y)); + t_smooth->context_help_set_keyword("Using Autos"); x1 += t_smooth->get_w() + xs10; add_subwindow(t_linear = new CWindowCurveToggle(Camera_Crv_Linear, mwindow, this, x1, y)); + t_linear->context_help_set_keyword("Using Autos"); x1 += t_linear->get_w() + xs10; add_subwindow(t_tangent = new CWindowCurveToggle(Camera_Crv_Tangent, mwindow, this, x1, y)); + t_tangent->context_help_set_keyword("Using Autos"); x1 += t_tangent->get_w() + xs10; add_subwindow(t_free = new CWindowCurveToggle(Camera_Crv_Free, mwindow, this, x1, y)); + t_free->context_help_set_keyword("Using Autos"); x1 += t_free->get_w() + xs10; add_subwindow(t_bump = new CWindowCurveToggle(Camera_Crv_Bump, mwindow, this, x1, y)); + t_bump->context_help_set_keyword("Bump autos"); x1 += button->get_w() + xs25; y += yS(5); add_subwindow(add_keyframe = new CWindowCameraAddKeyframe(mwindow, this, x1, y)); + add_keyframe->context_help_set_keyword("Using Autos"); x1 += add_keyframe->get_w() + xs15; add_subwindow(auto_edge = new CWindowCurveAutoEdge(mwindow, this, x1, y)); + auto_edge->context_help_set_keyword("Bump autos"); x1 += auto_edge->get_w() + xs10; add_subwindow(auto_span = new CWindowCurveAutoSpan(mwindow, this, x1, y)); + auto_span->context_help_set_keyword("Bump autos"); x1 += auto_span->get_w() + xS(50); add_subwindow(reset = new CWindowCameraReset(mwindow, this, x1, y)); @@ -1539,6 +1556,8 @@ int CWindowCurveAutoSpan::handle_event() CWindowProjectorGUI::CWindowProjectorGUI(MWindow *mwindow, CWindowTool *thread) : CWindowToolGUI(mwindow, thread, _(PROGRAM_NAME ": Projector"), xS(580), yS(200)) { +// *** CONTEXT_HELP *** + context_help_set_keyword("Camera and Projector"); } CWindowProjectorGUI::~CWindowProjectorGUI() { @@ -1591,8 +1610,10 @@ void CWindowProjectorGUI::create_objects() add_subwindow(bar3 = new BC_TitleBar(x1, y, xS(180)-x1, xs5, xs5, _("Justify"))); x1 += bar3->get_w() + xS(35); add_subwindow(bar4 = new BC_TitleBar(x1, y, xS(375)-x1, xs5, xs5, _("Curve type"))); + bar4->context_help_set_keyword("Using Autos"); x1 += bar4->get_w() + xS(25); add_subwindow(bar5 = new BC_TitleBar(x1, y, get_w()-xS(60)-x1, xs5, xs5, _("Keyframe"))); + bar5->context_help_set_keyword("Using Autos"); y += bar3->get_h() + ys10; x1 = x; @@ -1609,21 +1630,29 @@ void CWindowProjectorGUI::create_objects() add_subwindow(button = new CWindowProjectorBottom(mwindow, this, x1, y)); x1 += button->get_w() + xS(35); add_subwindow(t_smooth = new CWindowCurveToggle(Projector_Crv_Smooth, mwindow, this, x1, y)); + t_smooth->context_help_set_keyword("Using Autos"); x1 += t_smooth->get_w() + xs10; add_subwindow(t_linear = new CWindowCurveToggle(Projector_Crv_Linear, mwindow, this, x1, y)); + t_linear->context_help_set_keyword("Using Autos"); x1 += t_linear->get_w() + xs10; add_subwindow(t_tangent = new CWindowCurveToggle(Projector_Crv_Tangent, mwindow, this, x1, y)); + t_tangent->context_help_set_keyword("Using Autos"); x1 += t_tangent->get_w() + xs10; add_subwindow(t_free = new CWindowCurveToggle(Projector_Crv_Free, mwindow, this, x1, y)); + t_free->context_help_set_keyword("Using Autos"); x1 += t_free->get_w() + xs10; add_subwindow(t_bump = new CWindowCurveToggle(Projector_Crv_Bump, mwindow, this, x1, y)); + t_bump->context_help_set_keyword("Bump autos"); x1 += button->get_w() + xs25; y += yS(5); add_subwindow(add_keyframe = new CWindowProjectorAddKeyframe(mwindow, this, x1, y)); + add_keyframe->context_help_set_keyword("Using Autos"); x1 += add_keyframe->get_w() + xs15; add_subwindow(auto_edge = new CWindowCurveAutoEdge(mwindow, this, x1, y)); + auto_edge->context_help_set_keyword("Bump autos"); x1 += auto_edge->get_w() + xs10; add_subwindow(auto_span = new CWindowCurveAutoSpan(mwindow, this, x1, y)); + auto_span->context_help_set_keyword("Bump autos"); x1 += auto_span->get_w() + xS(50); add_subwindow(reset = new CWindowProjectorReset(mwindow, this, x1, y)); @@ -2955,6 +2984,8 @@ CWindowMaskGUI::CWindowMaskGUI(MWindow *mwindow, CWindowTool *thread) markers = 1; boundary = 1; preset_dialog = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Masks"); } CWindowMaskGUI::~CWindowMaskGUI() { @@ -3712,6 +3743,8 @@ CWindowMaskPresetGUI::CWindowMaskPresetGUI(CWindowMaskPresetDialog *preset_dialo : BC_Window(title, x, y, xS(320), yS(100), xS(320), yS(100), 0, 0, 1) { this->preset_dialog = preset_dialog; +// *** CONTEXT_HELP *** + context_help_set_keyword("Masks"); } void CWindowMaskPresetGUI::create_objects() @@ -3983,6 +4016,8 @@ void CWindowMaskGUI::save_masks(ArrayList &masks) CWindowRulerGUI::CWindowRulerGUI(MWindow *mwindow, CWindowTool *thread) : CWindowToolGUI(mwindow, thread, _(PROGRAM_NAME ": Ruler"), xS(320), yS(240)) { +// *** CONTEXT_HELP *** + context_help_set_keyword("Compositor Toolbar"); } CWindowRulerGUI::~CWindowRulerGUI() diff --git a/cinelerra-5.1/cinelerra/dvdcreate.C b/cinelerra-5.1/cinelerra/dvdcreate.C index 4c8ab188..6ecb270b 100644 --- a/cinelerra-5.1/cinelerra/dvdcreate.C +++ b/cinelerra-5.1/cinelerra/dvdcreate.C @@ -645,7 +645,7 @@ int CreateDVD_OK::button_press_event() int CreateDVD_OK::keypress_event() { - return 0; + return context_help_check_and_show(); } @@ -873,6 +873,8 @@ CreateDVD_GUI::CreateDVD_GUI(CreateDVD_Thread *thread, int x, int y, int w, int need_farmed = 0; ok = 0; cancel = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("DVD and Bluray Creation"); } CreateDVD_GUI::~CreateDVD_GUI() diff --git a/cinelerra-5.1/cinelerra/editlength.C b/cinelerra-5.1/cinelerra/editlength.C index 070681e8..87b716e2 100644 --- a/cinelerra-5.1/cinelerra/editlength.C +++ b/cinelerra-5.1/cinelerra/editlength.C @@ -124,6 +124,8 @@ EditLengthDialog::EditLengthDialog(MWindow *mwindow, { this->mwindow = mwindow; this->thread = thread; +// *** CONTEXT_HELP *** + context_help_set_keyword("Edit Length"); } EditLengthDialog::~EditLengthDialog() diff --git a/cinelerra-5.1/cinelerra/editpanel.C b/cinelerra-5.1/cinelerra/editpanel.C index 0a56e0fe..0fa5064a 100644 --- a/cinelerra-5.1/cinelerra/editpanel.C +++ b/cinelerra-5.1/cinelerra/editpanel.C @@ -484,6 +484,8 @@ EditLabelbutton::EditLabelbutton(MWindow *mwindow, EditPanel *panel, int x, int this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Toggle label at current position ( l )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Labels"); } EditLabelbutton::~EditLabelbutton() @@ -493,7 +495,7 @@ int EditLabelbutton::keypress_event() { if( get_keypress() == 'l' && !alt_down() ) return handle_event(); - return 0; + return context_help_check_and_show(); } int EditLabelbutton::handle_event() { @@ -509,6 +511,8 @@ EditNextLabel::EditNextLabel(MWindow *mwindow, this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Next label ( ctrl -> )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Labels"); } EditNextLabel::~EditNextLabel() { @@ -526,7 +530,7 @@ int EditNextLabel::keypress_event() return 1; } } - return 0; + return context_help_check_and_show(); } int EditNextLabel::handle_event() { @@ -543,6 +547,8 @@ EditPrevLabel::EditPrevLabel(MWindow *mwindow, this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Previous label ( ctrl <- )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Labels"); } EditPrevLabel::~EditPrevLabel() { @@ -560,7 +566,7 @@ int EditPrevLabel::keypress_event() return 1; } } - return 0; + return context_help_check_and_show(); } int EditPrevLabel::handle_event() { @@ -577,6 +583,8 @@ EditPrevEdit::EditPrevEdit(MWindow *mwindow, this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Previous edit (alt <- )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Snapping while Cutting and Dragging"); } EditPrevEdit::~EditPrevEdit() { @@ -594,7 +602,7 @@ int EditPrevEdit::keypress_event() return 1; } } - return 0; + return context_help_check_and_show(); } int EditPrevEdit::handle_event() { @@ -611,6 +619,8 @@ EditNextEdit::EditNextEdit(MWindow *mwindow, this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Next edit ( alt -> )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Snapping while Cutting and Dragging"); } EditNextEdit::~EditNextEdit() { @@ -628,7 +638,7 @@ int EditNextEdit::keypress_event() return 1; } } - return 0; + return context_help_check_and_show(); } int EditNextEdit::handle_event() { @@ -644,6 +654,8 @@ EditCopy::EditCopy(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Copy ( c )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Cut and Paste Editing"); } EditCopy::~EditCopy() { @@ -651,12 +663,12 @@ EditCopy::~EditCopy() int EditCopy::keypress_event() { - if( alt_down() ) return 0; + if( alt_down() ) return context_help_check_and_show(); if( (get_keypress() == 'c' && !ctrl_down()) || (panel->is_vwindow() && get_keypress() == 'C') ) { return handle_event(); } - return 0; + return context_help_check_and_show(); } int EditCopy::handle_event() { @@ -671,6 +683,8 @@ EditOverwrite::EditOverwrite(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Overwrite ( b )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Two Screen Editing"); } EditOverwrite::~EditOverwrite() { @@ -682,13 +696,13 @@ int EditOverwrite::handle_event() } int EditOverwrite::keypress_event() { - if( alt_down() ) return 0; + if( alt_down() ) return context_help_check_and_show(); if( get_keypress() == 'b' || (panel->is_vwindow() && get_keypress() == 'B') ) { handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } //set_inpoint @@ -699,6 +713,8 @@ EditInPoint::EditInPoint(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("In point ( [ or < )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("In\\/Out Points"); } EditInPoint::~EditInPoint() { @@ -723,7 +739,7 @@ int EditInPoint::keypress_event() return 1; } } - return 0; + return context_help_check_and_show(); } //set_outpoint @@ -734,6 +750,8 @@ EditOutPoint::EditOutPoint(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Out point ( ] or > )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("In\\/Out Points"); } EditOutPoint::~EditOutPoint() { @@ -758,7 +776,7 @@ int EditOutPoint::keypress_event() return 1; } } - return 0; + return context_help_check_and_show(); } //splice_selection @@ -768,6 +786,8 @@ EditSplice::EditSplice(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Splice ( v )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Two Screen Editing"); } EditSplice::~EditSplice() { @@ -779,13 +799,13 @@ int EditSplice::handle_event() } int EditSplice::keypress_event() { - if( alt_down() ) return 0; + if( alt_down() ) return context_help_check_and_show(); if( (get_keypress() == 'v' && !ctrl_down()) || (panel->is_vwindow() && get_keypress() == 'V') ) { handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } //to_clip @@ -795,6 +815,8 @@ EditToClip::EditToClip(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("To clip ( i )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Two Screen Editing"); } EditToClip::~EditToClip() { @@ -807,13 +829,13 @@ int EditToClip::handle_event() int EditToClip::keypress_event() { - if( alt_down() ) return 0; + if( alt_down() ) return context_help_check_and_show(); if( get_keypress() == 'i' || (panel->is_vwindow() && get_keypress() == 'I') ) { handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } //cut @@ -823,6 +845,8 @@ EditCut::EditCut(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Split | Cut ( x )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Cut and Paste Editing"); } EditCut::~EditCut() { @@ -830,10 +854,10 @@ EditCut::~EditCut() int EditCut::keypress_event() { if( ctrl_down() || shift_down() || alt_down() ) - return 0; + return context_help_check_and_show(); if( get_keypress() == 'x' ) return handle_event(); - return 0; + return context_help_check_and_show(); } int EditCut::handle_event() @@ -849,6 +873,8 @@ EditPaste::EditPaste(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Paste ( v )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Cut and Paste Editing"); } EditPaste::~EditPaste() { @@ -858,7 +884,7 @@ int EditPaste::keypress_event() { if( get_keypress() == 'v' && !ctrl_down() ) return handle_event(); - return 0; + return context_help_check_and_show(); } int EditPaste::handle_event() { @@ -873,6 +899,8 @@ EditFit::EditFit(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Fit selection to display ( f )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport and Buttons Bar"); } EditFit::~EditFit() { @@ -883,7 +911,7 @@ int EditFit::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } int EditFit::handle_event() { @@ -898,6 +926,8 @@ EditFitAutos::EditFitAutos(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Fit all autos to display ( Alt + f )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Using Autos"); } EditFitAutos::~EditFitAutos() { @@ -908,7 +938,7 @@ int EditFitAutos::keypress_event() panel->panel_fit_autos(!ctrl_down() ? 1 : 0); return 1; } - return 0; + return context_help_check_and_show(); } int EditFitAutos::handle_event() { @@ -926,6 +956,8 @@ ArrowButton::ArrowButton(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Drag and drop editing mode")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Drag and Drop Editing"); } int ArrowButton::handle_event() @@ -946,6 +978,8 @@ IBeamButton::IBeamButton(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Cut and paste editing mode")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Cut and Paste Editing"); } int IBeamButton::handle_event() @@ -967,6 +1001,8 @@ KeyFrameButton::KeyFrameButton(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Generate keyframes while tweeking (j)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Generate Keyframes while Tweaking"); } int KeyFrameButton::handle_event() @@ -984,7 +1020,7 @@ int KeyFrameButton::keypress_event() panel->panel_set_auto_keyframes(value); return 1; } - return 0; + return context_help_check_and_show(); } //set_span_keyframes @@ -997,6 +1033,8 @@ SpanKeyFrameButton::SpanKeyFrameButton(MWindow *mwindow, EditPanel *panel, int x this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Allow keyframe spanning")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Allow Keyframe Spanning"); } int SpanKeyFrameButton::handle_event() @@ -1015,6 +1053,8 @@ LockLabelsButton::LockLabelsButton(MWindow *mwindow, EditPanel *panel, int x, in this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Lock labels from moving with edits")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Labels"); } int LockLabelsButton::handle_event() @@ -1032,6 +1072,8 @@ EditManualGoto::EditManualGoto(MWindow *mwindow, EditPanel *panel, int x, int y) this->panel = panel; mangoto = new ManualGoto(mwindow, panel); set_tooltip(_("Manual goto ( g )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport and Buttons Bar"); } EditManualGoto::~EditManualGoto() { @@ -1049,7 +1091,7 @@ int EditManualGoto::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } @@ -1062,6 +1104,8 @@ EditClick2Play::EditClick2Play(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Click to play (p)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Click to Play in Viewer and Compositor"); } int EditClick2Play::handle_event() { @@ -1078,7 +1122,7 @@ int EditClick2Play::keypress_event() panel->set_click_to_play(value); return 1; } - return 0; + return context_help_check_and_show(); } @@ -1088,6 +1132,8 @@ EditCommercial::EditCommercial(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Commercial ( shift A )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("The commercial DB"); } EditCommercial::~EditCommercial() { @@ -1095,10 +1141,10 @@ EditCommercial::~EditCommercial() int EditCommercial::keypress_event() { if( ctrl_down() || !shift_down() || alt_down() ) - return 0; + return context_help_check_and_show(); if( get_keypress() == 'A' ) return handle_event(); - return 0; + return context_help_check_and_show(); } int EditCommercial::handle_event() @@ -1128,6 +1174,8 @@ EditUndo::EditUndo(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Undo ( z or Ctrl-z)")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport and Buttons Bar"); } EditUndo::~EditUndo() { @@ -1135,10 +1183,10 @@ EditUndo::~EditUndo() int EditUndo::keypress_event() { if( ctrl_down() || shift_down() || alt_down() ) - return 0; + return context_help_check_and_show(); if( get_keypress() == 'z' ) return handle_event(); - return 0; + return context_help_check_and_show(); } int EditUndo::handle_event() { @@ -1152,6 +1200,8 @@ EditRedo::EditRedo(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Redo ( shift Z )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport and Buttons Bar"); } EditRedo::~EditRedo() { @@ -1159,10 +1209,10 @@ EditRedo::~EditRedo() int EditRedo::keypress_event() { if( ctrl_down() || !shift_down() || alt_down() ) - return 0; + return context_help_check_and_show(); if( get_keypress() == 'Z' ) return handle_event(); - return 0; + return context_help_check_and_show(); } int EditRedo::handle_event() { @@ -1293,6 +1343,8 @@ EditPanelScope::EditPanelScope(MWindow *mwindow, EditPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("View scope")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Videoscope"); } EditPanelScope::~EditPanelScope() @@ -1340,6 +1392,8 @@ EditPanelGangTracks::EditPanelGangTracks(MWindow *mwindow, EditPanel *panel, this->panel = panel; int gang = mwindow->edl->local_session->gang_tracks; set_tooltip(_(gang_tips[gang])); +// *** CONTEXT_HELP *** + context_help_set_keyword("Displaying tracks: Ganged mode"); } EditPanelGangTracks::~EditPanelGangTracks() @@ -1387,6 +1441,8 @@ EditPanelTimecode::EditPanelTimecode(MWindow *mwindow, this->panel = panel; tc_dialog = 0; set_tooltip(_("Set Timecode")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Align Timecodes"); } EditPanelTimecode::~EditPanelTimecode() @@ -1450,6 +1506,8 @@ EditPanelTcWindow::EditPanelTcWindow(EditPanelTcDialog *tc_dialog, int x, int y) TCW_W, TCW_H, TCW_W, TCW_H, 0, 0, 1) { this->tc_dialog = tc_dialog; +// *** CONTEXT_HELP *** + context_help_set_keyword("Align Timecodes"); } EditPanelTcWindow::~EditPanelTcWindow() @@ -1554,6 +1612,11 @@ void EditPanelTcInt::update(int v) int EditPanelTcInt::keypress_event() { + if( get_keypress() == 'h' && alt_down() ) { + context_help_show("Align Timecodes"); + return 1; + } + if( (int)strlen(get_text()) >= digits ) BC_TextBox::update(""); int key = get_keypress(); diff --git a/cinelerra-5.1/cinelerra/fileac3.C b/cinelerra-5.1/cinelerra/fileac3.C index f7d78c59..c6a94161 100644 --- a/cinelerra-5.1/cinelerra/fileac3.C +++ b/cinelerra-5.1/cinelerra/fileac3.C @@ -352,6 +352,8 @@ AC3ConfigAudio::AC3ConfigAudio(BC_WindowBase *parent_window, { this->parent_window = parent_window; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } void AC3ConfigAudio::create_objects() diff --git a/cinelerra-5.1/cinelerra/filedv.C b/cinelerra-5.1/cinelerra/filedv.C index 032f64e4..cf8bc1bf 100644 --- a/cinelerra-5.1/cinelerra/filedv.C +++ b/cinelerra-5.1/cinelerra/filedv.C @@ -934,6 +934,8 @@ DVConfigAudio::DVConfigAudio(BC_WindowBase *parent_window, Asset *asset) { this->parent_window = parent_window; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } DVConfigAudio::~DVConfigAudio() @@ -964,6 +966,8 @@ DVConfigVideo::DVConfigVideo(BC_WindowBase *parent_window, Asset *asset) { this->parent_window = parent_window; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } DVConfigVideo::~DVConfigVideo() diff --git a/cinelerra-5.1/cinelerra/fileexr.C b/cinelerra-5.1/cinelerra/fileexr.C index 2a54f3ed..9c782a11 100644 --- a/cinelerra-5.1/cinelerra/fileexr.C +++ b/cinelerra-5.1/cinelerra/fileexr.C @@ -532,6 +532,8 @@ EXRConfigVideo::EXRConfigVideo(BC_WindowBase *parent_window, Asset *asset) { this->parent_window = parent_window; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } EXRConfigVideo::~EXRConfigVideo() diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.C b/cinelerra-5.1/cinelerra/fileffmpeg.C index a71d692a..bcc55817 100644 --- a/cinelerra-5.1/cinelerra/fileffmpeg.C +++ b/cinelerra-5.1/cinelerra/fileffmpeg.C @@ -516,6 +516,8 @@ FFMPEGConfigAudio::FFMPEGConfigAudio(BC_WindowBase *parent_window, audio_options = 0; format_name = asset->fformat; codec_name = asset->acodec; +// *** CONTEXT_HELP *** + context_help_set_keyword("Options for Render with FFmpeg"); } FFMPEGConfigAudio::~FFMPEGConfigAudio() @@ -681,6 +683,8 @@ FFMPEGConfigVideo::FFMPEGConfigVideo(BC_WindowBase *parent_window, bitrate = 0; quality = 0; video_options = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Options for Render with FFmpeg"); } FFMPEGConfigVideo::~FFMPEGConfigVideo() @@ -847,6 +851,8 @@ FFMPEGConfigFormat::FFMPEGConfigFormat(FFOptionsFormatViewDialog *view_dialog, format_options = 0; format_name = asset->fformat; codec_name = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Modifying FFmpeg Format Options"); } FFMPEGConfigFormat::~FFMPEGConfigFormat() @@ -1593,6 +1599,8 @@ FFOptionsWindow::FFOptionsWindow(FFOptionsDialog *dialog, int x, int y) this->dialog = dialog; this->selected = 0; this->kind = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Modifying FFmpeg Format Options"); } FFOptionsWindow::~FFOptionsWindow() diff --git a/cinelerra-5.1/cinelerra/fileflac.C b/cinelerra-5.1/cinelerra/fileflac.C index ba769a7e..94538037 100644 --- a/cinelerra-5.1/cinelerra/fileflac.C +++ b/cinelerra-5.1/cinelerra/fileflac.C @@ -343,6 +343,8 @@ FLACConfigAudio::FLACConfigAudio(BC_WindowBase *parent_window, { this->parent_window = parent_window; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } FLACConfigAudio::~FLACConfigAudio() diff --git a/cinelerra-5.1/cinelerra/fileformat.C b/cinelerra-5.1/cinelerra/fileformat.C index 6dc11781..c87edf2c 100644 --- a/cinelerra-5.1/cinelerra/fileformat.C +++ b/cinelerra-5.1/cinelerra/fileformat.C @@ -37,6 +37,8 @@ FileFormat::FileFormat(MWindow *mwindow) xS(375), yS(300), xS(375), yS(300)) { this->mwindow = mwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } FileFormat::~FileFormat() diff --git a/cinelerra-5.1/cinelerra/filejpeg.C b/cinelerra-5.1/cinelerra/filejpeg.C index 42dd2189..15ae547c 100644 --- a/cinelerra-5.1/cinelerra/filejpeg.C +++ b/cinelerra-5.1/cinelerra/filejpeg.C @@ -333,6 +333,8 @@ JPEGConfigVideo::JPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset) { this->parent_window = parent_window; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } JPEGConfigVideo::~JPEGConfigVideo() diff --git a/cinelerra-5.1/cinelerra/filempeg.C b/cinelerra-5.1/cinelerra/filempeg.C index fb4ee731..c728036a 100644 --- a/cinelerra-5.1/cinelerra/filempeg.C +++ b/cinelerra-5.1/cinelerra/filempeg.C @@ -1727,6 +1727,8 @@ MPEGConfigAudio::MPEGConfigAudio(BC_WindowBase *parent_window, Asset *asset) { this->parent_window = parent_window; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } MPEGConfigAudio::~MPEGConfigAudio() @@ -1881,6 +1883,8 @@ MPEGConfigVideo::MPEGConfigVideo(BC_WindowBase *parent_window, this->parent_window = parent_window; this->asset = asset; reset_cmodel(); +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } MPEGConfigVideo::~MPEGConfigVideo() diff --git a/cinelerra-5.1/cinelerra/fileogg.C b/cinelerra-5.1/cinelerra/fileogg.C index e65eccbf..63f68098 100644 --- a/cinelerra-5.1/cinelerra/fileogg.C +++ b/cinelerra-5.1/cinelerra/fileogg.C @@ -1633,6 +1633,8 @@ OGGConfigAudio::OGGConfigAudio(BC_WindowBase *parent_window, Asset *asset) { this->parent_window = parent_window; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } OGGConfigAudio::~OGGConfigAudio() @@ -1761,6 +1763,8 @@ OGGConfigVideo::OGGConfigVideo(BC_WindowBase *parent_window, Asset *asset) { this->parent_window = parent_window; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } OGGConfigVideo::~OGGConfigVideo() diff --git a/cinelerra-5.1/cinelerra/filepng.C b/cinelerra-5.1/cinelerra/filepng.C index 0540ff01..4b7f74f8 100644 --- a/cinelerra-5.1/cinelerra/filepng.C +++ b/cinelerra-5.1/cinelerra/filepng.C @@ -353,6 +353,8 @@ PNGConfigVideo::PNGConfigVideo(BC_WindowBase *parent_window, Asset *asset) compression = 0; depth8 = 0; depth16 = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } PNGConfigVideo::~PNGConfigVideo() diff --git a/cinelerra-5.1/cinelerra/fileppm.C b/cinelerra-5.1/cinelerra/fileppm.C index 625223ea..e91690a1 100644 --- a/cinelerra-5.1/cinelerra/fileppm.C +++ b/cinelerra-5.1/cinelerra/fileppm.C @@ -200,6 +200,8 @@ PPMConfigVideo::PPMConfigVideo(BC_WindowBase *gui, Asset *asset) { this->gui = gui; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } void PPMConfigVideo::create_objects() diff --git a/cinelerra-5.1/cinelerra/filesndfile.C b/cinelerra-5.1/cinelerra/filesndfile.C index ffd59b46..a215080d 100644 --- a/cinelerra-5.1/cinelerra/filesndfile.C +++ b/cinelerra-5.1/cinelerra/filesndfile.C @@ -376,6 +376,8 @@ SndFileConfig::SndFileConfig(BC_WindowBase *parent_window, Asset *asset) { this->parent_window = parent_window; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } SndFileConfig::~SndFileConfig() diff --git a/cinelerra-5.1/cinelerra/filetga.C b/cinelerra-5.1/cinelerra/filetga.C index 6eded708..df9a56ee 100644 --- a/cinelerra-5.1/cinelerra/filetga.C +++ b/cinelerra-5.1/cinelerra/filetga.C @@ -828,6 +828,8 @@ TGAConfigVideo::TGAConfigVideo(BC_WindowBase *gui, Asset *asset) compression_items.append(new BC_ListBoxItem(FileTGA::compression_to_str(TGA_RGBA_RLE))); compression_items.append(new BC_ListBoxItem(FileTGA::compression_to_str(TGA_RGB))); compression_items.append(new BC_ListBoxItem(FileTGA::compression_to_str(TGA_RGBA))); +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } TGAConfigVideo::~TGAConfigVideo() diff --git a/cinelerra-5.1/cinelerra/filetiff.C b/cinelerra-5.1/cinelerra/filetiff.C index 7104eed4..e14791e4 100644 --- a/cinelerra-5.1/cinelerra/filetiff.C +++ b/cinelerra-5.1/cinelerra/filetiff.C @@ -535,6 +535,8 @@ TIFFConfigVideo::TIFFConfigVideo(BC_WindowBase *parent_window, Asset *asset) { this->parent_window = parent_window; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } TIFFConfigVideo::~TIFFConfigVideo() diff --git a/cinelerra-5.1/cinelerra/filevorbis.C b/cinelerra-5.1/cinelerra/filevorbis.C index f04249f1..b051f9a9 100644 --- a/cinelerra-5.1/cinelerra/filevorbis.C +++ b/cinelerra-5.1/cinelerra/filevorbis.C @@ -371,6 +371,8 @@ VorbisConfigAudio::VorbisConfigAudio(BC_WindowBase *parent_window, { this->parent_window = parent_window; this->asset = asset; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } VorbisConfigAudio::~VorbisConfigAudio() diff --git a/cinelerra-5.1/cinelerra/formattools.C b/cinelerra-5.1/cinelerra/formattools.C index 68dd6afd..9f9b0c19 100644 --- a/cinelerra-5.1/cinelerra/formattools.C +++ b/cinelerra-5.1/cinelerra/formattools.C @@ -138,15 +138,18 @@ void FormatTools::create_objects( { int px = x; window->add_subwindow(path_textbox = new FormatPathText(px, y, this)); + path_textbox->context_help_set_keyword("File Format section"); px += path_textbox->get_w() + 5; path_recent = new BC_RecentList("PATH", mwindow->defaults, path_textbox, 10, px, y, xS(300), yS(100)); window->add_subwindow(path_recent); path_recent->load_items(File::formattostr(asset->format)); + path_recent->context_help_set_keyword("File Format section"); px += path_recent->get_w(); window->add_subwindow(path_button = new BrowseButton( mwindow->theme, window, path_textbox, px, y, asset->path, _("Output to file"), _("Select a file to write to:"), 0)); + path_button->context_help_set_keyword("File Format section"); // Set w for user. w = MAX(w, xS(305)); @@ -160,29 +163,37 @@ void FormatTools::create_objects( x = init_x; window->add_subwindow(format_title = new BC_Title(x, y, _("File Format:"))); + format_title->context_help_set_keyword("File Format section"); x += format_title->get_w() + margin; window->add_subwindow(format_text = new BC_TextBox(x, y, xS(160), 1, File::formattostr(asset->format))); + format_text->context_help_set_keyword("File Format section"); x += format_text->get_w() + margin; //printf("FormatTools::create_objects %d %p\n", __LINE__, window); window->add_subwindow(format_button = new FormatFormat(x, y, this)); format_button->create_objects(); + format_button->context_help_set_keyword("File Format section"); x += format_button->get_w() + 5; window->add_subwindow(ffmpeg_type = new FFMpegType(x, y, xS(70), 1, asset->fformat)); FFMPEG::set_asset_format(asset, mwindow->edl, asset->fformat); + ffmpeg_type->context_help_set_keyword("File Format section"); x += ffmpeg_type->get_w(); window->add_subwindow(format_ffmpeg = new FormatFFMPEG(x, y, this)); format_ffmpeg->create_objects(); + format_ffmpeg->context_help_set_keyword("File Format section"); x = init_x; y += format_button->get_h() + ys10; if( do_audio ) { window->add_subwindow(audio_title = new BC_Title(x, y, _("Audio:"), LARGEFONT, BC_WindowBase::get_resources()->audiovideo_color)); + audio_title->context_help_set_keyword("File Format section"); x += audio_title->get_w() + margin; window->add_subwindow(aparams_button = new FormatAParams(mwindow, this, x, y)); + aparams_button->context_help_set_keyword("File Format section"); x += aparams_button->get_w() + margin; if(prompt_audio) { window->add_subwindow(audio_switch = new FormatAudio(x, y, this, asset->audio_data)); + audio_switch->context_help_set_keyword("File Format section"); } x = init_x; ylev = y; @@ -202,15 +213,18 @@ void FormatTools::create_objects( //printf("FormatTools::create_objects 8\n"); window->add_subwindow(video_title = new BC_Title(x, y, _("Video:"), LARGEFONT, BC_WindowBase::get_resources()->audiovideo_color)); + video_title->context_help_set_keyword("File Format section"); x += video_title->get_w() + margin; if(prompt_video_compression) { window->add_subwindow(vparams_button = new FormatVParams(mwindow, this, x, y)); + vparams_button->context_help_set_keyword("File Format section"); x += vparams_button->get_w() + margin; } //printf("FormatTools::create_objects 9\n"); if(prompt_video) { window->add_subwindow(video_switch = new FormatVideo(x, y, this, asset->video_data)); + video_switch->context_help_set_keyword("File Format section"); y += video_switch->get_h(); } else { @@ -228,6 +242,7 @@ void FormatTools::create_objects( if( file_per_label ) { labeled_files = new FormatFilePerLabel(this, x, y, file_per_label); window->add_subwindow(labeled_files); + labeled_files->context_help_set_keyword("File Format section"); y += labeled_files->get_h() + ys10; } diff --git a/cinelerra-5.1/cinelerra/gwindowgui.C b/cinelerra-5.1/cinelerra/gwindowgui.C index 1fac6105..e0506c78 100644 --- a/cinelerra-5.1/cinelerra/gwindowgui.C +++ b/cinelerra-5.1/cinelerra/gwindowgui.C @@ -51,6 +51,8 @@ GWindowGUI::GWindowGUI(MWindow *mwindow, int w, int h) this->mwindow = mwindow; camera_xyz = 0; projector_xyz = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Show Overlays"); } GWindowGUI::~GWindowGUI() @@ -63,7 +65,7 @@ const char *GWindowGUI::non_auto_text[NON_AUTOMATION_TOTAL] = N_("Titles"), N_("Transitions"), N_("Plugin Keyframes"), - N_("Hard Edges"), + N_("Hard Edges") }; const char *GWindowGUI::auto_text[AUTOMATION_TOTAL] = @@ -82,6 +84,31 @@ const char *GWindowGUI::auto_text[AUTOMATION_TOTAL] = N_("Speed") }; +const char *GWindowGUI::non_auto_help[NON_AUTOMATION_TOTAL] = +{ + "Video and Audio Tracks and Navigation", + "Video and Audio Tracks and Navigation", + "Transition Plugins", + "Edit Params", + "Cut and Paste Editing" +}; + +const char *GWindowGUI::auto_help[AUTOMATION_TOTAL] = +{ + "The Patchbay", + "Camera and Projector", + "Camera and Projector", + "Camera and Projector", + "Camera and Projector", + "Camera and Projector", + "Camera and Projector", + "The Patchbay", + "The Patchbay", + "Overlays", + "Masks", + "Fade Automation Usage and Auto Gang" +}; + int GWindowGUI::auto_colors[AUTOMATION_TOTAL] = { PINK, @@ -166,6 +193,20 @@ const char *GWindowGUI::toggle_text(toggleinfo *tp) return "()"; } +const char *GWindowGUI::toggle_help(toggleinfo *tp) +{ + if( tp->isauto > 0 ) return auto_help[tp->ref]; + if( !tp->isauto ) return non_auto_help[tp->ref]; + switch( tp->ref ) { + case NONAUTOTOGGLES_CAMERA_XYZ: + case NONAUTOTOGGLES_PROJECTOR_XYZ: + return "Camera and Projector"; + case NON_AUTOMATION_HARD_EDGES: + return "Cut and Paste Editing"; + } + return "Show Overlays"; +} + void GWindowGUI::calculate_extents(BC_WindowBase *gui, int *w, int *h) { int temp1, temp2, temp3, temp4, temp5, temp6, temp7; @@ -273,6 +314,7 @@ void GWindowGUI::create_objects() new GWindowColorButton(toggle, get_w()-wh-ys10, y+yS(2), wh, color); add_tool(color_button); color_button->create_objects(); + color_button->context_help_set_keyword(toggle_help(tp)); } else draw_vframe(vframe, get_w()-vframe->get_w()-xs10, y); @@ -299,6 +341,7 @@ void GWindowGUI::create_objects() add_subwindow(new BC_Title(x1, y, accel)); } } + toggle->context_help_set_keyword(toggle_help(tp)); y += toggles[i]->get_h() + ys5; } update_toggles(0); @@ -408,7 +451,7 @@ int GWindowGUI::keypress_event() } break; } - return 0; + return context_help_check_and_show(); } int GWindowGUI::check_xyz(int group) diff --git a/cinelerra-5.1/cinelerra/gwindowgui.h b/cinelerra-5.1/cinelerra/gwindowgui.h index 6490c851..88906234 100644 --- a/cinelerra-5.1/cinelerra/gwindowgui.h +++ b/cinelerra-5.1/cinelerra/gwindowgui.h @@ -71,10 +71,13 @@ public: static const char *non_auto_text[]; static const char *auto_text[]; + static const char *non_auto_help[]; + static const char *auto_help[]; static const char *xyz_group[]; static const char *xyz_accel[]; static int auto_colors[]; static const char *toggle_text(toggleinfo *tp); + static const char *toggle_help(toggleinfo *tp); MWindow *mwindow; GWindowToggle *toggles[NONAUTOTOGGLES_COUNT + AUTOMATION_TOTAL]; diff --git a/cinelerra-5.1/cinelerra/interfaceprefs.C b/cinelerra-5.1/cinelerra/interfaceprefs.C index 593927e2..4e80eb86 100644 --- a/cinelerra-5.1/cinelerra/interfaceprefs.C +++ b/cinelerra-5.1/cinelerra/interfaceprefs.C @@ -48,6 +48,8 @@ InterfacePrefs::InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow) max_db = 0; shbtn_dialog = 0; file_probe_dialog = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Interface"); } InterfacePrefs::~InterfacePrefs() @@ -70,29 +72,36 @@ void InterfacePrefs::create_objects() int y0 = mwindow->theme->preferencesoptions_y; int x = x0, y = y0; - add_subwindow(new BC_Title(x, y, _("Editing:"), LARGEFONT, + BC_Title *title; + add_subwindow(title = new BC_Title(x, y, _("Editing:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Editing section"); y += ys35; int x2 = get_w()/2, y2 = y; x = x2; - BC_Title *title; add_subwindow(title = new BC_Title(x, y, _("Keyframe reticle:"))); + title->context_help_set_keyword("Using Autos"); y += title->get_h() + ys5; keyframe_reticle = new KeyframeReticle(pwindow, this, x, y, &pwindow->thread->preferences->keyframe_reticle); add_subwindow(keyframe_reticle); keyframe_reticle->create_objects(); + keyframe_reticle->context_help_set_keyword("Using Autos"); y += ys30; add_subwindow(title = new BC_Title(x, y, _("Snapshot path:"))); + title->context_help_set_keyword("Snapshot \\/ Grabshot"); y += title->get_h() + ys5; add_subwindow(snapshot_path = new SnapshotPathText(pwindow, this, x, y, get_w()-x-xs30)); + snapshot_path->context_help_set_keyword("Snapshot \\/ Grabshot"); x = x0; y = y2; add_subwindow(title = new BC_Title(x, y, _("Clicking on edit boundaries does what:"))); + title->context_help_set_keyword("Using the Drag Handle with Trim"); y += title->get_h() + ys10; - add_subwindow(new BC_Title(x, y, _("Button 1:"))); + add_subwindow(title = new BC_Title(x, y, _("Button 1:"))); + title->context_help_set_keyword("Using the Drag Handle with Trim"); int x1 = x + xS(100); ViewBehaviourText *text; @@ -101,110 +110,141 @@ void InterfacePrefs::create_objects() pwindow, &(pwindow->thread->edl->session->edit_handle_mode[0]))); text->create_objects(); + text->context_help_set_keyword("Using the Drag Handle with Trim"); y += ys30; - add_subwindow(new BC_Title(x, y, _("Button 2:"))); + add_subwindow(title = new BC_Title(x, y, _("Button 2:"))); + title->context_help_set_keyword("Using the Drag Handle with Trim"); add_subwindow(text = new ViewBehaviourText(x1, y - ys5, behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[1]), pwindow, &(pwindow->thread->edl->session->edit_handle_mode[1]))); text->create_objects(); + text->context_help_set_keyword("Using the Drag Handle with Trim"); y += ys30; - add_subwindow(new BC_Title(x, y, _("Button 3:"))); + add_subwindow(title = new BC_Title(x, y, _("Button 3:"))); + title->context_help_set_keyword("Using the Drag Handle with Trim"); add_subwindow(text = new ViewBehaviourText(x1, y - ys5, behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[2]), pwindow, &(pwindow->thread->edl->session->edit_handle_mode[2]))); text->create_objects(); + text->context_help_set_keyword("Using the Drag Handle with Trim"); y += text->get_h() + ys30; x = x0; add_subwindow(new BC_Bar(xs5, y, get_w() - xs10)); y += ys5; - add_subwindow(new BC_Title(x, y, _("Operation:"), LARGEFONT, + add_subwindow(title = new BC_Title(x, y, _("Operation:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Operation section"); int y1 = y; y += yS(15); AndroidRemote *android_remote = new AndroidRemote(pwindow, x2, y); add_subwindow(android_remote); + android_remote->context_help_set_keyword("Android Remote Control"); y += android_remote->get_h() + ys10; int x3 = x2; add_subwindow(title = new BC_Title(x3, y, _("Port:"))); + title->context_help_set_keyword("Android Remote Control"); x3 += title->get_w() + margin; AndroidPort *android_port = new AndroidPort(pwindow, x3, y); add_subwindow(android_port); + android_port->context_help_set_keyword("Android Remote Control"); x3 += android_port->get_w() + 2*margin; add_subwindow(title = new BC_Title(x3, y, _("PIN:"))); + title->context_help_set_keyword("Android Remote Control"); x3 += title->get_w() + margin; AndroidPIN *android_pin = new AndroidPIN(pwindow, x3, y); add_subwindow(android_pin); + android_pin->context_help_set_keyword("Android Remote Control"); y += android_port->get_h() + 3*margin; ShBtnPrefs *shbtn_prefs = new ShBtnPrefs(pwindow, this, x2, y); add_subwindow(shbtn_prefs); + shbtn_prefs->context_help_set_keyword("Menu Bar Shell Commands"); x3 = x2 + shbtn_prefs->get_w() + 2*margin; add_subwindow(reload_plugins = new PrefsReloadPlugins(pwindow, this, x3, y)); + reload_plugins->context_help_set_keyword("Operation section"); y += reload_plugins->get_h() + 3*margin; add_subwindow(title = new BC_Title(x2, y, _("Nested Proxy Path:"))); + title->context_help_set_keyword("Proxy"); y += title->get_h() + ys10; PrefsNestedProxyPath *nested_proxy_path = new PrefsNestedProxyPath(pwindow, this, x2, y, get_w()-x2-xs30); add_subwindow(nested_proxy_path); + nested_proxy_path->context_help_set_keyword("Proxy"); y += xs30; add_subwindow(title = new BC_Title(x2, y, _("Default LV2_PATH:"))); + title->context_help_set_keyword("Audio LV2 \\/ Calf Plugins"); y += title->get_h() + ys10; PrefsLV2PathText *lv2_path_text = new PrefsLV2PathText(pwindow, this, x2, y, get_w()-x2-xs30); add_subwindow(lv2_path_text); + lv2_path_text->context_help_set_keyword("Audio LV2 \\/ Calf Plugins"); y += xs30; y2 = y; x = x0; y = y1 + ys35; add_subwindow(file_probes = new PrefsFileProbes(pwindow, this, x, y)); + file_probes->context_help_set_keyword("Probe Order when Loading Media"); y += ys30; PrefsTrapSigSEGV *trap_segv = new PrefsTrapSigSEGV(this, x, y); add_subwindow(trap_segv); + trap_segv->context_help_set_keyword("Operation section"); x1 = x + trap_segv->get_w() + xs10; - add_subwindow(new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED)); + add_subwindow(title = new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED)); + title->context_help_set_keyword("Operation section"); y += ys30; PrefsTrapSigINTR *trap_intr = new PrefsTrapSigINTR(this, x, y); add_subwindow(trap_intr); - add_subwindow(new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED)); + trap_intr->context_help_set_keyword("Operation section"); + add_subwindow(title = new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED)); + title->context_help_set_keyword("Operation section"); y += ys30; yuv420p_dvdlace = new PrefsYUV420P_DVDlace(pwindow, this, x, y); add_subwindow(yuv420p_dvdlace); + yuv420p_dvdlace->context_help_set_keyword("Dvd Interlaced Chroma"); y += ys30; add_subwindow(title = new BC_Title(x1=x, y + ys5, _("Min DB for meter:"))); + title->context_help_set_keyword("Sound Level Meters Window"); x1 += title->get_w() + xs4; sprintf(string, "%d", pwindow->thread->edl->session->min_meter_db); add_subwindow(min_db = new MeterMinDB(pwindow, string, x1, y)); + min_db->context_help_set_keyword("Sound Level Meters Window"); x1 += min_db->get_w() + xs4; add_subwindow(title = new BC_Title(x1, y + ys5, _("Max:"))); + title->context_help_set_keyword("Sound Level Meters Window"); x1 += title->get_w() + xs4; sprintf(string, "%d", pwindow->thread->edl->session->max_meter_db); add_subwindow(max_db = new MeterMaxDB(pwindow, string, x1, y)); + max_db->context_help_set_keyword("Sound Level Meters Window"); y += ys30; StillImageUseDuration *use_stduration = new StillImageUseDuration(pwindow, pwindow->thread->edl->session->si_useduration, x, y); add_subwindow(use_stduration); + use_stduration->context_help_set_keyword("Working with Still Images"); x1 = x + use_stduration->get_w() + xs10; StillImageDuration *stduration = new StillImageDuration(pwindow, x1, y); add_subwindow(stduration); + stduration->context_help_set_keyword("Working with Still Images"); x1 += stduration->get_w() + xs10; - add_subwindow(new BC_Title(x1, y, _("Seconds"))); + add_subwindow(title = new BC_Title(x1, y, _("Seconds"))); + title->context_help_set_keyword("Working with Still Images"); y += ys30; PrefsAutostartLV2UI *autostart_lv2ui = new PrefsAutostartLV2UI(x, y,pwindow); add_subwindow(autostart_lv2ui); + autostart_lv2ui->context_help_set_keyword("Audio LV2 \\/ Calf Plugins"); y += autostart_lv2ui->get_h() + ys10; if( y2 > y ) y = y2; @@ -212,37 +252,48 @@ void InterfacePrefs::create_objects() add_subwindow(new BC_Bar(xs5, y, get_w() - xs10)); y += ys5; - add_subwindow(new BC_Title(x, y, _("Index files:"), LARGEFONT, resources->text_default)); + add_subwindow(title = new BC_Title(x, y, _("Index files:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Index Files section"); y += ys30; - add_subwindow(new BC_Title(x, y + ys5, + add_subwindow(title = new BC_Title(x, y + ys5, _("Index files go here:"), MEDIUMFONT, resources->text_default)); + title->context_help_set_keyword("Index Files section"); x1 = x + xS(230); add_subwindow(ipathtext = new IndexPathText(x1, y, pwindow, pwindow->thread->preferences->index_directory)); + ipathtext->context_help_set_keyword("Index Files section"); x1 += ipathtext->get_w(); add_subwindow(ipath = new BrowseButton(mwindow->theme, this, ipathtext, x1, y, pwindow->thread->preferences->index_directory, _("Index Path"), _("Select the directory for index files"), 1)); + ipath->context_help_set_keyword("Index Files section"); y += ys30; - add_subwindow(new BC_Title(x, y + ys5, _("Size of index file in KB:"), + add_subwindow(title = new BC_Title(x, y + ys5, _("Size of index file in KB:"), MEDIUMFONT, resources->text_default)); + title->context_help_set_keyword("Index Files section"); sprintf(string, "%jd", pwindow->thread->preferences->index_size/1024); add_subwindow(isize = new IndexSize(x + xS(230), y, pwindow, string)); + isize->context_help_set_keyword("Index Files section"); add_subwindow(new ScanCommercials(pwindow, xS(400),y)); y += ys30; - add_subwindow(new BC_Title(x, y + ys5, _("Number of index files to keep:"), + add_subwindow(title = new BC_Title(x, y + ys5, _("Number of index files to keep:"), MEDIUMFONT, resources->text_default)); + title->context_help_set_keyword("Index Files section"); sprintf(string, "%ld", (long)pwindow->thread->preferences->index_count); add_subwindow(icount = new IndexCount(x + xS(230), y, pwindow, string)); + icount->context_help_set_keyword("Index Files section"); add_subwindow(del_indexes = new DeleteAllIndexes(mwindow, pwindow, xS(400), y, _("Delete existing indexes"), "[*.idx][*.toc][*.mkr]")); + del_indexes->context_help_set_keyword("Index Files section"); y += ys30; add_subwindow(ffmpeg_marker_files = new IndexFFMPEGMarkerFiles(this, x, y)); + ffmpeg_marker_files->context_help_set_keyword("Index Files section"); add_subwindow(del_clipngs = new DeleteAllIndexes(mwindow, pwindow, xS(400), y, _("Delete clip thumbnails"), "clip_*.png")); + del_clipngs->context_help_set_keyword("Index Files section"); } const char* InterfacePrefs::behavior_to_text(int mode) @@ -409,6 +460,8 @@ ScanCommercials::ScanCommercials(PreferencesWindow *pwindow, int x, int y) _("Scan for commercials during toc build")) { this->pwindow = pwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("The commercial DB"); } int ScanCommercials::handle_event() { diff --git a/cinelerra-5.1/cinelerra/keyframegui.C b/cinelerra-5.1/cinelerra/keyframegui.C index fb7de36f..74356b54 100644 --- a/cinelerra-5.1/cinelerra/keyframegui.C +++ b/cinelerra-5.1/cinelerra/keyframegui.C @@ -475,6 +475,8 @@ KeyFrameWindow::KeyFrameWindow(MWindow *mwindow, KeyFrameThread *thread, { this->mwindow = mwindow; this->thread = thread; +// *** CONTEXT_HELP *** + context_help_set_keyword("Saved Plugin Presets"); } void KeyFrameWindow::create_objects() @@ -828,6 +830,6 @@ int KeyFramePresetsOK::keypress_event() } } } - return 0; + return context_help_check_and_show(); } diff --git a/cinelerra-5.1/cinelerra/labeledit.C b/cinelerra-5.1/cinelerra/labeledit.C index 9a728a0e..b06d5c76 100644 --- a/cinelerra-5.1/cinelerra/labeledit.C +++ b/cinelerra-5.1/cinelerra/labeledit.C @@ -84,6 +84,8 @@ LabelEditWindow::LabelEditWindow(MWindow *mwindow, LabelEdit *thread) { this->mwindow = mwindow; this->thread = thread; +// *** CONTEXT_HELP *** + context_help_set_keyword("Labels"); } LabelEditWindow::~LabelEditWindow() diff --git a/cinelerra-5.1/cinelerra/levelwindowgui.C b/cinelerra-5.1/cinelerra/levelwindowgui.C index b35409be..ac28f56f 100644 --- a/cinelerra-5.1/cinelerra/levelwindowgui.C +++ b/cinelerra-5.1/cinelerra/levelwindowgui.C @@ -41,6 +41,8 @@ LevelWindowGUI::LevelWindowGUI(MWindow *mwindow, LevelWindow *thread) { this->thread = thread; this->mwindow = mwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Sound Level Meters Window"); } LevelWindowGUI::~LevelWindowGUI() @@ -121,7 +123,7 @@ int LevelWindowGUI::keypress_event() return 1; } } - return 0; + return context_help_check_and_show(); } int LevelWindowGUI::reset_over() diff --git a/cinelerra-5.1/cinelerra/loadfile.C b/cinelerra-5.1/cinelerra/loadfile.C index 4867bd34..d9d9fe78 100644 --- a/cinelerra-5.1/cinelerra/loadfile.C +++ b/cinelerra-5.1/cinelerra/loadfile.C @@ -168,6 +168,8 @@ LoadFileWindow::LoadFileWindow(MWindow *mwindow, { this->thread = thread; this->mwindow = mwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Loading Files"); } LoadFileWindow::~LoadFileWindow() diff --git a/cinelerra-5.1/cinelerra/mainclock.C b/cinelerra-5.1/cinelerra/mainclock.C index 06e23d2b..41e2df82 100644 --- a/cinelerra-5.1/cinelerra/mainclock.C +++ b/cinelerra-5.1/cinelerra/mainclock.C @@ -33,6 +33,8 @@ MainClock::MainClock(MWindow *mwindow, int x, int y, int w) this->mwindow = mwindow; position_offset = 0; set_bg_color(mwindow->theme->clock_bg_color); +// *** CONTEXT_HELP *** + context_help_set_keyword("Time Format section"); } MainClock::~MainClock() diff --git a/cinelerra-5.1/cinelerra/mainmenu.C b/cinelerra-5.1/cinelerra/mainmenu.C index 58c0d622..e2902b3b 100644 --- a/cinelerra-5.1/cinelerra/mainmenu.C +++ b/cinelerra-5.1/cinelerra/mainmenu.C @@ -90,6 +90,8 @@ MainMenu::MainMenu(MWindow *mwindow, MWindowGUI *gui, int w) { this->gui = gui; this->mwindow = mwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Program Window"); } MainMenu::~MainMenu() @@ -2113,6 +2115,8 @@ LoadLayoutConfirm::LoadLayoutConfirm(LoadLayoutDialog *layout_dialog, int x, int : BC_Window(_(PROGRAM_NAME ": Layout"), x, y, xS(300),yS(140), xS(300),yS(140), 0) { this->layout_dialog = layout_dialog; +// *** CONTEXT_HELP *** + context_help_set_keyword("Window Layouts"); } LoadLayoutConfirm::~LoadLayoutConfirm() diff --git a/cinelerra-5.1/cinelerra/manualgoto.C b/cinelerra-5.1/cinelerra/manualgoto.C index 3f0c3a7e..f51281ce 100644 --- a/cinelerra-5.1/cinelerra/manualgoto.C +++ b/cinelerra-5.1/cinelerra/manualgoto.C @@ -83,6 +83,8 @@ ManualGotoWindow::ManualGotoWindow(ManualGoto *mango, int x, int y) MGT_W, MGT_H, MGT_W, MGT_H, 0, 0, 1) { this->mango = mango; +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport and Buttons Bar"); } ManualGotoWindow::~ManualGotoWindow() diff --git a/cinelerra-5.1/cinelerra/mbuttons.C b/cinelerra-5.1/cinelerra/mbuttons.C index 8c3b8a2d..7c22885a 100644 --- a/cinelerra-5.1/cinelerra/mbuttons.C +++ b/cinelerra-5.1/cinelerra/mbuttons.C @@ -47,6 +47,8 @@ MButtons::MButtons(MWindow *mwindow, MWindowGUI *gui) { this->gui = gui; this->mwindow = mwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport and Buttons Bar"); } MButtons::~MButtons() @@ -93,6 +95,11 @@ int MButtons::keypress_event() result = transport->keypress_event(); } + if(!result) + { + result = context_help_check_and_show(); + } + return result; } diff --git a/cinelerra-5.1/cinelerra/menuattachtransition.C b/cinelerra-5.1/cinelerra/menuattachtransition.C index 52e3dd38..b9af91f8 100644 --- a/cinelerra-5.1/cinelerra/menuattachtransition.C +++ b/cinelerra-5.1/cinelerra/menuattachtransition.C @@ -138,6 +138,18 @@ TransitionDialog::TransitionDialog(MWindow *mwindow, { this->mwindow = mwindow; this->thread = thread; +// *** CONTEXT_HELP *** + switch( thread->data_type ) { + case TRACK_AUDIO: + context_help_set_keyword("Audio Transitions"); + break; + case TRACK_VIDEO: + context_help_set_keyword("Video Transitions"); + break; + default: + context_help_set_keyword("Transition Plugins"); + break; + } } TransitionSetDefault::TransitionSetDefault(TransitionDialog *window, int x, int y) diff --git a/cinelerra-5.1/cinelerra/menueffects.C b/cinelerra-5.1/cinelerra/menueffects.C index b58d770c..fb16ab31 100644 --- a/cinelerra-5.1/cinelerra/menueffects.C +++ b/cinelerra-5.1/cinelerra/menueffects.C @@ -581,6 +581,8 @@ MenuEffectWindow::MenuEffectWindow(MWindow *mwindow, file_title = 0; format_tools = 0; loadmode = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Rendered Effects"); } MenuEffectWindow::~MenuEffectWindow() @@ -688,7 +690,7 @@ int MenuEffectWindowOK::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } MenuEffectWindowCancel::MenuEffectWindowCancel(MenuEffectWindow *window) @@ -710,7 +712,7 @@ int MenuEffectWindowCancel::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } MenuEffectWindowList::MenuEffectWindowList(MenuEffectWindow *window, @@ -731,6 +733,54 @@ int MenuEffectWindowList::handle_event() return 1; } +// *** CONTEXT_HELP *** +int MenuEffectWindowList::keypress_event() +{ + int item; + char title[BCTEXTLEN]; + +// printf("MenuEffectWindowList::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(); + + // Try to show help for the plugin currently under mouse + title[0] = '\0'; + item = get_highlighted_item(); + if (item >= 0 && item < window->plugin_list->total) + strcpy(title, window->plugin_list->values[item]->get_text()); + + // If some plugin is highlighted, show its help + // Otherwise show more general help + if (title[0]) { + if (! strcmp(title, "Overlay")) { + // "Overlay" plugin title is ambiguous + if (window->asset->audio_data) + strcat(title, " \\(Audio\\)"); + if (window->asset->video_data) + strcat(title, " \\(Video\\)"); + } + if (! strncmp(title, "F_", 2)) { + // FFmpeg plugins can be audio or video + if (window->asset->audio_data) + strcpy(title, "FFmpeg Audio Plugins"); + if (window->asset->video_data) + strcpy(title, "FFmpeg Video Plugins"); + } + context_help_show(title); + return 1; + } + else { + context_help_show("Rendered Effects"); + return 1; + } + context_help_show("Rendered Effects"); + return 1; +} + #define PROMPT_TEXT _("Set up effect panel and hit \"OK\"") #define MEP_W xS(260) #define MEP_H yS(100) @@ -745,6 +795,8 @@ MenuEffectPrompt::MenuEffectPrompt(MWindow *mwindow) MenuEffectPrompt::calculate_h(mwindow->gui), 0, 0, 1) { +// *** CONTEXT_HELP *** + context_help_set_keyword("Rendered Effects"); } int MenuEffectPrompt::calculate_w(BC_WindowBase *gui) diff --git a/cinelerra-5.1/cinelerra/menueffects.h b/cinelerra-5.1/cinelerra/menueffects.h index 1316a04d..357b0484 100644 --- a/cinelerra-5.1/cinelerra/menueffects.h +++ b/cinelerra-5.1/cinelerra/menueffects.h @@ -170,6 +170,7 @@ public: ArrayList *plugin_list); int handle_event(); + int keypress_event(); MenuEffectWindow *window; }; diff --git a/cinelerra-5.1/cinelerra/meterpanel.C b/cinelerra-5.1/cinelerra/meterpanel.C index 10e01ca0..a5398ab9 100644 --- a/cinelerra-5.1/cinelerra/meterpanel.C +++ b/cinelerra-5.1/cinelerra/meterpanel.C @@ -362,6 +362,8 @@ MeterMeter::MeterMeter(MWindow *mwindow, this->mwindow = mwindow; this->panel = panel; set_delays(TRACKING_RATE * 10, TRACKING_RATE); +// *** CONTEXT_HELP *** + context_help_set_keyword("Sound Level Meters Window"); } MeterMeter::~MeterMeter() @@ -394,6 +396,8 @@ MeterShow::MeterShow(MWindow *mwindow, MeterPanel *panel, int x, int y) this->mwindow = mwindow; this->panel = panel; set_tooltip(_("Show meters")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Sound Level Meters Window"); } diff --git a/cinelerra-5.1/cinelerra/mixersalign.C b/cinelerra-5.1/cinelerra/mixersalign.C index 5a148d38..6e9abcc6 100644 --- a/cinelerra-5.1/cinelerra/mixersalign.C +++ b/cinelerra-5.1/cinelerra/mixersalign.C @@ -521,6 +521,8 @@ MixersAlignWindow::MixersAlignWindow(MixersAlign *dialog, int x, int y) : BC_Window(_("Align Mixers"), x, y, xS(880), yS(380), xS(880), yS(380), 1) { this->dialog = dialog; +// *** CONTEXT_HELP *** + context_help_set_keyword("Video sync using Waveforms"); } MixersAlignWindow::~MixersAlignWindow() { diff --git a/cinelerra-5.1/cinelerra/mtimebar.C b/cinelerra-5.1/cinelerra/mtimebar.C index 60d71da1..41ce4132 100644 --- a/cinelerra-5.1/cinelerra/mtimebar.C +++ b/cinelerra-5.1/cinelerra/mtimebar.C @@ -53,6 +53,8 @@ MTimeBar::MTimeBar(MWindow *mwindow, { this->gui = gui; this->pane = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Time Format section"); } MTimeBar::MTimeBar(MWindow *mwindow, @@ -65,6 +67,8 @@ MTimeBar::MTimeBar(MWindow *mwindow, { this->gui = mwindow->gui; this->pane = pane; +// *** CONTEXT_HELP *** + context_help_set_keyword("Time Format section"); } void MTimeBar::create_objects() diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index 2918e23e..e5d4bc69 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -5385,6 +5385,8 @@ ConfirmRefWindow::ConfirmRefWindow(MWindow *mwindow, char *path, { this->mwindow = mwindow; this->path = path; +// *** CONTEXT_HELP *** + context_help_set_keyword("File by Reference"); } ConfirmRefWindow::~ConfirmRefWindow() diff --git a/cinelerra-5.1/cinelerra/mwindowgui.C b/cinelerra-5.1/cinelerra/mwindowgui.C index 1b00a0fb..f875a14a 100644 --- a/cinelerra-5.1/cinelerra/mwindowgui.C +++ b/cinelerra-5.1/cinelerra/mwindowgui.C @@ -128,6 +128,8 @@ MWindowGUI::MWindowGUI(MWindow *mwindow) cwindow_remote_handler = 0; record_remote_handler = 0; android_control = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Program Window"); } @@ -1313,6 +1315,9 @@ int MWindowGUI::keypress_event() if(result) cursor_motion_event(); + if(!result) + result = context_help_check_and_show(); + return result; } @@ -2371,6 +2376,8 @@ FFMpegToggle::FFMpegToggle(MWindow *mwindow, MButtons *mbuttons, int x, int y) this->mwindow = mwindow; this->mbuttons = mbuttons; set_tooltip(get_value() ? FFMPEG_EARLY_TIP : FFMPEG_LATE_TIP); +// *** CONTEXT_HELP *** + context_help_set_keyword("FFmpeg Early Probe Explanation"); } FFMpegToggle::~FFMpegToggle() @@ -2395,6 +2402,8 @@ StackButton::StackButton(MWindow *mwindow, int x, int y) { this->mwindow = mwindow; set_tooltip(_("Close EDL")); +// *** CONTEXT_HELP *** + context_help_set_keyword("OpenEDL"); } int StackButton::handle_event() @@ -2425,6 +2434,8 @@ ProxyToggle::ProxyToggle(MWindow *mwindow, MButtons *mbuttons, int x, int y) scaler_images = mwindow->edl->session->proxy_use_scaler; set_tooltip(mwindow->edl->session->proxy_state!=PROXY_DISABLED ? _("Disable proxy") : _("Enable proxy")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Proxy"); } void ProxyToggle::show() @@ -2478,6 +2489,6 @@ int ProxyToggle::keypress_event() return handle_event(); } } - return 0; + return context_help_check_and_show(); } diff --git a/cinelerra-5.1/cinelerra/new.C b/cinelerra-5.1/cinelerra/new.C index 47e46705..f9294cff 100644 --- a/cinelerra-5.1/cinelerra/new.C +++ b/cinelerra-5.1/cinelerra/new.C @@ -307,6 +307,8 @@ NewWindow::NewWindow(MWindow *mwindow, NewThread *new_thread, int x, int y) folder = 0; name = 0; recent_folder = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Project and Media Attributes"); } NewWindow::~NewWindow() @@ -712,6 +714,8 @@ FrameRatePulldown::FrameRatePulldown(MWindow *mwindow, { this->mwindow = mwindow; this->output = output; +// *** CONTEXT_HELP *** + context_help_set_keyword("Video In section"); } int FrameRatePulldown::handle_event() { diff --git a/cinelerra-5.1/cinelerra/patchbay.C b/cinelerra-5.1/cinelerra/patchbay.C index fb0339a9..c2ae534d 100644 --- a/cinelerra-5.1/cinelerra/patchbay.C +++ b/cinelerra-5.1/cinelerra/patchbay.C @@ -138,6 +138,8 @@ PatchBay::PatchBay(MWindow *mwindow, MWindowGUI *gui) this->pane = 0; drag_operation = Tracks::NONE; for(int i = 0; i < TRANSFER_TYPES; i++) mode_icons[i] = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("The Patchbay"); } PatchBay::PatchBay(MWindow *mwindow, @@ -156,6 +158,8 @@ PatchBay::PatchBay(MWindow *mwindow, this->pane = pane; drag_operation = Tracks::NONE; for(int i = 0; i < TRANSFER_TYPES; i++) mode_icons[i] = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("The Patchbay"); // printf("PatchBay::PatchBay %d %d %d %d %d\n", // __LINE__, // x, diff --git a/cinelerra-5.1/cinelerra/patchgui.C b/cinelerra-5.1/cinelerra/patchgui.C index fa471477..1431249d 100644 --- a/cinelerra-5.1/cinelerra/patchgui.C +++ b/cinelerra-5.1/cinelerra/patchgui.C @@ -626,6 +626,8 @@ MasterPatch::MasterPatch(MWindow *mwindow, PatchGUI *patch, int x, int y) this->mwindow = mwindow; this->patch = patch; set_tooltip(_("Master Track")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Displaying tracks: Ganged mode"); } int MasterPatch::handle_event() diff --git a/cinelerra-5.1/cinelerra/performanceprefs.C b/cinelerra-5.1/cinelerra/performanceprefs.C index e13cb2f6..44545e31 100644 --- a/cinelerra-5.1/cinelerra/performanceprefs.C +++ b/cinelerra-5.1/cinelerra/performanceprefs.C @@ -41,6 +41,8 @@ PerformancePrefs::PerformancePrefs(MWindow *mwindow, PreferencesWindow *pwindow) : PreferencesDialog(mwindow, pwindow) { hot_node = -1; +// *** CONTEXT_HELP *** + context_help_set_keyword("Performance"); } PerformancePrefs::~PerformancePrefs() @@ -63,6 +65,7 @@ void PerformancePrefs::create_objects() char string[BCTEXTLEN]; BC_Resources *resources = BC_WindowBase::get_resources(); BC_WindowBase *win; + BC_Title *title; node_list = 0; generate_node_list(); @@ -72,9 +75,11 @@ void PerformancePrefs::create_objects() int y0 = y; win = add_subwindow(new BC_Title(x, y + ys5, _("Cache size (MB):"), MEDIUMFONT, resources->text_default)); + win->context_help_set_keyword("Performance section"); int maxw = win->get_w(); int y1 = y += ys30; win = add_subwindow(new BC_Title(x, y1 + ys5, _("Seconds to preroll renders:"))); + win->context_help_set_keyword("Performance section"); maxw = bmax(win->get_w(), maxw); int x2 = x + maxw + xs5; int y2 = y += ys30; @@ -87,9 +92,12 @@ void PerformancePrefs::create_objects() int x1 = x + xmargin4; add_subwindow(cache_transitions = new CacheTransitions(x1, y0, pwindow, this)); + cache_transitions->context_help_set_keyword("Performance section"); win = add_subwindow(new BC_Title(x1, y1, _("Use HW Device:"))); + win->context_help_set_keyword("Performance section"); maxw = win->get_w(); win = add_subwindow(new BC_Title(x1, y2, _("Project SMP cpus:"))); + win->context_help_set_keyword("Performance section"); maxw = bmax(win->get_w(), maxw); x2 = x1 + maxw + xs5; PrefsUseHWDev *use_hw_dev = new PrefsUseHWDev(pwindow, this, x2, y1); @@ -102,19 +110,23 @@ void PerformancePrefs::create_objects() y += ys5; - add_subwindow(new BC_Title(x, y, _("Background Rendering (Video only)"), LARGEFONT, resources->text_default)); + add_subwindow(title = new BC_Title(x, y, _("Background Rendering (Video only)"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Background Rendering"); y1 = y += ys30; win = add_subwindow(new PrefsUseBRender(pwindow, x, y)); + win->context_help_set_keyword("Background Rendering"); y += win->get_h() + ys10; win = add_subwindow(new BC_Title(x, y, _("Frames per background rendering job:"))); + win->context_help_set_keyword("Background Rendering"); y += win->get_h() + ys5; PrefsBRenderFragment *brender_fragment = new PrefsBRenderFragment(pwindow, this, x + xmargin3, y); brender_fragment->create_objects(); y += brender_fragment->get_h() + ys5; win = add_subwindow(new BC_Title(x, y, _("Frames to preroll background:"))); + win->context_help_set_keyword("Background Rendering"); y += win->get_h() + ys5; PrefsBRenderPreroll *bpreroll = new PrefsBRenderPreroll(pwindow, this, x + xmargin3, y + ys5); @@ -122,7 +134,8 @@ void PerformancePrefs::create_objects() y += bpreroll->get_h() + ys20; x += xmargin4; - add_subwindow(new BC_Title(x, y1, _("Output for background rendering:"))); + add_subwindow(title = new BC_Title(x, y1, _("Output for background rendering:"))); + title->context_help_set_keyword("Background Rendering"); y1 += ys20; brender_tools = new FormatTools(mwindow, this, pwindow->thread->preferences->brender_asset); @@ -143,21 +156,28 @@ void PerformancePrefs::create_objects() // Renderfarm add_subwindow(new BC_Bar(xs5, y, get_w() - xs10)); y += ys5; - add_subwindow(new BC_Title(x, y, _("Render Farm"), LARGEFONT, resources->text_default)); + add_subwindow(title = new BC_Title(x, y, _("Render Farm"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Render Farm Menu"); x1 = get_w() - BC_GenericButton::calculate_w(this, _("Reset rates")) - x; add_subwindow(new PrefsRenderFarmReset(pwindow, this, x1, y)); x1 = x + xmargin4; BC_Title *node_title = new BC_Title(x1, y, _("Nodes:")); add_subwindow(node_title); + node_title->context_help_set_keyword("Render Farm Menu"); x1 += node_title->get_w() + xS(15); sprintf(string, _(MASTER_NODE_FRAMERATE_TEXT), pwindow->thread->preferences->local_rate); add_subwindow(master_rate = new BC_Title(x1, y, string)); + master_rate->context_help_set_keyword("Render Farm Menu"); add_subwindow(node_list = new PrefsRenderFarmNodes(pwindow, this, x + xmargin4, y+=yS(25))); + node_list->context_help_set_keyword("Render Farm Menu"); add_subwindow(new PrefsRenderFarm(pwindow, x, y+=ys5)); - add_subwindow(new BC_Title(x, y+=ys30, _("Hostname:"))); - add_subwindow(new BC_Title(x + xmargin3, y, _("Port:"))); + add_subwindow(title = new BC_Title(x, y+=ys30, _("Hostname:"))); + title->context_help_set_keyword("Render Farm Menu"); + add_subwindow(title = new BC_Title(x + xmargin3, y, _("Port:"))); + title->context_help_set_keyword("Render Farm Menu"); add_subwindow(edit_node = new PrefsRenderFarmEditNode(pwindow, this, x, y+=yS(25))); + edit_node->context_help_set_keyword("Render Farm Menu"); edit_port = new PrefsRenderFarmPort(pwindow, this, x+xmargin3, y); edit_port->create_objects(); @@ -165,16 +185,19 @@ void PerformancePrefs::create_objects() add_subwindow(new PrefsRenderFarmNewNode(pwindow, this, x+xmargin2, y)); add_subwindow(new PrefsRenderFarmSortNodes(pwindow, this, x, y+=ys30)); add_subwindow(new PrefsRenderFarmDelNode(pwindow, this, x+xmargin2, y)); - add_subwindow(new BC_Title(x, y+=ys35, _("Client Watchdog Timeout:"))); + add_subwindow(title = new BC_Title(x, y+=ys35, _("Client Watchdog Timeout:"))); + title->context_help_set_keyword("Render Farm Menu"); renderfarm_watchdog = new PrefsRenderFarmWatchdog(pwindow, this, x+xmargin3, y-ys5); renderfarm_watchdog->create_objects(); - add_subwindow(new BC_Title(x, y+=ys35, _("Total jobs to create:"))); + add_subwindow(title = new BC_Title(x, y+=ys35, _("Total jobs to create:"))); + title->context_help_set_keyword("Render Farm Menu"); PrefsRenderFarmJobs *jobs = new PrefsRenderFarmJobs(pwindow, this, x + xmargin3, y-ys5); jobs->create_objects(); y += jobs->get_h() + ys5; win = add_subwindow(new BC_Title(x, y, _("(overridden if new file at each label is checked)"))); + win->context_help_set_keyword("Render Farm Menu"); // y += win->get_h() + ys5; // add_subwindow(new PrefsRenderFarmVFS(pwindow, this, x, y)); // add_subwindow(new BC_Title(x, y, @@ -406,6 +429,8 @@ PrefsRenderFarm::PrefsRenderFarm(PreferencesWindow *pwindow, int x, int y) _("Use render farm")) { this->pwindow = pwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Render Farm section"); } PrefsRenderFarm::~PrefsRenderFarm() { @@ -424,6 +449,8 @@ PrefsForceUniprocessor::PrefsForceUniprocessor(PreferencesWindow *pwindow, int x _("Force single processor use")) { this->pwindow = pwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Performance section"); } PrefsForceUniprocessor::~PrefsForceUniprocessor() { @@ -556,6 +583,8 @@ PrefsRenderFarmNewNode::PrefsRenderFarmNewNode(PreferencesWindow *pwindow, Perfo { this->pwindow = pwindow; this->subwindow = subwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Render Farm Menu"); } PrefsRenderFarmNewNode::~PrefsRenderFarmNewNode() { @@ -586,6 +615,8 @@ PrefsRenderFarmReplaceNode::PrefsRenderFarmReplaceNode(PreferencesWindow *pwindo { this->pwindow = pwindow; this->subwindow = subwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Render Farm Menu"); } PrefsRenderFarmReplaceNode::~PrefsRenderFarmReplaceNode() { @@ -610,6 +641,8 @@ PrefsRenderFarmDelNode::PrefsRenderFarmDelNode(PreferencesWindow *pwindow, Perfo { this->pwindow = pwindow; this->subwindow = subwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Render Farm Menu"); } PrefsRenderFarmDelNode::~PrefsRenderFarmDelNode() { @@ -636,6 +669,8 @@ PrefsRenderFarmSortNodes::PrefsRenderFarmSortNodes(PreferencesWindow *pwindow, { this->pwindow = pwindow; this->subwindow = subwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Render Farm Menu"); } PrefsRenderFarmSortNodes::~PrefsRenderFarmSortNodes() @@ -658,6 +693,8 @@ PrefsRenderFarmReset::PrefsRenderFarmReset(PreferencesWindow *pwindow, { this->pwindow = pwindow; this->subwindow = subwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Render Farm Menu"); } int PrefsRenderFarmReset::handle_event() diff --git a/cinelerra-5.1/cinelerra/playbackprefs.C b/cinelerra-5.1/cinelerra/playbackprefs.C index e220aba4..ba7e9ab3 100644 --- a/cinelerra-5.1/cinelerra/playbackprefs.C +++ b/cinelerra-5.1/cinelerra/playbackprefs.C @@ -47,6 +47,8 @@ PlaybackPrefs::PlaybackPrefs(MWindow *mwindow, PreferencesWindow *pwindow, int c video_device = 0; audio_offset = 0; play_gain = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Playback A \\/ Playback B"); } PlaybackPrefs::~PlaybackPrefs() @@ -75,8 +77,10 @@ void PlaybackPrefs::create_objects() // Audio BC_Title *title1, *title2; add_subwindow(title1 = new BC_Title(x, y, _("Audio Out"), LARGEFONT)); + title1->context_help_set_keyword("Audio Out section"); y += title1->get_h() + margin; add_subwindow(title2 = new BC_Title(x, y, _("Playback buffer samples:"), MEDIUMFONT)); + title2->context_help_set_keyword("Audio Out section"); x2 = title2->get_x() + title2->get_w() + margin; SET_TRACE @@ -92,10 +96,12 @@ SET_TRACE menu->add_item(new BC_MenuItem("65536")); menu->add_item(new BC_MenuItem("131072")); menu->add_item(new BC_MenuItem("262144")); + menu->context_help_set_keyword("Audio Out section"); y += menu->get_h() + ys5; x2 = x; add_subwindow(title1 = new BC_Title(x2, y, _("Audio offset (sec):"))); + title1->context_help_set_keyword("Audio Out section"); x2 += title1->get_w() + xs5; audio_offset = new PlaybackAudioOffset(pwindow, this, x2, y); audio_offset->create_objects(); @@ -114,15 +120,18 @@ SET_TRACE PlaybackMap51_2 *map51_2 = new PlaybackMap51_2(pwindow, this, playback_config->aconfig->map51_2, y); add_subwindow(map51_2); + map51_2->context_help_set_keyword("Audio Out section"); x2 = map51_2->get_x() + map51_2->get_w() + xS(15); y2 = y + BC_TextBox::calculate_h(this,MEDIUMFONT,1,1) - get_text_height(MEDIUMFONT); add_subwindow(title2 = new BC_Title(x2, y2, _("Gain:"))); + title2->context_help_set_keyword("Audio Out section"); x2 += title2->get_w() + xS(8); play_gain = new PlaybackGain(x2, y, pwindow, this); play_gain->create_objects(); y += yS(40); - add_subwindow(new BC_Title(x, y, _("Audio Driver:"))); + add_subwindow(title1 = new BC_Title(x, y, _("Audio Driver:"))); + title1->context_help_set_keyword("Audio Out section"); audio_device = new ADevicePrefs(x + xS(100), y, pwindow, this, playback_config->aconfig, 0, MODEPLAY); audio_device->initialize(0); @@ -136,17 +145,21 @@ SET_TRACE SET_TRACE add_subwindow(title1 = new BC_Title(x, y, _("Video Out"), LARGEFONT)); + title1->context_help_set_keyword("Video Out section"); y += title1->get_h() + margin; SET_TRACE add_subwindow(window = new VideoEveryFrame(pwindow, this, x, y)); + window->context_help_set_keyword("Video Out section"); int x1 = x + window->get_w() + xs30; const char *txt = _("Framerate achieved:"); int y1 = y + (window->get_h() - BC_Title::calculate_h(this, txt)) / 2; add_subwindow(title1 = new BC_Title(x1, y1, txt)); + title1->context_help_set_keyword("Video Out section"); x1 += title1->get_w() + margin; add_subwindow(framerate_title = new BC_Title(x1, y1, "--", MEDIUMFONT, RED)); draw_framerate(0); + framerate_title->context_help_set_keyword("Video Out section"); y += window->get_h() + 2*margin; // add_subwindow(asynchronous = new VideoAsynchronous(pwindow, x, y)); @@ -154,15 +167,18 @@ SET_TRACE SET_TRACE add_subwindow(title1 = new BC_Title(x, y, _("Scaling equation: Enlarge / Reduce "))); + title1->context_help_set_keyword("Video Out section"); VScalingEquation *vscaling_equation = new VScalingEquation(x + title1->get_w() + xS(65), y, &pwindow->thread->edl->session->interpolation_type); add_subwindow(vscaling_equation); vscaling_equation->create_objects(); + vscaling_equation->context_help_set_keyword("Video Out section"); SET_TRACE y += yS(35); add_subwindow(title1 = new BC_Title(x, y, _("DVD Subtitle to display:"))); + title1->context_help_set_keyword("Video Out section"); PlaybackSubtitleNumber *subtitle_number; x1 = x + title1->get_w() + margin; subtitle_number = new PlaybackSubtitleNumber(x1, y, pwindow, this); @@ -172,13 +188,16 @@ SET_TRACE PlaybackSubtitle *subtitle_toggle; x1 += subtitle_number->get_w() + margin; add_subwindow(subtitle_toggle = new PlaybackSubtitle(x2, y, pwindow, this)); + subtitle_toggle->context_help_set_keyword("Video Out section"); y += subtitle_toggle->get_h(); PlaybackLabelCells *label_cells_toggle; add_subwindow(label_cells_toggle = new PlaybackLabelCells(x2, y, pwindow, this)); + label_cells_toggle->context_help_set_keyword("Video Out section"); y2 = y + label_cells_toggle->get_h(); add_subwindow(title1=new BC_Title(x2, y2, _("TOC Program No:"), MEDIUMFONT)); + title1->context_help_set_keyword("Video Out section"); PlaybackProgramNumber *program_number; program_number = new PlaybackProgramNumber( x2 + title1->get_w() + xs10, y2, pwindow, this); @@ -186,15 +205,18 @@ SET_TRACE add_subwindow(interpolate_raw = new PlaybackInterpolateRaw( x, y, pwindow, this)); + interpolate_raw->context_help_set_keyword("Video Out section"); y += interpolate_raw->get_h() + margin; add_subwindow(white_balance_raw = new PlaybackWhiteBalanceRaw(x, y, pwindow, this)); if(!pwindow->thread->edl->session->interpolate_raw) white_balance_raw->disable(); + white_balance_raw->context_help_set_keyword("Video Out section"); y += white_balance_raw->get_h() + margin; add_subwindow(vdevice_title = new BC_Title(x, y, _("Video Driver:"))); + vdevice_title->context_help_set_keyword("Video Out section"); y += vdevice_title->get_h() + margin; video_device = new VDevicePrefs(x, y, pwindow, this, playback_config->vconfig, 0, MODEPLAY); @@ -252,6 +274,8 @@ PlaybackViewFollows::PlaybackViewFollows(PreferencesWindow *pwindow, int value, : BC_CheckBox(xS(10), y, value, _("View follows playback")) { this->pwindow = pwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Audio Out section"); } int PlaybackViewFollows::handle_event() @@ -265,6 +289,8 @@ PlaybackSoftwareTimer::PlaybackSoftwareTimer(PreferencesWindow *pwindow, int val : BC_CheckBox(xS(10), y, value, _("Disable hardware synchronization")) { this->pwindow = pwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Audio Out section"); } int PlaybackSoftwareTimer::handle_event() @@ -278,6 +304,8 @@ PlaybackRealTime::PlaybackRealTime(PreferencesWindow *pwindow, int value, int y) : BC_CheckBox(xS(10), y, value, _("Audio playback in real time priority (root only)")) { this->pwindow = pwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Audio Out section"); } int PlaybackRealTime::handle_event() diff --git a/cinelerra-5.1/cinelerra/playtransport.C b/cinelerra-5.1/cinelerra/playtransport.C index 8caf4678..f53b529e 100644 --- a/cinelerra-5.1/cinelerra/playtransport.C +++ b/cinelerra-5.1/cinelerra/playtransport.C @@ -395,6 +395,8 @@ RewindButton::RewindButton(MWindow *mwindow, PlayTransport *transport, int x, in : PTransportButton(mwindow, transport, x, y, mwindow->theme->get_image_set("rewind")) { set_tooltip(_("Rewind ( Home )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport Controls"); } int RewindButton::handle_event() { @@ -408,6 +410,8 @@ FastReverseButton::FastReverseButton(MWindow *mwindow, PlayTransport *transport, : PTransportButton(mwindow, transport, x, y, mwindow->theme->get_image_set("fastrev")) { set_tooltip(_("Fast reverse ( + or Alt-p )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport Controls"); } int FastReverseButton::handle_event() { @@ -421,6 +425,8 @@ ReverseButton::ReverseButton(MWindow *mwindow, PlayTransport *transport, int x, : PTransportButton(mwindow, transport, x, y, mwindow->theme->get_image_set("reverse")) { set_tooltip(_("Normal reverse ( 6 or Alt-o )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport Controls"); } int ReverseButton::handle_event() { @@ -434,6 +440,8 @@ FrameReverseButton::FrameReverseButton(MWindow *mwindow, PlayTransport *transpor : PTransportButton(mwindow, transport, x, y, mwindow->theme->get_image_set("framerev")) { set_tooltip(_("Frame reverse ( 4 or Alt-u )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport Controls"); } int FrameReverseButton::handle_event() { @@ -449,6 +457,8 @@ PlayButton::PlayButton(MWindow *mwindow, PlayTransport *transport, int x, int y) : PTransportButton(mwindow, transport, x, y, mwindow->theme->get_image_set("play")) { set_tooltip(_("Normal forward ( 3 or Alt-l )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport Controls"); } int PlayButton::handle_event() { @@ -464,6 +474,8 @@ FramePlayButton::FramePlayButton(MWindow *mwindow, PlayTransport *transport, int : PTransportButton(mwindow, transport, x, y, mwindow->theme->get_image_set("framefwd")) { set_tooltip(_("Frame forward ( 1 or Alt-j )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport Controls"); } int FramePlayButton::handle_event() { @@ -479,6 +491,8 @@ FastPlayButton::FastPlayButton(MWindow *mwindow, PlayTransport *transport, int x : PTransportButton(mwindow, transport, x, y, mwindow->theme->get_image_set("fastfwd")) { set_tooltip(_("Fast forward ( Enter or Alt-; )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport Controls"); } int FastPlayButton::handle_event() { @@ -490,6 +504,8 @@ EndButton::EndButton(MWindow *mwindow, PlayTransport *transport, int x, int y) : PTransportButton(mwindow, transport, x, y, mwindow->theme->get_image_set("end")) { set_tooltip(_("Jump to end ( End )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport Controls"); } int EndButton::handle_event() { @@ -503,6 +519,8 @@ StopButton::StopButton(MWindow *mwindow, PlayTransport *transport, int x, int y) : PTransportButton(mwindow, transport, x, y, mwindow->theme->get_image_set("stop")) { set_tooltip(_("Stop ( 0 or Alt-m )")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Transport Controls"); } int StopButton::handle_event() { diff --git a/cinelerra-5.1/cinelerra/pluginclient.C b/cinelerra-5.1/cinelerra/pluginclient.C index 29306b8c..d31b4b00 100644 --- a/cinelerra-5.1/cinelerra/pluginclient.C +++ b/cinelerra-5.1/cinelerra/pluginclient.C @@ -133,7 +133,27 @@ PluginClientWindow::PluginClientWindow(PluginClient *client, client->window_x /* - w / 2 */, client->window_y /* - h / 2 */, w, h, min_w, min_h, allow_resize, 0, 1) { + char title[BCTEXTLEN]; + this->client = client; + +// *** CONTEXT_HELP *** + if(client) { + strcpy(title, client->plugin_title()); + if(! strcmp(title, "Overlay")) { + // "Overlay" plugin title is ambiguous + if(client->is_audio()) strcat(title, " \\(Audio\\)"); + if(client->is_video()) strcat(title, " \\(Video\\)"); + } + if(client->server->is_ffmpeg()) { + // FFmpeg plugins can be audio or video + if(client->is_audio()) + strcpy(title, "FFmpeg Audio Plugins"); + if(client->is_video()) + strcpy(title, "FFmpeg Video Plugins"); + } + context_help_set_keyword(title); + } } PluginClientWindow::PluginClientWindow(const char *title, @@ -141,6 +161,8 @@ PluginClientWindow::PluginClientWindow(const char *title, : BC_Window(title, x, y, w, h, min_w, min_h, allow_resize, 0, 1) { this->client = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword(title); } PluginClientWindow::~PluginClientWindow() diff --git a/cinelerra-5.1/cinelerra/plugindialog.C b/cinelerra-5.1/cinelerra/plugindialog.C index 8063982b..48f470e6 100644 --- a/cinelerra-5.1/cinelerra/plugindialog.C +++ b/cinelerra-5.1/cinelerra/plugindialog.C @@ -137,6 +137,18 @@ PluginDialog::PluginDialog(MWindow *mwindow, this->mwindow = mwindow; this->thread = thread; single_standalone = 0; +// *** CONTEXT_HELP *** + switch( thread->data_type ) { + case TRACK_AUDIO: + context_help_set_keyword("Audio Effects"); + break; + case TRACK_VIDEO: + context_help_set_keyword("Video Effects"); + break; + default: + context_help_set_keyword("How to Use Plugins"); + break; + } } PluginDialog::~PluginDialog() @@ -551,6 +563,67 @@ int PluginDialogNew::selection_changed() return 1; } +// *** CONTEXT_HELP *** +int PluginDialogNew::keypress_event() +{ + int item, plugin_no; + char title[BCTEXTLEN]; + PluginServer *plugin = 0; + +// printf("PluginDialogNew::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(); + + // Try to show help for the plugin currently under mouse + item = get_highlighted_item(); + if (item >= 0 && item < dialog->standalone_data.size()) { + plugin_no = ((PluginDialogListItem *)dialog->standalone_data[item])->item_no; + if (plugin_no >= 0 && plugin_no < dialog->plugindb.total) + plugin = dialog->plugindb.values[plugin_no]; + } + + // If some plugin is highlighted, 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 (dialog->thread->data_type) { + case TRACK_AUDIO: + context_help_show("Audio Effects"); + return 1; + case TRACK_VIDEO: + context_help_show("Video Effects"); + return 1; + default: + context_help_show("How to Use Plugins"); + return 1; + } + context_help_show("How to Use Plugins"); + return 1; + } + context_help_show("How to Use Plugins"); + return 1; +} + // PluginDialogAttachNew::PluginDialogAttachNew(MWindow *mwindow, PluginDialog *dialog, int x, int y) // : BC_GenericButton(x, y, _("Attach")) // { @@ -588,6 +661,7 @@ PluginDialogShared::PluginDialogShared(PluginDialog *dialog, : BC_ListBox(x, y, w, h, LISTBOX_TEXT, shared_data) { this->dialog = dialog; + context_help_set_keyword("Shared Effects and Shared Tracks"); } PluginDialogShared::~PluginDialogShared() { } int PluginDialogShared::handle_event() @@ -661,6 +735,7 @@ PluginDialogModules::PluginDialogModules(PluginDialog *dialog, : BC_ListBox(x, y, w, h, LISTBOX_TEXT, module_data) { this->dialog = dialog; + context_help_set_keyword("Shared Effects and Shared Tracks"); } PluginDialogModules::~PluginDialogModules() { } int PluginDialogModules::handle_event() @@ -717,6 +792,7 @@ PluginDialogSingle::PluginDialogSingle(PluginDialog *dialog, int x, int y) _("Attach single standalone and share others")) { this->dialog = dialog; + context_help_set_keyword("Shared Effects and Shared Tracks"); } int PluginDialogSingle::handle_event() diff --git a/cinelerra-5.1/cinelerra/plugindialog.h b/cinelerra-5.1/cinelerra/plugindialog.h index 39f9a78f..7c306baa 100644 --- a/cinelerra-5.1/cinelerra/plugindialog.h +++ b/cinelerra-5.1/cinelerra/plugindialog.h @@ -193,6 +193,7 @@ public: int handle_event(); int selection_changed(); + int keypress_event(); PluginDialog *dialog; }; diff --git a/cinelerra-5.1/cinelerra/preferencesthread.C b/cinelerra-5.1/cinelerra/preferencesthread.C index 75d8fe81..3ca281e5 100644 --- a/cinelerra-5.1/cinelerra/preferencesthread.C +++ b/cinelerra-5.1/cinelerra/preferencesthread.C @@ -440,6 +440,8 @@ PreferencesWindow::PreferencesWindow(MWindow *mwindow, category = 0; dialog = 0; confirm_dialog = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Settings and Preferences"); } PreferencesWindow::~PreferencesWindow() @@ -691,7 +693,7 @@ int PreferencesOK::keypress_event() { if( get_keypress() == RETURN ) return handle_event(); - return 0; + return context_help_check_and_show(); } int PreferencesOK::handle_event() @@ -765,7 +767,7 @@ int PreferencesCancel::keypress_event() thread->window->set_done(1); return 1; } - return 0; + return context_help_check_and_show(); } int PreferencesCancel::handle_event() { diff --git a/cinelerra-5.1/cinelerra/probeprefs.C b/cinelerra-5.1/cinelerra/probeprefs.C index 47460c7e..e81d742b 100644 --- a/cinelerra-5.1/cinelerra/probeprefs.C +++ b/cinelerra-5.1/cinelerra/probeprefs.C @@ -59,6 +59,8 @@ ProbeEditWindow::ProbeEditWindow(FileProbeDialog *pb_dialog, int x, int y) probe_enabled = 0; pb_enabled = 0; pb_disabled = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Probe Order when Loading Media"); } ProbeEditWindow::~ProbeEditWindow() diff --git a/cinelerra-5.1/cinelerra/proxy.C b/cinelerra-5.1/cinelerra/proxy.C index 8888a28a..64897df9 100644 --- a/cinelerra-5.1/cinelerra/proxy.C +++ b/cinelerra-5.1/cinelerra/proxy.C @@ -396,6 +396,8 @@ ProxyWindow::ProxyWindow(MWindow *mwindow, ProxyDialog *dialog, int x, int y) this->mwindow = mwindow; this->dialog = dialog; format_tools = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Proxy"); } ProxyWindow::~ProxyWindow() diff --git a/cinelerra-5.1/cinelerra/question.C b/cinelerra-5.1/cinelerra/question.C index ccea32c1..768ead5f 100644 --- a/cinelerra-5.1/cinelerra/question.C +++ b/cinelerra-5.1/cinelerra/question.C @@ -76,7 +76,7 @@ int QuestionYesButton::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } QuestionNoButton::QuestionNoButton(MWindow *mwindow, QuestionWindow *window, int x, int y) @@ -98,5 +98,5 @@ int QuestionNoButton::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } diff --git a/cinelerra-5.1/cinelerra/recordgui.C b/cinelerra-5.1/cinelerra/recordgui.C index d425dbce..082d2693 100644 --- a/cinelerra-5.1/cinelerra/recordgui.C +++ b/cinelerra-5.1/cinelerra/recordgui.C @@ -112,6 +112,8 @@ RecordGUI::RecordGUI(MWindow *mwindow, Record *record) } total_dropped_frames = 0; total_clipped_samples = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Record Web Media"); } RecordGUI::~RecordGUI() @@ -588,7 +590,7 @@ int RecordGUISave::keypress_event() // handle_event(); // return 1; // } - return 0; + return context_help_check_and_show(); } RecordGUICancel::RecordGUICancel(RecordGUI *gui) @@ -612,7 +614,7 @@ int RecordGUICancel::keypress_event() return 1; } - return 0; + return context_help_check_and_show(); } @@ -669,7 +671,7 @@ int RecordGUIDropFrames::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } RecordGUIFillFrames::RecordGUIFillFrames(RecordGUI *gui, int x, int y) @@ -693,7 +695,7 @@ int RecordGUIFillFrames::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } RecordGUIPowerOff::RecordGUIPowerOff(RecordGUI *gui, int x, int y) @@ -702,6 +704,8 @@ RecordGUIPowerOff::RecordGUIPowerOff(RecordGUI *gui, int x, int y) this->set_underline(0); this->gui = gui; set_tooltip(_("poweroff system when batch record done.")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Capture at some Future Time via Batch"); } int RecordGUIPowerOff::handle_event() @@ -717,7 +721,7 @@ int RecordGUIPowerOff::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } @@ -727,6 +731,8 @@ RecordGUICommCheck::RecordGUICommCheck(RecordGUI *gui, int x, int y) this->set_underline(0); this->gui = gui; set_tooltip(_("check for commercials.")); +// *** CONTEXT_HELP *** + context_help_set_keyword("The commercial DB"); } int RecordGUICommCheck::handle_event() @@ -743,7 +749,7 @@ int RecordGUICommCheck::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } @@ -830,7 +836,7 @@ int RecordGUIMonitorVideo::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } @@ -868,7 +874,7 @@ int RecordGUIMonitorAudio::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } @@ -877,6 +883,8 @@ RecordGUIAudioMeters::RecordGUIAudioMeters(RecordGUI *gui, int x, int y) { this->set_underline(6); this->gui = gui; +// *** CONTEXT_HELP *** + context_help_set_keyword("Sound Level Meters Window"); } int RecordGUIAudioMeters::handle_event() @@ -905,7 +913,7 @@ int RecordGUIAudioMeters::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } RecordPath::RecordPath(RecordGUI *gui, int x, int y) @@ -973,6 +981,8 @@ RecordGUINewBatch::RecordGUINewBatch(RecordGUI *gui, int x, int y) { this->gui = gui; set_tooltip(_("Create new clip.")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Capture at some Future Time via Batch"); } int RecordGUINewBatch::handle_event() { @@ -986,6 +996,8 @@ RecordGUIDeleteBatch::RecordGUIDeleteBatch(RecordGUI *gui, int x, int y) { this->gui = gui; set_tooltip(_("Delete clip.")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Capture at some Future Time via Batch"); } int RecordGUIDeleteBatch::handle_event() @@ -1000,6 +1012,8 @@ RecordGUIStartBatches::RecordGUIStartBatches(RecordGUI *gui, int x, int y) { this->gui = gui; set_tooltip(_("Start batch recording\nfrom the current position.")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Capture at some Future Time via Batch"); } int RecordGUIStartBatches::handle_event() @@ -1014,6 +1028,8 @@ RecordGUIStopBatches::RecordGUIStopBatches(RecordGUI *gui, int x, int y) : RecordBatchesGUI::StopBatches(gui->record->record_batches, x, y) { this->gui = gui; +// *** CONTEXT_HELP *** + context_help_set_keyword("Capture at some Future Time via Batch"); } int RecordGUIStopBatches::handle_event() @@ -1031,6 +1047,8 @@ RecordGUIActivateBatch::RecordGUIActivateBatch(RecordGUI *gui, int x, int y) { this->gui = gui; set_tooltip(_("Make the highlighted\nclip active.")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Capture at some Future Time via Batch"); } int RecordGUIActivateBatch::handle_event() { @@ -1045,6 +1063,8 @@ RecordGUILabel::RecordGUILabel(RecordGUI *gui, int x, int y) { this->gui = gui; set_underline(0); +// *** CONTEXT_HELP *** + context_help_set_keyword("Capture at some Future Time via Batch"); } @@ -1064,7 +1084,7 @@ int RecordGUILabel::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } @@ -1072,6 +1092,8 @@ RecordGUIClearLabels::RecordGUIClearLabels(RecordGUI *gui, int x, int y) : BC_GenericButton(x, y, _("ClrLbls")) { this->gui = gui; +// *** CONTEXT_HELP *** + context_help_set_keyword("Capture at some Future Time via Batch"); } @@ -1247,7 +1269,12 @@ void RecordGUI::update_audio(int channels, double *max, int *over) int RecordGUI::keypress_event() { - return record_transport->keypress_event(); + if (get_keypress() != 'h' || ! alt_down() || + ! is_tooltip_event_win() || ! cursor_inside()) + return record_transport->keypress_event(); + + context_help_show("Record Web Media"); + return 1; } void RecordGUI::update_labels(double new_position) @@ -1622,7 +1649,7 @@ int RecordGUIDCOffset::handle_event() return 1; } -int RecordGUIDCOffset::keypress_event() { return 0; } +int RecordGUIDCOffset::keypress_event() { return context_help_check_and_show(); } RecordGUIDCOffsetText::RecordGUIDCOffsetText(char *text, int y, int number) : BC_TextBox(xS(30), y+yS(1), xS(67), 1, text, 0) diff --git a/cinelerra-5.1/cinelerra/recordmonitor.C b/cinelerra-5.1/cinelerra/recordmonitor.C index 3a77feb6..3342c8d9 100644 --- a/cinelerra-5.1/cinelerra/recordmonitor.C +++ b/cinelerra-5.1/cinelerra/recordmonitor.C @@ -260,6 +260,8 @@ RecordMonitorGUI::RecordMonitorGUI(MWindow *mwindow, big_cursor_toggle = 0; current_operation = MONITOR_NONE; signal_status = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Capturing and Recording Media"); } RecordMonitorGUI::~RecordMonitorGUI() @@ -526,6 +528,9 @@ int RecordMonitorGUI::keypress_event() break; } + if( !result ) + result = context_help_check_and_show(); + return result; } diff --git a/cinelerra-5.1/cinelerra/recordprefs.C b/cinelerra-5.1/cinelerra/recordprefs.C index 6c671ba2..04e177ca 100644 --- a/cinelerra-5.1/cinelerra/recordprefs.C +++ b/cinelerra-5.1/cinelerra/recordprefs.C @@ -42,6 +42,8 @@ RecordPrefs::RecordPrefs(MWindow *mwindow, PreferencesWindow *pwindow) : PreferencesDialog(mwindow, pwindow) { this->mwindow = mwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Recording"); } RecordPrefs::~RecordPrefs() @@ -70,6 +72,7 @@ void RecordPrefs::create_objects() add_subwindow(title = new BC_Title(x, y, _("File Format:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("File Format section"); y += title->get_h() + margin; recording_format = new FormatTools(mwindow, this, @@ -90,6 +93,7 @@ void RecordPrefs::create_objects() realtime_toc = new RecordRealtimeTOC(mwindow, pwindow, x0+xS(400), y0, pwindow->thread->edl->session->record_realtime_toc); add_subwindow(realtime_toc); + realtime_toc->context_help_set_keyword("File Format section"); // Audio hardware add_subwindow(new BC_Bar(x, y, get_w() - x * 2)); @@ -99,11 +103,13 @@ void RecordPrefs::create_objects() add_subwindow(title = new BC_Title(x, y, _("Audio In"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Audio In section"); y += title->get_h() + margin; - add_subwindow(new BC_Title(x, y, _("Record Driver:"), + add_subwindow(title = new BC_Title(x, y, _("Record Driver:"), MEDIUMFONT, resources->text_default)); + title->context_help_set_keyword("Audio In section"); audio_in_device = new ADevicePrefs(x + xS(110), y, pwindow, this, 0, pwindow->thread->edl->session->aconfig_in, MODERECORD); audio_in_device->initialize(1); @@ -113,9 +119,13 @@ void RecordPrefs::create_objects() int pad = RecordWriteLength::calculate_h(this, MEDIUMFONT, 1, 1) + mwindow->theme->widget_border; add_subwindow(title0 = new BC_Title(x, y, _("Samples read from device:"))); + title0->context_help_set_keyword("Audio In section"); add_subwindow(title1 = new BC_Title(x, y + pad, _("Samples to write to disk:"))); + title1->context_help_set_keyword("Audio In section"); add_subwindow(title2 = new BC_Title(x, y + pad * 2, _("Sample rate for recording:"))); + title2->context_help_set_keyword("Audio In section"); add_subwindow(title3 = new BC_Title(x, y + pad * 3, _("Channels to record:"))); + title3->context_help_set_keyword("Audio In section"); x2 = MAX(title0->get_w(), title1->get_w()) + margin; x2 = MAX(x2, title2->get_w() + margin); x2 = MAX(x2, title3->get_w() + margin); @@ -134,11 +144,14 @@ void RecordPrefs::create_objects() menu->add_item(new BC_MenuItem("65536")); menu->add_item(new BC_MenuItem("131072")); menu->add_item(new BC_MenuItem("262144")); + menu->context_help_set_keyword("Audio In section"); sprintf(string, "%jd", pwindow->thread->edl->session->record_write_length); add_subwindow(textbox = new RecordWriteLength(mwindow, pwindow, x2, y, string)); + textbox->context_help_set_keyword("Audio In section"); y += textbox->get_h() + mwindow->theme->widget_border; add_subwindow(textbox = new RecordSampleRate(pwindow, x2, y)); + textbox->context_help_set_keyword("Audio In section"); add_subwindow(new SampleRatePulldown(mwindow, textbox, x2 + textbox->get_w(), y)); y += textbox->get_h() + mwindow->theme->widget_border; @@ -149,10 +162,12 @@ void RecordPrefs::create_objects() RecordMap51_2 *record_map51_2 = new RecordMap51_2(mwindow, pwindow, x, y, pwindow->thread->edl->session->aconfig_in->map51_2); add_subwindow(record_map51_2); + record_map51_2->context_help_set_keyword("Audio In section"); x2 = x + record_map51_2->get_w() + xs30; int y2 = y + BC_TextBox::calculate_h(this,MEDIUMFONT,1,1) - get_text_height(MEDIUMFONT); add_subwindow(title = new BC_Title(x2, y2, _("Gain:"))); + title->context_help_set_keyword("Audio In section"); x2 += title->get_w() + xS(8); RecordGain *rec_gain = new RecordGain(pwindow, this, x2, y); rec_gain->create_objects(); @@ -170,38 +185,47 @@ void RecordPrefs::create_objects() add_subwindow(title1 = new BC_Title(x, y, _("Video In"), LARGEFONT, resources->text_default)); + title1->context_help_set_keyword("Video In section"); y += title1->get_h() + margin; add_subwindow(title1 = new BC_Title(x, y, _("Record Driver:"), MEDIUMFONT, resources->text_default)); + title1->context_help_set_keyword("Video In section"); video_in_device = new VDevicePrefs(x + title1->get_w() + margin, y, pwindow, this, 0, pwindow->thread->edl->session->vconfig_in, MODERECORD); video_in_device->initialize(1); y += video_in_device->get_h() + margin; add_subwindow(title1 = new BC_Title(x, y, _("Frames to record to disk at a time:"))); + title1->context_help_set_keyword("Video In section"); x1 = x + title1->get_w() + margin; sprintf(string, "%d", pwindow->thread->edl->session->video_write_length); add_subwindow(textbox = new VideoWriteLength(pwindow, string, x1, y)); + textbox->context_help_set_keyword("Video In section"); x1 += textbox->get_w() + margin; add_subwindow(new CaptureLengthTumbler(pwindow, textbox, x1, y)); y += ys27; add_subwindow(title1 = new BC_Title(x, y, _("Frames to buffer in device:"))); + title1->context_help_set_keyword("Video In section"); x1 = x + title1->get_w() + margin; sprintf(string, "%d", pwindow->thread->edl->session->vconfig_in->capture_length); add_subwindow(textbox = new VideoCaptureLength(pwindow, string, x1, y)); + textbox->context_help_set_keyword("Video In section"); x1 += textbox->get_w() + margin; add_subwindow(new CaptureLengthTumbler(pwindow, textbox, x1, y)); y += ys27; x1 = x; - add_subwindow(new BC_Title(x1, y, _("Positioning:"))); + add_subwindow(title1 = new BC_Title(x1, y, _("Positioning:"))); + title1->context_help_set_keyword("Video In section"); x1 += xS(120); add_subwindow(textbox = new BC_TextBox(x1, y, xS(200), 1, "")); + textbox->context_help_set_keyword("Video In section"); RecordPositioning *positioning = new RecordPositioning(pwindow,textbox); add_subwindow(positioning); positioning->create_objects(); + positioning->context_help_set_keyword("Video In section"); y += positioning->get_h() + ys5; add_subwindow(new RecordSyncDrives(pwindow, @@ -211,22 +235,29 @@ void RecordPrefs::create_objects() BC_TextBox *w_text, *h_text; add_subwindow(title1 = new BC_Title(x, y, _("Size of captured frame:"))); + title1->context_help_set_keyword("Video In section"); x += title1->get_w() + margin; add_subwindow(w_text = new RecordW(pwindow, x, y)); + w_text->context_help_set_keyword("Video In section"); x += w_text->get_w() + margin; add_subwindow(title1 = new BC_Title(x, y, "x")); + title1->context_help_set_keyword("Video In section"); x += title1->get_w() + margin; add_subwindow(h_text = new RecordH(pwindow, x, y)); + h_text->context_help_set_keyword("Video In section"); x += h_text->get_w() + margin; FrameSizePulldown *frame_sizes; add_subwindow(frame_sizes = new FrameSizePulldown(mwindow->theme, w_text, h_text, x, y)); + frame_sizes->context_help_set_keyword("Video In section"); y += frame_sizes->get_h() + margin; x = mwindow->theme->preferencesoptions_x; add_subwindow(title1 = new BC_Title(x, y, _("Frame rate for recording:"))); + title1->context_help_set_keyword("Video In section"); x += title1->get_w() + margin; add_subwindow(textbox = new RecordFrameRate(pwindow, x, y)); + textbox->context_help_set_keyword("Video In section"); x += textbox->get_w() + margin; add_subwindow(new FrameRatePulldown(mwindow, textbox, x, y)); @@ -281,6 +312,8 @@ RecordRealTime::RecordRealTime(MWindow *mwindow, _("Record in realtime priority (root only)")) { this->pwindow = pwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Audio In section"); } int RecordRealTime::handle_event() @@ -437,6 +470,8 @@ CaptureLengthTumbler::CaptureLengthTumbler(PreferencesWindow *pwindow, BC_TextBo { this->pwindow = pwindow; this->text = text; +// *** CONTEXT_HELP *** + context_help_set_keyword("Video In section"); } int CaptureLengthTumbler::handle_up_event() @@ -500,6 +535,8 @@ RecordSyncDrives::RecordSyncDrives(PreferencesWindow *pwindow, int value, int x, : BC_CheckBox(x, y, value, _("Sync drives automatically")) { this->pwindow = pwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Video In section"); } int RecordSyncDrives::handle_event() diff --git a/cinelerra-5.1/cinelerra/recordscopes.C b/cinelerra-5.1/cinelerra/recordscopes.C index c9bceab9..598464c6 100644 --- a/cinelerra-5.1/cinelerra/recordscopes.C +++ b/cinelerra-5.1/cinelerra/recordscopes.C @@ -171,6 +171,8 @@ ScopeEnable::ScopeEnable(MWindow *mwindow, RecordMonitor *record_monitor, int x, this->record_monitor = record_monitor; this->mwindow = mwindow; set_tooltip(_("View scope")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Videoscope"); } ScopeEnable::~ScopeEnable() diff --git a/cinelerra-5.1/cinelerra/recordtransport.C b/cinelerra-5.1/cinelerra/recordtransport.C index 2b19e8d4..67a92fbe 100644 --- a/cinelerra-5.1/cinelerra/recordtransport.C +++ b/cinelerra-5.1/cinelerra/recordtransport.C @@ -175,6 +175,8 @@ RecordGUIRec::RecordGUIRec(RecordTransport *record_transport, int x, int y) { this->record_transport = record_transport; set_tooltip(_("Start recording\nfrom current position")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Recording Immediately to Capture"); } RecordGUIRec::~RecordGUIRec() @@ -192,7 +194,7 @@ int RecordGUIRec::handle_event() int RecordGUIRec::keypress_event() { - return 0; + return context_help_check_and_show(); } RecordGUIRecFrame::RecordGUIRecFrame(RecordTransport *record_transport, int x, int y) @@ -200,6 +202,8 @@ RecordGUIRecFrame::RecordGUIRecFrame(RecordTransport *record_transport, int x, i { this->record_transport = record_transport; set_tooltip(_("RecordTransport single frame")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Recording Immediately to Capture"); } RecordGUIRecFrame::~RecordGUIRecFrame() @@ -217,7 +221,7 @@ int RecordGUIRecFrame::handle_event() int RecordGUIRecFrame::keypress_event() { - return 0; + return context_help_check_and_show(); } RecordGUIPlay::RecordGUIPlay(RecordTransport *record_transport, int x, int y) @@ -240,7 +244,7 @@ int RecordGUIPlay::handle_event() int RecordGUIPlay::keypress_event() { - return 0; + return context_help_check_and_show(); } @@ -249,6 +253,8 @@ RecordGUIStop::RecordGUIStop(RecordTransport *record_transport, int x, int y) { this->record_transport = record_transport; set_tooltip(_("Stop operation")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Recording Immediately to Capture"); } RecordGUIStop::~RecordGUIStop() @@ -265,7 +271,7 @@ int RecordGUIStop::handle_event() int RecordGUIStop::keypress_event() { - return 0; + return context_help_check_and_show(); } @@ -288,7 +294,7 @@ int RecordGUIPause::handle_event() int RecordGUIPause::keypress_event() { - return 0; + return context_help_check_and_show(); } @@ -298,6 +304,8 @@ RecordGUIRewind::RecordGUIRewind(RecordTransport *record_transport, int x, int y { this->record_transport = record_transport; set_tooltip(_("Start over")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Recording Immediately to Capture"); } RecordGUIRewind::~RecordGUIRewind() @@ -314,7 +322,7 @@ int RecordGUIRewind::handle_event() int RecordGUIRewind::keypress_event() { - return 0; + return context_help_check_and_show(); } @@ -355,7 +363,7 @@ return 0; int RecordGUIBack::keypress_event() { - return 0; + return context_help_check_and_show(); } @@ -395,7 +403,7 @@ int RecordGUIFwd::repeat_event() int RecordGUIFwd::keypress_event() { - return 0; + return context_help_check_and_show(); } @@ -418,6 +426,6 @@ int RecordGUIEnd::handle_event() int RecordGUIEnd::keypress_event() { - return 0; + return context_help_check_and_show(); } diff --git a/cinelerra-5.1/cinelerra/remotecontrol.C b/cinelerra-5.1/cinelerra/remotecontrol.C index 457d3313..0907707d 100644 --- a/cinelerra-5.1/cinelerra/remotecontrol.C +++ b/cinelerra-5.1/cinelerra/remotecontrol.C @@ -12,6 +12,8 @@ RemoteWindow::RemoteWindow(RemoteControl *remote_control) 0, 0, xS(16), yS(16), -1, -1, 1, 0, 1) { this->remote_control = remote_control; +// *** CONTEXT_HELP *** + context_help_set_keyword("Remote Control for DVB"); } RemoteWindow::~RemoteWindow() diff --git a/cinelerra-5.1/cinelerra/render.C b/cinelerra-5.1/cinelerra/render.C index 323bebf3..a7456717 100644 --- a/cinelerra-5.1/cinelerra/render.C +++ b/cinelerra-5.1/cinelerra/render.C @@ -990,6 +990,8 @@ RenderWindow::RenderWindow(MWindow *mwindow, rangeselection = 0; rangeinout = 0; range1frame = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Single File Rendering"); } RenderWindow::~RenderWindow() diff --git a/cinelerra-5.1/cinelerra/resizetrackthread.C b/cinelerra-5.1/cinelerra/resizetrackthread.C index dc6564e3..f2223b81 100644 --- a/cinelerra-5.1/cinelerra/resizetrackthread.C +++ b/cinelerra-5.1/cinelerra/resizetrackthread.C @@ -107,6 +107,8 @@ ResizeVTrackWindow::ResizeVTrackWindow(MWindow *mwindow, { this->mwindow = mwindow; this->thread = thread; +// *** CONTEXT_HELP *** + context_help_set_keyword("Track and Output Sizes"); } ResizeVTrackWindow::~ResizeVTrackWindow() diff --git a/cinelerra-5.1/cinelerra/savefile.C b/cinelerra-5.1/cinelerra/savefile.C index a551c28b..c227a560 100644 --- a/cinelerra-5.1/cinelerra/savefile.C +++ b/cinelerra-5.1/cinelerra/savefile.C @@ -178,6 +178,8 @@ SaveProjectWindow::SaveProjectWindow(MWindow *mwindow, const char *dir_path, this->overwrite = overwrite; this->save_mode = save_mode; this->reload = reload; +// *** CONTEXT_HELP *** + context_help_set_keyword("Export Project"); } SaveProjectWindow::~SaveProjectWindow() { diff --git a/cinelerra-5.1/cinelerra/setformat.C b/cinelerra-5.1/cinelerra/setformat.C index cfd43685..6afdebfc 100644 --- a/cinelerra-5.1/cinelerra/setformat.C +++ b/cinelerra-5.1/cinelerra/setformat.C @@ -280,6 +280,8 @@ SetFormatWindow::SetFormatWindow(MWindow *mwindow, this->mwindow = mwindow; this->thread = thread; presets = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Project and Media Attributes"); } SetFormatWindow::~SetFormatWindow() { diff --git a/cinelerra-5.1/cinelerra/shbtnprefs.C b/cinelerra-5.1/cinelerra/shbtnprefs.C index e8e44b0b..c28f91d8 100644 --- a/cinelerra-5.1/cinelerra/shbtnprefs.C +++ b/cinelerra-5.1/cinelerra/shbtnprefs.C @@ -131,6 +131,8 @@ ShBtnEditWindow::ShBtnEditWindow(ShBtnEditDialog *shbtn_edit, int x, int y) { this->shbtn_edit = shbtn_edit; sb_dialog = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Menu Bar Shell Commands"); } ShBtnEditWindow::~ShBtnEditWindow() @@ -224,6 +226,8 @@ ShBtnTextWindow::ShBtnTextWindow(ShBtnEditWindow *sb_window, int x, int y) this->sb_window = sb_window; warn = sb_window->sb_dialog->pref->warn; run_script = sb_window->sb_dialog->pref->run_script; +// *** CONTEXT_HELP *** + context_help_set_keyword("Menu Bar Shell Commands"); } ShBtnTextWindow::~ShBtnTextWindow() @@ -435,6 +439,8 @@ MainShBtns::MainShBtns(MWindow *mwindow, int x, int y) { this->mwindow = mwindow; set_tooltip(_("shell cmds")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Menu Bar Shell Commands"); } int MainShBtns::load(Preferences *preferences) diff --git a/cinelerra-5.1/cinelerra/shuttle.C b/cinelerra-5.1/cinelerra/shuttle.C index e8d5572b..4860a769 100644 --- a/cinelerra-5.1/cinelerra/shuttle.C +++ b/cinelerra-5.1/cinelerra/shuttle.C @@ -553,6 +553,11 @@ void Shuttle::key(unsigned short code, unsigned int value) fprintf(stderr, "key(%d, %d) out of range\n", code + EVENT_CODE_KEY1, value); return; } +// Show help if both Alt's pressed on keyboard together with a shuttle button + if( wdw && wdw->alt_down() ) { + if( value ) wdw->context_help_show("Shuttle key default arrangement"); + return; + } send_stroke_sequence(value ? KJS_KEY_DOWN : KJS_KEY_UP, code); } diff --git a/cinelerra-5.1/cinelerra/swindow.C b/cinelerra-5.1/cinelerra/swindow.C index cbbde0e9..d57becf7 100644 --- a/cinelerra-5.1/cinelerra/swindow.C +++ b/cinelerra-5.1/cinelerra/swindow.C @@ -48,7 +48,7 @@ int SWindowOK::button_press_event() int SWindowOK::keypress_event() { - return 0; + return context_help_check_and_show(); } @@ -280,6 +280,8 @@ SWindowGUI::SWindowGUI(SWindow *swindow, int x, int y, int w, int h) text_font = MEDIUMFONT; text_rowsz = get_text_ascent(text_font)+1 + get_text_descent(text_font)+1; sub_format = SUB_FORMAT_SRT; +// *** CONTEXT_HELP *** + context_help_set_keyword("Subtitles"); } SWindowGUI::~SWindowGUI() diff --git a/cinelerra-5.1/cinelerra/tipwindow.C b/cinelerra-5.1/cinelerra/tipwindow.C index 2c126bf0..6014b504 100644 --- a/cinelerra-5.1/cinelerra/tipwindow.C +++ b/cinelerra-5.1/cinelerra/tipwindow.C @@ -156,7 +156,7 @@ int TipWindowGUI::keypress_event() set_done(0); break; } - return 0; + return context_help_check_and_show(); } diff --git a/cinelerra-5.1/cinelerra/trackcanvas.C b/cinelerra-5.1/cinelerra/trackcanvas.C index c6722e79..d15f9a37 100644 --- a/cinelerra-5.1/cinelerra/trackcanvas.C +++ b/cinelerra-5.1/cinelerra/trackcanvas.C @@ -158,10 +158,646 @@ void TrackCanvas::resize_event() //printf("TrackCanvas::resize_event 2\n"); } +// *** CONTEXT_HELP *** +// This complicated implementation (up to *** END_CONTEXT_HELP ***) +// serves solely for context dependent help int TrackCanvas::keypress_event() { + int cursor_x, cursor_y; + +// printf("TrackCanvas::keypress_event: %d\n", get_keypress()); + if (get_keypress() != 'h' || ! alt_down()) return 0; + if (! is_tooltip_event_win() || ! cursor_inside()) return 0; + + cursor_x = get_cursor_x(); + cursor_y = get_cursor_y(); + +// Provide different help depending on the kind of object under the cursor: +// transition border handles +// transition icons themselves +// autos (keyframes or lines) and plugin keyframes +// asset border handles +// plugin border handles +// plugin bars themselves + if (help_transition_handles(cursor_x, cursor_y)) return 1; + if (help_transitions(cursor_x, cursor_y)) return 1; + if (help_keyframes(cursor_x, cursor_y)) return 1; + if (help_edit_handles(cursor_x, cursor_y)) return 1; + if (help_plugin_handles(cursor_x, cursor_y)) return 1; + if (help_plugins(cursor_x, cursor_y)) return 1; + +// Show "Editing" chapter as a fallback when cursor was over anything else + context_help_show("Editing"); + return 1; +} + +int TrackCanvas::help_transitions(int cursor_x, int cursor_y) +{ + int done = 0; + int64_t x, y, w, h; + Transition *transition = 0; + + // Detect, if any, the transition under cursor + for( Track *track = mwindow->edl->tracks->first; track && !done; track = track->next ) { + if( track->is_hidden() ) continue; + if( !track->show_transitions() ) continue; + + for( Edit *edit = track->edits->first; edit; edit = edit->next ) { + if( edit->transition ) { + edit_dimensions(edit, x, y, w, h); + get_transition_coords(edit, x, y, w, h); + + if( MWindowGUI::visible(x, x + w, 0, get_w()) && + MWindowGUI::visible(y, y + h, 0, get_h()) ) { + if( cursor_x >= x && cursor_x < x + w && + cursor_y >= y && cursor_y < y + h ) { + transition = edit->transition; + done = 1; + break; + } + } + } + } + } + + // If transition found, display its context help + if(transition) { + context_help_show(transition->title); + return 1; + } + + return 0; +} + +int TrackCanvas::help_keyframes(int cursor_x, int cursor_y) +{ + int result = 0; + EDLSession *session = mwindow->edl->session; + + static BC_Pixmap *help_pixmaps[AUTOMATION_TOTAL] = + { + 0, 0, 0, 0, 0, 0, 0, 0, + pankeyframe_pixmap, + modekeyframe_pixmap, + maskkeyframe_pixmap, + 0, + }; + + for(Track *track = mwindow->edl->tracks->first; + track && !result; + track = track->next) { + if( track->is_hidden() ) continue; + Automation *automation = track->automation; + + for(int i = 0; i < AUTOMATION_TOTAL && !result; i ++) + { +// Event not trapped and automation visible + Autos *autos = automation->autos[i]; + if(!result && session->auto_conf->autos[i] && autos) { + switch(i) { + case AUTOMATION_MODE: + case AUTOMATION_PAN: + case AUTOMATION_MASK: + result = help_autos(track, automation->autos[i], + cursor_x, cursor_y, + help_pixmaps[i]); + break; + + default: { + switch(autos->get_type()) { + case Autos::AUTOMATION_TYPE_FLOAT: { + Automation automation(0, track); + int grouptype = automation.autogrouptype(i, track); + + result = help_float_autos(track, autos, + cursor_x, cursor_y, + grouptype); + + break; } + + case Autos::AUTOMATION_TYPE_INT: { + result = help_int_autos(track, autos, + cursor_x, cursor_y); + break; } + } + break; } + } + + if(result) + { + context_help_show("Using Autos"); + } + } + } + + if(!result && session->auto_conf->plugins) { + result = help_plugin_autos(track, cursor_x, cursor_y); + if(result) { + context_help_show("Edit Params"); + } + } + } + + return result; +} + +int TrackCanvas::help_plugin_autos(Track *track, int cursor_x, int cursor_y) +{ + int result = 0; + + double view_start; + double unit_start; + double view_end; + double unit_end; + double yscale; + int center_pixel; + double zoom_sample; + double zoom_units; + + if(!track->expand_view) return 0; + + calculate_viewport(track, + view_start, + unit_start, + view_end, + unit_end, + yscale, + center_pixel, + zoom_sample, + zoom_units); + + for(int i = 0; i < track->plugin_set.total && !result; i++) + { + PluginSet *plugin_set = track->plugin_set.values[i]; + int center_pixel = track->y_pixel - + mwindow->edl->local_session->track_start[pane->number]; + if( track->show_titles() ) + center_pixel += mwindow->theme->get_image("title_bg_data")->get_h(); + if( track->show_assets() ) + center_pixel += track->data_h; + center_pixel += (i + 0.5) * mwindow->theme->get_image("plugin_bg_data")->get_h(); + + for(Plugin *plugin = (Plugin*)plugin_set->first; + plugin && !result; + plugin = (Plugin*)plugin->next) + { + for(KeyFrame *keyframe = (KeyFrame*)plugin->keyframes->first; + keyframe && !result; + keyframe = (KeyFrame*)keyframe->next) + { + if(keyframe->position >= unit_start && keyframe->position < unit_end) + { + int64_t x = (int64_t)((keyframe->position - unit_start) / zoom_units); + int y = center_pixel - keyframe_pixmap->get_h() / 2; + + if(cursor_x >= x && cursor_y >= y && + cursor_x < x + keyframe_pixmap->get_w() && + cursor_y < y + keyframe_pixmap->get_h()) + { + result = 1; + } + } + } + } + } + + return result; +} + +int TrackCanvas::help_autos(Track *track, Autos *autos, int cursor_x, + int cursor_y, BC_Pixmap *pixmap) +{ + int result = 0; + + double view_start; + double unit_start; + double view_end; + double unit_end; + double yscale; + int center_pixel; + double zoom_sample; + double zoom_units; + + calculate_viewport(track, + view_start, + unit_start, + view_end, + unit_end, + yscale, + center_pixel, + zoom_sample, + zoom_units); + + Auto *current; + + for(current = autos->first; current && !result; current = NEXT) + { + if(current->position >= unit_start && current->position < unit_end) + { + int64_t x, y; + x = (int64_t)((double)(current->position - unit_start) / + zoom_units - (pixmap->get_w() / 2.0 + 0.5)); + y = center_pixel - pixmap->get_h() / 2; + + if(cursor_x >= x && cursor_y >= y && + cursor_x < x + pixmap->get_w() && + cursor_y < y + pixmap->get_h()) + { + result = 1; + } + } + } + + return result; +} + +int TrackCanvas::help_float_autos(Track *track, Autos *autos, int cursor_x, int cursor_y, int autogrouptype) +{ + int result = 0; + int center_pixel; + double view_start, unit_start; + double view_end, unit_end, yscale; + double zoom_sample, zoom_units; + double slope; + + calculate_viewport(track, view_start, unit_start, view_end, unit_end, + yscale, center_pixel, zoom_sample, zoom_units); + +// Get first auto before start + Auto *current = 0, *previous = 0; + + for( current = autos->last; + current && current->position >= unit_start; + current = PREVIOUS ) ; + + Auto *first_auto = current ? current : + autos->first ? autos->first : autos->default_auto; + + double ax = 0, ay = 0, ax2 = 0, ay2 = 0; + if( first_auto ) { + calculate_auto_position(0, &ax, &ay, 0, 0, 0, 0, + first_auto, unit_start, zoom_units, yscale, autogrouptype); + } + if( current ) + current = NEXT; + else { + current = autos->first; + ax = 0; + } + + do { + if(current) { + calculate_auto_position(1, &ax2, &ay2, 0, 0, 0, 0, + current, unit_start, zoom_units, yscale, autogrouptype); + } + else { + ax2 = get_w(); + ay2 = ay; + } + + slope = ax2 > ax ? (ay2 - ay) / (ax2 - ax) : 0; + + if(ax2 > get_w()) { + ax2 = get_w(); + ay2 = ay + slope * (get_w() - ax); + } + + if(ax < 0) { + ay = ay + slope * (0 - ax); + ax = 0; + } + +// test handle + if( current && !result && current != autos->default_auto ) { + if( track->is_armed() ) { + result = test_floatauto((FloatAuto*)current, 0, + (int)center_pixel, (int)yscale, cursor_x, cursor_y, + unit_start, zoom_units, yscale, autogrouptype); + } + } + +// test joining line + if( !result && track->is_armed() ) { + result = test_floatline(center_pixel, + (FloatAutos*)autos, unit_start, zoom_units, yscale, +// Exclude auto coverage from the end of the line. The auto overlaps + (int)ax, (int)ax2 - HANDLE_W / 2, cursor_x, cursor_y, + 0, autogrouptype); + } + + if( current ) { + previous = current; + calculate_auto_position(0, &ax2, &ay2, 0, 0, 0, 0, previous, + unit_start, zoom_units, yscale, autogrouptype); + current = NEXT; + } + ax = ax2; ay = ay2; + } while( current && current->position <= unit_end && !result ); + + if( ax < get_w() && !result ) { + ax2 = get_w(); ay2 = ay; + if(track->is_armed()) { + result = test_floatline(center_pixel, + (FloatAutos*)autos, unit_start, zoom_units, yscale, + (int)ax, (int)ax2, cursor_x, cursor_y, + 0, autogrouptype); + } + } + + return result; +} + +int TrackCanvas::help_int_autos(Track *track, Autos *autos, int cursor_x, int cursor_y) +{ + int result = 0; + double view_start; + double unit_start; + double view_end; + double unit_end; + double yscale; + int center_pixel; + double zoom_sample; + double zoom_units; + double ax, ay, ax2, ay2; + + calculate_viewport(track, + view_start, + unit_start, + view_end, + unit_end, + yscale, + center_pixel, + zoom_sample, + zoom_units); + + double high = -yscale * 0.8 / 2; + double low = yscale * 0.8 / 2; + +// Get first auto before start + Auto *current; + for(current = autos->last; current && current->position >= unit_start; current = PREVIOUS) + ; + + if(current) + { + ax = 0; + ay = ((IntAuto*)current)->value > 0 ? high : low; + current = NEXT; + } + else + { + current = autos->first ? autos->first : autos->default_auto; + if(current) + { + ax = 0; + ay = ((IntAuto*)current)->value > 0 ? high : low; + } + else + { + ax = 0; + ay = yscale; + } + } + + do + { + if(current) + { + ax2 = (double)(current->position - unit_start) / zoom_units; + ay2 = ((IntAuto*)current)->value > 0 ? high : low; + } + else + { + ax2 = get_w(); + ay2 = ay; + } + + if(ax2 > get_w()) ax2 = get_w(); + + if(current && !result) + { + if(current != autos->default_auto) + { + if(track->is_armed()) + { + result = test_auto(current, + (int)ax2, + (int)ay2, + (int)center_pixel, + (int)yscale, + cursor_x, + cursor_y, + 0); + } + } + + current = NEXT; + } + + if(!result) + { + if(track->is_armed()) + { + result = test_toggleline(autos, + center_pixel, + (int)ax, + (int)ay, + (int)ax2, + (int)ay2, + cursor_x, + cursor_y, + 0); + } + } + + ax = ax2; + ay = ay2; + }while(current && current->position <= unit_end && !result); + + if(ax < get_w() && !result) + { + ax2 = get_w(); + ay2 = ay; + if(track->is_armed()) + { + result = test_toggleline(autos, + center_pixel, + (int)ax, + (int)ay, + (int)ax2, + (int)ay2, + cursor_x, + cursor_y, + 0); + } + } + return result; +} + +int TrackCanvas::help_transition_handles(int cursor_x, int cursor_y) +{ + if( !mwindow->edl->session->auto_conf->transitions ) + return 0; + int result = 0; + + Track *track = mwindow->edl->tracks->first; + for( ; track && !result; track=track->next) { + if( track->is_hidden() ) continue; + Edit *edit = track->edits->first; + for( ; edit && !result; edit=edit->next ) { + Transition *trans = edit->transition; + if( !trans ) continue; + int64_t x, y, w, h; + edit_dimensions(edit, x, y, w, h); + int strip_x = x, edit_y = y; + get_transition_coords(edit, x, y, w, h); + VFrame *strip = mwindow->theme->get_image("plugin_bg_data"); + int strip_y = y - strip->get_h(); + if( track->show_assets() && track->show_titles() ) + edit_y += mwindow->theme->get_image("title_bg_data")->get_h(); + if( strip_y < edit_y ) strip_y = edit_y; + int strip_w = Units::round(edit->track->from_units(edit->transition->length) * + mwindow->edl->session->sample_rate / mwindow->edl->local_session->zoom_sample); + int x1 = strip_x + strip_w - HANDLE_W/2, x2 = x1 + HANDLE_W; + int y1 = strip_y + strip->get_h()/2 - HANDLE_H/2, y2 = y1 + HANDLE_W; + if( cursor_x >= x1 && cursor_x < x2 && + cursor_y >= y1 && cursor_y < y2 ) { + result = 1; + } + } + } + + if( result ) { + context_help_show("Editing Effects"); + } + + return result; +} + +int TrackCanvas::help_edit_handles(int cursor_x, int cursor_y) +{ + int result = 0; + + for( Track *track=mwindow->edl->tracks->first; track && !result; track=track->next) { + if( track->is_hidden() ) continue; + for( Edit *edit=track->edits->first; edit && !result; edit=edit->next ) { + int64_t edit_x, edit_y, edit_w, edit_h; + edit_dimensions(edit, edit_x, edit_y, edit_w, edit_h); + + if( cursor_x >= edit_x && cursor_x <= edit_x + edit_w && + cursor_y >= edit_y && cursor_y < edit_y + edit_h && + ( cursor_x < edit_x + HANDLE_W || + cursor_x >= edit_x + edit_w - HANDLE_W )) { + result = 1; + } + } + } + + if( result ) { + context_help_show("Trimming"); + } + + return result; +} + +int TrackCanvas::help_plugin_handles(int cursor_x, int cursor_y) +{ + int result = 0; + + for(Track *track = mwindow->edl->tracks->first; + track && !result; + track = track->next) { + if( track->is_hidden() ) continue; + for(int i = 0; i < track->plugin_set.total && !result; i++) { + PluginSet *plugin_set = track->plugin_set.values[i]; + for(Plugin *plugin = (Plugin*)plugin_set->first; + plugin && !result; + plugin = (Plugin*)plugin->next) { + int64_t plugin_x, plugin_y, plugin_w, plugin_h; + plugin_dimensions(plugin, plugin_x, plugin_y, plugin_w, plugin_h); + + if(cursor_x >= plugin_x && cursor_x <= plugin_x + plugin_w && + cursor_y >= plugin_y && cursor_y < plugin_y + plugin_h && + (cursor_x < plugin_x + HANDLE_W || + cursor_x >= plugin_x + plugin_w - HANDLE_W)) { + result = 1; + } + } + } + } + + if(result) { + context_help_show("Editing Effects"); + } + + return result; +} + +int TrackCanvas::help_plugins(int cursor_x, int cursor_y) +{ + int done = 0; + int64_t x, y, w, h; + Track *track = 0; + Plugin *plugin = 0; + char title[BCTEXTLEN]; + + // Detect, if any, the plugin under cursor + for(track = mwindow->edl->tracks->first; track && !done; track = track->next) { + if(!track->expand_view) continue; + + for(int i = 0; i < track->plugin_set.total && !done; i++) { + // first check if plugins are visible at all + if (!track->expand_view) + continue; + PluginSet *plugin_set = track->plugin_set.values[i]; + for(plugin = (Plugin*)plugin_set->first; + plugin && !done; + plugin = (Plugin*)plugin->next) { + plugin_dimensions(plugin, x, y, w, h); + if(MWindowGUI::visible(x, x + w, 0, get_w()) && + MWindowGUI::visible(y, y + h, 0, get_h())) { + if(cursor_x >= x && cursor_x < x + w && + cursor_y >= y && cursor_y < y + h) { + done = 1; + break; + } + } + } + } + } + + // If plugin found, display its context help + if(plugin) { + strcpy(title, plugin->title); + if(! strcmp(title, "Overlay")) + // "Overlay" plugin title is ambiguous + switch(plugin->track->data_type) + { + case TRACK_AUDIO: + strcat(title, " \\(Audio\\)"); + break; + case TRACK_VIDEO: + strcat(title, " \\(Video\\)"); + break; + } + if(! strncmp(title, "F_", 2)) + // FFmpeg plugins can be audio or video + switch(plugin->track->data_type) + { + case TRACK_AUDIO: + strcpy(title, "FFmpeg Audio Plugins"); + break; + case TRACK_VIDEO: + strcpy(title, "FFmpeg Video Plugins"); + break; + } + context_help_show(title); + return 1; + } + return 0; } +// *** END_CONTEXT_HELP *** int TrackCanvas::cursor_leave_event() { diff --git a/cinelerra-5.1/cinelerra/trackcanvas.h b/cinelerra-5.1/cinelerra/trackcanvas.h index 15f8db63..2f7358ac 100644 --- a/cinelerra-5.1/cinelerra/trackcanvas.h +++ b/cinelerra-5.1/cinelerra/trackcanvas.h @@ -62,6 +62,19 @@ public: int drag_start_event(); int cursor_leave_event(); int keypress_event(); + +// *** CONTEXT_HELP *** + int help_transitions(int cursor_x, int cursor_y); + int help_transition_handles(int cursor_x, int cursor_y); + int help_keyframes(int cursor_x, int cursor_y); + int help_edit_handles(int cursor_x, int cursor_y); + int help_plugin_handles(int cursor_x, int cursor_y); + int help_plugins(int cursor_x, int cursor_y); + int help_plugin_autos(Track *track, int cursor_x, int cursor_y); + int help_autos(Track *track, Autos *autos, int cursor_x, int cursor_y, BC_Pixmap *pixmap); + int help_float_autos(Track *track, Autos *autos, int cursor_x, int cursor_y, int autogrouptype); + int help_int_autos(Track *track, Autos *autos, int cursor_x, int cursor_y); + void draw_resources(int mode = 0, int indexes_only = 0, // Redraw only certain audio resources with indexes Indexable *indexable = 0); diff --git a/cinelerra-5.1/cinelerra/trackpopup.C b/cinelerra-5.1/cinelerra/trackpopup.C index f22825e4..576a48ba 100644 --- a/cinelerra-5.1/cinelerra/trackpopup.C +++ b/cinelerra-5.1/cinelerra/trackpopup.C @@ -389,6 +389,8 @@ TrackPopupUserTitleWindow::TrackPopupUserTitleWindow(MWindow *mwindow, this->mwindow = mwindow; this->popup = popup; strcpy(new_text, !popup->edit ? "" : popup->edit->user_title); +// *** CONTEXT_HELP *** + context_help_set_keyword("Track Popup Menu"); } TrackPopupUserTitleWindow::~TrackPopupUserTitleWindow() @@ -588,6 +590,8 @@ TrackPopupShowWindow::TrackPopupShowWindow(MWindow *mwindow, { this->mwindow = mwindow; this->popup = popup; +// *** CONTEXT_HELP *** + context_help_set_keyword("Track Popup Menu"); } TrackPopupShowWindow::~TrackPopupShowWindow() diff --git a/cinelerra-5.1/cinelerra/transitionpopup.C b/cinelerra-5.1/cinelerra/transitionpopup.C index 5922a881..2a73b772 100644 --- a/cinelerra-5.1/cinelerra/transitionpopup.C +++ b/cinelerra-5.1/cinelerra/transitionpopup.C @@ -148,6 +148,8 @@ TransitionLengthDialog::TransitionLengthDialog(MWindow *mwindow, { this->mwindow = mwindow; this->thread = thread; +// *** CONTEXT_HELP *** + context_help_set_keyword("Transition Plugins"); } TransitionLengthDialog::~TransitionLengthDialog() diff --git a/cinelerra-5.1/cinelerra/vdeviceprefs.C b/cinelerra-5.1/cinelerra/vdeviceprefs.C index 3245c168..9d718b42 100644 --- a/cinelerra-5.1/cinelerra/vdeviceprefs.C +++ b/cinelerra-5.1/cinelerra/vdeviceprefs.C @@ -123,6 +123,7 @@ int VDevicePrefs::initialize(int creation) dialog->add_subwindow(menu = new VDriverMenu(x, y + yS(10), this, (mode == MODERECORD), driver)); menu->create_objects(); + menu->context_help_set_keyword("Video Out section"); } switch(this->driver) @@ -216,11 +217,14 @@ void VDevicePrefs::create_dvb_objs() dvb_adapter_title = new BC_Title(x1, y2, _("DVB Adapter:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(dvb_adapter_title); + dvb_adapter_title->context_help_set_keyword("Video Out section"); dialog->add_subwindow(device_text = new VDeviceTextBox(x1, y1, output_char)); + device_text->context_help_set_keyword("Video Out section"); int x2 = x1 + device_text->get_w() + xS(5); device_title = new BC_Title(x2, y2, _("dev:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(device_title); + device_title->context_help_set_keyword("Video Out section"); int *output_int = &in_config->dvb_in_device; dvb_adapter_device = new VDeviceTumbleBox(this, x2, y1, output_int, 0, 9, xS(20)); dvb_adapter_device->create_objects(); @@ -228,6 +232,7 @@ void VDevicePrefs::create_dvb_objs() follow_video_config = new BC_CheckBox(x1, y1, &in_config->follow_video, _("Follow video config")); dialog->add_subwindow(follow_video_config); + follow_video_config->context_help_set_keyword("Video Out section"); } int VDevicePrefs::create_firewire_objs() @@ -257,7 +262,9 @@ int VDevicePrefs::create_firewire_objs() if(output_char) { dialog->add_subwindow(device_title = new BC_Title(x1, y, _("Device Path:"), MEDIUMFONT, resources->text_default)); + device_title->context_help_set_keyword("Video Out section"); dialog->add_subwindow(firewire_path = new VDeviceTextBox(x1, y + ys20, output_char)); + firewire_path->context_help_set_keyword("Video Out section"); x1 += firewire_path->get_w() + xs5; } @@ -275,7 +282,9 @@ int VDevicePrefs::create_firewire_objs() break; } dialog->add_subwindow(port_title = new BC_Title(x1, y, _("Port:"), MEDIUMFONT, resources->text_default)); + port_title->context_help_set_keyword("Video Out section"); dialog->add_subwindow(firewire_port = new VDeviceIntBox(x1, y + ys20, output_int)); + firewire_port->context_help_set_keyword("Video Out section"); x1 += firewire_port->get_w() + xs5; // Firewire channel @@ -293,7 +302,9 @@ int VDevicePrefs::create_firewire_objs() } dialog->add_subwindow(channel_title = new BC_Title(x1, y, _("Channel:"), MEDIUMFONT, resources->text_default)); + channel_title->context_help_set_keyword("Video Out section"); dialog->add_subwindow(firewire_channel = new VDeviceIntBox(x1, y + ys20, output_int)); + firewire_channel->context_help_set_keyword("Video Out section"); x1 += firewire_channel->get_w() + xs5; @@ -316,7 +327,9 @@ int VDevicePrefs::create_firewire_objs() if(output_int) { dialog->add_subwindow(syt_title = new BC_Title(x1, y, _("Syt Offset:"), MEDIUMFONT, resources->text_default)); + syt_title->context_help_set_keyword("Video Out section"); dialog->add_subwindow(firewire_syt = new VDeviceIntBox(x1, y + ys20, output_int)); + firewire_syt->context_help_set_keyword("Video Out section"); } return 0; @@ -330,7 +343,9 @@ int VDevicePrefs::create_v4l2_objs() int x1 = x + menu->get_w() + xs5; output_char = pwindow->thread->edl->session->vconfig_in->v4l2_in_device; dialog->add_subwindow(device_title = new BC_Title(x1, y, _("Device path:"), MEDIUMFONT, resources->text_default)); + device_title->context_help_set_keyword("Video Out section"); dialog->add_subwindow(device_text = new VDeviceTextBox(x1, y + ys20, output_char)); + device_text->context_help_set_keyword("Video Out section"); return 0; } @@ -342,11 +357,14 @@ int VDevicePrefs::create_v4l2jpeg_objs() int x1 = x + menu->get_w() + xs5; char *output_char = &pwindow->thread->edl->session->vconfig_in->v4l2jpeg_in_device[0]; dialog->add_subwindow(device_title = new BC_Title(x1, y, _("Device path:"), MEDIUMFONT, resources->text_default)); + device_title->context_help_set_keyword("Video Out section"); dialog->add_subwindow(device_text = new VDeviceTextBox(x1, y + ys20, output_char)); + device_text->context_help_set_keyword("Video Out section"); x1 += bmax(device_title->get_w(),device_text->get_w()) + xs5; int *output_int = &pwindow->thread->edl->session->vconfig_in->v4l2jpeg_in_fields; fields_title = new BC_Title(x1, y, _("Fields:"), MEDIUMFONT, resources->text_default); dialog->add_subwindow(fields_title); + fields_title->context_help_set_keyword("Video Out section"); device_fields = new VDeviceTumbleBox(this, x1, y + ys20, output_int, 1, 2, xS(20)); device_fields->create_objects(); return 0; @@ -359,12 +377,15 @@ int VDevicePrefs::create_v4l2mpeg_objs() int x1 = x + menu->get_w() + xS(5); output_char = pwindow->thread->edl->session->vconfig_in->v4l2mpeg_in_device; dialog->add_subwindow(device_title = new BC_Title(x1, y, _("Device path:"), MEDIUMFONT, resources->text_default)); + device_title->context_help_set_keyword("Video Out section"); int y1 = y + yS(20); dialog->add_subwindow(device_text = new VDeviceTextBox(x1, y1, output_char)); + device_text->context_help_set_keyword("Video Out section"); x1 += xS(64); y1 += device_text->get_h() + yS(5); follow_video_config = new BC_CheckBox(x1, y1, &in_config->follow_video, _("Follow video config")); dialog->add_subwindow(follow_video_config); + follow_video_config->context_help_set_keyword("Video Out section"); return 0; } @@ -376,7 +397,9 @@ int VDevicePrefs::create_screencap_objs() int x1 = x + menu->get_w() + xS(5); output_char = pwindow->thread->edl->session->vconfig_in->screencapture_display; dialog->add_subwindow(device_title = new BC_Title(x1, y, _("Display:"), MEDIUMFONT, resources->text_default)); + device_title->context_help_set_keyword("Video Out section"); dialog->add_subwindow(device_text = new VDeviceTextBox(x1, y + yS(20), output_char)); + device_text->context_help_set_keyword("Video Out section"); return 0; } @@ -400,8 +423,10 @@ int VDevicePrefs::create_x11_objs() if( driver == PLAYBACK_X11 ) y1 -= yS(10); dialog->add_subwindow(device_title = new BC_Title(x1, y1+yS(4), x11_display, MEDIUMFONT, resources->text_default)); + device_title->context_help_set_keyword("Video Out section"); int x2 = x1 + device_title->get_w() + xS(10), dy = device_title->get_h(); dialog->add_subwindow(device_text = new VDeviceTextBox(x2, y1, output_char)); + device_text->context_help_set_keyword("Video Out section"); if( driver == PLAYBACK_X11 ) { int y2 = device_text->get_h(); if( dy < y2 ) dy = y2; @@ -409,6 +434,7 @@ int VDevicePrefs::create_x11_objs() use_direct_x11 = new BC_CheckBox(x1, y1, &out_config->use_direct_x11, _("use direct x11 render if possible")); dialog->add_subwindow(use_direct_x11); + use_direct_x11->context_help_set_keyword("Video Out section"); } return 0; } diff --git a/cinelerra-5.1/cinelerra/vpatchgui.C b/cinelerra-5.1/cinelerra/vpatchgui.C index cab73d79..53ec27fb 100644 --- a/cinelerra-5.1/cinelerra/vpatchgui.C +++ b/cinelerra-5.1/cinelerra/vpatchgui.C @@ -298,6 +298,8 @@ VModePatch::VModePatch(MWindow *mwindow, VPatchGUI *patch, int x, int y) this->mode = mwindow->get_int_auto(patch, AUTOMATION_MODE)->value; set_icon(patch->patchbay->mode_to_icon(this->mode)); set_tooltip(_("Overlay mode")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Overlays"); } VModePatch::VModePatch(MWindow *mwindow, VPatchGUI *patch) @@ -507,6 +509,8 @@ VMixPatch::VMixPatch(MWindow *mwindow, VPatchGUI *patch, int x, int y) : MixPatch(mwindow, patch, x, y) { set_tooltip(_("Mixer")); +// *** CONTEXT_HELP *** + context_help_set_keyword("Recover Mixer Windows"); } VMixPatch::~VMixPatch() diff --git a/cinelerra-5.1/cinelerra/vtimebar.C b/cinelerra-5.1/cinelerra/vtimebar.C index 80447e88..e575c796 100644 --- a/cinelerra-5.1/cinelerra/vtimebar.C +++ b/cinelerra-5.1/cinelerra/vtimebar.C @@ -43,6 +43,8 @@ VTimeBar::VTimeBar(MWindow *mwindow, { this->mwindow = mwindow; this->gui = gui; +// *** CONTEXT_HELP *** + context_help_set_keyword("Preview Region Usage"); } int VTimeBar::resize_event() diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index e789d1f0..196b2980 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.C +++ b/cinelerra-5.1/cinelerra/vwindowgui.C @@ -79,6 +79,8 @@ VWindowGUI::VWindowGUI(MWindow *mwindow, VWindow *vwindow) // source = 0; strcpy(loaded_title, ""); highlighted = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Viewer Window"); } VWindowGUI::~VWindowGUI() @@ -382,6 +384,8 @@ int VWindowGUI::keypress_event() } if( !result ) result = transport->keypress_event(); + if( !result ) + result = context_help_check_and_show(); return result; } diff --git a/cinelerra-5.1/cinelerra/zoombar.C b/cinelerra-5.1/cinelerra/zoombar.C index d8d3ccc3..b09223ad 100644 --- a/cinelerra-5.1/cinelerra/zoombar.C +++ b/cinelerra-5.1/cinelerra/zoombar.C @@ -50,6 +50,8 @@ ZoomBar::ZoomBar(MWindow *mwindow, MWindowGUI *gui) { this->gui = gui; this->mwindow = mwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("Zoom Panel"); } ZoomBar::~ZoomBar() diff --git a/cinelerra-5.1/cinelerra/zoompanel.C b/cinelerra-5.1/cinelerra/zoompanel.C index 5e9dcd5b..b1818689 100644 --- a/cinelerra-5.1/cinelerra/zoompanel.C +++ b/cinelerra-5.1/cinelerra/zoompanel.C @@ -272,6 +272,8 @@ ZoomPopup::ZoomPopup(MWindow *mwindow, ZoomPanel *panel, int x, int y) { this->mwindow = mwindow; this->panel = panel; +// *** CONTEXT_HELP *** + context_help_set_keyword("Compositor Controls"); } ZoomPopup::~ZoomPopup() @@ -292,6 +294,8 @@ ZoomTumbler::ZoomTumbler(MWindow *mwindow, ZoomPanel *panel, int x, int y) { this->mwindow = mwindow; this->panel = panel; +// *** CONTEXT_HELP *** + context_help_set_keyword("Compositor Controls"); } ZoomTumbler::~ZoomTumbler() diff --git a/cinelerra-5.1/cinelerra/zwindowgui.C b/cinelerra-5.1/cinelerra/zwindowgui.C index 722e6c14..94b52e1c 100644 --- a/cinelerra-5.1/cinelerra/zwindowgui.C +++ b/cinelerra-5.1/cinelerra/zwindowgui.C @@ -48,6 +48,8 @@ ZWindowGUI::ZWindowGUI(MWindow *mwindow, ZWindow *zwindow, Mixer *mixer) playback_engine = 0; highlighted = 0; playable = zwindow->playable; +// *** CONTEXT_HELP *** + context_help_set_keyword("Multi-Camera"); } ZWindowGUI::~ZWindowGUI() @@ -114,6 +116,9 @@ int ZWindowGUI::keypress_event() lock_window("ZWindowGUI::keypress_event 1"); } + if( !result ) + result = context_help_check_and_show(); + return result; } diff --git a/cinelerra-5.1/doc/ContextManual.pl b/cinelerra-5.1/doc/ContextManual.pl new file mode 100755 index 00000000..cbb14341 --- /dev/null +++ b/cinelerra-5.1/doc/ContextManual.pl @@ -0,0 +1,228 @@ +#!/usr/bin/perl + +# Helper script for context help in Cinelerra +# Calling: ContextManual.pl "" +# Searches the requested key in the following order: +# 1) manual Contents +# 2) manual Index +# 3) all manual pages via grep +# 4) FFmpeg or Ladspa plugins +# The first item found is shown via the default web browser +# If nothing found, the Contents itself is shown +# On empty keyphrase do nothing +# The special keyphrase "TOC" shows Contents, "IDX" shows Index +# The keyphrase starting with "FILE:" shows the file named after colon + +# Several important definitions + +# Web browser executable +$cin_browser = $ENV{'CIN_BROWSER'}; +# a likely default browser +$cin_browser = 'firefox' if $cin_browser eq ''; +# another possible browser +#$cin_browser = 'xdg-open' if $cin_browser eq ''; +# a fake browser for debugging +#$cin_browser = 'echo'; + +# The node with the manual contents +$contents_node = 'Contents.html'; + +# The node with the manual index +$index_node = 'Index.html'; + +# Several special plugin names necessary to rewrite +%rewrite = ( + # Rendered effects and transitions are not segmented in the Contents + # CD Ripper is an audio effect but erroneously placed + # under Rendered Video Effects in the manual + "CD Ripper" => "Rendered Audio Effects", + "Normalize" => "Rendered Audio Effects", + "Resample" => "Rendered Audio Effects", + "Time stretch" => "Rendered Audio Effects", + + "720 to 480" => "Rendered Video Effects", + "Reframe" => "Rendered Video Effects", + + # Audio transitions are segmented in the Index +# "Crossfade" => "Audio Transitions", + + # Video transitions are segmented in the Index +# "BandSlide" => "Video Transitions", +# "BandWipe" => "Video Transitions", +# "Dissolve" => "Video Transitions", +# "Flash" => "Video Transitions", +# "IrisSquare" => "Video Transitions", +# "Shape Wipe" => "Video Transitions", +# "Slide" => "Video Transitions", +# "Wipe" => "Video Transitions", +# "Zoom" => "Video Transitions", + + # Several not properly matched names + "AgingTV" => "Aging TV", + "Brightness/Contrast" => "Brightness\\/Contrast", + "Chroma key (HSV)" => "Chroma Key \\(HSV\\)", + "Crop & Position" => "Crop & Position", + "FindObj" => "Find Object", + "RGB - 601" => "RGB-601", + "ShiftInterlace" => "Shift Interlace", + "Cinelerra: Scopes" => "Videoscope" + ); + +# Cinelerra installation path +$cin_dat = $ENV{'CIN_DAT'}; +$cin_dat = '.' if $cin_dat eq ''; + +# Cinelerra HTML manual must reside here +$cin_man = "$cin_dat/doc/CinelerraGG_Manual"; +$contents = $cin_man.'/'.$contents_node; +$index = $cin_man.'/'.$index_node; +#print "ContextManual: using contents $contents\n"; + +# 1st argument is the requested key +$help_key = $ARGV[0]; +#print "ContextManual: request=$help_key\n"; +# Do nothing if no key requested +exit 0 if $help_key eq ''; +# Show contents on this special request +if ($help_key eq 'TOC') +{ + system "$cin_browser \"file://$contents\" &"; + exit 0; +} +# Show index on this special request +if ($help_key eq 'IDX') +{ + system "$cin_browser \"file://$index\" &"; + exit 0; +} +# Show the named file on this special request +if ($help_key =~ /^FILE:/) +{ + $help_key =~ s/^FILE://; + $help_key = $cin_man.'/'.$help_key; + system "$cin_browser \"file://$help_key\" &"; + exit 0; +} + +$help_key = $rewrite{$help_key} if exists $rewrite{$help_key}; +# Do nothing if no key requested +exit 0 if $help_key eq ''; +# Show contents on this special request +if ($help_key eq 'TOC') +{ + system "$cin_browser \"file://$contents\" &"; + exit 0; +} +# Show index on this special request +if ($help_key eq 'IDX') +{ + system "$cin_browser \"file://$index\" &"; + exit 0; +} +# Show the named file on this special request +if ($help_key =~ /^FILE:/) +{ + $help_key =~ s/^FILE://; + $help_key = $cin_man.'/'.$help_key; + system "$cin_browser \"file://$help_key\" &"; + exit 0; +} + +# Now try searching... +open CONTENTS, $contents or die "Cannot open $contents: $!"; +$node = ''; +# First search contents for the exact key +while () +{ + chomp; + last if ($node) = /^\s*HREF=\"(.+?\.html)\">\s*$help_key\s*<\/A>$/; +} +# If not found, search contents for an approximate key +if ($node eq '') +{ + seek CONTENTS, 0, 0; + while () + { + chomp; + last if ($node) = /^\s*HREF=\"(.+?\.html)\">.*?$help_key.*?<\/A>$/i; + } +} + +# If not found, search index for the exact key +if ($node eq '') +{ + open INDEX, $index or die "Cannot open $index: $!"; + while () + { + chomp; + # Cut off anchor: xdg-open does not like it + last if ($node) = /\s*$help_key\s*<\/A>$/; + # Retain anchor +# last if ($node) = /\s*$help_key\s*<\/A>$/; + } + close INDEX; +} +# If not found, search index for an approximate key +if ($node eq '') +{ + open INDEX, $index or die "Cannot open $index: $!"; + while () + { + chomp; + # Cut off anchor: xdg-open does not like it + last if ($node) = /.*?$help_key.*?<\/A>$/i; + # Retain anchor +# last if ($node) = /.*?$help_key.*?<\/A>$/i; + } + close INDEX; +} + +# If not found, grep manual for exact key instance +if ($node eq '') +{ + $_ = `grep -l \"$help_key\" $cin_dat/doc/CinelerraGG_Manual/*.html`; + ($node) = split; +} +# If not found, grep manual for case insensitive key instance +if ($node eq '') +{ + $_ = `grep -il \"$help_key\" $cin_dat/doc/CinelerraGG_Manual/*.html`; + ($node) = split; +} + +if ($node eq '') +{ + if ($help_key =~ /^F_/) + { # If not found, search contents for FFmpeg plugins + $help_key = 'FFmpeg Audio and Video Plugins'; + seek CONTENTS, 0, 0; + while () + { + chomp; + last if ($node) = /^\s*HREF=\"(.+?\.html)\">\s*$help_key\s*<\/A>$/; + } + } + elsif ($help_key =~ /^L_/) + { # If not found, search contents for LADSPA plugins + $help_key = 'Audio Ladspa Effects'; + seek CONTENTS, 0, 0; + while () + { + chomp; + last if ($node) = /^\s*HREF=\"(.+?\.html)\">\s*$help_key\s*<\/A>$/; + } + } +} + +close CONTENTS; + +# If still nothing found, show contents +$node = $contents_node if $node eq ''; +$node = $cin_man.'/'.$node unless $node =~ /\//; +#print "ContextManual: found $node\n"; + +# Call browser to show the proposed HTML file +system "$cin_browser \"file://$node\" &"; + +# And immediately return to the caller +exit 0; diff --git a/cinelerra-5.1/doc/Makefile b/cinelerra-5.1/doc/Makefile index 3b5d7350..25cc9d34 100644 --- a/cinelerra-5.1/doc/Makefile +++ b/cinelerra-5.1/doc/Makefile @@ -58,6 +58,7 @@ install: all cp -a cinelerra.html $(TARGET_DIR)/. cp -a shortcuts.html $(TARGET_DIR)/. cp -a RenderMux.sh $(TARGET_DIR)/. + cp -a ContextManual.pl $(TARGET_DIR)/. cp -a 99-ShuttlePRO.rules $(TARGET_DIR)/. clean: diff --git a/cinelerra-5.1/guicast/bcbutton.C b/cinelerra-5.1/guicast/bcbutton.C index 03256e60..00eb8cb7 100644 --- a/cinelerra-5.1/guicast/bcbutton.C +++ b/cinelerra-5.1/guicast/bcbutton.C @@ -290,7 +290,7 @@ int BC_OKButton::resize_event(int w, int h) int BC_OKButton::keypress_event() { if(get_keypress() == RETURN) return handle_event(); - return 0; + return context_help_check_and_show(); } int BC_OKButton::calculate_h() @@ -354,7 +354,7 @@ int BC_CancelButton::resize_event(int w,int h) int BC_CancelButton::keypress_event() { if(get_keypress() == ESC) return handle_event(); - return 0; + return context_help_check_and_show(); } int BC_CancelButton::calculate_h() @@ -512,7 +512,7 @@ int BC_OKTextButton::handle_event() int BC_OKTextButton::keypress_event() { if(get_keypress() == RETURN) return handle_event(); - return 0; + return context_help_check_and_show(); } @@ -541,7 +541,7 @@ int BC_CancelTextButton::handle_event() int BC_CancelTextButton::keypress_event() { if(get_keypress() == ESC) return handle_event(); - return 0; + return context_help_check_and_show(); } diff --git a/cinelerra-5.1/guicast/bcfilebox.C b/cinelerra-5.1/guicast/bcfilebox.C index ca88ead2..638081f5 100644 --- a/cinelerra-5.1/guicast/bcfilebox.C +++ b/cinelerra-5.1/guicast/bcfilebox.C @@ -780,7 +780,7 @@ int BC_FileBox::keypress_event() set_done(1); return 1; } - return 0; + return context_help_check_and_show(); } int BC_FileBox::close_event() diff --git a/cinelerra-5.1/guicast/bclistbox.C b/cinelerra-5.1/guicast/bclistbox.C index ae341879..df5b6f0f 100644 --- a/cinelerra-5.1/guicast/bclistbox.C +++ b/cinelerra-5.1/guicast/bclistbox.C @@ -3485,7 +3485,7 @@ int BC_ListBox::expander_active() int BC_ListBox::keypress_event() { - if( !active ) return 0; + if( !active ) return context_help_check_and_show(); //printf("BC_ListBox::keypress_event %d\n", __LINE__); @@ -3612,6 +3612,9 @@ int BC_ListBox::keypress_event() //printf("BC_ListBox::keypress_event %d\n", __LINE__); } + if( !result ) + result = context_help_check_and_show(); + return result; } diff --git a/cinelerra-5.1/guicast/bcmenubar.C b/cinelerra-5.1/guicast/bcmenubar.C index 7d7cc2b2..4ed2baa8 100644 --- a/cinelerra-5.1/guicast/bcmenubar.C +++ b/cinelerra-5.1/guicast/bcmenubar.C @@ -186,6 +186,7 @@ int BC_MenuBar::keypress_event() result = menu_titles.values[i]->dispatch_keypress(); } } + if (!result) result = context_help_check_and_show(); return result; } diff --git a/cinelerra-5.1/guicast/bcpot.C b/cinelerra-5.1/guicast/bcpot.C index 6b91b33c..c5ad40ca 100644 --- a/cinelerra-5.1/guicast/bcpot.C +++ b/cinelerra-5.1/guicast/bcpot.C @@ -284,8 +284,10 @@ int BC_Pot::keypress_event() show_value_tooltip(); draw(1); handle_event(); + return result; } - return result; + + return context_help_check_and_show(); } int BC_Pot::cursor_enter_event() diff --git a/cinelerra-5.1/guicast/bcslider.C b/cinelerra-5.1/guicast/bcslider.C index f8b53fe0..9a07c3ba 100644 --- a/cinelerra-5.1/guicast/bcslider.C +++ b/cinelerra-5.1/guicast/bcslider.C @@ -210,8 +210,8 @@ int BC_Slider::repeat_event(int64_t duration) int BC_Slider::keypress_event() { int result = 0; - if(!active || !enabled) return 0; - if(ctrl_down() || shift_down()) return 0; + if(!active || !enabled) return context_help_check_and_show(); + if(ctrl_down() || shift_down()) return context_help_check_and_show(); switch(get_keypress()) { @@ -238,8 +238,10 @@ int BC_Slider::keypress_event() handle_event(); show_value_tooltip(); draw_face(1); + return result; } - return result; + + return context_help_check_and_show(); } int BC_Slider::cursor_enter_event() diff --git a/cinelerra-5.1/guicast/bctextbox.C b/cinelerra-5.1/guicast/bctextbox.C index b81da1fb..afbf7147 100644 --- a/cinelerra-5.1/guicast/bctextbox.C +++ b/cinelerra-5.1/guicast/bctextbox.C @@ -1152,6 +1152,9 @@ int BC_TextBox::keypress_event() int result = 0; int dispatch_event = 0; +// Evtl catch Alt/H + if (context_help_check_and_show()) return 1; + if(!active || !enabled) return 0; int wtext_len = wtext_update(); diff --git a/cinelerra-5.1/guicast/bcwindowbase.C b/cinelerra-5.1/guicast/bcwindowbase.C index 9f3e2123..93279934 100644 --- a/cinelerra-5.1/guicast/bcwindowbase.C +++ b/cinelerra-5.1/guicast/bcwindowbase.C @@ -254,6 +254,7 @@ int BC_WindowBase::initialize() display_lock_owner = 0; test_keypress = 0; keys_return[0] = 0; + context_help_keyword[0] = 0; is_deleting = 0; window_lock = 0; resend_event_window = 0; @@ -1730,6 +1731,90 @@ int BC_WindowBase::close_event() return 1; } +// *** CONTEXT_HELP *** +// This basic implementation serves solely for context help. +// We are handling Alt/H only. Any subclass requiring more sophisticated +// processing of keystrokes has to provide its own overloaded handler. +int BC_WindowBase::keypress_event() +{ +// printf("BC_WindowBase::keypress_event: %d\n", get_keypress()); + return context_help_check_and_show(); +} + +// The stuff up to END_CONTEXT_HELP serves solely for context help +void BC_WindowBase::context_help_set_keyword(const char *keyword) +{ + if (keyword) strcpy(context_help_keyword, keyword); +} + +const char *BC_WindowBase::context_help_get_keyword() +{ +// If we have context_help_keyword defined here, return it. +// Otherwise recursively track widget hierarchy up to top_level +// and return the nearest found nonempty keyword. +// If nothing found, the special keyword "TOC" is returned. + if (context_help_keyword[0] || this == top_level || + this == parent_window || ! parent_window) { + if (! context_help_keyword[0] && this == top_level) + context_help_set_keyword("TOC"); + return context_help_keyword; + } + return parent_window->context_help_get_keyword(); +} + +void BC_WindowBase::context_help_show(const char *keyword) +{ + char cmd[BCTEXTLEN]; + + if (! keyword) return; + + sprintf(cmd, "\"%s/doc/ContextManual.pl\" \"%s\"", getenv("CIN_DAT"), + keyword); +// printf("BC_WindowBase::context_help_show(%s):\n%s\n", keyword, cmd); + +// ContextManual.pl starts browser in background, so system() should not block + system(cmd); +} + +void BC_WindowBase::context_help_show() +{ + context_help_show(context_help_get_keyword()); +} + +int BC_WindowBase::context_help_check_and_show(const char *keyword) +{ + if (! keyword) return 0; + if (! keyword[0]) return 0; + +// We are handling Alt/H only + if (get_keypress() != 'h' || ! alt_down()) return 0; + +// Restrict cursor location to that widget keystroke occured in + if (! is_tooltip_event_win() || ! cursor_inside()) return 0; + + context_help_show(keyword); + return 1; +} + +int BC_WindowBase::context_help_check_and_show() +{ + const char *keyword; + +// We are handling Alt/H only + if (get_keypress() != 'h' || ! alt_down()) return 0; + +// Restrict cursor location, so any subwindow can define its own help keyword + if (! is_tooltip_event_win() || ! cursor_inside()) return 0; + +// If a widget has not defined its own help keyword, the parent can provide it + keyword = context_help_get_keyword(); + if (! keyword[0]) return 0; + + context_help_show(keyword); + return 1; +} +// *** END_CONTEXT_HELP *** + int BC_WindowBase::dispatch_drag_start() { int result = 0; @@ -4036,6 +4121,12 @@ int BC_WindowBase::is_event_win() return this->win == top_level->event_win; } +int BC_WindowBase::is_tooltip_event_win() +{ + return this->win == top_level->event_win || + tooltip_popup && tooltip_popup->win == top_level->event_win; +} + void BC_WindowBase::set_dragging(int value) { is_dragging = value; diff --git a/cinelerra-5.1/guicast/bcwindowbase.h b/cinelerra-5.1/guicast/bcwindowbase.h index e4eb8ba4..2feaf66c 100644 --- a/cinelerra-5.1/guicast/bcwindowbase.h +++ b/cinelerra-5.1/guicast/bcwindowbase.h @@ -206,7 +206,7 @@ public: virtual int cursor_motion_event() { return 0; }; virtual int cursor_leave_event(); virtual int cursor_enter_event(); - virtual int keypress_event() { return 0; }; + virtual int keypress_event(); virtual int keyrelease_event() { return 0; }; virtual int translation_event() { return 0; }; virtual int drag_start_event() { return 0; }; @@ -370,6 +370,8 @@ public: BC_WindowBase* get_parent(); // Event happened in this window int is_event_win(); +// Event happened either in this window or in the associated tooltip + int is_tooltip_event_win(); int cursor_inside(); // Deactivate everything and activate this subwindow virtual int activate(); @@ -563,6 +565,14 @@ public: long from_clipboard(char *data, long maxlen, int clipboard_num); long clipboard_len(int clipboard_num); +// *** CONTEXT_HELP *** + void context_help_set_keyword(const char *keyword); + const char *context_help_get_keyword(); + void context_help_show(const char *keyword); + void context_help_show(); + int context_help_check_and_show(const char *keyword); + int context_help_check_and_show(); + int test_keypress; char keys_return[KEYPRESSLEN]; @@ -798,6 +808,9 @@ private: int shared_bg_pixmap; char title[BCTEXTLEN]; +// *** CONTEXT_HELP *** + char context_help_keyword[BCTEXTLEN]; + // X Window parameters int screen; Window rootwin; diff --git a/cinelerra-5.1/plugins/720to480/720to480.C b/cinelerra-5.1/plugins/720to480/720to480.C index 6d62e873..c7b99463 100644 --- a/cinelerra-5.1/plugins/720to480/720to480.C +++ b/cinelerra-5.1/plugins/720to480/720to480.C @@ -55,6 +55,9 @@ _720to480Window::_720to480Window(_720to480Main *client, int x, int y) : BC_Window(client->gui_string, x, y, xS(230), yS(150), xS(230), yS(150), 0, 0, 1) { this->client = client; +// *** CONTEXT_HELP *** + if(client) context_help_set_keyword(client->plugin_title()); + else context_help_set_keyword("Rendered Video Effects"); } diff --git a/cinelerra-5.1/plugins/cdripper/cdripwindow.C b/cinelerra-5.1/plugins/cdripper/cdripwindow.C index 28acfeb4..61314662 100644 --- a/cinelerra-5.1/plugins/cdripper/cdripwindow.C +++ b/cinelerra-5.1/plugins/cdripper/cdripwindow.C @@ -30,6 +30,9 @@ CDRipWindow::CDRipWindow(CDRipMain *cdripper, int x, int y) x, y, xS(450), yS(230), xS(450), yS(230), 0, 0, 1) { this->cdripper = cdripper; +// *** CONTEXT_HELP *** + if(cdripper) context_help_set_keyword(cdripper->plugin_title()); + else context_help_set_keyword("Rendered Audio Effects"); } CDRipWindow::~CDRipWindow() diff --git a/cinelerra-5.1/plugins/color3way/color3waywindow.C b/cinelerra-5.1/plugins/color3way/color3waywindow.C index f0d2db4c..d55f2cd5 100644 --- a/cinelerra-5.1/plugins/color3way/color3waywindow.C +++ b/cinelerra-5.1/plugins/color3way/color3waywindow.C @@ -554,8 +554,8 @@ int Color3WayPoint::cursor_leave_event() int Color3WayPoint::keypress_event() { int result = 0; - if(!active) return 0; - if(ctrl_down() || shift_down()) return 0; + if(!active) return context_help_check_and_show(); + if(ctrl_down() || shift_down()) return context_help_check_and_show(); switch(get_keypress()) { @@ -584,6 +584,7 @@ int Color3WayPoint::keypress_event() plugin->send_configure_change(); gui->update(); } + else result = context_help_check_and_show(); return result; } diff --git a/cinelerra-5.1/plugins/graphic/graphic.C b/cinelerra-5.1/plugins/graphic/graphic.C index 7a99221d..3fb5c066 100644 --- a/cinelerra-5.1/plugins/graphic/graphic.C +++ b/cinelerra-5.1/plugins/graphic/graphic.C @@ -872,7 +872,7 @@ int GraphicGUI::keypress_event() } } } - return 0; + return context_help_check_and_show(); } diff --git a/cinelerra-5.1/plugins/histogram/histogramwindow.C b/cinelerra-5.1/plugins/histogram/histogramwindow.C index 49e9a91a..b36c7b0b 100644 --- a/cinelerra-5.1/plugins/histogram/histogramwindow.C +++ b/cinelerra-5.1/plugins/histogram/histogramwindow.C @@ -330,6 +330,9 @@ int HistogramWindow::keypress_event() } } + if (! result) + result = context_help_check_and_show(); + return result; } diff --git a/cinelerra-5.1/plugins/histogram_bezier/bistogramwindow.C b/cinelerra-5.1/plugins/histogram_bezier/bistogramwindow.C index 5fa84032..1cfed9a6 100644 --- a/cinelerra-5.1/plugins/histogram_bezier/bistogramwindow.C +++ b/cinelerra-5.1/plugins/histogram_bezier/bistogramwindow.C @@ -182,6 +182,8 @@ int HistogramWindow::keypress_event() result = 1; } } + if( !result ) + result = context_help_check_and_show(); return result; } diff --git a/cinelerra-5.1/plugins/normalize/normalizewindow.C b/cinelerra-5.1/plugins/normalize/normalizewindow.C index 463ca610..dc741769 100644 --- a/cinelerra-5.1/plugins/normalize/normalizewindow.C +++ b/cinelerra-5.1/plugins/normalize/normalizewindow.C @@ -27,6 +27,8 @@ NormalizeWindow::NormalizeWindow(int x, int y) : BC_Window(_(PROGRAM_NAME ": Normalize"), x - xS(160), y - yS(75), xS(320), yS(150), xS(320), yS(150), 0, 0, 1) { +// *** CONTEXT_HELP *** + context_help_set_keyword("Rendered Audio Effects"); } NormalizeWindow::~NormalizeWindow() diff --git a/cinelerra-5.1/plugins/reframe/reframe.C b/cinelerra-5.1/plugins/reframe/reframe.C index 4af96105..7554012d 100644 --- a/cinelerra-5.1/plugins/reframe/reframe.C +++ b/cinelerra-5.1/plugins/reframe/reframe.C @@ -176,6 +176,9 @@ ReFrameWindow::ReFrameWindow(ReFrame *plugin, int x, int y) 1) { this->plugin = plugin; +// *** CONTEXT_HELP *** + if(plugin) context_help_set_keyword(plugin->plugin_title()); + else context_help_set_keyword("Rendered Video Effects"); } ReFrameWindow::~ReFrameWindow() diff --git a/cinelerra-5.1/plugins/resample/resample.C b/cinelerra-5.1/plugins/resample/resample.C index 6293ba69..90c7cccd 100644 --- a/cinelerra-5.1/plugins/resample/resample.C +++ b/cinelerra-5.1/plugins/resample/resample.C @@ -73,6 +73,9 @@ ResampleWindow::ResampleWindow(ResampleEffect *plugin, int x, int y) 1) { this->plugin = plugin; +// *** CONTEXT_HELP *** + if(plugin) context_help_set_keyword(plugin->plugin_title()); + else context_help_set_keyword("Rendered Audio Effects"); } void ResampleWindow::create_objects() diff --git a/cinelerra-5.1/plugins/sketcher/sketcherwindow.C b/cinelerra-5.1/plugins/sketcher/sketcherwindow.C index 796a84c4..c022ecdd 100644 --- a/cinelerra-5.1/plugins/sketcher/sketcherwindow.C +++ b/cinelerra-5.1/plugins/sketcher/sketcherwindow.C @@ -816,7 +816,7 @@ int SketcherWindow::keypress_event() del_curve->handle_event() : del_point->handle_event() ; } - return 0; + return context_help_check_and_show(); } diff --git a/cinelerra-5.1/plugins/synthesizer/synthesizer.C b/cinelerra-5.1/plugins/synthesizer/synthesizer.C index 01a49738..3b0e9f2b 100644 --- a/cinelerra-5.1/plugins/synthesizer/synthesizer.C +++ b/cinelerra-5.1/plugins/synthesizer/synthesizer.C @@ -672,7 +672,7 @@ int SynthWindow::keypress_event() set_done(1); return 1; } - return 0; + return context_help_check_and_show(); } int SynthWindow::resize_event(int w, int h) @@ -1038,6 +1038,13 @@ void SynthNote::stop_note() int SynthNote::keypress_event() { +// Evtl catch Alt/H + if (get_keypress() == 'h' && alt_down()) + { + context_help_show(); + return 1; + } + if(number >= FIRST_TITLE && number < LAST_TITLE) { if(get_keypress() == keyboard_map[number - FIRST_TITLE][0]) diff --git a/cinelerra-5.1/plugins/timestretch/timestretch.C b/cinelerra-5.1/plugins/timestretch/timestretch.C index 0653a9e2..c4f01e1b 100644 --- a/cinelerra-5.1/plugins/timestretch/timestretch.C +++ b/cinelerra-5.1/plugins/timestretch/timestretch.C @@ -129,6 +129,9 @@ TimeStretchWindow::TimeStretchWindow(TimeStretch *plugin, int x, int y) 1) { this->plugin = plugin; +// *** CONTEXT_HELP *** + if(plugin) context_help_set_keyword(plugin->plugin_title()); + else context_help_set_keyword("Rendered Audio Effects"); }