LibreOffice Module sfx2 (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TemplateDlgLocalView Class Referencefinal

#include <templatedlglocalview.hxx>

Inheritance diagram for TemplateDlgLocalView:
Collaboration diagram for TemplateDlgLocalView:

Public Member Functions

 TemplateDlgLocalView (std::unique_ptr< weld::ScrolledWindow > xWindow, std::unique_ptr< weld::Menu > xMenu, std::unique_ptr< weld::TreeView > xTreeView)
void setTemplateViewMode (TemplateViewMode eMode)
virtual void showAllTemplates () override
void showRegion (TemplateContainerItem const *pItem)
void showRegion (std::u16string_view rName)
void reload ()
virtual bool KeyInput (const KeyEvent &rKEvt) override
void createContextMenu (const bool bIsDefault, const bool bIsBuiltIn, const bool bIsSingleSel, const OUString &rDefaultImg)
virtual void Show () override
virtual void Hide () override
bool IsVisible () const
void connect_focus_rect (const Link< weld::Widget &, tools::Rectangle > &rLink)
void MakeItemVisible (sal_uInt16 nId)
void insertItems (const std::vector< TemplateItemProperties > &rTemplates, bool isRegionSelected, bool bShowCategoryInTooltip)
- Public Member Functions inherited from TemplateLocalView
 TemplateLocalView (std::unique_ptr< weld::ScrolledWindow > xWindow, std::unique_ptr< weld::Menu > xMenu)
virtual ~TemplateLocalView () override
void insertItems (const std::vector< TemplateItemProperties > &rTemplates, bool isRegionSelected=true, bool bShowCategoryInTooltip=false)
void Populate ()
void reload ()
virtual void showAllTemplates ()
void showRegion (TemplateContainerItem const *pItem)
void ContextMenuSelectHdl (std::u16string_view rIdent)
TemplateContainerItemgetRegion (std::u16string_view sStr)
sal_uInt16 getRegionId (size_t pos) const
sal_uInt16 getRegionId (std::u16string_view sRegionName) const
OUString getRegionName (const sal_uInt16 nRegionId) const
OUString getRegionItemName (const sal_uInt16 nItemId) const
std::vector< OUString > getFolderNames ()
std::vector< TemplateItemPropertiesgetFilteredItems (const std::function< bool(const TemplateItemProperties &) > &rFunc) const
sal_uInt16 createRegion (const OUString &rName)
bool renameRegion (std::u16string_view rTitle, const OUString &rNewTitle)
bool removeRegion (const sal_uInt16 nItemId)
bool removeTemplate (const sal_uInt16 nItemId, const sal_uInt16 nSrcItemId)
void moveTemplates (const std::set< const ThumbnailViewItem *, selection_cmp_fn > &rItems, const sal_uInt16 nTargetItem)
bool copyFrom (TemplateContainerItem *pItem, const OUString &rPath)
bool exportTo (const sal_uInt16 nItemId, const sal_uInt16 nRegionItemId, std::u16string_view rName)
virtual bool renameItem (ThumbnailViewItem *pItem, const OUString &sNewTitle) override
virtual bool MouseButtonDown (const MouseEvent &rMEvt) override
virtual bool Command (const CommandEvent &rPos) override
virtual bool KeyInput (const KeyEvent &rKEvt) override
sal_uInt16 getCurRegionId () const
void setCurRegionId (sal_uInt16 nCurRegionId)
void setOpenRegionHdl (const Link< void *, void > &rLink)
void setCreateContextMenuHdl (const Link< ThumbnailViewItem *, void > &rLink)
void setOpenTemplateHdl (const Link< ThumbnailViewItem *, void > &rLink)
void setEditTemplateHdl (const Link< ThumbnailViewItem *, void > &rLink)
void setDeleteTemplateHdl (const Link< void *, void > &rLink)
void setDefaultTemplateHdl (const Link< ThumbnailViewItem *, void > &rLink)
void setMoveTemplateHdl (const Link< void *, void > &rLink)
void setExportTemplateHdl (const Link< void *, void > &rLink)
void updateThumbnailDimensions (tools::Long itemMaxSize)
void RemoveDefaultTemplateIcon (std::u16string_view rPath)
bool IsBuiltInRegion (const OUString &rRegionName)
- Public Member Functions inherited from ThumbnailView
 ThumbnailView (std::unique_ptr< weld::ScrolledWindow > xWindow, std::unique_ptr< weld::Menu > xMenu)
virtual ~ThumbnailView () override
virtual bool MouseMove (const MouseEvent &rMEvt) override
virtual void Reload ()
 Updates information in the view; used only in RecentDocsView ATM. More...
void AppendItem (std::unique_ptr< ThumbnailViewItem > pItem)
void RemoveItem (sal_uInt16 nItemId)
virtual void Clear ()
void updateItems (std::vector< std::unique_ptr< ThumbnailViewItem > > items)
size_t GetItemPos (sal_uInt16 nItemId) const
sal_uInt16 GetItemId (size_t nPos) const
sal_uInt16 GetItemId (const Point &rPos) const
virtual bool renameItem (ThumbnailViewItem *pItem, const OUString &sNewTitle)
bool isDrawMnemonic () const
void setItemMaxTextLength (sal_uInt32 nLength)
void setItemDimensions (tools::Long ItemWidth, tools::Long ThumbnailHeight, tools::Long DisplayHeight, int itemPadding)
void SelectItem (sal_uInt16 nItemId)
bool IsItemSelected (sal_uInt16 nItemId) const
void deselectItems ()
 deselect all current selected items. More...
void ShowTooltips (bool bShowTooltips)
void DrawMnemonics (bool bDrawMnemonics)
void filterItems (const std::function< bool(const ThumbnailViewItem *) > &func)
void setItemStateHdl (const Link< const ThumbnailViewItem *, void > &aLink)
virtual void Resize () override
virtual void Show () override
virtual void Hide () override
virtual void SetDrawingArea (weld::DrawingArea *pDrawingArea) override
- Public Member Functions inherited from weld::CustomWidgetController
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible ()
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)=0
virtual void Resize ()
virtual bool MouseButtonDown (const MouseEvent &)
virtual bool MouseMove (const MouseEvent &)
virtual bool MouseButtonUp (const MouseEvent &)
virtual void GetFocus ()
virtual void LoseFocus ()
virtual void StyleUpdated ()
virtual bool Command (const CommandEvent &)
virtual bool KeyInput (const KeyEvent &)
virtual tools::Rectangle GetFocusRect ()
virtual FactoryFunction GetUITestFactory () const
virtual OUString RequestHelp (tools::Rectangle &)
virtual OUString GetHelpText () const
Size const & GetOutputSizePixel () const
void SetOutputSizePixel (const Size &rSize)
virtual void SetDrawingArea (weld::DrawingArea *pDrawingArea)
weld::DrawingAreaGetDrawingArea () const
void Invalidate ()
void Invalidate (const tools::Rectangle &rRect)
virtual void Show ()
virtual void Hide ()
void SetCursor (void *pData)
void GrabFocus ()
bool HasFocus () const
bool HasChildFocus () const
bool IsVisible () const
bool IsReallyVisible () const
bool IsEnabled () const
void Enable () const
void Disable () const
bool IsActive () const
int GetTextHeight () const
int GetTextWidth (const OUString &rText) const
OUString GetAccessibleName () const
OUString GetAccessibleDescription () const
void CaptureMouse ()
bool IsMouseCaptured () const
Point GetPointerPosPixel () const
void EnableRTL (bool bEnable)
bool IsRTLEnabled () const
void ReleaseMouse ()
void SetPointer (PointerStyle ePointerStyle)
void SetHelpId (const OUString &rHelpId)
void SetAccessibleName (const OUString &rName)
void SetInputContext (const InputContext &rInputContext)
void SetCursorRect (const tools::Rectangle &rCursorRect, int nExtTextInputWidth)
virtual int GetSurroundingText (OUString &)
virtual bool DeleteSurroundingText (const Selection &)
css::uno::Reference< css::datatransfer::dnd::XDropTarget > GetDropTarget ()
css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard () const
void SetDragDataTransferable (rtl::Reference< TransferDataContainer > &rTransferable, sal_uInt8 eDNDConstants)
virtual bool StartDrag ()
void set_size_request (int nWidth, int nHeight)
void queue_resize ()
 CustomWidgetController ()
