Exciting new Alt/h help key provided by sge (Georgy) with many thanks!
authorGood Guy <good1.2guy@gmail.com>
Mon, 10 May 2021 19:40:26 +0000 (13:40 -0600)
committerGood Guy <good1.2guy@gmail.com>
Mon, 10 May 2021 19:40:26 +0000 (13:40 -0600)
126 files changed:
cinelerra-5.1/cinelerra/aboutprefs.C
cinelerra-5.1/cinelerra/adeviceprefs.C
cinelerra-5.1/cinelerra/apatchgui.C
cinelerra-5.1/cinelerra/appearanceprefs.C
cinelerra-5.1/cinelerra/assetedit.C
cinelerra-5.1/cinelerra/assetpopup.C
cinelerra-5.1/cinelerra/assetremove.C
cinelerra-5.1/cinelerra/avc1394transport.C
cinelerra-5.1/cinelerra/awindowgui.C
cinelerra-5.1/cinelerra/awindowgui.h
cinelerra-5.1/cinelerra/batchrender.C
cinelerra-5.1/cinelerra/bdcreate.C
cinelerra-5.1/cinelerra/binfolder.C
cinelerra-5.1/cinelerra/browsebutton.C
cinelerra-5.1/cinelerra/canvas.C
cinelerra-5.1/cinelerra/channeledit.C
cinelerra-5.1/cinelerra/channelinfo.C
cinelerra-5.1/cinelerra/channelpicker.C
cinelerra-5.1/cinelerra/clipedit.C
cinelerra-5.1/cinelerra/colorpicker.C
cinelerra-5.1/cinelerra/confirmquit.C
cinelerra-5.1/cinelerra/confirmsave.C
cinelerra-5.1/cinelerra/convert.C
cinelerra-5.1/cinelerra/cpanel.C
cinelerra-5.1/cinelerra/ctimebar.C
cinelerra-5.1/cinelerra/cwindowgui.C
cinelerra-5.1/cinelerra/cwindowtool.C
cinelerra-5.1/cinelerra/dvdcreate.C
cinelerra-5.1/cinelerra/editlength.C
cinelerra-5.1/cinelerra/editpanel.C
cinelerra-5.1/cinelerra/fileac3.C
cinelerra-5.1/cinelerra/filedv.C
cinelerra-5.1/cinelerra/fileexr.C
cinelerra-5.1/cinelerra/fileffmpeg.C
cinelerra-5.1/cinelerra/fileflac.C
cinelerra-5.1/cinelerra/fileformat.C
cinelerra-5.1/cinelerra/filejpeg.C
cinelerra-5.1/cinelerra/filempeg.C
cinelerra-5.1/cinelerra/fileogg.C
cinelerra-5.1/cinelerra/filepng.C
cinelerra-5.1/cinelerra/fileppm.C
cinelerra-5.1/cinelerra/filesndfile.C
cinelerra-5.1/cinelerra/filetga.C
cinelerra-5.1/cinelerra/filetiff.C
cinelerra-5.1/cinelerra/filevorbis.C
cinelerra-5.1/cinelerra/formattools.C
cinelerra-5.1/cinelerra/gwindowgui.C
cinelerra-5.1/cinelerra/gwindowgui.h
cinelerra-5.1/cinelerra/interfaceprefs.C
cinelerra-5.1/cinelerra/keyframegui.C
cinelerra-5.1/cinelerra/labeledit.C
cinelerra-5.1/cinelerra/levelwindowgui.C
cinelerra-5.1/cinelerra/loadfile.C
cinelerra-5.1/cinelerra/mainclock.C
cinelerra-5.1/cinelerra/mainmenu.C
cinelerra-5.1/cinelerra/manualgoto.C
cinelerra-5.1/cinelerra/mbuttons.C
cinelerra-5.1/cinelerra/menuattachtransition.C
cinelerra-5.1/cinelerra/menueffects.C
cinelerra-5.1/cinelerra/menueffects.h
cinelerra-5.1/cinelerra/meterpanel.C
cinelerra-5.1/cinelerra/mixersalign.C
cinelerra-5.1/cinelerra/mtimebar.C
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/mwindowgui.C
cinelerra-5.1/cinelerra/new.C
cinelerra-5.1/cinelerra/patchbay.C
cinelerra-5.1/cinelerra/patchgui.C
cinelerra-5.1/cinelerra/performanceprefs.C
cinelerra-5.1/cinelerra/playbackprefs.C
cinelerra-5.1/cinelerra/playtransport.C
cinelerra-5.1/cinelerra/pluginclient.C
cinelerra-5.1/cinelerra/plugindialog.C
cinelerra-5.1/cinelerra/plugindialog.h
cinelerra-5.1/cinelerra/preferencesthread.C
cinelerra-5.1/cinelerra/probeprefs.C
cinelerra-5.1/cinelerra/proxy.C
cinelerra-5.1/cinelerra/question.C
cinelerra-5.1/cinelerra/recordgui.C
cinelerra-5.1/cinelerra/recordmonitor.C
cinelerra-5.1/cinelerra/recordprefs.C
cinelerra-5.1/cinelerra/recordscopes.C
cinelerra-5.1/cinelerra/recordtransport.C
cinelerra-5.1/cinelerra/remotecontrol.C
cinelerra-5.1/cinelerra/render.C
cinelerra-5.1/cinelerra/resizetrackthread.C
cinelerra-5.1/cinelerra/savefile.C
cinelerra-5.1/cinelerra/setformat.C
cinelerra-5.1/cinelerra/shbtnprefs.C
cinelerra-5.1/cinelerra/shuttle.C
cinelerra-5.1/cinelerra/swindow.C
cinelerra-5.1/cinelerra/tipwindow.C
cinelerra-5.1/cinelerra/trackcanvas.C
cinelerra-5.1/cinelerra/trackcanvas.h
cinelerra-5.1/cinelerra/trackpopup.C
cinelerra-5.1/cinelerra/transitionpopup.C
cinelerra-5.1/cinelerra/vdeviceprefs.C
cinelerra-5.1/cinelerra/vpatchgui.C
cinelerra-5.1/cinelerra/vtimebar.C
cinelerra-5.1/cinelerra/vwindowgui.C
cinelerra-5.1/cinelerra/zoombar.C
cinelerra-5.1/cinelerra/zoompanel.C
cinelerra-5.1/cinelerra/zwindowgui.C
cinelerra-5.1/doc/ContextManual.pl [new file with mode: 0755]
cinelerra-5.1/doc/Makefile
cinelerra-5.1/guicast/bcbutton.C
cinelerra-5.1/guicast/bcfilebox.C
cinelerra-5.1/guicast/bclistbox.C
cinelerra-5.1/guicast/bcmenubar.C
cinelerra-5.1/guicast/bcpot.C
cinelerra-5.1/guicast/bcslider.C
cinelerra-5.1/guicast/bctextbox.C
cinelerra-5.1/guicast/bcwindowbase.C
cinelerra-5.1/guicast/bcwindowbase.h
cinelerra-5.1/plugins/720to480/720to480.C
cinelerra-5.1/plugins/cdripper/cdripwindow.C
cinelerra-5.1/plugins/color3way/color3waywindow.C
cinelerra-5.1/plugins/graphic/graphic.C
cinelerra-5.1/plugins/histogram/histogramwindow.C
cinelerra-5.1/plugins/histogram_bezier/bistogramwindow.C
cinelerra-5.1/plugins/normalize/normalizewindow.C
cinelerra-5.1/plugins/reframe/reframe.C
cinelerra-5.1/plugins/resample/resample.C
cinelerra-5.1/plugins/sketcher/sketcherwindow.C
cinelerra-5.1/plugins/synthesizer/synthesizer.C
cinelerra-5.1/plugins/timestretch/timestretch.C

