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()); }
void BaseGrid::OnHighlightVisibleChange(agi::OptionValue const& opt) { if (opt.GetBool()) { seek_listener.Unblock(); } else { seek_listener.Block(); } }
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(); } }
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(); } }
void TimeEdit::OnInsertChanged(agi::OptionValue const& opt) { insert = !opt.GetBool(); }
void AudioTimingControllerKaraoke::OnAutoCommitChange(agi::OptionValue const& opt) { auto_commit = opt.GetBool(); }
void FrameMain::OnVideoDetach(agi::OptionValue const& opt) { if (opt.GetBool()) SetDisplayMode(0, -1); else if (context->videoController->IsLoaded()) SetDisplayMode(1, -1); }