virtual ~CustomWidgetController ()
 CustomWidgetController (CustomWidgetController const &)=default
 CustomWidgetController (CustomWidgetController &&)=default
CustomWidgetControlleroperator= (CustomWidgetController const &)=default
CustomWidgetControlleroperator= (CustomWidgetController &&)=default
- Public Member Functions inherited from ListView
 ListView (std::unique_ptr< weld::TreeView > xTreeView)
 ~ListView ()
void AppendItem (const OUString &rId, const OUString &rTitle, const OUString &rSubtitle, const OUString &rPath, bool bDefault)
void AppendRow (const OUString &rImage, const OUString &rTitle, const OUString &rSubtitle, const OUString &rApplication, const OUString &rModify, const OUString &rSize, const OUString &rId)
void UpdateRow (int nIndex, const OUString &rImage, const OUString &rTitle, const OUString &rSubtitle, const OUString &rApplication, const OUString &rModify, const OUString &rSize, const OUString &rId)
void ReloadRows ()
bool UpdateRows ()
void sortColumn (const int col)
void sort ()
void clearListView ()
void ShowListView ()
void HideListView ()
void unselect_all ()
void grab_focus ()
void rename (const OUString &rId, const OUString &rTitle)
void refreshDefaultColumn ()

Private Member Functions