index f6fdde4ae21ced66cbf1fe0743de976c53e328a5..03a6f9d03f57eaffa9df6a1a2a029c79f2177306 100644 (file)
@@ -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()
index 78cef42dfb012925800523987fc2c844b317f57d..74d62d8dc1fb1dd3024e88f2ec5c7202f6843aef 100644 (file)
@@ -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;
 }
index d44b584b46812092c4cb14cb79c79206b90e336f..678254abfbcc465c0ec4e45f62c8e2101ac11cb3 100644 (file)
@@ -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()
index c80ee26bef23c2a00ff0557087ca65fdbdc33700..356fe206928a1de6fb30feaea2fc207df0990706 100644 (file)
@@ -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;
 }
 
index e603ad8cabba5eaa0aad4fd5060c86252a70258a..9bdf847f3f58cd7373d2e4d05cf45ab9ef09026d 100644 (file)
@@ -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()
index b414455caee18de166da5e76f503b20f98a6e65e..bbdf172fc2dbcc1fb5a4ec5f334c1bcb8f01f904 100644 (file)
@@ -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()
index 564c18cf19cfadafadf9ad11ad030834918d31d4..f623bce4ab7ee89522d75551e403e426e328fe2b 100644 (file)
@@ -36,6 +36,8 @@ AssetRemoveWindow::AssetRemoveWindow(MWindow *mwindow)
 {
        this->mwindow = mwindow;
        data = 0;
+// *** CONTEXT_HELP ***
+       context_help_set_keyword("Resources Window");
 }
 
 AssetRemoveWindow::~AssetRemoveWindow()
index ba9617690a6edc76130b6703891ef27193862cf0..1629ba863984fa4109b4144a50ae409ac3318b8c 100644 (file)
@@ -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
index 4dc1ce2853d26250839170642f34ea931616dd1a..67c759180d05200a9034193f6e21e2887fbda066 100644 (file)
@@ -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, "")
index b52add9b2059f84f668084644b7456ecd3c52410..311e3da1afa89cdcd27f4344367731772a1291ea 100644 (file)
@@ -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;
index 9e4dbc3cdfe6ecf92eac4d69d80d318d524b04ac..ace9e562ff735510f53027275484b639b9c72f48 100644 (file)
@@ -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
index 93794d516f842acea5469b703e9f36b3c1170afc..150f835d523fdf9fb960a5817116feaf542433a5 100644 (file)
@@ -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()
index ff4d0ba6a940e1d42aaa3d3d85f6daa58c1958ba..f7be299a19a50f08deac6c01a3db5d4ea617bb5f 100644 (file)
@@ -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()
index fae5758b94d7eb35fa31afd364f6493cfd846cf2..99b356a8891c088a084e5592b270f38fdb3c6faf 100644 (file)
@@ -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()
index ad5e88111deddac2d2b7deaae86bd2c49186b28e..0779224e6f7057b4d8840ba7868333e0ef56aef6 100644 (file)
@@ -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;
 }
index 57f07856c67c50263954320af5adb5b72ab935a4..83e69f7c094c285995a5cab5c4e2bcb2dc6d1c98 100644 (file)
@@ -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();
 }
 
 
index e6e8486ee486507b142bac5af5066419a01cb20c..5c8d9187420fe758605b7d9921cff113c0fc1576 100644 (file)
@@ -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()
index 7880c30689299a0bfd07ba243ad54d61ebe55952..553bd9be0cec935d10eb49ea082288a48a0b534a 100644 (file)
@@ -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();
 }
 
 
index e002dd47634298fe7885a9c0b0ea592f4e152c8f..f3f81f252815f5869b636ea559993531906df670 100644 (file)
@@ -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()
index fd796bfcaef64b158ad34396ecb75e58a8f7a7e3..b1e2a94969a5cb745170c9b29b532e51ca6b7a44 100644 (file)
@@ -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()
index 17bfc989f8d9a737b98a5068653db76b188fa0be..b0cb9dcfd8ccc0eaafa62b5f1d7607a95ed9e099 100644 (file)
@@ -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();
 }
 
index fe89aff8b886f8c94e7e9a255f571769a7bea8a0..45d47ac0d80a26fa5caa7abb7a3910c2154a9d58 100644 (file)
@@ -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());
index 45fff292840f8e60a97de0f187bf7a5e4053f393..a73d5148c376a4c9f09f4b7de94ff70cee68ac7d 100644 (file)
@@ -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()
index 5f8dd4d7c048ba179266cc81b2f30bc950219284..1f82e046e9d1e495613b2bf74aa218188ba21bf3 100644 (file)
@@ -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()
 {
index d7f5b3ff061c9b9985a4379c783cc27944abe0bc..951666784f3c5d4c8565ba8b403ae1840b55ca00 100644 (file)
@@ -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()
index 08fa9ef2f757c03424b1922059c73efd27d3a8d2..d9738c2cbe8c93b5989d85fd9487c6178d6604d2 100644 (file)
@@ -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;
 }
 
index d7a4ec6cf95de294bcf14c5d36b15ef8752f8d9c..cd33106949f323f1b2c774562ef850477b4686f9 100644 (file)
@@ -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<SubMask *> &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()
index 4c8ab188aadc2518a88e6c7ff8938e4b7bb2aab6..6ecb270b381be0102a77e08381b2f0d03b660774 100644 (file)
@@ -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()
index 070681e8e3cd4061573755802df74c92e39dc8c8..87b716e254691174a62b0aecb21b92519b0b5f09 100644 (file)
@@ -124,6 +124,8 @@ EditLengthDialog::EditLengthDialog(MWindow *mwindow,
 {
        this->mwindow = mwindow;
        this->thread = thread;
+// *** CONTEXT_HELP ***
+       context_help_set_keyword("Edit Length");
 }
 
 EditLengthDialog::~EditLengthDialog()
index 0a56e0fe0ec31b8848b80373ddf7b23c9af906c3..0fa5064af127c74ea30061238fa83b42b1f81e2f 100644 (file)
@@ -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();
index f7d78c592af6e148c089342a5054b5dc86ab1cc0..c6a94161780871f935f497c8d35cb9e3b85accb8 100644 (file)
@@ -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()
index 032f64e44131abea955dcf07f243e9486c6f8749..cf8bc1bf074dd673cfdc6036c34b1794d04062b0 100644 (file)
@@ -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()
index 2a54f3ed7ad668a7de36e682336a3f3c0f40b4fd..9c782a112f8340e8f62023c4398ead416be07c35 100644 (file)
@@ -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()
index a71d692aad1e3584e54b350cd248b98387be5807..bcc558170db4817a3976f0a248aaabfe7aaa3b05 100644 (file)
@@ -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()
index ba769a7e8842ecb40183b8e027569cdb018476a3..94538037746188f78eb553fe697157791082b2ee 100644 (file)
@@ -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()
index 6dc11781fe7f67eff97ef1c3e8b20decd89fa0a1..c87edf2cfe3d3fcabf02a76cc1e92e09f9ba69fe 100644 (file)
@@ -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()
index 42dd2189d73fbf68d966b501b8b435a6ccdf0767..15ae547cbeea9fd1ea6e016e960c468ae41a194c 100644 (file)
@@ -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()
index fb4ee731d05c868f41d25fd307b60b9aecdf0109..c728036ae52604364c7093dde59c763b4ba2e833 100644 (file)
@@ -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()
index e65eccbf41e0ecca1f19db6fe17208b71ec8250a..63f6809840c900172208a8a80a96b4b87b0f122b 100644 (file)
@@ -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()
index 0540ff015534c90d5cd82a05fa9c96ba8cfb0337..4b7f74f80b915563cd0c36a71fb28becd108bef9 100644 (file)
@@ -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()
index 625223eaa5f476a266bceaf785d9ab97eeef086b..e91690a12946a7622ff26ff123f6d3331ad85cb6 100644 (file)
@@ -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()
index ffd59b46fdd2967fb7f61480bf16c2b25e75f810..a215080de577b4230cfcfe644e8a7a64e294b51e 100644 (file)
@@ -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()
index 6eded708207b6a2df2d326b5a9d601d5b1058bd3..df9a56ee94a36fbe95fa7adcabd7cdb839e54626 100644 (file)
@@ -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()
index 7104eed4f7daa4e650b48793976d203c1dd62d6a..e14791e41856e71467ff4ce501d5aa4b854b4166 100644 (file)
@@ -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()
index f04249f13e06148e8b88a5f1bfbae78663ba4ffe..b051f9a95f8da24d945adeb18dc62942fc6453ec 100644 (file)
@@ -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()
index 68dd6afd24670fd9804481d603909b54308095fe..9f9b0c199e2341275041d29fafc6eca5b9ed38ed 100644 (file)
@@ -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;
        }
 
index 1fac6105e59ed24c8038f1b258fe872b28880104..e0506c7853cec929456c5fc3905a7c98301d76b7 100644 (file)
@@ -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)
index 6490c851c4ff3f2f713a017ff6ed00453134fb63..889062348a3f06257baa6b9ca2ab9f67078ed475 100644 (file)
@@ -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];
index 593927e21e1ae1da974c9c2075b6dcb824081c7c..4e80eb86de9dd868f83c33df957bc21c51bbbdc1 100644 (file)
@@ -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()
 {
index fb7de36f93d32e6f118e52313b2b430235a21c1a..74356b54ff0a89aa6986333e19f7bd6b023fe7ea 100644 (file)
@@ -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();
 }
 
index 9a728a0e8d0e632ccc9fa87bb60c1ff820160860..b06d5c76178b1b885f47c37335fdf8d3c90e8dbd 100644 (file)
@@ -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()
index b35409bebbeb6c5cd3aeb3ec654de791018085a9..ac28f56f4fe68409064cd5613d9b8be0859bd6b9 100644 (file)
@@ -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()
index 4867bd34db5fe2bdd588662373f63a237c8a4470..d9d9fe78b413dac53729e3276c6868c300ca7c90 100644 (file)
@@ -168,6 +168,8 @@ LoadFileWindow::LoadFileWindow(MWindow *mwindow,
 {
        this->thread = thread;
        this->mwindow = mwindow;
+// *** CONTEXT_HELP ***
+       context_help_set_keyword("Loading Files");
 }
 
 LoadFileWindow::~LoadFileWindow()
index 06e23d2b1242c2520a0b258142ad68cf2856b107..41e2df822c4737433e86651c4af7f29604a1758f 100644 (file)
@@ -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()
index 58c0d622407d7b14392cde4cf1ae50267e016831..e2902b3bfa62e113ba10c712587478416688ac9c 100644 (file)
@@ -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()
index 3f0c3a7e10fadfa4cddcaf65d157cdaf846e64bd..f51281ce2f5560464217f142d99fe97ac9ee6892 100644 (file)
@@ -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()
index 8c3b8a2d0258e2bb533ed28931ac2f107504c668..7c22885a5345e8ff2a040f3970c8d6301f5d1516 100644 (file)
@@ -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;
 }
 
index 52e3dd389e3babe36df6311d946c91bdcde82970..b9af91f890947060aaec3388530ba5fa66239c9c 100644 (file)
@@ -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)
index b58d770c224814430b22eb7356a0d2fa5b12aa8e..fb16ab319781f529e3be61c1afc21b71d5db208c 100644 (file)
@@ -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)
index 1316a04d3099c5d813feef6168cad925d2fb7407..357b0484306f4a653a735824fe5ddb2d670e5720 100644 (file)
@@ -170,6 +170,7 @@ public:
                ArrayList<BC_ListBoxItem*> *plugin_list);
 
        int handle_event();
+       int keypress_event();
        MenuEffectWindow *window;
 };
 
index 10e01ca0a030b6eb5a57840a4a7340188861adb7..a5398ab94bca2b2ddf85c488f04efc65e759fb1c 100644 (file)
@@ -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");
 }
 
 
