AboutPrefs::AboutPrefs(MWindow *mwindow, PreferencesWindow *pwindow)
: PreferencesDialog(mwindow, pwindow)
{
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("About");
}
AboutPrefs::~AboutPrefs()
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) {
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) {
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);
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);
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);
&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;
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:
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;
}
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;
}
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;
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
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;
}
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();
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();
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;
}
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();
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;
}
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;
}
: MixPatch(mwindow, patch, x, y)
{
set_tooltip(_("Mixer"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Recover Mixer Windows");
}
AMixPatch::~AMixPatch()
thumbnails = 0;
thumbnail_size = 0;
vicon_size = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Appearance");
}
AppearancePrefs::~AppearancePrefs()
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;
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,
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);
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;
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));
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;
}
detail_dialog = 0;
win_width = 0;
win_height = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Info Asset Details");
}
asset->add_user();
info[0] = 0;
text = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Info Asset Details");
}
DetailAssetWindow::~DetailAssetWindow()
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()
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()
{
this->mwindow = mwindow;
data = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Resources Window");
}
AssetRemoveWindow::~AssetRemoveWindow()
int AVC1394GUISeekStart::keypress_event()
{
if(get_keypress() == HOME) return handle_event();
- return 0;
+ return context_help_check_and_show();
}
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)
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)
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)
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,
int AVC1394GUIPause::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
AVC1394GUIFForward::AVC1394GUIFForward(MWindow *mwindow, AVC1394Control *avc, int x, int y)
int AVC1394GUIFForward::keypress_event()
{
if(get_keypress() == KPENTER) return handle_event();
- return 0;
+ return context_help_check_and_show();
}
int AVC1394GUISeekEnd::keypress_event()
{
if(get_keypress() == END) return handle_event();
- return 0;
+ return context_help_check_and_show();
}
#endif
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()
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::
int AWindowGUI::keypress_event()
{
+ char title[BCTEXTLEN];
+ PluginServer* plugin = 0;
switch( get_keypress() ) {
case 'w': case 'W':
if( ctrl_down() ) {
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();
}
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;
}
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, "")
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;
this->mwindow = mwindow;
this->thread = thread;
use_renderfarm = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Batch Rendering");
}
BatchRenderGUI::~BatchRenderGUI()
int BatchRenderSaveList::keypress_event() {
if( get_keypress() == 's' ||
get_keypress() == 'S' ) return handle_event();
- return 0;
+ return context_help_check_and_show();
}
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,
thread->gui->set_done(1);
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
//new help button
int CreateBD_OK::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
need_farmed = 0;
ok = 0;
cancel = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("DVD and Bluray Creation");
}
CreateBD_GUI::~CreateBD_GUI()
x, y, xS(w), yS(h), -1, -1, 0, 0, 1)
{
this->thread = thread;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("User Folders");
}
NewFolderGUI::~NewFolderGUI()
: 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()
-1, -1, allow_resize, 0, 1)
{
this->thread = thread;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("User Folders");
}
ModifyTargetGUI::~ModifyTargetGUI()
want_directory, // Want only directories
0, theme->browse_pad)
{
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Loading Files");
}
BrowseButtonWindow::~BrowseButtonWindow()
set_fullscreen(0, 1);
break;
default:
- return 0;
+ return caller->context_help_check_and_show();
}
return 1;
}
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()
0, 0, 0, 0, 1)
{
this->gui = gui;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Initial Setup for DVB Capture");
}
void ConfirmScan::create_objects()
this->channel_picker = channel_picker;
this->window = window;
this->thread = thread;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Initial Setup for DVB Capture");
}
ChannelEditEditWindow::~ChannelEditEditWindow()
{
{
this->thread = thread;
this->channel_picker = channel_picker;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Initial Setup for DVB Capture");
}
ChannelEditPictureWindow::~ChannelEditPictureWindow()
{
channel_picker->set_picture(device_id, get_value());
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
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()
int ChannelInfoOK::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
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()
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()
channel_picker->current_channel_name(),
x, y, 200, 300)
{
-
this->channel_picker = channel_picker;
}
: BC_Tumbler(x, y)
{
this->channel_picker = channel_picker;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Initial Setup for DVB Capture");
}
ChannelTumbler::~ChannelTumbler()
{
return 1;
}
else
- return 0;
+ return context_help_check_and_show();
}
{
this->mwindow = mwindow;
this->thread = thread;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Workflow with OpenEDL and Nested Clips");
}
ClipEditWindow::~ClipEditWindow()
ColorGUI(this)
{
this->thread = thread;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Title");
}
ColorWindow::~ColorWindow()
{
if( toupper(get_keypress()) == *get_text() )
return handle_event();
- return 0;
+ return context_help_check_and_show();
}
ConfirmQuitNoButton::ConfirmQuitNoButton(MWindow *mwindow,
{
if( toupper(get_keypress()) == *get_text() )
return handle_event();
- return 0;
+ return context_help_check_and_show();
}
ConfirmQuitCancelButton::ConfirmQuitCancelButton(MWindow *mwindow,
int ConfirmQuitCancelButton::keypress_event()
{
if(get_keypress() == ESC) return handle_event();
- return 0;
+ return context_help_check_and_show();
}
_(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());
this->mwindow = mwindow;
this->dialog = dialog;
format_tools = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Transcode");
}
ConvertWindow::~ConvertWindow()
this->mwindow = mwindow;
this->gui = gui;
set_tooltip(_("Protect video from changes (F1)"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Compositor Toolbar");
}
CPanelProtect::~CPanelProtect()
{
this->mwindow = mwindow;
this->gui = gui;
set_tooltip(_("Edit mask (F3)"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Masks");
}
CPanelMask::~CPanelMask()
{
this->mwindow = mwindow;
this->gui = gui;
set_tooltip(_("Ruler (F4)"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Compositor Toolbar");
}
CPanelRuler::~CPanelRuler()
{
this->mwindow = mwindow;
this->gui = gui;
set_tooltip(_("Zoom view (F2)"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Compositor Toolbar");
}
CPanelMagnify::~CPanelMagnify()
{
this->mwindow = mwindow;
this->gui = gui;
set_tooltip(_("Adjust camera automation (F5)"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Camera and Projector");
}
CPanelCamera::~CPanelCamera()
{
this->mwindow = mwindow;
this->gui = gui;
set_tooltip(_("Adjust projector automation (F6)"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Camera and Projector");
}
CPanelProj::~CPanelProj()
{
this->mwindow = mwindow;
this->gui = gui;
set_tooltip(_("Crop a layer or output (F7)"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Cropping");
}
CPanelCrop::~CPanelCrop()
this->mwindow = mwindow;
this->gui = gui;
set_tooltip(_("Get color (F8)"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Compositor Toolbar");
}
CPanelEyedrop::~CPanelEyedrop()
this->mwindow = mwindow;
this->gui = gui;
set_tooltip(_("Show tool info (F9)"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Compositor Toolbar");
}
CPanelToolWindow::~CPanelToolWindow()
this->mwindow = mwindow;
this->gui = gui;
set_tooltip(_("Show safe regions (F10)"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Compositor Toolbar");
}
CPanelTitleSafe::~CPanelTitleSafe()
{
{
this->mwindow = mwindow;
this->gui = gui;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Preview Region Usage");
}
int CTimeBar::resize_event()
control_out_x = control_out_y = 0;
translating_zoom = 0;
highlighted = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Compositor Window");
}
CWindowGUI::~CWindowGUI()
if( !result )
result = transport->keypress_event();
+ if( !result )
+ result = context_help_check_and_show();
+
return result;
}
result = 1;
}
- return result;
+ if( result ) return result;
+ return context_help_check_and_show();
}
int CWindowToolGUI::translation_event()
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
const char *CWindowCropOpMode::crop_ops[] = {
CWindowCropGUI::CWindowCropGUI(MWindow *mwindow, CWindowTool *thread)
: CWindowToolGUI(mwindow, thread, _(PROGRAM_NAME ": Crop"), xS(330), yS(100))
{
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Cropping");
}
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()
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()
{
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;
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));
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()
{
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;
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));
markers = 1;
boundary = 1;
preset_dialog = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Masks");
}
CWindowMaskGUI::~CWindowMaskGUI()
{
: 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()
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()
int CreateDVD_OK::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
need_farmed = 0;
ok = 0;
cancel = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("DVD and Bluray Creation");
}
CreateDVD_GUI::~CreateDVD_GUI()
{
this->mwindow = mwindow;
this->thread = thread;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Edit Length");
}
EditLengthDialog::~EditLengthDialog()
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Toggle label at current position ( l )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Labels");
}
EditLabelbutton::~EditLabelbutton()
{
if( get_keypress() == 'l' && !alt_down() )
return handle_event();
- return 0;
+ return context_help_check_and_show();
}
int EditLabelbutton::handle_event()
{
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Next label ( ctrl -> )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Labels");
}
EditNextLabel::~EditNextLabel()
{
return 1;
}
}
- return 0;
+ return context_help_check_and_show();
}
int EditNextLabel::handle_event()
{
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Previous label ( ctrl <- )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Labels");
}
EditPrevLabel::~EditPrevLabel()
{
return 1;
}
}
- return 0;
+ return context_help_check_and_show();
}
int EditPrevLabel::handle_event()
{
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Previous edit (alt <- )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Snapping while Cutting and Dragging");
}
EditPrevEdit::~EditPrevEdit()
{
return 1;
}
}
- return 0;
+ return context_help_check_and_show();
}
int EditPrevEdit::handle_event()
{
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Next edit ( alt -> )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Snapping while Cutting and Dragging");
}
EditNextEdit::~EditNextEdit()
{
return 1;
}
}
- return 0;
+ return context_help_check_and_show();
}
int EditNextEdit::handle_event()
{
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Copy ( c )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Cut and Paste Editing");
}
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()
{
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Overwrite ( b )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Two Screen Editing");
}
EditOverwrite::~EditOverwrite()
{
}
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
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("In point ( [ or < )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("In\\/Out Points");
}
EditInPoint::~EditInPoint()
{
return 1;
}
}
- return 0;
+ return context_help_check_and_show();
}
//set_outpoint
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Out point ( ] or > )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("In\\/Out Points");
}
EditOutPoint::~EditOutPoint()
{
return 1;
}
}
- return 0;
+ return context_help_check_and_show();
}
//splice_selection
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Splice ( v )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Two Screen Editing");
}
EditSplice::~EditSplice()
{
}
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
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("To clip ( i )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Two Screen Editing");
}
EditToClip::~EditToClip()
{
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
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Split | Cut ( x )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Cut and Paste Editing");
}
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()
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Paste ( v )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Cut and Paste Editing");
}
EditPaste::~EditPaste()
{
{
if( get_keypress() == 'v' && !ctrl_down() )
return handle_event();
- return 0;
+ return context_help_check_and_show();
}
int EditPaste::handle_event()
{
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()
{
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
int EditFit::handle_event()
{
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()
{
panel->panel_fit_autos(!ctrl_down() ? 1 : 0);
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
int EditFitAutos::handle_event()
{
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()
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()
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()
panel->panel_set_auto_keyframes(value);
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
//set_span_keyframes
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Allow keyframe spanning"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Allow Keyframe Spanning");
}
int SpanKeyFrameButton::handle_event()
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()
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()
{
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
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()
{
panel->set_click_to_play(value);
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Commercial ( shift A )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("The commercial DB");
}
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()
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()
{
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()
{
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Redo ( shift Z )"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Transport and Buttons Bar");
}
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()
{
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("View scope"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Videoscope");
}
EditPanelScope::~EditPanelScope()
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()
this->panel = panel;
tc_dialog = 0;
set_tooltip(_("Set Timecode"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Align Timecodes");
}
EditPanelTimecode::~EditPanelTimecode()
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()
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();
{
this->parent_window = parent_window;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
void AC3ConfigAudio::create_objects()
{
this->parent_window = parent_window;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
DVConfigAudio::~DVConfigAudio()
{
this->parent_window = parent_window;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
DVConfigVideo::~DVConfigVideo()
{
this->parent_window = parent_window;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
EXRConfigVideo::~EXRConfigVideo()
audio_options = 0;
format_name = asset->fformat;
codec_name = asset->acodec;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Options for Render with FFmpeg");
}
FFMPEGConfigAudio::~FFMPEGConfigAudio()
bitrate = 0;
quality = 0;
video_options = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Options for Render with FFmpeg");
}
FFMPEGConfigVideo::~FFMPEGConfigVideo()
format_options = 0;
format_name = asset->fformat;
codec_name = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Modifying FFmpeg Format Options");
}
FFMPEGConfigFormat::~FFMPEGConfigFormat()
this->dialog = dialog;
this->selected = 0;
this->kind = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Modifying FFmpeg Format Options");
}
FFOptionsWindow::~FFOptionsWindow()
{
this->parent_window = parent_window;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
FLACConfigAudio::~FLACConfigAudio()
xS(375), yS(300), xS(375), yS(300))
{
this->mwindow = mwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
FileFormat::~FileFormat()
{
this->parent_window = parent_window;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
JPEGConfigVideo::~JPEGConfigVideo()
{
this->parent_window = parent_window;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
MPEGConfigAudio::~MPEGConfigAudio()
this->parent_window = parent_window;
this->asset = asset;
reset_cmodel();
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
MPEGConfigVideo::~MPEGConfigVideo()
{
this->parent_window = parent_window;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
OGGConfigAudio::~OGGConfigAudio()
{
this->parent_window = parent_window;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
OGGConfigVideo::~OGGConfigVideo()
compression = 0;
depth8 = 0;
depth16 = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
PNGConfigVideo::~PNGConfigVideo()
{
this->gui = gui;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
void PPMConfigVideo::create_objects()
{
this->parent_window = parent_window;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
SndFileConfig::~SndFileConfig()
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()
{
this->parent_window = parent_window;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
TIFFConfigVideo::~TIFFConfigVideo()
{
this->parent_window = parent_window;
this->asset = asset;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
VorbisConfigAudio::~VorbisConfigAudio()
{
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));
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;
//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 {
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;
}
this->mwindow = mwindow;
camera_xyz = 0;
projector_xyz = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Show Overlays");
}
GWindowGUI::~GWindowGUI()
N_("Titles"),
N_("Transitions"),
N_("Plugin Keyframes"),
- N_("Hard Edges"),
+ N_("Hard Edges")
};
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,
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;
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);
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);
}
break;
}
- return 0;
+ return context_help_check_and_show();
}
int GWindowGUI::check_xyz(int group)
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];
max_db = 0;
shbtn_dialog = 0;
file_probe_dialog = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Interface");
}
InterfacePrefs::~InterfacePrefs()
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;
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;
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)
_("Scan for commercials during toc build"))
{
this->pwindow = pwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("The commercial DB");
}
int ScanCommercials::handle_event()
{
{
this->mwindow = mwindow;
this->thread = thread;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Saved Plugin Presets");
}
void KeyFrameWindow::create_objects()
}
}
}
- return 0;
+ return context_help_check_and_show();
}
{
this->mwindow = mwindow;
this->thread = thread;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Labels");
}
LabelEditWindow::~LabelEditWindow()
{
this->thread = thread;
this->mwindow = mwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Sound Level Meters Window");
}
LevelWindowGUI::~LevelWindowGUI()
return 1;
}
}
- return 0;
+ return context_help_check_and_show();
}
int LevelWindowGUI::reset_over()
{
this->thread = thread;
this->mwindow = mwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Loading Files");
}
LoadFileWindow::~LoadFileWindow()
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()
{
this->gui = gui;
this->mwindow = mwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Program Window");
}
MainMenu::~MainMenu()
: 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()
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()
{
this->gui = gui;
this->mwindow = mwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Transport and Buttons Bar");
}
MButtons::~MButtons()
result = transport->keypress_event();
}
+ if(!result)
+ {
+ result = context_help_check_and_show();
+ }
+
return result;
}
{
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)
file_title = 0;
format_tools = 0;
loadmode = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Rendered Effects");
}
MenuEffectWindow::~MenuEffectWindow()
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
MenuEffectWindowCancel::MenuEffectWindowCancel(MenuEffectWindow *window)
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
MenuEffectWindowList::MenuEffectWindowList(MenuEffectWindow *window,
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)
MenuEffectPrompt::calculate_h(mwindow->gui),
0, 0, 1)
{
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Rendered Effects");
}
int MenuEffectPrompt::calculate_w(BC_WindowBase *gui)
ArrayList<BC_ListBoxItem*> *plugin_list);
int handle_event();
+ int keypress_event();
MenuEffectWindow *window;
};
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()
this->mwindow = mwindow;
this->panel = panel;
set_tooltip(_("Show meters"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Sound Level Meters Window");
}
: 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()
{
{
this->gui = gui;
this->pane = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Time Format section");
}
MTimeBar::MTimeBar(MWindow *mwindow,
{
this->gui = mwindow->gui;
this->pane = pane;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Time Format section");
}
void MTimeBar::create_objects()
{
this->mwindow = mwindow;
this->path = path;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("File by Reference");
}
ConfirmRefWindow::~ConfirmRefWindow()
cwindow_remote_handler = 0;
record_remote_handler = 0;
android_control = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Program Window");
}
if(result)
cursor_motion_event();
+ if(!result)
+ result = context_help_check_and_show();
+
return result;
}
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()
{
this->mwindow = mwindow;
set_tooltip(_("Close EDL"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("OpenEDL");
}
int StackButton::handle_event()
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()
return handle_event();
}
}
- return 0;
+ return context_help_check_and_show();
}
folder = 0;
name = 0;
recent_folder = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Project and Media Attributes");
}
NewWindow::~NewWindow()
{
this->mwindow = mwindow;
this->output = output;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Video In section");
}
int FrameRatePulldown::handle_event()
{
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,
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,
this->mwindow = mwindow;
this->patch = patch;
set_tooltip(_("Master Track"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Displaying tracks: Ganged mode");
}
int MasterPatch::handle_event()
: PreferencesDialog(mwindow, pwindow)
{
hot_node = -1;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Performance");
}
PerformancePrefs::~PerformancePrefs()
char string[BCTEXTLEN];
BC_Resources *resources = BC_WindowBase::get_resources();
BC_WindowBase *win;
+ BC_Title *title;
node_list = 0;
generate_node_list();
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;
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);
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);
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);
// 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();
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,
_("Use render farm"))
{
this->pwindow = pwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Render Farm section");
}
PrefsRenderFarm::~PrefsRenderFarm()
{
_("Force single processor use"))
{
this->pwindow = pwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Performance section");
}
PrefsForceUniprocessor::~PrefsForceUniprocessor()
{
{
this->pwindow = pwindow;
this->subwindow = subwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Render Farm Menu");
}
PrefsRenderFarmNewNode::~PrefsRenderFarmNewNode()
{
{
this->pwindow = pwindow;
this->subwindow = subwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Render Farm Menu");
}
PrefsRenderFarmReplaceNode::~PrefsRenderFarmReplaceNode()
{
{
this->pwindow = pwindow;
this->subwindow = subwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Render Farm Menu");
}
PrefsRenderFarmDelNode::~PrefsRenderFarmDelNode()
{
{
this->pwindow = pwindow;
this->subwindow = subwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Render Farm Menu");
}
PrefsRenderFarmSortNodes::~PrefsRenderFarmSortNodes()
{
this->pwindow = pwindow;
this->subwindow = subwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Render Farm Menu");
}
int PrefsRenderFarmReset::handle_event()
video_device = 0;
audio_offset = 0;
play_gain = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Playback A \\/ Playback B");
}
PlaybackPrefs::~PlaybackPrefs()
// 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
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();
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);
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));
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);
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);
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);
: 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()
: 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()
: 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()
: 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()
{
: 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()
{
: 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()
{
: 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()
{
: 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()
{
: 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()
{
: 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()
{
: 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()
{
: 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()
{
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,
: 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()
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()
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"))
// {
: 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()
: 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()
_("Attach single standalone and share others"))
{
this->dialog = dialog;
+ context_help_set_keyword("Shared Effects and Shared Tracks");
}
int PluginDialogSingle::handle_event()
int handle_event();
int selection_changed();
+ int keypress_event();
PluginDialog *dialog;
};
category = 0;
dialog = 0;
confirm_dialog = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Settings and Preferences");
}
PreferencesWindow::~PreferencesWindow()
{
if( get_keypress() == RETURN )
return handle_event();
- return 0;
+ return context_help_check_and_show();
}
int PreferencesOK::handle_event()
thread->window->set_done(1);
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
int PreferencesCancel::handle_event()
{
probe_enabled = 0;
pb_enabled = 0;
pb_disabled = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Probe Order when Loading Media");
}
ProbeEditWindow::~ProbeEditWindow()
this->mwindow = mwindow;
this->dialog = dialog;
format_tools = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Proxy");
}
ProxyWindow::~ProxyWindow()
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
QuestionNoButton::QuestionNoButton(MWindow *mwindow, QuestionWindow *window, int x, int y)
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
}
total_dropped_frames = 0;
total_clipped_samples = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Record Web Media");
}
RecordGUI::~RecordGUI()
// handle_event();
// return 1;
// }
- return 0;
+ return context_help_check_and_show();
}
RecordGUICancel::RecordGUICancel(RecordGUI *gui)
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
RecordGUIFillFrames::RecordGUIFillFrames(RecordGUI *gui, int x, int y)
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
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()
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
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()
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
{
this->set_underline(6);
this->gui = gui;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Sound Level Meters Window");
}
int RecordGUIAudioMeters::handle_event()
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
RecordPath::RecordPath(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()
{
{
this->gui = gui;
set_tooltip(_("Delete clip."));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Capture at some Future Time via Batch");
}
int RecordGUIDeleteBatch::handle_event()
{
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()
: 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()
{
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()
{
{
this->gui = gui;
set_underline(0);
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Capture at some Future Time via Batch");
}
handle_event();
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
: BC_GenericButton(x, y, _("ClrLbls"))
{
this->gui = gui;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Capture at some Future Time via Batch");
}
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)
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)
big_cursor_toggle = 0;
current_operation = MONITOR_NONE;
signal_status = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Capturing and Recording Media");
}
RecordMonitorGUI::~RecordMonitorGUI()
break;
}
+ if( !result )
+ result = context_help_check_and_show();
+
return result;
}
: PreferencesDialog(mwindow, pwindow)
{
this->mwindow = mwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Recording");
}
RecordPrefs::~RecordPrefs()
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,
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));
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);
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);
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;
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();
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,
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));
_("Record in realtime priority (root only)"))
{
this->pwindow = pwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Audio In section");
}
int RecordRealTime::handle_event()
{
this->pwindow = pwindow;
this->text = text;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Video In section");
}
int CaptureLengthTumbler::handle_up_event()
: BC_CheckBox(x, y, value, _("Sync drives automatically"))
{
this->pwindow = pwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Video In section");
}
int RecordSyncDrives::handle_event()
this->record_monitor = record_monitor;
this->mwindow = mwindow;
set_tooltip(_("View scope"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Videoscope");
}
ScopeEnable::~ScopeEnable()
{
this->record_transport = record_transport;
set_tooltip(_("Start recording\nfrom current position"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Recording Immediately to Capture");
}
RecordGUIRec::~RecordGUIRec()
int RecordGUIRec::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
RecordGUIRecFrame::RecordGUIRecFrame(RecordTransport *record_transport, int x, int y)
{
this->record_transport = record_transport;
set_tooltip(_("RecordTransport single frame"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Recording Immediately to Capture");
}
RecordGUIRecFrame::~RecordGUIRecFrame()
int RecordGUIRecFrame::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
RecordGUIPlay::RecordGUIPlay(RecordTransport *record_transport, int x, int y)
int RecordGUIPlay::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
{
this->record_transport = record_transport;
set_tooltip(_("Stop operation"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Recording Immediately to Capture");
}
RecordGUIStop::~RecordGUIStop()
int RecordGUIStop::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
int RecordGUIPause::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
{
this->record_transport = record_transport;
set_tooltip(_("Start over"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Recording Immediately to Capture");
}
RecordGUIRewind::~RecordGUIRewind()
int RecordGUIRewind::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
int RecordGUIBack::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
int RecordGUIFwd::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
int RecordGUIEnd::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
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()
rangeselection = 0;
rangeinout = 0;
range1frame = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Single File Rendering");
}
RenderWindow::~RenderWindow()
{
this->mwindow = mwindow;
this->thread = thread;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Track and Output Sizes");
}
ResizeVTrackWindow::~ResizeVTrackWindow()
this->overwrite = overwrite;
this->save_mode = save_mode;
this->reload = reload;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Export Project");
}
SaveProjectWindow::~SaveProjectWindow()
{
this->mwindow = mwindow;
this->thread = thread;
presets = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Project and Media Attributes");
}
SetFormatWindow::~SetFormatWindow()
{
{
this->shbtn_edit = shbtn_edit;
sb_dialog = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Menu Bar Shell Commands");
}
ShBtnEditWindow::~ShBtnEditWindow()
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()
{
this->mwindow = mwindow;
set_tooltip(_("shell cmds"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Menu Bar Shell Commands");
}
int MainShBtns::load(Preferences *preferences)
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);
}
int SWindowOK::keypress_event()
{
- return 0;
+ return context_help_check_and_show();
}
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()
set_done(0);
break;
}
- return 0;
+ return context_help_check_and_show();
}
//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()
{
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);
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()
{
this->mwindow = mwindow;
this->popup = popup;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Track Popup Menu");
}
TrackPopupShowWindow::~TrackPopupShowWindow()
{
this->mwindow = mwindow;
this->thread = thread;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Transition Plugins");
}
TransitionLengthDialog::~TransitionLengthDialog()
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)
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();
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()
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;
}
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
}
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;
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;
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;
}
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;
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;
}
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;
}
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;
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;
}
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)
: MixPatch(mwindow, patch, x, y)
{
set_tooltip(_("Mixer"));
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Recover Mixer Windows");
}
VMixPatch::~VMixPatch()
{
this->mwindow = mwindow;
this->gui = gui;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Preview Region Usage");
}
int VTimeBar::resize_event()
// source = 0;
strcpy(loaded_title, "");
highlighted = 0;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Viewer Window");
}
VWindowGUI::~VWindowGUI()
}
if( !result )
result = transport->keypress_event();
+ if( !result )
+ result = context_help_check_and_show();
return result;
}
{
this->gui = gui;
this->mwindow = mwindow;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Zoom Panel");
}
ZoomBar::~ZoomBar()
{
this->mwindow = mwindow;
this->panel = panel;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Compositor Controls");
}
ZoomPopup::~ZoomPopup()
{
this->mwindow = mwindow;
this->panel = panel;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Compositor Controls");
}
ZoomTumbler::~ZoomTumbler()
playback_engine = 0;
highlighted = 0;
playable = zwindow->playable;
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Multi-Camera");
}
ZWindowGUI::~ZWindowGUI()
lock_window("ZWindowGUI::keypress_event 1");
}
+ if( !result )
+ result = context_help_check_and_show();
+
return result;
}
--- /dev/null
+#!/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 & 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;
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:
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()
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()
int BC_OKTextButton::keypress_event()
{
if(get_keypress() == RETURN) return handle_event();
- return 0;
+ return context_help_check_and_show();
}
int BC_CancelTextButton::keypress_event()
{
if(get_keypress() == ESC) return handle_event();
- return 0;
+ return context_help_check_and_show();
}
set_done(1);
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
int BC_FileBox::close_event()
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__);
//printf("BC_ListBox::keypress_event %d\n", __LINE__);
}
+ if( !result )
+ result = context_help_check_and_show();
+
return result;
}
result = menu_titles.values[i]->dispatch_keypress();
}
}
+ if (!result) result = context_help_check_and_show();
return result;
}
show_value_tooltip();
draw(1);
handle_event();
+ return result;
}
- return result;
+
+ return context_help_check_and_show();
}
int BC_Pot::cursor_enter_event()
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())
{
handle_event();
show_value_tooltip();
draw_face(1);
+ return result;
}
- return result;
+
+ return context_help_check_and_show();
}
int BC_Slider::cursor_enter_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();
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;
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;
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;
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; };
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();
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];
int shared_bg_pixmap;
char title[BCTEXTLEN];
+// *** CONTEXT_HELP ***
+ char context_help_keyword[BCTEXTLEN];
+
// X Window parameters
int screen;
Window rootwin;
: 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");
}
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()
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())
{
plugin->send_configure_change();
gui->update();
}
+ else result = context_help_check_and_show();
return result;
}
}
}
}
- return 0;
+ return context_help_check_and_show();
}
}
}
+ if (! result)
+ result = context_help_check_and_show();
+
return result;
}
result = 1;
}
}
+ if( !result )
+ result = context_help_check_and_show();
return result;
}
: BC_Window(_(PROGRAM_NAME ": Normalize"), x - xS(160), y - yS(75),
xS(320), yS(150), xS(320), yS(150), 0, 0, 1)
{
+// *** CONTEXT_HELP ***
+ context_help_set_keyword("Rendered Audio Effects");
}
NormalizeWindow::~NormalizeWindow()
1)
{
this->plugin = plugin;
+// *** CONTEXT_HELP ***
+ if(plugin) context_help_set_keyword(plugin->plugin_title());
+ else context_help_set_keyword("Rendered Video Effects");
}
ReFrameWindow::~ReFrameWindow()
1)
{
this->plugin = plugin;
+// *** CONTEXT_HELP ***
+ if(plugin) context_help_set_keyword(plugin->plugin_title());
+ else context_help_set_keyword("Rendered Audio Effects");
}
void ResampleWindow::create_objects()
del_curve->handle_event() :
del_point->handle_event() ;
}
- return 0;
+ return context_help_check_and_show();
}
set_done(1);
return 1;
}
- return 0;
+ return context_help_check_and_show();
}
int SynthWindow::resize_event(int w, int h)
int SynthNote::keypress_event()
{
+// Evtl catch Alt/H
+ if (get_keypress() == 'h' && alt_down())
+ {
+ context_help_show();
+ return 1;
+ }
+
if(number >= FIRST_TITLE && number < LAST_TITLE)
{
if(get_keypress() == keyboard_map[number - FIRST_TITLE][0])
1)
{
this->plugin = plugin;
+// *** CONTEXT_HELP ***
+ if(plugin) context_help_set_keyword(plugin->plugin_title());
+ else context_help_set_keyword("Rendered Audio Effects");
}