LibreOffice Module sfx2 (master) 1
templatedlglocalview.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9#pragma once
10
12#include <sfx2/listview.hxx>
13
15{
16public:
17 TemplateDlgLocalView(std::unique_ptr<weld::ScrolledWindow> xWindow,
18 std::unique_ptr<weld::Menu> xMenu,
19 std::unique_ptr<weld::TreeView> xTreeView);
20
22
23 virtual void showAllTemplates() override;
24
25 void showRegion(TemplateContainerItem const* pItem);
26
27 void showRegion(std::u16string_view rName);
28
29 void reload();
30
31 virtual bool KeyInput(const KeyEvent& rKEvt) override;
32
33 void createContextMenu(const bool bIsDefault, const bool bIsBuiltIn, const bool bIsSingleSel,
34 const OUString& rDefaultImg);
35
36 virtual void Show() override;
37
38 virtual void Hide() override;
39
40 bool IsVisible() const;
41
43 {
45 }
46
48
49 void insertItems(const std::vector<TemplateItemProperties>& rTemplates, bool isRegionSelected,
50 bool bShowCategoryInTooltip);
51
52private:
53 void ContextMenuSelectHdl(std::u16string_view rIdent);
54
56
57 void syncCursor();
58
59 void updateSelection();
60
61 DECL_LINK(RowActivatedHdl, weld::TreeView&, bool);
62
63 DECL_LINK(ListViewChangedHdl, weld::TreeView&, void);
64
65 DECL_LINK(PopupMenuHdl, const CommandEvent&, bool);
66
67 DECL_LINK(KeyPressHdl, const KeyEvent&, bool);
68
70};
71
72/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void showRegion(TemplateContainerItem const *pItem)
virtual void Hide() override
void insertItems(const std::vector< TemplateItemProperties > &rTemplates, bool isRegionSelected, bool bShowCategoryInTooltip)
void connect_focus_rect(const Link< weld::Widget &, tools::Rectangle > &rLink)
DECL_LINK(PopupMenuHdl, const CommandEvent &, bool)
virtual void Show() override
virtual void showAllTemplates() override
void ContextMenuSelectHdl(std::u16string_view rIdent)
void MakeItemVisible(sal_uInt16 nId)
TemplateDlgLocalView(std::unique_ptr< weld::ScrolledWindow > xWindow, std::unique_ptr< weld::Menu > xMenu, std::unique_ptr< weld::TreeView > xTreeView)
DECL_LINK(ListViewChangedHdl, weld::TreeView &, void)
void setTemplateViewMode(TemplateViewMode eMode)
virtual bool KeyInput(const KeyEvent &rKEvt) override
DECL_LINK(KeyPressHdl, const KeyEvent &, bool)
void createContextMenu(const bool bIsDefault, const bool bIsBuiltIn, const bool bIsSingleSel, const OUString &rDefaultImg)
DECL_LINK(RowActivatedHdl, weld::TreeView &, bool)
void MakeItemVisible(sal_uInt16 nId)
weld::DrawingArea * GetDrawingArea() const
void connect_focus_rect(const Link< Widget &, tools::Rectangle > &rLink)
Mode eMode
TemplateViewMode
Definition: listview.hxx:15
sal_Int16 nId