index 5a148d38a4b312f4f9d5143d6ec6dff2a9e82261..6e9abcc6260340dcace8b27e35e952b370f5ecaa 100644 (file)
@@ -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()
 {
index 60d71da1b36478d4a818502a73c9e2049f8890e9..41ce4132a7ac3b200af1c5990aaaf962909129ad 100644 (file)
@@ -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()
index 2918e23e63e59e4035bb86e2b07059ea0536fd2e..e5d4bc69ce37dd5d1b8b8c839636989f2c62947e 100644 (file)
@@ -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()
index 1b00a0fb541dbbee3ebe88f2e87a64cc33a3aa3a..f875a14a30bac80becd05082c7d60a9fd5a31c2a 100644 (file)
@@ -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();
 }
 
index 47e467050920d397eb5baa1c49ff8fc13d7e7d8c..f9294cffee1cc1c96f1f8c1e561d4e9eabe7a7f4 100644 (file)
@@ -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()
 {
index fb0339a95be3c9be82aaed956df8bbb1fc3fabce..c2ae534dc4ed137f90c0e35d61ef110aed9ca2c6 100644 (file)
@@ -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,
index fa471477af7e1eb25338f6311be9e2374a252483..1431249d01760cd6801ee0c4891e10aa869eef7c 100644 (file)
@@ -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()
index e13cb2f65f2d4b0a3523146d4822973758ae964c..44545e319f20cf647264945c7097db55c22c0629 100644 (file)
@@ -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()
index e220aba4ec19cfbdaccf4d528d1ed89e059e3bf9..ba7e9ab3f631beb8af33ca6de6901bca7e26db57 100644 (file)
@@ -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()
index 8caf4678bb3493ff5b7e0326ab6d82c5bf5d8d3e..f53b529e79abf60a93674e844f687a0bbd2b4648 100644 (file)
@@ -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()
 {
index 29306b8c5f50e222ba2dce26e973319c6bd895ea..d31b4b002c787bfbee824f252d40e504ebc29ed6 100644 (file)
@@ -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()
index 8063982bfe8ffa652b11cf624af470f050b76e17..48f470e6efaa5888929399794fdfd4ec90ec80f3 100644 (file)
@@ -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()
index 39f9a78fb210cbd78740e098907f2c27009362e7..7c306baa5a326a28c8c9c9e7d80b1cd584d7840f 100644 (file)
@@ -193,6 +193,7 @@ public:
 
        int handle_event();
        int selection_changed();
+       int keypress_event();
        PluginDialog *dialog;
 };
 
index 75d8fe81e5741296b0fdc7c1ee31c4015b09ff55..3ca281e54e6fe08cc1cfa7cf2c104f03b2871998 100644 (file)
@@ -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()
 {
index 47460c7ede46875eb4013ae12d23f03484ed6ec5..e81d742b41e278399b6dfe1c099d59b4fc83318e 100644 (file)
@@ -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()
index 8888a28ad87a616e36badacd18cddd2279440b43..64897df96a338f6a2adef99dddc362bb8f4c1020 100644 (file)
@@ -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()
index ccea32c120c8504483553b30b64d27519be19e4a..768ead5fa7648372069c2d384d13d1d3928bdc42 100644 (file)
@@ -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();
 }
index d425dbce17e6bff9665ce546fd357a1627aecfd9..082d26934342cb8aa022e04d0b643f5e02832e45 100644 (file)
@@ -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)
index 3a77feb65d4798fbaf2df0de7d1959728d7a1232..3342c8d9689ad255cf7780efdc1690d616468e0d 100644 (file)
@@ -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;
 }
 
index 6c671ba29a3c8e8ddb90d5220e1d0b1bf798402b..04e177cab3e8fdea35b0d262cedaa9a095c98e79 100644 (file)
@@ -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()
index c9bceab985a8c9fb9d08b0a167e7e8325a834d6e..598464c6ae6c981bab208a2213cf32c0e081e839 100644 (file)
@@ -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()
index 2b19e8d4d60d194040308e98c44fb0f400e93717..67a92fbeb2ddf06254465b4fa2e6e364e153c3d6 100644 (file)
@@ -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();
 }
 
