Branch libreoffice-5-0-4
[LibreOffice.git] / include / svx / fontworkgallery.hxx
blobdfae49d09336dc1c0eca0ad1a27fdbca18fdded8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #ifndef INCLUDED_SVX_FONTWORKGALLERY_HXX
22 #define INCLUDED_SVX_FONTWORKGALLERY_HXX
24 #include <svx/svxdllapi.h>
26 #include <vcl/fixed.hxx>
27 #include <vcl/button.hxx>
28 #include <vcl/dialog.hxx>
29 #include <vcl/field.hxx>
31 #include <svtools/valueset.hxx>
33 #include <sfx2/tbxctrl.hxx>
35 #include <vector>
37 class FmFormModel;
38 class SdrView;
39 namespace vcl { class Window; }
40 class SdrTextObj;
41 class SdrObject;
42 class SdrModel;
44 class SfxBindings;
48 namespace svx
51 class SVX_DLLPUBLIC SAL_WARN_UNUSED FontWorkShapeTypeControl : public SfxToolBoxControl
53 public:
54 SFX_DECL_TOOLBOX_CONTROL();
55 FontWorkShapeTypeControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
56 virtual ~FontWorkShapeTypeControl();
58 virtual void Select(sal_uInt16 nSelectModifier) SAL_OVERRIDE;
59 virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE;
60 virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE;
63 class SAL_WARN_UNUSED FontworkCharacterSpacingDialog : public ModalDialog
65 VclPtr<MetricField> m_pMtrScale;
67 public:
68 FontworkCharacterSpacingDialog( vcl::Window* pParent, sal_Int32 nScale );
69 virtual ~FontworkCharacterSpacingDialog();
70 virtual void dispose() SAL_OVERRIDE;
72 sal_Int32 getScale() const;
75 class SVX_DLLPUBLIC SAL_WARN_UNUSED FontWorkGalleryDialog : public ModalDialog
77 VclPtr<ValueSet> mpCtlFavorites;
78 VclPtr<OKButton> mpOKButton;
80 sal_uInt16 mnThemeId;
82 SdrView* mpSdrView;
83 FmFormModel* mpModel;
85 DECL_LINK( DoubleClickFavoriteHdl, void * );
86 DECL_LINK( ClickOKHdl, void * );
87 DECL_LINK( ClickTextDirectionHdl, ImageButton * );
89 SdrObject** mppSdrObject;
90 SdrModel* mpDestModel;
92 void initFavorites(sal_uInt16 nThemeId);
93 void insertSelectedFontwork();
94 void fillFavorites(sal_uInt16 nThemeId);
96 std::vector< BitmapEx> maFavoritesHorizontal;
98 public:
99 FontWorkGalleryDialog( SdrView* pView, vcl::Window* pParent, sal_uInt16 nSID );
100 virtual ~FontWorkGalleryDialog();
101 virtual void dispose() SAL_OVERRIDE;
103 // SJ: if the SdrObject** is set, the SdrObject is not inserted into the page when executing the dialog
104 void SetSdrObjectRef( SdrObject**, SdrModel* pModel );
109 #endif
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */