1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
10 #include "templatesearchview.hxx"
12 #include "templatesearchviewitem.hxx"
14 TemplateSearchView::TemplateSearchView (Window
*pParent
, WinBits nWinStyle
)
15 : ThumbnailView(pParent
,nWinStyle
)
19 TemplateSearchView::~TemplateSearchView ()
23 void TemplateSearchView::AppendItem(sal_uInt16 nAssocItemId
, sal_uInt16 nRegionId
, sal_uInt16 nIdx
,
24 const OUString
&rTitle
, const OUString
&rSubtitle
,
25 const OUString
&rPath
,
26 const BitmapEx
&rImage
)
28 TemplateSearchViewItem
*pItem
= new TemplateSearchViewItem(*this, getNextItemId());
29 pItem
->mnAssocId
= nAssocItemId
;
30 pItem
->mnDocId
= nIdx
;
31 pItem
->mnRegionId
= nRegionId
;
32 pItem
->maPreview1
= rImage
;
33 pItem
->maTitle
= rTitle
;
34 pItem
->setSubTitle(rSubtitle
);
35 pItem
->setPath(rPath
);
36 pItem
->setSelectClickHdl(LINK(this,ThumbnailView
,OnItemSelected
));
38 ThumbnailView::AppendItem(pItem
);
40 CalculateItemPositions();
43 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */