30#include <osl/diagnose.h>
40 mbPageIsFocused(false)
73 const sal_Int32 nCandidate (
mnPageIndex - nColumnCount);
84 const sal_Int32 nCandidate (
mnPageIndex + nColumnCount);
85 if (nCandidate < nPageCount)
150 mnPageIndex = (rpDescriptor->GetPage()->GetPageNum()-1)/2;
185 const bool bScrollToFocus)
226 rListener.Call(
nullptr);
231: mbFocusVisible(rManager.IsFocusShowing())
240 mrManager.ShowFocus();
SlideSorter & mrSlideSorter
Show previews for all the slides in a document and allow the user to insert or delete slides and modi...
SD_DLLPUBLIC controller::SlideSorterController & GetController() const
const VclPtr< sd::Window > & GetContentWindow() const
Return the content window.
model::SlideSorterModel & GetModel() const
view::SlideSorterView & GetView() const
Create an instance of this class to temporarily hide the focus indicator.
~FocusHider() COVERITY_NOEXCEPT_FALSE
FocusHider(FocusManager &)
This class manages the focus of the slide sorter.
void MoveFocus(FocusMoveDirection eDirection)
Move the focus from the currently focused page to one that is displayed adjacent to it,...
void NotifyFocusChangeListeners() const
Call all currently registered listeners that a focus change has happened.
bool ToggleFocus()
Toggle the focused state of the current slide.
model::SharedPageDescriptor GetFocusedPageDescriptor() const
Return the descriptor of the page that currently has the focus.
::std::vector< Link< LinkParamNone *, void > > maFocusChangeListeners
void RemoveFocusChangeListener(const Link< LinkParamNone *, void > &rListener)
Remove a focus change listener.
void HideFocus()
Hide the focus indicator.
bool mbPageIsFocused
This flag indicates whether the page pointed to by mpFocusDescriptor has the focus.
bool SetFocusedPage(const model::SharedPageDescriptor &rDescriptor)
Set the focused page to the one described by the given page descriptor.
void ShowFocus(const bool bScrollToFocus=true)
Show the focus indicator of the current slide.
FocusManager(SlideSorter &rSlideSorter)
Create a new focus manager that operates on the pages of the model associated with the given controll...
void HideFocusIndicator(const model::SharedPageDescriptor &rpDescriptor)
Reset the focus state of the given descriptor and request a repaint so that the focus indicator is hi...
void AddFocusChangeListener(const Link< LinkParamNone *, void > &rListener)
Add a listener that is called when the focus is shown or hidden or set to another page object.
void ShowFocusIndicator(const model::SharedPageDescriptor &rpDescriptor, const bool bScrollToFocus)
Set the focus state of the given descriptor, scroll it into the visible area and request a repaint so...
SlideSorter & mrSlideSorter
bool IsFocusShowing() const
Return <TRUE> when the focus indicator is currently shown.
sal_Int32 mnPageIndex
Index of the page that may be focused.
bool HasFocus() const
Return whether the window managed by the called focus manager has the input focus of the application.
bool SetFocusedPageFromCurrentPage()
Set the focused page to the one that is the current slide of the Slide Manager.
std::shared_ptr< CurrentSlideManager > const & GetCurrentSlideManager() const
VisibleAreaManager & GetVisibleAreaManager() const
void RequestVisible(const model::SharedPageDescriptor &rpDescriptor, const bool bForce=false)
Request to make the specified page object visible.
sal_Int32 GetPageCount() const
Return the number of slides in the document regardless of whether they are visible or not or whether ...
SharedPageDescriptor GetPageDescriptor(const sal_Int32 nPageIndex, const bool bCreate=true) const
Return a page descriptor for the page with the specified index.
sal_Int32 GetColumnCount() const
Return the number of columns.
view::Layouter & GetLayouter()
bool SetState(const model::SharedPageDescriptor &rpDescriptor, const model::PageDescriptor::State eState, const bool bStateValue)
std::shared_ptr< PageDescriptor > SharedPageDescriptor