int VWindowGUI::keypress_event()
{
	int result = 0;
	switch(get_keypress())
	{
		case 'w':
		case 'W':
			close_event();
			result = 1;
			break;
		case 'z':
			mwindow->undo_entry(this);
			break;
		case 'Z':
			mwindow->redo_entry(this);
			break;
		case 'f':
			unlock_window();
			if(mwindow->session->vwindow_fullscreen)
				canvas->stop_fullscreen();
			else
				canvas->start_fullscreen();
			lock_window("VWindowGUI::keypress_event 1");
			break;
		case ESC:
			unlock_window();
			if(mwindow->session->vwindow_fullscreen)
				canvas->stop_fullscreen();
			lock_window("VWindowGUI::keypress_event 2");
			break;
	}
	if(!result) result = transport->keypress_event();
	
	return result;
}
Beispiel #2
0
void MainError::show_error_local(const char *string)
{
SET_TRACE
// assume user won't get to closing the GUI here
	lock_window("MainError::show_error_local");
SET_TRACE
	if(get_gui())
	{
SET_TRACE
		MainErrorGUI *gui = (MainErrorGUI*)get_gui();
		gui->lock_window("MainError::show_error_local");
SET_TRACE
		append_error(string);
SET_TRACE
		gui->list->update(&errors,
			0,
			0,
			1,
			gui->list->get_xposition(),
			gui->list->get_yposition(),
			gui->list->get_highlighted_item(),  // Flat index of item cursor is over
			0,     // set all autoplace flags to 1
			1);
SET_TRACE
		gui->unlock_window();
		unlock_window();
SET_TRACE
		start();
SET_TRACE
	}
	else
	{
Beispiel #3
0
int BatchRenderStop::handle_event()
{
	unlock_window();
	thread->stop_rendering();
	lock_window("BatchRenderStop::handle_event");
	return 1;
}
Beispiel #4
0
int StopButton::handle_event()
{
	unlock_window();
	transport->handle_transport(STOP, 0, 0);
	lock_window("StopButton::handle_event");
	return 1;
}
Beispiel #5
0
void VorbisConfigAudio::create_objects()
{
	int x = 10, y = 10;
	int x1 = 150;
	char string[BCTEXTLEN];

	lock_window("VorbisConfigAudio::create_objects");
	add_tool(fixed_bitrate = new VorbisFixedBitrate(x, y, this));
	add_tool(variable_bitrate = new VorbisVariableBitrate(x1, y, this));

	y += 30;
	sprintf(string, "%d", asset->vorbis_min_bitrate);
	add_tool(new BC_Title(x, y, _("Min bitrate:")));
	add_tool(new VorbisMinBitrate(x1, y, this, string));

	y += 30;
	add_tool(new BC_Title(x, y, _("Avg bitrate:")));
	sprintf(string, "%d", asset->vorbis_bitrate);
	add_tool(new VorbisAvgBitrate(x1, y, this, string));

	y += 30;
	add_tool(new BC_Title(x, y, _("Max bitrate:")));
	sprintf(string, "%d", asset->vorbis_max_bitrate);
	add_tool(new VorbisMaxBitrate(x1, y, this, string));


	add_subwindow(new BC_OKButton(this));
	show_window();
	flush();
	unlock_window();
}
Beispiel #6
0
int FastPlayButton::handle_event() 
{
	unlock_window();
	transport->handle_transport(FAST_FWD, 0, ctrl_down());
	lock_window("FastPlayButton::handle_event");
	return 1;
}
Beispiel #7
0
int ReverseButton::handle_event()
{
	unlock_window();
	transport->handle_transport(NORMAL_REWIND, 0, ctrl_down());
	lock_window("ReverseButton::handle_event");
	return 1;
}
Beispiel #8
0
int RecordGUIStop::handle_event()
{
	unlock_window();
	record_transport->stop_writing();
	lock_window("RecordGUIStop::handle_event");
	return 1;
}
Beispiel #9
0
int FramePlayButton::handle_event()
{
	unlock_window();
	transport->handle_transport(SINGLE_FRAME_FWD, 0, ctrl_down());
	lock_window("FramePlayButton::handle_event");
	return 1;
}
Beispiel #10
0
int ChannelEditMoveDown::handle_event()
{
	lock_window("ChannelEditMoveDown::handle_event");
	window->move_channel_down();
	unlock_window();
	return 1;
}
void MenuEffectWindow::create_objects()
{
	int x, y;
	result = -1;
	mwindow->theme->get_menueffect_sizes(plugin_list ? 1 : 0);

	lock_window("MenuEffectWindow::create_objects");
// only add the list if needed
	if(plugin_list)
	{
		add_subwindow(list_title = new BC_Title(mwindow->theme->menueffect_list_x, 
			mwindow->theme->menueffect_list_y, 
			_("Select an effect")));
		add_subwindow(list = new MenuEffectWindowList(this, 
			mwindow->theme->menueffect_list_x, 
			mwindow->theme->menueffect_list_y + list_title->get_h() + 5, 
			mwindow->theme->menueffect_list_w,
			mwindow->theme->menueffect_list_h - list_title->get_h() - 5,
			plugin_list));
	}

	add_subwindow(file_title = new BC_Title(
		mwindow->theme->menueffect_file_x, 
		mwindow->theme->menueffect_file_y, 
		(char*)((menueffects->strategy == FILE_PER_LABEL  || menueffects->strategy == FILE_PER_LABEL_FARM) ? 
			_("Select the first file to render to:") : 
			_("Select a file to render to:"))));

	x = mwindow->theme->menueffect_tools_x;
	y = mwindow->theme->menueffect_tools_y;
	format_tools = new FormatTools(mwindow,
					this, 
					asset);
	format_tools->create_objects(x, 
					y, 
					asset->audio_data, 
					asset->video_data, 
					0, 
					0, 
					0,
					1,
					0,
					0,
					&menueffects->strategy,
					0);

	loadmode = new LoadMode(mwindow, 
		this, 
		x, 
		y, 
		&menueffects->load_mode, 
		1,
		0);
	loadmode->create_objects();

	add_subwindow(new MenuEffectWindowOK(this));
	add_subwindow(new MenuEffectWindowCancel(this));
	show_window();
	unlock_window();
}
Beispiel #12
0
int RecordGUIStop::handle_event()
{
	unlock_window();
	record->stop_operation(1);
	lock_window("RecordGUIStop::handle_event");
	return 1;
}
Beispiel #13
0
int PlayButton::handle_event()
{
	unlock_window();
	transport->handle_transport(NORMAL_FWD, 0, ctrl_down());
	lock_window("PlayButton::handle_event");
	return 1;
}
Beispiel #14
0
int RecordGUIRecFrame::handle_event()
{
	unlock_window();
	record->start_recording(0, CONTEXT_SINGLEFRAME);
	lock_window("RecordGUIRecFrame::handle_event");
	return 1;
}
Beispiel #15
0
int RecordGUIPlay::handle_event()
{
	unlock_window();
//	engine->start_preview();
	lock_window();
	return 1;
}
Beispiel #16
0
int RecordGUIRec::handle_event()
{
	unlock_window();
	record->start_recording(0, CONTEXT_INTERACTIVE);
	lock_window("RecordGUIRec::handle_event");
	return 1;
}
void ClipEditWindow::create_objects()
{
	lock_window("ClipEditWindow::create_objects");
	this->create_it = thread->create_it;

	int x = 10, y = 10;
	int x1 = x;
	BC_TextBox *textbox;
	BC_TextBox *titlebox;
	BC_Title *title;

	add_subwindow(title = new BC_Title(x1, y, _("Title:")));
	y += title->get_h() + 5;
	add_subwindow(titlebox = new ClipEditTitle(this, x1, y, get_w() - x1 * 2));
	y += titlebox->get_h() + 10;
	add_subwindow(title = new BC_Title(x1, y, _("Comments:")));
	y += title->get_h() + 5;
	add_subwindow(textbox = new ClipEditComments(this, 
		x1, 
		y, 
		get_w() - x1 * 2, 
		BC_TextBox::pixels_to_rows(this, 
			MEDIUMFONT, 
			get_h() - 10 - BC_OKButton::calculate_h() - y)));



	add_subwindow(new BC_OKButton(this));
	add_subwindow(new BC_CancelButton(this));
	show_window();
	titlebox->activate();
	unlock_window();
}
Beispiel #18
0
int ChannelEditSort::handle_event()
{
	lock_window("ChannelEditSort::handle_event");
	window->sort();
	unlock_window();
	return 1;
}
int RecordGUIStartBatches::handle_event()
{
	unlock_window();
	record->start_recording(0, CONTEXT_BATCH);
	lock_window("RecordGUIStartBatches::handle_event");
	return 1;
}
Beispiel #20
0
int RecordGUIRecFrame::handle_event()
{
	if( record_transport->record->cron_active() > 0 ) return 0;
	unlock_window();
	record_transport->start_writing_file(1);
	lock_window("RecordGUIRecFrame::handle_event");
	return 1;
}
Beispiel #21
0
int BatchRenderCancel::handle_event()
{
	unlock_window();
	thread->stop_rendering();
	lock_window("BatchRenderCancel::handle_event");
	thread->gui->set_done(1);
	return 1;
}
Beispiel #22
0
void ChannelEditWindow::scan_confirm()
{
	channel_picker->load_scan_defaults(&thread->scan_params);
	if(!scan_confirm_thread) scan_confirm_thread = new ConfirmScanThread(this);
	unlock_window();
	scan_confirm_thread->start();
	lock_window("ChannelEditWindow::scan_confirm");
}
Beispiel #23
0
void CreateDVD_GUI::create_objects()
{
	lock_window("CreateDVD_GUI::create_objects");
	int pady = BC_TextBox::calculate_h(this, MEDIUMFONT, 0, 1) + 5;
	int padx = BC_Title::calculate_w(this, (char*)"X", MEDIUMFONT);
	int x = padx/2, y = pady/2;
	BC_Title *title = new BC_Title(x, y, "Title:", MEDIUMFONT, YELLOW);
	add_subwindow(title);
	at_x = x + title->get_w();  at_y = y;
	asset_title = new CreateDVD_AssetTitle(this, at_x, at_y, get_w()-at_x-10);
	add_subwindow(asset_title);
	y += title->get_h() + pady/2;
	title = new BC_Title(x, y, "tmp path:", MEDIUMFONT, YELLOW);
	add_subwindow(title);
	tmp_x = x + title->get_w();  tmp_y = y;
	tmp_path = new CreateDVD_TmpPath(this, tmp_x, tmp_y,  get_w()-tmp_x-10);
	add_subwindow(tmp_path);
	y += title->get_h() + pady/2;
	disk_space = new CreateDVD_DiskSpace(this, x, y);
	add_subwindow(disk_space);
	disk_space->update();
	y += disk_space->get_h() + pady/2;
	need_deinterlace = new CreateDVD_Deinterlace(this, x, y);
	add_subwindow(need_deinterlace);
	int x1 = x + 150, x2 = x1 + 150;
	need_inverse_telecine = new CreateDVD_InverseTelecine(this, x1, y);
	add_subwindow(need_inverse_telecine);
	need_use_ffmpeg = new CreateDVD_UseFFMpeg(this, x2, y);
	add_subwindow(need_use_ffmpeg);
	y += need_deinterlace->get_h() + pady/2;
	need_scale = new CreateDVD_Scale(this, x, y);
	add_subwindow(need_scale);
	need_wide_audio = new CreateDVD_WideAudio(this, x1, y);
	add_subwindow(need_wide_audio);
	need_resize_tracks = new CreateDVD_ResizeTracks(this, x2, y);
	add_subwindow(need_resize_tracks);
	y += need_scale->get_h() + pady/2;
	need_histogram = new CreateDVD_Histogram(this, x, y);
	add_subwindow(need_histogram);
	need_wide_aspect = new CreateDVD_WideAspect(this, x1, y);
	add_subwindow(need_wide_aspect);
	need_label_chapters = new CreateDVD_LabelChapters(this, x2, y);
	add_subwindow(need_label_chapters);
	ok_w = BC_OKButton::calculate_w();
	ok_h = BC_OKButton::calculate_h();
	ok_x = 10;
	ok_y = get_h() - ok_h - 10;
	ok = new CreateDVD_OK(this, ok_x, ok_y);
	add_subwindow(ok);
	cancel_w = BC_CancelButton::calculate_w();
	cancel_h = BC_CancelButton::calculate_h();
	cancel_x = get_w() - cancel_w - 10,
	cancel_y = get_h() - cancel_h - 10;
	cancel = new CreateDVD_Cancel(this, cancel_x, cancel_y);
	add_subwindow(cancel);
	show_window();
	unlock_window();
}
Beispiel #24
0
void PreferencesWindow::update_rates()
{
	lock_window("PreferencesWindow::update_rates");
	if(thread->current_dialog == PreferencesThread::PERFORMANCE)
	{
		dialog->update_rates();
	}
	unlock_window();
}
Beispiel #25
0
int PluginOn::handle_event()
{
	plugin->on = get_value();
	unlock_window();
	mwindow->restart_brender();
	mwindow->sync_parameters(CHANGE_EDL);
	lock_window("PluginOn::handle_event");
	return 1;
}
Beispiel #26
0
int BatchRenderGUI::close_event()
{
// Stop batch rendering
	unlock_window();
	thread->stop_rendering();
	lock_window("BatchRenderGUI::close_event");
	set_done(1);
	return 1;
}
Beispiel #27
0
int RecordMonitorGUI::redraw()
{
	lock_window("RecordMonitorGUI::redraw");
	int w = mwindow->session->rmonitor_w;
	int h = mwindow->session->rmonitor_h;
	int result = resize_event(w, h);
	unlock_window();
	return result;
}
Beispiel #28
0
int RecordMonitorGUI::close_event()
{
	thread->record->set_video_monitoring(0);
	thread->record->set_audio_monitoring(0);
	thread->record->video_window_open = 0;
	unlock_window();
	lock_window("RecordMonitorGUI::close_event");
	hide_window();
	return 0;
}
Beispiel #29
0
int PluginShow::handle_event()
{
	unlock_window();
	if(get_value()) 
		mwindow->show_plugin(plugin);
	else
		mwindow->hide_plugin(plugin, 1);
	lock_window("PluginShow::handle_event");
	return 1;
}
Beispiel #30
0
int PreferencesWindow::update_framerate()
{
	lock_window("PreferencesWindow::update_framerate");
	if(thread->current_dialog < PreferencesThread::RECORD)
	{
		dialog->draw_framerate(1);
//		flash();
	}
	unlock_window();
	return 0;
}