index 457d331395e8bf91d7462518851e211d78ea77fa..0907707d6e6311c0935f2e6eb56cdc8c679cc489 100644 (file)
@@ -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()
index 323bebf333f4ccf2dc4530355e8353ffeaf0712c..a7456717556bc3e58e194578bf297de7ab7576c2 100644 (file)
@@ -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()
index dc6564e305802d6fe8da47510de8f6af410a0f9b..f2223b813480a906551520c059310e75f5d8a733 100644 (file)
@@ -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()
index a551c28b4c68ecea7d953ce2ddad1fb4669a118a..c227a56029e0df191f0a4b839f801a8a66fb2e9a 100644 (file)
@@ -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()
 {
index cfd43685fd5b470b949c8bbef7a38b1689ba6f9e..6afdebfc033b12d9529072032643f2b4f84c6542 100644 (file)
@@ -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()
 {
index e8e44b0beeb9bcd5790e314961b38122edd44955..c28f91d8a272276ac2d24ddcbf69cf8a9f44e5ba 100644 (file)
@@ -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)
index e8d5572b82571425656773bae387a40f34bc9d0c..4860a7697a4c7a6076154f7fbae6132f955013f4 100644 (file)
@@ -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);
 }
 
index cbbde0e9fe40fcd76fe5ec474a683c873ff449a5..d57becf70b113aaa64c7ddae42c7b39f764d7e0e 100644 (file)
@@ -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()
index 2c126bf0f8f3b83364d5115bbec85a716e3834c2..6014b50402243a53135e8d86c21e1845134fc667 100644 (file)
@@ -156,7 +156,7 @@ int TipWindowGUI::keypress_event()
                set_done(0);
                break;
        }
-       return 0;
+       return context_help_check_and_show();
 }
 
 
index c6722e794db0d42d53456dfb66817aaf99c18d3f..d15f9a3774f0978adece81815e2adc412342b89e 100644 (file)
@@ -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()
 {
index 15f8db630e6233c13506fde87251866c11c8cc38..2f7358acb616e70713e7a310af979ce47a9afbd8 100644 (file)
@@ -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);
index f22825e44bc1fb78b5da244311996eb40bc30aba..576a48babddd7a9c15a3f45c9ef9079ae8f428a6 100644 (file)
@@ -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()
index 5922a8810e0e3b5cc9cf1352534e8f6fc73fb402..2a73b772f1f4c323971a1a24ee1ac3a81850fe44 100644 (file)
@@ -148,6 +148,8 @@ TransitionLengthDialog::TransitionLengthDialog(MWindow *mwindow,
 {
        this->mwindow = mwindow;
        this->thread = thread;
+// *** CONTEXT_HELP ***
+       context_help_set_keyword("Transition Plugins");
 }
 
 TransitionLengthDialog::~TransitionLengthDialog()
index 3245c168c746aaea789f855172e0b745db60c4df..9d718b423546fb7d8d2a853304c64b96fb818f0c 100644 (file)
@@ -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;
 }
index cab73d7991dc39f099008edd7fd06bdd58669d4a..53ec27fb3af0d935b5d14f6d7b9df0ba56a0c63e 100644 (file)
@@ -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()
index 80447e881351ccdd668105cb0ab2f0f3a52b84c5..e575c796270ba9bffb29f285c385ccb192962a85 100644 (file)
@@ -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()
index e789d1f0026dd8273ab208a004c7bbb23e68d0f3..196b2980630197ee7ee8f65bb24590523ceed882 100644 (file)
@@ -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;
 }
 
