45#ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED
46#define SV_DECL_DRAW_DOC_SHELL_DEFINED
51 class AcceleratorExecute;
79 std::unique_ptr<::svt::AcceleratorExecute>
m_xAccel;
105 bool m_bEditing =
false;
133 OUString GetObjectName (
135 const bool bCreate =
true)
const;
137 void CloseBookmarkDoc();
148 typedef std::pair<const weld::TreeIter&, OUString>
IterString;
163 bool PageBelongsToCurrentShow (
const SdPage* pPage)
const;
166 static void OnDragFinished();
180 std::unique_ptr<weld::TreeIter> xIter(m_xTreeView->make_iterator());
181 if (m_xTreeView->get_cursor(xIter.get()))
183 m_xTreeView->start_editing(*xIter);
189 m_xTreeView->set_sensitive(bSensitive);
204 m_xTreeView->grab_focus();
209 m_xTreeView->set_size_request(nWidth, nHeight);
214 return m_xTreeView->get_approximate_digit_width();
224 return m_xTreeView->get_height_rows(nRows);
229 m_eSelectionMode =
eMode;
230 m_xTreeView->set_selection_mode(
eMode);
235 return m_eSelectionMode;
240 m_aRowActivatedHdl = rLink;
245 m_aKeyPressHdl = rLink;
250 m_aMouseReleaseHdl = rLink;
255 m_aPopupMenuHdl = rLink;
258 bool HasSelectedChildren(std::u16string_view rName);
259 bool SelectEntry(std::u16string_view rName);
264 return m_xTreeView->get_selected_text();
269 return m_xTreeView->get_selected(
nullptr);
274 return m_xTreeView->count_selected_rows();
279 m_aChangeHdl = rLink;
284 return m_xTreeView->is_selected(rIter);
289 return m_xTreeView->get_iter_first(rIter);
299 return m_xTreeView->make_iterator();
304 return m_xTreeView->get_visible();
309 m_xTreeView->unselect_all();
314 std::unique_ptr<weld::TreeIter> xIter(m_xTreeView->make_iterator());
315 if (m_xTreeView->get_cursor(xIter.get()))
316 return m_xTreeView->get_text(*xIter);
322 std::unique_ptr<weld::TreeIter> xIter(m_xTreeView->make_iterator());
323 if (m_xTreeView->get_cursor(xIter.get()))
324 return m_xTreeView->get_id(*xIter);
333 void SetShowAllShapes (
const bool bShowAllShapes,
const bool bFill);
336 void SetOrderFrontToBack (
const bool bOrderFrontToBack);
342 bool IsEqualToShapeList(std::unique_ptr<weld::TreeIter>& rEntry,
const SdrObjList& rList,
343 std::u16string_view rListName);
345 static bool IsInDrag();
373 const OUString& rsName,
374 const bool bIsExcluded,
380 void AddShapeToTransferable (
388 std::vector<OUString> GetSelectEntryList(
const int nDepth)
const;
390 std::vector<OUString> GetSelectedEntryIds()
const;
396 void InsertEntry(
const OUString &rName,
const OUString &rExpander)
398 m_xTreeView->insert(
nullptr, -1, &rName,
nullptr,
nullptr,
nullptr,
false, m_xScratchIter.get());
399 m_xTreeView->set_image(*m_xScratchIter, rExpander);
405 m_xTreeView->insert(pParent, m_bOrderFrontToBack ? 0 : -1, &rName, &rId,
nullptr,
406 nullptr,
false, m_xScratchIter.get());
409 m_xTreeView->insert(
nullptr, -1, &rName, &rId,
nullptr,
nullptr,
false, m_xScratchIter.get());
410 m_xTreeView->set_image(*m_xScratchIter, rExpander);
412 m_xTreeView->copy_iterator(*m_xScratchIter, *pEntry);
420 m_xTreeView->clear();
434 static SdPageObjsTransferable* getImplementation(
const css::uno::Reference< css::uno::XInterface >& rxData )
noexcept;
452 virtual void AddSupportedFormats()
override;
453 virtual bool GetData(
const css::datatransfer::DataFlavor& rFlavor,
const OUString& rDestDoc )
override;
454 virtual void DragFinished(
sal_Int8 nDropAction )
override;
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
ExecuteDrop-Event.
SdPageObjsTLVDropTarget(weld::TreeView &rTreeView)
weld::TreeView & m_rTreeView
void SetDrawView(SdrView *pSdrView)
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
AcceptDrop-Event.
void SetOrderFrontToBack(bool bSet)
::sd::DrawDocShell & mrDocShell
NavigatorDragType const meDragType
NavigatorDragType GetDragType() const
INetBookmark const maBookmark
::sd::DrawDocShell & GetDocShell() const
static SotClipboardFormatId mnListBoxDropFormatId
Temporary drop flavor id that is used internally in the navigator.
::sd::DrawDocShellRef m_xBookmarkDocShRef
for the loading of bookmarks
SdDrawDocument * m_pBookmarkDoc
void connect_popup_menu(const Link< const CommandEvent &, bool > &rLink)
bool get_iter_first(weld::TreeIter &rIter) const
bool GetOrderFrontToBack() const
void InsertEntry(const weld::TreeIter *pParent, const OUString &rId, const OUString &rName, const OUString &rExpander, weld::TreeIter *pEntry=nullptr)
std::unique_ptr< weld::TreeView > m_xTreeView
DECL_DLLPRIVATE_LINK(RowActivatedHdl, weld::TreeView &, bool)
OUString get_cursor_text() const
bool IsEditingActive() const
DECL_DLLPRIVATE_LINK(DragBeginHdl, bool &, bool)
DECL_LINK(MousePressHdl, const MouseEvent &, bool)
std::unique_ptr< weld::TreeIter > make_iterator()
void connect_changed(const Link< weld::TreeView &, void > &rLink)
const SdDrawDocument * m_pDoc
DECL_DLLPRIVATE_LINK(AsyncRowActivatedHdl, void *, void)
DECL_DLLPRIVATE_LINK(AsyncSelectHdl, void *, void)
DECL_DLLPRIVATE_LINK(RequestingChildrenHdl, const weld::TreeIter &, bool)
void connect_key_press(const Link< const KeyEvent &, bool > &rLink)
weld::TreeView & get_treeview()
SdNavigatorWin * m_pNavigator
SelectionMode get_selection_mode() const
Link< const CommandEvent &, bool > m_aPopupMenuHdl
void set_size_request(int nWidth, int nHeight)
void connect_mouse_release(const Link< const MouseEvent &, bool > &rLink)
DECL_LINK(MouseReleaseHdl, const MouseEvent &, bool)
DECL_LINK(EditEntryAgain, void *, void)
bool m_bNavigationGrabsFocus
If navigation should not only select the relevant shape but also change focus to it.
bool get_selected() const
float get_approximate_digit_width() const
ImplSVEvent * m_nRowActivateEventId
DECL_DLLPRIVATE_LINK(SelectHdl, weld::TreeView &, void)
DECL_DLLPRIVATE_LINK(KeyInputHdl, const KeyEvent &, bool)
DECL_LINK(EditedEntryHdl, const IterString &, bool)
int count_selected_rows() const
std::unique_ptr<::svt::AcceleratorExecute > m_xAccel
static bool SAL_DLLPRIVATE bIsInDrag
static, in the case the navigator is deleted in ExecuteDrag
std::unique_ptr< weld::TreeIter > m_xScratchIter
void connect_row_activated(const Link< weld::TreeView &, bool > &rLink)
void InsertEntry(const OUString &rName, const OUString &rExpander)
OUString get_cursor_id() const
bool GetShowAllShapes() const
Link< weld::TreeView &, bool > m_aRowActivatedHdl
bool IsNavigationGrabsFocus() const
std::unique_ptr< SdPageObjsTLVDropTarget > m_xDropTargetHelper
bool m_bSelectionHandlerNavigates
If changing the selection should also result in navigating to the relevant shape.
bool is_selected(const weld::TreeIter &rIter) const
ImplSVEvent * m_nSelectEventId
OUString get_selected_text() const
DECL_LINK(EditingEntryHdl, const weld::TreeIter &, bool)
DECL_LINK(CommandHdl, const CommandEvent &, bool)
bool IsLinkableSelected() const
bool m_bShowAllPages
This flag controls whether to show all pages.
int get_height_rows(int nRows) const
SelectionMode m_eSelectionMode
rtl::Reference< SdPageObjsTransferable > m_xHelper
std::pair< const weld::TreeIter &, OUString > IterString
Link< weld::TreeView &, void > m_aChangeHdl
Link< const KeyEvent &, bool > m_aKeyPressHdl
Link< const MouseEvent &, bool > m_aMouseReleaseHdl
void set_sensitive(bool bSensitive)
void set_selection_mode(SelectionMode eMode)
::tools::SvRef< DrawDocShell > DrawDocShellRef