void OutputView::AttachedToWindow() { BView::AttachedToWindow(); SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); // Watch for these from Controller if (fController->LockLooper()) { fController->StartWatching(this, kMsgControllerSourceFrameChanged); fController->StartWatching(this, kMsgControllerTargetFrameChanged); fController->StartWatching(this, kMsgControllerSelectionWindowClosed); fController->StartWatching(this, kMsgControllerMediaFileFormatChanged); fController->UnlockLooper(); } fMinimizeOnStart->SetTarget(this); fFileName->SetTarget(this); fCustomArea->SetTarget(this); fWholeScreen->SetTarget(this); fWindow->SetTarget(this); fScaleSlider->SetTarget(this); fFilePanelButton->SetTarget(this); fScaleSlider->SetValue(Settings().Scale()); Settings().GetCaptureArea(fCustomCaptureRect); if (fCustomCaptureRect == BScreen().Frame()) fWholeScreen->SetValue(B_CONTROL_ON); else { fCustomArea->SetValue(B_CONTROL_ON); fSelectArea->SetEnabled(true); } UpdatePreviewFromSettings(); }
void OutputView::AttachedToWindow() { BView::AttachedToWindow(); SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); fMinimizeOnStart->SetTarget(this); fFileName->SetTarget(this); fOutputFileType->SetTarget(this); fCustomArea->SetTarget(this); fWholeScreen->SetTarget(this); UpdatePreviewFromSettings(); }
void OutputView::UpdateSettings() { Settings settings; if (fWholeScreen->Value() == B_CONTROL_ON) settings.SetCaptureArea(BScreen().Frame()); //BRect captureRect = settings.CaptureArea(); //const float factor = 100; // TODO: set the frame //settings.SetClipFrame(GetScaledRect(captureRect, factor)); UpdatePreviewFromSettings(); BuildCodecMenu(FormatFamily()); fController->SetMediaFormat(fFormat); }