index d8d3ccc35faf001b8869e1965bf6d66db3d8e2ff..b09223ad895674616ceef6ce04cc49fd1737ec10 100644 (file)
@@ -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()
index 5e9dcd5bd32b239294792ff13c5eebd0b2432535..b18186890db59650a8383c7b20d9a772db8a5196 100644 (file)
@@ -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()
index 722e6c14988dc7c7186ffc9f9e2991684a18cfdc..94b52e1c802e642f119af86bd19a0b60a1abe199 100644 (file)
@@ -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 (executable)
index 0000000..cbb1434
--- /dev/null
@@ -0,0 +1,228 @@
+#!/usr/bin/perl
+
+# Helper script for context help in Cinelerra
+# Calling: ContextManual.pl "<help keyphrase>"
+# 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 &amp; 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 (<CONTENTS>)
+{
+  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 (<CONTENTS>)
+  {
+    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 (<INDEX>)
+  {
+    chomp;
+    # Cut off anchor: xdg-open does not like it
+    last if ($node) = /<A\s+HREF=\"(.+?\.html)(?:#\d+)?\">\s*$help_key\s*<\/A>$/;
+    # Retain anchor
+#    last if ($node) = /<A\s+HREF=\"(.+?\.html(?:#\d+)?)\">\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 (<INDEX>)
+  {
+    chomp;
+    # Cut off anchor: xdg-open does not like it
+    last if ($node) = /<A\s+HREF=\"(.+?\.html)(?:#\d+)?\">.*?$help_key.*?<\/A>$/i;
+    # Retain anchor
+#    last if ($node) = /<A\s+HREF=\"(.+?\.html(?:#\d+)?)\">.*?$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 (<CONTENTS>)
+    {
+      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 (<CONTENTS>)
+    {
+      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;
index 3b5d7350d35612213d2aaf3a7aa67aef88aa8e1e..25cc9d34c8e9c15311283744a48451cc47df8f06 100644 (file)
@@ -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:
index 03256e60f3b7a68bd8d633e43b07d1b377d14767..00eb8cb716015c84c6f73e13b468b184ab44aafe 100644 (file)
@@ -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();
 }
 
 
index ca88ead281760bb0a5a19c4eb4c10358761aef8b..638081f5166a0c861d0139f88fab3801008e17cc 100644 (file)
@@ -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()
index ae341879caf4f22372e98a4c5ea266e51b0658ee..df5b6f0f32c2de420208d8dc4f323aba575a3e10 100644 (file)
@@ -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;
 }
 
index 7d7cc2b27c27ce74f2125debcb4503a46b5a9c30..4ed2baa8d84d3baa90496822a81d69e4c8198de7 100644 (file)
@@ -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;
 }
 
index 6b91b33c6e067011074d4e76cf3c9393d03baf71..c5ad40ca17005c77d6af26b121bde95723b3fafa 100644 (file)
@@ -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()
index f8b53fe0f7400c00df376b4be8b136677724aa7c..9a07c3ba826e316dd220e1a21c218f42ed200025 100644 (file)
@@ -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()
index b81da1fb35e261568755a89d4c09e7dd766a3280..afbf7147734cb171dfd578fdccd965a1e6e0b9a6 100644 (file)
@@ -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();
index 9f3e2123c843c7e0f336ae1d4c53105b03b04a71..93279934cb9b56fa4ac5615357ba5a4915b0a6ac 100644 (file)
@@ -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;
index e4eb8ba4c812354305d27a2fea44b078b93a94dd..2feaf66cebcb1e798ed807697473723a90d37803 100644 (file)
@@ -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;
index 6d62e8737765e5f9acc9c52876122ec0bbf6cd5f..c7b99463e8a6dc1832e612cfb36d769f7a5e6057 100644 (file)
@@ -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");
 }
 
 
index 28acfeb47389b0883325333098650b4f965186ab..61314662088b8c60ce24305c6108834fc5ca7e85 100644 (file)
@@ -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()
index f0d2db4cb6e13f8a4573dd3846d4d8e923ab8c23..d55f2cd5eadc5e8367a347dec012f4623036bbea 100644 (file)
@@ -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;
 }
 
index 7a99221df8a0d53912791577af0dc7a433ffaf4d..3fb5c066538f165e475eb8e4078879cd90f64ed7 100644 (file)
@@ -872,7 +872,7 @@ int GraphicGUI::keypress_event()
                        }
                }
        }
-       return 0;
+       return context_help_check_and_show();
 }
 
 
index 49e9a91a1314a960079c0dc7c376be1c028cfb66..b36c7b0b8999b6d8b43dcdb26800e342e6b6d3ff 100644 (file)
+++ b/