示例#1
0
void AudioBox::OnVerticalLink(agi::OptionValue const& opt) {
	if (opt.GetBool()) {
		int pos = mid(1, VerticalZoom->GetValue(), 100);
		double value = pow(pos / 50.0, 3);
		controller->SetVolume(value);
		VolumeBar->SetValue(pos);
	}
	VolumeBar->Enable(!opt.GetBool());
}
示例#2
0
void BaseGrid::OnHighlightVisibleChange(agi::OptionValue const& opt) {
	if (opt.GetBool()) {
		seek_listener.Unblock();
	}
	else {
		seek_listener.Block();
	}
}
示例#3
0
void VideoPositionMarkerProvider::OptChanged(agi::OptionValue const& opt) {
	if (opt.GetBool()) {
		video_seek_slot.Unblock();
		marker.reset(new VideoPositionMarker);
		marker->SetPosition(vc->GetFrameN());
	}
	else {
		video_seek_slot.Block();
		marker.reset();
	}
}
示例#4
0
void FrameMain::EnableToolBar(agi::OptionValue const& opt) {
	if (opt.GetBool()) {
		if (!GetToolBar()) {
			toolbar::AttachToolbar(this, "main", context.get(), "Default");
			GetToolBar()->Realize();
		}
	}
	else if (wxToolBar *old_tb = GetToolBar()) {
		SetToolBar(nullptr);
		delete old_tb;
		Layout();
	}
}
示例#5
0
void Pen::OnWidthChanged(agi::OptionValue const& opt) {
	impl.SetWidth(opt.GetInt());
}
示例#6
0
void Pen::OnColourChanged(agi::OptionValue const& opt) {
	impl.SetColour(to_wx(opt.GetColor()));
}
示例#7
0
void TimeEdit::OnInsertChanged(agi::OptionValue const& opt) {
	insert = !opt.GetBool();
}
示例#8
0
void AudioTimingControllerKaraoke::OnAutoCommitChange(agi::OptionValue const& opt) {
	auto_commit = opt.GetBool();
}
示例#9
0
void FrameMain::OnVideoDetach(agi::OptionValue const& opt) {
	if (opt.GetBool())
		SetDisplayMode(0, -1);
	else if (context->videoController->IsLoaded())
		SetDisplayMode(1, -1);
}