LibreOffice Module sd (master) 1
|
#include <SlideSorterController.hxx>
Classes | |
class | ModelChangeLock |
Create an object of this inner class to prevent updates due to model changes. More... | |
Public Member Functions | |
SlideSorterController (SlideSorter &rSlideSorter) | |
Create a new controller for the slide sorter. More... | |
void | Init () |
Late initialization. More... | |
~SlideSorterController () | |
void | Dispose () |
void | Resize (const ::tools::Rectangle &rAvailableSpace) |
Place and size the scroll bars and the browser window so that the given rectangle is filled. More... | |
void | Rearrange (bool bForce) |
Determine which of the UI elements–the scroll bars, the scroll bar filler, the actual slide sorter view–are visible and place them in the area last passed to Resize(). More... | |
model::SharedPageDescriptor | GetPageAt (const Point &rPixelPosition) |
Return the descriptor of the page that is rendered under the given position. More... | |
SD_DLLPUBLIC PageSelector & | GetPageSelector () |
FocusManager & | GetFocusManager () |
SD_DLLPUBLIC controller::Clipboard & | GetClipboard () |
ScrollBarManager & | GetScrollBarManager () |
Return the object that manages the scroll bars. More... | |
std::shared_ptr< CurrentSlideManager > const & | GetCurrentSlideManager () const |
std::shared_ptr< SlotManager > const & | GetSlotManager () const |
std::shared_ptr< SelectionManager > const & | GetSelectionManager () const |
std::shared_ptr< InsertionIndicatorHandler > const & | GetInsertionIndicatorHandler () const |
void | Paint (const ::tools::Rectangle &rRect, vcl::Window *pWin) |
This method forwards the call to the SlideSorterView and executes pending operations like moving selected pages into the visible area. More... | |
void | FuTemporary (SfxRequest &rRequest) |
void | FuPermanent (SfxRequest &rRequest) |
void | FuSupport (SfxRequest &rRequest) |
bool | Command (const CommandEvent &rEvent, ::sd::Window *pWindow) |
void | GetCtrlState (SfxItemSet &rSet) |
void | GetStatusBarState (SfxItemSet &rSet) |
void | ExecCtrl (SfxRequest &rRequest) |
void | GetAttrState (SfxItemSet &rSet) |
void | HandleModelChange () |
Handle a change of the model, that is, handle the removal and insertion of whole pages or a change of the edit mode. More... | |
DECL_LINK (WindowEventHandler, VclWindowEvent &, void) | |
DECL_LINK (ApplicationEventHandler, VclSimpleEvent &, void) | |
void | UpdateAllPages () |
Update the display of all pages. More... | |
rtl::Reference< FuPoor > | CreateSelectionFunction (SfxRequest &rRequest) |
This factory method creates a selection function. More... | |
::rtl::Reference< SelectionFunction > | GetCurrentSelectionFunction () const |
When the current function of the view shell is the slide sorter selection function then return a reference to it. More... | |
void | PrepareEditModeChange () |
Prepare for a change of the edit mode. More... | |
void | ChangeEditMode (EditMode eEditMode) |
Set a new edit mode and return whether the edit mode really has been changed. More... | |
void | FinishEditModeChange () |
Finish the change of the edit mode. More... | |
void | PageNameHasChanged (int nPageIndex, const OUString &rsOldName) |
Call this method when the name of one of the pages has changed. More... | |
void | SetDocumentSlides (const css::uno::Reference< css::container::XIndexAccess > &rxSlides) |
Provide the set of pages to be displayed in the slide sorter. More... | |
const std::shared_ptr< Animator > & | GetAnimator () const |
Return an Animator object. More... | |
VisibleAreaManager & | GetVisibleAreaManager () const |
void | CheckForMasterPageAssignment () |
void | CheckForSlideTransitionAssignment () |
Private Member Functions | |
void | LockModelChange () |
Prepare for several model changes, i.e. More... | |
void | UnlockModelChange () |
Further calls to HandleModelChange() will result in a full featured update of model, view, and controller. More... | |
void | PreModelChange () |
Prepare for a model change. More... | |
void | PostModelChange () |
Complete a model change. More... | |
Friends | |
class | ModelChangeLock |
Definition at line 91 of file SlideSorterController.hxx.
sd::slidesorter::controller::SlideSorterController::SlideSorterController | ( | SlideSorter & | rSlideSorter | ) |
Create a new controller for the slide sorter.
pParentWindow | The window that contains the controls of the new controller. |
Definition at line 84 of file SlideSorterController.cxx.
References VclPtr< class reference_type >::get(), sd::slidesorter::SlideSorter::GetContentWindow(), sd::slidesorter::view::SlideSorterView::GetModelArea(), vcl::Window::GetParent(), tools::Rectangle::GetSize(), make_shared(), mrModel, mrSlideSorter, mrView, vcl::Window::SetBackground(), sd::Window::SetCenterAllowed(), vcl::Window::SetMapMode(), and sd::Window::SetViewSize().
sd::slidesorter::controller::SlideSorterController::~SlideSorterController | ( | ) |
Definition at line 140 of file SlideSorterController.cxx.
References mpListener, and TOOLS_WARN_EXCEPTION.
void sd::slidesorter::controller::SlideSorterController::ChangeEditMode | ( | EditMode | eEditMode | ) |
Set a new edit mode and return whether the edit mode really has been changed.
For proper saving and restoring of the selection this method should be called between calls to PrepareEditModeChange() and FinishEditModeChange().
Definition at line 740 of file SlideSorterController.cxx.
References sd::slidesorter::model::SlideSorterModel::GetEditMode(), HandleModelChange(), mrModel, PreModelChange(), and sd::slidesorter::model::SlideSorterModel::SetEditMode().
Referenced by sd::slidesorter::controller::Listener::propertyChange(), and sd::slidesorter::controller::Listener::UpdateEditMode().
void sd::slidesorter::controller::SlideSorterController::CheckForMasterPageAssignment | ( | ) |
Definition at line 853 of file SlideSorterController.cxx.
References sd::slidesorter::model::SlideSorterModel::GetPageCount(), sd::slidesorter::view::SlideSorterView::GetPreviewCache(), mrModel, and mrView.
Referenced by sd::slidesorter::controller::Listener::Notify().
void sd::slidesorter::controller::SlideSorterController::CheckForSlideTransitionAssignment | ( | ) |
Definition at line 869 of file SlideSorterController.cxx.
References sd::slidesorter::model::SlideSorterModel::GetPageCount(), sd::slidesorter::view::SlideSorterView::GetPreviewCache(), mrModel, and mrView.
Referenced by sd::slidesorter::controller::Listener::Notify().
bool sd::slidesorter::controller::SlideSorterController::Command | ( | const CommandEvent & | rEvent, |
::sd::Window * | pWindow | ||
) |
Definition at line 278 of file SlideSorterController.cxx.
References tools::Rectangle::Center(), CommandEvent::GetCommand(), GetCurrentSelectionFunction(), SfxShell::GetDispatcher(), sd::slidesorter::model::SlideSorterModel::GetEditMode(), GetFocusManager(), GetInsertionIndicatorHandler(), sd::slidesorter::view::SlideSorterView::GetLayouter(), CommandEvent::GetMousePosPixel(), sd::slidesorter::model::PageEnumeration::GetNextElement(), sd::slidesorter::view::SlideSorterView::GetOrientation(), sd::slidesorter::view::Layouter::GetPageObjectLayouter(), GetScrollBarManager(), GetSelectionManager(), sd::slidesorter::SlideSorter::GetView(), sd::slidesorter::SlideSorter::GetViewShell(), CommandEvent::GetWheelData(), sd::slidesorter::model::PageEnumeration::HasMoreElements(), sd::slidesorter::view::Layouter::HORIZONTAL, CommandEvent::IsMouseEvent(), mbContextMenuOpen, sd::slidesorter::controller::InsertionIndicatorHandler::MoveMode, mpInsertionIndicatorHandler, mrModel, mrSlideSorter, mrView, sd::slidesorter::controller::ScrollBarManager::Orientation_Horizontal, sd::slidesorter::controller::ScrollBarManager::Orientation_Vertical, Page, pData, vcl::Window::PixelToLogic(), vcl::Window::ReleaseMouse(), sd::slidesorter::controller::ScrollBarManager::Scroll(), SD_MOD, and sd::slidesorter::view::SlideSorterView::UpdatePageUnderMouse().
rtl::Reference< FuPoor > sd::slidesorter::controller::SlideSorterController::CreateSelectionFunction | ( | SfxRequest & | rRequest | ) |
This factory method creates a selection function.
Definition at line 695 of file SlideSorterController.cxx.
References sd::slidesorter::controller::SelectionFunction::Create(), and mrSlideSorter.
Referenced by Init().
sd::slidesorter::controller::SlideSorterController::DECL_LINK | ( | ApplicationEventHandler | , |
VclSimpleEvent & | , | ||
void | |||
) |
sd::slidesorter::controller::SlideSorterController::DECL_LINK | ( | WindowEventHandler | , |
VclWindowEvent & | , | ||
void | |||
) |
void sd::slidesorter::controller::SlideSorterController::Dispose | ( | ) |
Definition at line 157 of file SlideSorterController.cxx.
References sd::slidesorter::controller::Animator::AM_Immediate, mpAnimator, mpClipboard, mpInsertionIndicatorHandler, and mpSelectionManager.
void sd::slidesorter::controller::SlideSorterController::ExecCtrl | ( | SfxRequest & | rRequest | ) |
Definition at line 619 of file SlideSorterController.cxx.
References mpSlotManager.
void sd::slidesorter::controller::SlideSorterController::FinishEditModeChange | ( | ) |
Finish the change of the edit mode.
Here we may select a page or restore a previously saved selection.
Definition at line 753 of file SlideSorterController.cxx.
References GetCurrentSlideManager(), sd::slidesorter::model::SlideSorterModel::GetEditMode(), sd::slidesorter::model::SlideSorterModel::GetPageDescriptor(), maSelectionBeforeSwitch, MasterPage, mnCurrentPageBeforeSwitch, mpEditModeChangeMasterPage, mpPageSelector, and mrModel.
Referenced by sd::slidesorter::controller::Listener::Notify().
void sd::slidesorter::controller::SlideSorterController::FuPermanent | ( | SfxRequest & | rRequest | ) |
Definition at line 268 of file SlideSorterController.cxx.
References mpSlotManager.
void sd::slidesorter::controller::SlideSorterController::FuSupport | ( | SfxRequest & | rRequest | ) |
Definition at line 273 of file SlideSorterController.cxx.
References mpSlotManager.
void sd::slidesorter::controller::SlideSorterController::FuTemporary | ( | SfxRequest & | rRequest | ) |
Definition at line 263 of file SlideSorterController.cxx.
References mpSlotManager.
|
inline |
Return an Animator object.
Definition at line 243 of file SlideSorterController.hxx.
References mpAnimator.
void sd::slidesorter::controller::SlideSorterController::GetAttrState | ( | SfxItemSet & | rSet | ) |
Definition at line 624 of file SlideSorterController.cxx.
References mpSlotManager, and rSet.
Clipboard & sd::slidesorter::controller::SlideSorterController::GetClipboard | ( | ) |
Definition at line 205 of file SlideSorterController.cxx.
References mpClipboard.
Referenced by sd::slidesorter::controller::SelectionFunction::DoCopy(), sd::slidesorter::controller::SelectionFunction::DoCut(), sd::slidesorter::controller::SelectionFunction::DoPaste(), sd::slidesorter::view::SlideSorterView::DragFinished(), and sd::slidesorter::controller::SlotManager::FuSupport().
void sd::slidesorter::controller::SlideSorterController::GetCtrlState | ( | SfxItemSet & | rSet | ) |
Definition at line 562 of file SlideSorterController.cxx.
References SfxViewFrame::Current(), DBG_ASSERT, SfxItemSet::DisableItem(), sd::slidesorter::SlideSorter::GetContentWindow(), SfxItemSet::GetItemState(), SfxShell::GetSlotState(), mrSlideSorter, sd::OUTPUT_DRAWMODE_BLACKWHITE, sd::OUTPUT_DRAWMODE_COLOR, sd::OUTPUT_DRAWMODE_CONTRAST, sd::OUTPUT_DRAWMODE_GRAYSCALE, SfxItemSet::Put(), and rSet.
rtl::Reference< SelectionFunction > sd::slidesorter::controller::SlideSorterController::GetCurrentSelectionFunction | ( | ) | const |
When the current function of the view shell is the slide sorter selection function then return a reference to it.
Otherwise return an empty reference.
Definition at line 701 of file SlideSorterController.cxx.
References sd::ViewShell::GetCurrentFunction(), sd::slidesorter::SlideSorter::GetViewShell(), and mrSlideSorter.
Referenced by Command(), sd::slidesorter::controller::Clipboard::ExecuteDrop(), and sd::slidesorter::controller::IMPL_LINK().
std::shared_ptr< CurrentSlideManager > const & sd::slidesorter::controller::SlideSorterController::GetCurrentSlideManager | ( | ) | const |
Definition at line 217 of file SlideSorterController.cxx.
References mpCurrentSlideManager.
Referenced by FinishEditModeChange(), sd::SdUnoSlideView::getCurrentPage(), sd::slidesorter::controller::SelectionFunction::GotoNextPage(), PostModelChange(), PreModelChange(), sd::slidesorter::controller::Listener::propertyChange(), sd::slidesorter::controller::SlotManager::RenameSlideFromDrawViewShell(), sd::slidesorter::controller::VisibleAreaManager::RequestCurrentSlideVisible(), sd::slidesorter::controller::SelectionManager::SelectionHasChanged(), sd::slidesorter::controller::Clipboard::SelectPageRange(), sd::SdUnoSlideView::setCurrentPage(), sd::slidesorter::controller::SelectionFunction::ModeHandler::SetCurrentPage(), sd::slidesorter::model::SlideSorterModel::SetDocumentSlides(), sd::slidesorter::controller::FocusManager::SetFocusedPageFromCurrentPage(), and sd::slidesorter::controller::PageSelector::UpdateCurrentPage().
FocusManager & sd::slidesorter::controller::SlideSorterController::GetFocusManager | ( | ) |
Definition at line 199 of file SlideSorterController.cxx.
References mpFocusManager.
Referenced by accessibility::AccessibleSlideSorterView::Implementation::Activated(), sd::slidesorter::controller::SelectionFunction::cancel(), Command(), accessibility::AccessibleSlideSorterView::Implementation::ConnectListeners(), sd::slidesorter::controller::SelectionManager::DeleteSelectedPages(), sd::slidesorter::controller::SelectionObserver::EndObservation(), accessibility::AccessibleSlideSorterObject::getAccessibleStateSet(), sd::slidesorter::controller::Clipboard::GetInsertionPosition(), sd::slidesorter::controller::SelectionFunction::GotoPage(), accessibility::IMPL_LINK_NOARG(), sd::slidesorter::controller::SelectionFunction::KeyInput(), sd::slidesorter::controller::SelectionFunction::MoveFocus(), sd::slidesorter::controller::CurrentSlideManager::NotifyCurrentSlideChange(), and accessibility::AccessibleSlideSorterView::Implementation::ReleaseListeners().
std::shared_ptr< InsertionIndicatorHandler > const & sd::slidesorter::controller::SlideSorterController::GetInsertionIndicatorHandler | ( | ) | const |
Definition at line 236 of file SlideSorterController.cxx.
References mpInsertionIndicatorHandler.
Referenced by Command(), sd::slidesorter::controller::Clipboard::DetermineInsertPosition(), sd::slidesorter::controller::DragAndDropContext::DragAndDropContext(), sd::slidesorter::controller::Clipboard::ExecuteDrop(), sd::slidesorter::controller::Clipboard::GetInsertionPosition(), sd::slidesorter::controller::SlotManager::GetInsertionPosition(), sd::slidesorter::controller::Clipboard::IsInsertionTrivial(), sd::slidesorter::controller::DragAndDropContext::SetTargetSlideSorter(), sd::slidesorter::controller::Clipboard::StartDrag(), and sd::slidesorter::controller::DragAndDropContext::UpdatePosition().
model::SharedPageDescriptor sd::slidesorter::controller::SlideSorterController::GetPageAt | ( | const Point & | rPixelPosition | ) |
Return the descriptor of the page that is rendered under the given position.
This takes the IsOnlyPreviewTriggersMouseOver property into account.
Definition at line 165 of file SlideSorterController.cxx.
References sd::slidesorter::view::SlideSorterView::GetLayouter(), sd::slidesorter::model::SlideSorterModel::GetPageDescriptor(), sd::slidesorter::view::SlideSorterView::GetPageIndexAtPoint(), sd::slidesorter::view::Layouter::GetPageObjectLayouter(), mrModel, mrView, sd::slidesorter::view::PageObjectLayouter::Preview, and sd::slidesorter::view::PageObjectLayouter::WindowCoordinateSystem.
Referenced by sd::slidesorter::controller::SelectionFunction::EventDescriptor::EventDescriptor(), accessibility::AccessibleSlideSorterView::getAccessibleAtPoint(), and sd::slidesorter::view::SlideSorterView::UpdatePageUnderMouse().
PageSelector & sd::slidesorter::controller::SlideSorterController::GetPageSelector | ( | ) |
Definition at line 193 of file SlideSorterController.cxx.
References mpPageSelector.
Referenced by accessibility::AccessibleSlideSorterView::clearAccessibleSelection(), sd::slidesorter::controller::SelectionManager::DeleteSelectedPages(), accessibility::AccessibleSlideSorterView::deselectAccessibleChild(), sd::slidesorter::controller::SelectionFunction::ModeHandler::DeselectAllPages(), sd::slidesorter::controller::SlotManager::DuplicateSelectedSlides(), sd::slidesorter::controller::SelectionObserver::EndObservation(), sd::slidesorter::controller::Listener::frameAction(), sd::slidesorter::controller::SlotManager::FuTemporary(), accessibility::AccessibleSlideSorterObject::getAccessibleStateSet(), sd::slidesorter::controller::SlotManager::GetClipboardState(), sd::slidesorter::controller::SlotManager::GetInsertionPosition(), sd::slidesorter::controller::SlotManager::GetMenuState(), accessibility::AccessibleSlideSorterView::getSelectedAccessibleChild(), accessibility::AccessibleSlideSorterView::getSelectedAccessibleChildCount(), sd::SdUnoSlideView::getSelection(), sd::slidesorter::controller::SlotManager::GetStatusBarState(), sd::slidesorter::controller::IMPL_LINK(), sd::slidesorter::controller::SlotManager::InsertSlide(), accessibility::AccessibleSlideSorterView::isAccessibleChildSelected(), sd::slidesorter::controller::SelectionFunction::KeyInput(), sd::slidesorter::controller::SelectionFunction::MoveFocus(), sd::slidesorter::controller::CurrentSlideManager::NotifyCurrentSlideChange(), sd::slidesorter::controller::Listener::propertyChange(), sd::slidesorter::model::SlideSorterModel::Resync(), sd::framework::ViewShellWrapper::select(), sd::SdUnoSlideView::select(), accessibility::AccessibleSlideSorterView::selectAccessibleChild(), accessibility::AccessibleSlideSorterView::selectAllAccessibleChildren(), sd::slidesorter::controller::SelectionFunction::ModeHandler::SelectOnePage(), sd::DrawViewShell::SelectPage(), sd::slidesorter::controller::Clipboard::SelectPageRange(), and sd::slidesorter::model::SlideSorterModel::SetDocumentSlides().
ScrollBarManager & sd::slidesorter::controller::SlideSorterController::GetScrollBarManager | ( | ) |
Return the object that manages the scroll bars.
Definition at line 211 of file SlideSorterController.cxx.
References mpScrollBarManager.
Referenced by Command(), sd::slidesorter::controller::SelectionFunction::MouseButtonUp(), Rearrange(), sd::slidesorter::controller::DragAndDropContext::SetTargetSlideSorter(), and sd::slidesorter::controller::DragAndDropContext::UpdatePosition().
std::shared_ptr< SelectionManager > const & sd::slidesorter::controller::SlideSorterController::GetSelectionManager | ( | ) | const |
Definition at line 229 of file SlideSorterController.cxx.
References mpSelectionManager.
Referenced by Command(), accessibility::AccessibleSlideSorterView::Implementation::ConnectListeners(), sd::slidesorter::controller::Clipboard::DoDelete(), sd::slidesorter::controller::PageSelector::EnableBroadcasting(), sd::slidesorter::controller::SlotManager::FuTemporary(), sd::slidesorter::controller::PageSelector::GetCoreSelection(), sd::slidesorter::controller::Clipboard::GetInsertionPosition(), sd::slidesorter::controller::SlotManager::GetInsertionPosition(), sd::slidesorter::controller::Listener::HandleModelChange(), sd::slidesorter::controller::IMPL_LINK(), Init(), sd::slidesorter::controller::SelectionFunction::KeyInput(), and accessibility::AccessibleSlideSorterView::Implementation::ReleaseListeners().
std::shared_ptr< SlotManager > const & sd::slidesorter::controller::SlideSorterController::GetSlotManager | ( | ) | const |
Definition at line 223 of file SlideSorterController.cxx.
References mpSlotManager.
Referenced by sd::slidesorter::model::SlideSorterModel::SetDocumentSlides().
void sd::slidesorter::controller::SlideSorterController::GetStatusBarState | ( | SfxItemSet & | rSet | ) |
Definition at line 614 of file SlideSorterController.cxx.
References mpSlotManager, and rSet.
VisibleAreaManager & sd::slidesorter::controller::SlideSorterController::GetVisibleAreaManager | ( | ) | const |
Definition at line 847 of file SlideSorterController.cxx.
References mpVisibleAreaManager.
Referenced by sd::slidesorter::controller::PageSelector::GetCoreSelection(), Rearrange(), sd::slidesorter::controller::ScrollBarManager::Scroll(), and sd::slidesorter::controller::FocusManager::ShowFocusIndicator().
void sd::slidesorter::controller::SlideSorterController::HandleModelChange | ( | ) |
Handle a change of the model, that is, handle the removal and insertion of whole pages or a change of the edit mode.
This method is a convenience function that simply calls PreModelChange() and then PostModelChange().
Definition at line 472 of file SlideSorterController.cxx.
References sd::slidesorter::model::SlideSorterModel::GetDocument(), SdrModel::GetPageCount(), mrModel, and PreModelChange().
Referenced by ChangeEditMode(), sd::slidesorter::controller::SelectionManager::DeleteSelectedPages(), sd::slidesorter::controller::Listener::HandleModelChange(), sd::slidesorter::controller::Listener::Notify(), and sd::slidesorter::controller::Clipboard::PasteTransferable().
void sd::slidesorter::controller::SlideSorterController::Init | ( | void | ) |
Late initialization.
Call this method once a new object has been created.
Definition at line 117 of file SlideSorterController.cxx.
References CreateSelectionFunction(), sd::slidesorter::model::SlideSorterModel::GetDocument(), SdrModel::GetItemPool(), GetSelectionManager(), mpClipboard, mpCurrentSlideManager, mpFocusManager, mpListener, mpPageSelector, mpScrollBarManager, mpSelectionManager, mpSlotManager, mrModel, mrSlideSorter, and sd::slidesorter::SlideSorter::SetCurrentFunction().
|
private |
Prepare for several model changes, i.e.
prevent time-consuming and non-critical operations like repaints until UnlockModelChange() is called. Critical operations like releasing references to pages that do not exist anymore are executed.
Definition at line 414 of file SlideSorterController.cxx.
References mnModelChangeLockCount.
Referenced by sd::slidesorter::controller::SlideSorterController::ModelChangeLock::ModelChangeLock().
void sd::slidesorter::controller::SlideSorterController::PageNameHasChanged | ( | int | nPageIndex, |
const OUString & | rsOldName | ||
) |
Call this method when the name of one of the pages has changed.
This is then notified to the accessibility object, when that exists.
nPageIndex | The index of the page whose name has been changed. |
rsOldName | The old name of the page. The new name can be taken from the page object. |
Definition at line 791 of file SlideSorterController.cxx.
References Any, accessibility::AccessibleSlideSorterObject::FireAccessibleEvent(), VclPtr< class reference_type >::get(), vcl::Window::GetAccessible(), accessibility::AccessibleSlideSorterView::GetAccessibleChildImplementation(), sd::slidesorter::SlideSorter::GetContentWindow(), SdPage::GetName(), accessibility::AccessibleSlideSorterObject::GetPage(), sd::slidesorter::model::SlideSorterModel::GetPageDescriptor(), mrModel, mrSlideSorter, mrView, and sd::slidesorter::view::SlideSorterView::RequestRepaint().
Referenced by sd::slidesorter::controller::SlotManager::RenameSlide().
void sd::slidesorter::controller::SlideSorterController::Paint | ( | const ::tools::Rectangle & | rRect, |
vcl::Window * | pWin | ||
) |
This method forwards the call to the SlideSorterView and executes pending operations like moving selected pages into the visible area.
Definition at line 242 of file SlideSorterController.cxx.
References sd::slidesorter::view::SlideSorterView::CompleteRedraw(), Exception, vcl::Window::GetOutDev(), mnPaintEntranceCount, and mrView.
|
private |
Complete a model change.
This includes the recreation of data structures that depend on the model and the request for a repaint to show the changes.
Definition at line 446 of file SlideSorterController.cxx.
References VclPtr< class reference_type >::get(), sd::slidesorter::SlideSorter::GetContentWindow(), GetCurrentSlideManager(), sd::slidesorter::view::SlideSorterView::GetModelArea(), tools::Rectangle::GetSize(), sd::slidesorter::SlideSorter::GetViewShell(), sd::ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_END, mbIsForcedRearrangePending, mbPostModelChangePending, mrModel, mrSlideSorter, mrView, sd::slidesorter::view::SlideSorterView::PostModelChange(), Rearrange(), sd::slidesorter::model::SlideSorterModel::Resync(), sd::Window::SetViewOrigin(), and sd::Window::SetViewSize().
Referenced by UnlockModelChange().
|
private |
Prepare for a model change.
This method does all the things that need to be done before the model changes, e.g. because they need access to the model data before the change.
Definition at line 428 of file SlideSorterController.cxx.
References sd::slidesorter::SlideSorter::GetContentWindow(), GetCurrentSlideManager(), sd::slidesorter::SlideSorter::GetViewShell(), sd::ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_START, mbPostModelChangePending, mrSlideSorter, mrView, and sd::slidesorter::view::SlideSorterView::PreModelChange().
Referenced by ChangeEditMode(), HandleModelChange(), and SetDocumentSlides().
void sd::slidesorter::controller::SlideSorterController::PrepareEditModeChange | ( | ) |
Prepare for a change of the edit mode.
Depending on the current edit mode we may save the selection so that it can be restored when later changing back to the current edit mode.
Definition at line 707 of file SlideSorterController.cxx.
References sd::slidesorter::model::SlideSorterModel::GetEditMode(), sd::ViewShellBase::GetMainViewShell(), sd::slidesorter::SlideSorter::GetViewShell(), sd::ViewShell::GetViewShellBase(), maSelectionBeforeSwitch, mnCurrentPageBeforeSwitch, mpEditModeChangeMasterPage, mrModel, mrSlideSorter, Page, and SdrPage::TRG_GetMasterPage().
Referenced by sd::slidesorter::controller::Listener::Notify().
void sd::slidesorter::controller::SlideSorterController::Rearrange | ( | bool | bForce | ) |
Determine which of the UI elements–the scroll bars, the scroll bar filler, the actual slide sorter view–are visible and place them in the area last passed to Resize().
bForce | When <TRUE> is given (<FALSE> is the default) then the content window and with it the SlideSorterView is resized event when its size does not change (the size does change when the visibility of scroll bars changes.) |
Definition at line 644 of file SlideSorterController.cxx.
References VclPtr< class reference_type >::get(), sd::slidesorter::SlideSorter::GetContentWindow(), sd::slidesorter::view::SlideSorterView::GetOrientation(), vcl::Window::GetOutputSizePixel(), vcl::Window::GetPosPixel(), GetScrollBarManager(), tools::Rectangle::GetSize(), GetVisibleAreaManager(), sd::slidesorter::view::Layouter::HORIZONTAL, tools::Rectangle::IsEmpty(), maTotalWindowArea, mbIsForcedRearrangePending, mnModelChangeLockCount, mrSlideSorter, mrView, sd::slidesorter::controller::ScrollBarManager::PlaceScrollBars(), sd::slidesorter::controller::VisibleAreaManager::RequestCurrentSlideVisible(), sd::slidesorter::view::SlideSorterView::RequestRepaint(), sd::slidesorter::view::SlideSorterView::Resize(), vcl::Window::SetPosSizePixel(), tools::Rectangle::TopLeft(), sd::slidesorter::view::SlideSorterView::UpdateOrientation(), sd::slidesorter::controller::ScrollBarManager::UpdateScrollBars(), and sd::slidesorter::view::Layouter::VERTICAL.
Referenced by sd::slidesorter::controller::SlotManager::FuTemporary(), PostModelChange(), and Resize().
void sd::slidesorter::controller::SlideSorterController::Resize | ( | const ::tools::Rectangle & | rAvailableSpace | ) |
Place and size the scroll bars and the browser window so that the given rectangle is filled.
Definition at line 635 of file SlideSorterController.cxx.
References maTotalWindowArea, and Rearrange().
void sd::slidesorter::controller::SlideSorterController::SetDocumentSlides | ( | const css::uno::Reference< css::container::XIndexAccess > & | rxSlides | ) |
Provide the set of pages to be displayed in the slide sorter.
The GetDocumentSlides() method can be found only in the SlideSorterModel.
Definition at line 836 of file SlideSorterController.cxx.
References sd::slidesorter::model::SlideSorterModel::GetDocumentSlides(), mrModel, PreModelChange(), and sd::slidesorter::model::SlideSorterModel::SetDocumentSlides().
Referenced by sd::slidesorter::model::SlideSorterModel::UpdatePageList().
|
private |
Further calls to HandleModelChange() will result in a full featured update of model, view, and controller.
When HandleModelChange() has been called since the last LockModelChange() then this is done right away to bring the view up-to-date.
Definition at line 419 of file SlideSorterController.cxx.
References mbPostModelChangePending, mnModelChangeLockCount, and PostModelChange().
void sd::slidesorter::controller::SlideSorterController::UpdateAllPages | ( | ) |
Update the display of all pages.
This involves a redraw and releasing previews and caches.
Definition at line 629 of file SlideSorterController.cxx.
References sd::slidesorter::SlideSorter::GetContentWindow(), and mrSlideSorter.
Referenced by sd::slidesorter::controller::SlotManager::ExecCtrl().
|
friend |
Definition at line 180 of file SlideSorterController.hxx.
|
private |
This array stores the indices of the selected page descriptors at the time when the edit mode is switched to EditMode::MasterPage.
With this we can restore the selection when switching back to EditMode::Page mode.
Definition at line 278 of file SlideSorterController.hxx.
Referenced by FinishEditModeChange(), and PrepareEditModeChange().
|
private |
This rectangle in the parent window encloses scroll bars and slide sorter window.
It is set when Resize() is called.
Definition at line 291 of file SlideSorterController.hxx.
Referenced by Rearrange(), and Resize().
|
private |
Definition at line 270 of file SlideSorterController.hxx.
Referenced by Command().
|
private |
Definition at line 269 of file SlideSorterController.hxx.
Referenced by PostModelChange(), and Rearrange().
|
private |
Definition at line 272 of file SlideSorterController.hxx.
Referenced by PostModelChange(), PreModelChange(), and UnlockModelChange().
|
private |
The current page before the edit mode is switched to EditMode::MasterPage.
Definition at line 280 of file SlideSorterController.hxx.
Referenced by FinishEditModeChange(), and PrepareEditModeChange().
|
private |
Definition at line 268 of file SlideSorterController.hxx.
Referenced by LockModelChange(), Rearrange(), and UnlockModelChange().
|
private |
This counter is used to avoid processing of reentrant calls to Paint().
Definition at line 296 of file SlideSorterController.hxx.
Referenced by Paint().
|
private |
Definition at line 262 of file SlideSorterController.hxx.
Referenced by Dispose(), and GetAnimator().
|
private |
Definition at line 260 of file SlideSorterController.hxx.
Referenced by Dispose(), GetClipboard(), and Init().
|
mutableprivate |
Definition at line 258 of file SlideSorterController.hxx.
Referenced by GetCurrentSlideManager(), and Init().
|
private |
The master page to select after the edit mode is changed.
This member is used to pass the pointer from PrepareEditModeChange() to FinishEditModeChange().
Definition at line 286 of file SlideSorterController.hxx.
Referenced by FinishEditModeChange(), and PrepareEditModeChange().
|
private |
Definition at line 255 of file SlideSorterController.hxx.
Referenced by GetFocusManager(), and Init().
|
private |
Definition at line 261 of file SlideSorterController.hxx.
Referenced by Command(), Dispose(), and GetInsertionIndicatorHandler().
|
private |
Definition at line 266 of file SlideSorterController.hxx.
Referenced by Init(), and ~SlideSorterController().
|
private |
Definition at line 254 of file SlideSorterController.hxx.
Referenced by FinishEditModeChange(), GetPageSelector(), and Init().
|
private |
Definition at line 257 of file SlideSorterController.hxx.
Referenced by GetScrollBarManager(), and Init().
|
private |
Definition at line 259 of file SlideSorterController.hxx.
Referenced by Dispose(), GetSelectionManager(), and Init().
|
private |
Definition at line 256 of file SlideSorterController.hxx.
Referenced by ExecCtrl(), FuPermanent(), FuSupport(), FuTemporary(), GetAttrState(), GetSlotManager(), GetStatusBarState(), and Init().
|
private |
Definition at line 263 of file SlideSorterController.hxx.
Referenced by GetVisibleAreaManager().
|
private |
Definition at line 252 of file SlideSorterController.hxx.
Referenced by ChangeEditMode(), CheckForMasterPageAssignment(), CheckForSlideTransitionAssignment(), Command(), FinishEditModeChange(), GetPageAt(), HandleModelChange(), Init(), PageNameHasChanged(), PostModelChange(), PrepareEditModeChange(), and SetDocumentSlides().
|
private |
Definition at line 251 of file SlideSorterController.hxx.
Referenced by Command(), CreateSelectionFunction(), GetCtrlState(), GetCurrentSelectionFunction(), Init(), PageNameHasChanged(), PostModelChange(), PreModelChange(), PrepareEditModeChange(), Rearrange(), SlideSorterController(), and UpdateAllPages().
|
private |
Definition at line 253 of file SlideSorterController.hxx.
Referenced by CheckForMasterPageAssignment(), CheckForSlideTransitionAssignment(), Command(), GetPageAt(), PageNameHasChanged(), Paint(), PostModelChange(), PreModelChange(), Rearrange(), and SlideSorterController().