void ContextMenuSelectHdl (std::u16string_view rIdent)
void insertFilteredItems ()
void syncCursor ()
void updateSelection ()
 DECL_LINK (RowActivatedHdl, weld::TreeView &, bool)
 DECL_LINK (ListViewChangedHdl, weld::TreeView &, void)
 DECL_LINK (PopupMenuHdl, const CommandEvent &, bool)
 DECL_LINK (KeyPressHdl, const KeyEvent &, bool)

Private Attributes

TemplateViewMode mViewMode

Additional Inherited Members

- Static Public Member Functions inherited from TemplateLocalView
static BitmapEx scaleImg (const BitmapEx &rImg, tools::Long width, tools::Long height)
static BitmapEx getDefaultThumbnail (std::u16string_view rPath)
static BitmapEx fetchThumbnail (const OUString &msURL, tools::Long width, tools::Long height)
static bool IsDefaultTemplate (const OUString &rPath)
static bool IsInternalTemplate (const OUString &rPath)
- Static Public Member Functions inherited from ThumbnailView
static BitmapEx readThumbnail (const OUString &msURL)
- Static Public Member Functions inherited from weld::CustomWidgetController
static bool IsUpdateMode ()
- Protected Member Functions inherited from TemplateLocalView
virtual void OnItemDblClicked (ThumbnailViewItem *pItem) override
- Protected Member Functions inherited from ThumbnailView
virtual bool KeyInput (const KeyEvent &rKEvt) override
virtual bool MouseButtonDown (const MouseEvent &rMEvt) override
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
virtual void GetFocus () override
virtual void LoseFocus () override
virtual OUString RequestHelp (tools::Rectangle &rRect) override
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible () override
const css::uno::Reference< css::accessibility::XAccessible > & getAccessible () const
void DrawItem (ThumbnailViewItem const *pItem)
virtual void OnItemDblClicked (ThumbnailViewItem *pItem)
void UpdateColors ()
void CalculateItemPositions (bool bScrollBarUsed=false)
void MakeItemVisible (sal_uInt16 nId)
void ImplInit ()
void ImplDeleteItems ()
size_t ImplGetItem (const Point &rPoint) const
ThumbnailViewItemImplGetItem (size_t nPos)
sal_uInt16 ImplGetVisibleItemCount () const
ThumbnailViewItemImplGetVisibleItem (sal_uInt16 nVisiblePos)
void ImplFireAccessibleEvent (short nEventId, const css::uno::Any &rOldValue, const css::uno::Any &rNewValue)
bool ImplHasAccessibleListeners () const
 DECL_DLLPRIVATE_LINK (ImplScrollHdl, weld::ScrolledWindow &, void)
- Protected Member Functions inherited from ListView
sal_uInt16 get_nId (int pos) const
void select_id (const OUString &sId)
int get_selected_index () const
std::vector< intget_selected_rows () const
bool IsListViewVisible () const
OUString get_id (int pos) const
void set_cursor (int pos)
int get_cursor_index () const
sal_uInt16 get_cursor_nId () const
void select (int pos)
int get_index (sal_uInt16 nId) const
 DECL_LINK (ColumnClickedHdl, const int, void)
 DECL_LINK (QueryTooltipHdl, const weld::TreeIter &, OUString)
- Protected Attributes inherited from TemplateLocalView
sal_uInt16 mnCurRegionId
tools::Long mnThumbnailWidth
tools::Long mnThumbnailHeight
Point maPosition
Link< void *, void > maOpenRegionHdl
Link< ThumbnailViewItem *, void > maCreateContextMenuHdl
Link< ThumbnailViewItem *, void > maOpenTemplateHdl
Link< ThumbnailViewItem *, void > maEditTemplateHdl
Link< void *, void > maDeleteTemplateHdl
Link< ThumbnailViewItem *, void > maDefaultTemplateHdl
Link< void *, void > maMoveTemplateHdl
Link< void *, void > maExportTemplateHdl
std::unique_ptr< SfxDocumentTemplatesmpDocTemplates
std::vector< std::unique_ptr< TemplateContainerItem > > maRegions
std::vector< TemplateItemPropertiesmaAllTemplates
- Protected Attributes inherited from ThumbnailView
std::vector< std::unique_ptr< ThumbnailViewItem > > mItemList
css::uno::Reference< css::accessibility::XAccessible > mxAccessible
ThumbnailValueItemList mFilteredItemList
 Cache to store the filtered items. More...
ThumbnailValueItemList::iterator mpStartSelRange
tools::Long mnItemWidth
tools::Long mnItemHeight
tools::Long mnItemPadding
tools::Long mnThumbnailHeight
tools::Long mnDisplayHeight
tools::Long mnVItemSpace
tools::Long mnVisLines
tools::Long mnLines
sal_uInt16 mnCols
sal_uInt16 mnFirstLine
bool mbScroll: 1
bool mbAllowVScrollBar: 1
bool mbHasVisibleItems: 1
bool mbShowTooltips: 1
bool mbDrawMnemonics: 1
bool mbSelectOnFocus: 1
Color maFillColor
 Background color of the thumbnail view widget. More...
Color maTextColor
 Text color. More...
Color maHighlightColor
 Color of the highlight (background) of the hovered item. More...
Color maHighlightTextColor
 Color of the text for the highlighted item. More...
Color maSelectHighlightColor
 Color of the highlight (background) of the selected and hovered item. More...
Color maSelectHighlightTextColor
 Color of the text of the selected and hovered item. More...
double mfHighlightTransparence
 Transparence of the highlight. More...
Link< const ThumbnailViewItem *, void > maItemStateHdl
std::unique_ptr< ThumbnailItemAttributesmpItemAttrs
std::unique_ptr< weld::ScrolledWindowmxScrolledWindow
std::unique_ptr< weld::MenumxContextMenu
std::function< bool(const ThumbnailViewItem *)> maFilterFunc
- Protected Attributes inherited from ListView
std::unique_ptr< weld::TreeViewmxTreeView
std::vector< std::unique_ptr< ListViewItem > > mListViewItems
int mnSortColumn

Detailed Description

Definition at line 14 of file templatedlglocalview.hxx.

Constructor & Destructor Documentation

◆ TemplateDlgLocalView()

TemplateDlgLocalView::TemplateDlgLocalView ( std::unique_ptr< weld::ScrolledWindow xWindow,
std::unique_ptr< weld::Menu xMenu,
std::unique_ptr< weld::TreeView xTreeView 

Definition at line 25 of file templatedlglocalview.cxx.

References LINK, and ListView::mxTreeView.

Member Function Documentation

◆ connect_focus_rect()

void TemplateDlgLocalView::connect_focus_rect ( const Link< weld::Widget &, tools::Rectangle > &  rLink)

◆ ContextMenuSelectHdl()

void TemplateDlgLocalView::ContextMenuSelectHdl ( std::u16string_view  rIdent)

◆ createContextMenu()

void TemplateDlgLocalView::createContextMenu ( const bool  bIsDefault,
const bool  bIsBuiltIn,
const bool  bIsSingleSel,
const OUString &  rDefaultImg 

◆ DECL_LINK() [1/4]

TemplateDlgLocalView::DECL_LINK ( KeyPressHdl  ,
const KeyEvent ,

◆ DECL_LINK() [2/4]

TemplateDlgLocalView::DECL_LINK ( ListViewChangedHdl  ,
weld::TreeView ,

◆ DECL_LINK() [3/4]

TemplateDlgLocalView::DECL_LINK ( PopupMenuHdl  ,
const CommandEvent ,

◆ DECL_LINK() [4/4]

TemplateDlgLocalView::DECL_LINK ( RowActivatedHdl  ,
weld::TreeView ,

◆ Hide()

void TemplateDlgLocalView::Hide ( )

Reimplemented from ThumbnailView.

Definition at line 257 of file templatedlglocalview.cxx.

References ThumbnailView::Hide(), and ListView::HideListView().

◆ insertFilteredItems()

void TemplateDlgLocalView::insertFilteredItems ( )

◆ insertItems()

void TemplateDlgLocalView::insertItems ( const std::vector< TemplateItemProperties > &  rTemplates,
bool  isRegionSelected = true,
bool  bShowCategoryInTooltip = false 

◆ IsVisible()

bool TemplateDlgLocalView::IsVisible ( ) const

◆ KeyInput()

bool TemplateDlgLocalView::KeyInput ( const KeyEvent rKEvt)

◆ MakeItemVisible()

void TemplateDlgLocalView::MakeItemVisible ( sal_uInt16  nId)

Definition at line 47 of file templatedlglocalview.hxx.

References ThumbnailView::MakeItemVisible(), and nId.

Referenced by syncCursor().

◆ reload()

void TemplateDlgLocalView::reload ( )

◆ setTemplateViewMode()

void TemplateDlgLocalView::setTemplateViewMode ( TemplateViewMode  eMode)

Definition at line 241 of file templatedlglocalview.cxx.

References eMode, and mViewMode.

◆ Show()

void TemplateDlgLocalView::Show ( )

◆ showAllTemplates()

void TemplateDlgLocalView::showAllTemplates ( )

◆ showRegion() [1/2]

void TemplateDlgLocalView::showRegion ( std::u16string_view  rName)

Definition at line 57 of file templatedlglocalview.cxx.

References TemplateLocalView::maRegions, and showRegion().

◆ showRegion() [2/2]

void TemplateDlgLocalView::showRegion ( TemplateContainerItem const *  pItem)

◆ syncCursor()

void TemplateDlgLocalView::syncCursor ( )

◆ updateSelection()

void TemplateDlgLocalView::updateSelection ( )

Member Data Documentation

◆ mViewMode

TemplateViewMode TemplateDlgLocalView::mViewMode

Definition at line 69 of file templatedlglocalview.hxx.

Referenced by createContextMenu(), setTemplateViewMode(), Show(), and syncCursor().

The documentation for this class was generated from the following files: