/src/libreoffice/include/svx/fontworkgallery.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 | | * This file incorporates work covered by the following license notice: |
10 | | * |
11 | | * Licensed to the Apache Software Foundation (ASF) under one or more |
12 | | * contributor license agreements. See the NOTICE file distributed |
13 | | * with this work for additional information regarding copyright |
14 | | * ownership. The ASF licenses this file to you under the Apache |
15 | | * License, Version 2.0 (the "License"); you may not use this file |
16 | | * except in compliance with the License. You may obtain a copy of |
17 | | * the License at http://www.apache.org/licenses/LICENSE-2.0 . |
18 | | */ |
19 | | |
20 | | |
21 | | #ifndef INCLUDED_SVX_FONTWORKGALLERY_HXX |
22 | | #define INCLUDED_SVX_FONTWORKGALLERY_HXX |
23 | | |
24 | | #include <svx/svxdllapi.h> |
25 | | #include <vcl/weld/DialogController.hxx> |
26 | | #include <vcl/weld/IconView.hxx> |
27 | | #include <vcl/weld/MetricSpinButton.hxx> |
28 | | #include <vcl/weld/weld.hxx> |
29 | | #include <com/sun/star/frame/XFrame.hpp> |
30 | | #include <map> |
31 | | #include <vector> |
32 | | |
33 | | class SdrView; |
34 | | class SdrObject; |
35 | | class SdrModel; |
36 | | |
37 | | namespace svx |
38 | | { |
39 | | |
40 | | class SAL_WARN_UNUSED FontworkCharacterSpacingDialog final : public weld::GenericDialogController |
41 | | { |
42 | | std::unique_ptr<weld::MetricSpinButton> m_xMtrScale; |
43 | | |
44 | | public: |
45 | | FontworkCharacterSpacingDialog(weld::Window* pParent, sal_Int32 nScale); |
46 | | virtual ~FontworkCharacterSpacingDialog() override; |
47 | | |
48 | | sal_Int32 getScale() const; |
49 | | }; |
50 | | |
51 | | class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC FontWorkGalleryDialog final : public weld::GenericDialogController |
52 | | { |
53 | | sal_uInt16 mnThemeId; |
54 | | SdrView& mrSdrView; |
55 | | |
56 | | bool mbInsertIntoPage; |
57 | | rtl::Reference<SdrObject> mxSdrObject; |
58 | | SdrModel* mpDestModel; |
59 | | |
60 | | std::vector<Bitmap> maFavoritesHorizontal; |
61 | | |
62 | | std::unique_ptr<weld::IconView> maCtlFavorites; |
63 | | std::unique_ptr<weld::Button> mxOKButton; |
64 | | |
65 | | css::uno::Reference<css::frame::XFrame> mxFrame; |
66 | | |
67 | | void initFavorites(sal_uInt16 nThemeId); |
68 | | void insertSelectedFontwork(); |
69 | | void fillFavorites(sal_uInt16 nThemeId); |
70 | | |
71 | | DECL_DLLPRIVATE_LINK(DoubleClickFavoriteHdl, weld::IconView&, bool); |
72 | | DECL_DLLPRIVATE_LINK(ClickOKHdl, weld::Button&, void ); |
73 | | |
74 | | public: |
75 | | FontWorkGalleryDialog(weld::Window* pParent, SdrView& rView, |
76 | | css::uno::Reference<css::frame::XFrame> xFrame); |
77 | | virtual ~FontWorkGalleryDialog() override; |
78 | | |
79 | | // SJ: if the SdrObject** is set, the SdrObject is not inserted into the page when executing the dialog |
80 | | void SetSdrObjectRef( SdrModel* pModel ); |
81 | 0 | SdrObject* GetSdrObjectRef() { return mxSdrObject.get(); } |
82 | | }; |
83 | | |
84 | | } |
85 | | |
86 | | #endif |
87 | | |
88 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |