void SlideSorter::Init()
{ if (mpViewShellBase != nullptr)
mxControllerWeak = mpViewShellBase->GetController();
// Reinitialize colors in Properties with window specific values. if (mpContentWindow)
{
mpProperties->SetBackgroundColor(
mpContentWindow->GetSettings().GetStyleSettings().GetWindowColor());
mpProperties->SetSelectionColor(
mpContentWindow->GetSettings().GetStyleSettings().GetMenuHighlightColor());
}
CreateModelViewController ();
SetupListeners ();
// Initialize the window.
sd::Window *pContentWindow = GetContentWindow().get(); if (!pContentWindow) return;
vcl::Window* pParentWindow = pContentWindow->GetParent(); if (pParentWindow != nullptr)
pParentWindow->SetBackground(Application::GetSettings().GetStyleSettings().GetFaceColor());
pContentWindow->SetBackground(Wallpaper());
pContentWindow->SetViewOrigin (Point(0,0)); // We do our own scrolling while dragging a page selection.
pContentWindow->SetUseDropScroll (false); // Change the winbits so that the active window accepts the focus.
pContentWindow->SetStyle ((pContentWindow->GetStyle() & ~WB_DIALOGCONTROL) | WB_TABSTOP);
pContentWindow->Hide();
// Set view pointer of base class.
SetupControls();
}
SlideSorter::~SlideSorter()
{
ReleaseListeners();
// Dispose model, view and controller to avoid calls between them when // they are being destructed and one or two of them are already gone.
mpSlideSorterController->Dispose();
mpSlideSorterView->Dispose();
mpSlideSorterModel->Dispose();
// Reset the auto pointers explicitly to control the order of destruction.
mpSlideSorterController.reset();
mpSlideSorterView.reset();
mpSlideSorterModel.reset();
void SlideSorter::CreateModelViewController()
{
mpSlideSorterModel.reset(CreateModel());
DBG_ASSERT(mpSlideSorterModel != nullptr, "Can not create model for slide browser");
// Now that model, view, and controller are constructed, do the // initialization that relies on all three being in place.
mpSlideSorterController->Init();
mpSlideSorterView->Init();
}
model::SlideSorterModel* SlideSorter::CreateModel()
{ // Get pointers to the document.
ViewShellBase* pViewShellBase = GetViewShellBase(); if (pViewShellBase != nullptr)
{
assert (pViewShellBase->GetDocument() != nullptr);
void SlideSorter::RelocateToWindow (vcl::Window* pParentWindow)
{ // Stop all animations for they have been started for the old window.
mpSlideSorterController->GetAnimator()->RemoveAllAnimations();
// For accessibility we have to shortly hide the content window. This // triggers the construction of a new accessibility object for the new // view shell. (One is created earlier while the constructor of the base // class is executed. But because at that time the correct // accessibility object can not be constructed we do that now.) if (mpContentWindow)
{
mpContentWindow->Hide();
mpContentWindow->Show();
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.