/src/libreoffice/sfx2/inc/templateviewitem.hxx
Line | Count | Source |
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 | | |
10 | | #pragma once |
11 | | |
12 | | #include <sfx2/thumbnailviewitem.hxx> |
13 | | |
14 | | class TemplateViewItem final : public ThumbnailViewItem |
15 | | { |
16 | | public: |
17 | | |
18 | | TemplateViewItem(ThumbnailView& rView, sal_uInt16 nId); |
19 | | |
20 | | virtual ~TemplateViewItem () override; |
21 | | |
22 | 0 | void setPath (const OUString &rPath) { maPath = rPath; } |
23 | | |
24 | 0 | const OUString& getPath () const { return maPath; } |
25 | | |
26 | 0 | void showDefaultIcon(bool bVal) { mbIsDefaultTemplate = bVal; } |
27 | | |
28 | 0 | bool IsDefaultTemplate() const { return mbIsDefaultTemplate; } |
29 | | |
30 | | tools::Rectangle getDefaultIconArea() const; |
31 | | |
32 | | virtual void Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor, |
33 | | const ThumbnailItemAttributes *pAttrs) override; |
34 | | |
35 | | sal_uInt16 mnRegionId; |
36 | | sal_uInt16 mnDocId; |
37 | | |
38 | | private: |
39 | | |
40 | | OUString maPath; |
41 | | Bitmap maDefaultBitmap; |
42 | | bool mbIsDefaultTemplate; |
43 | | }; |
44 | | |
45 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |