Bump version to 6.4-15
[LibreOffice.git] / include / svx / fillctrl.hxx
blob5278fc31e7187e256552a42a446402c2f8eaaeee
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 .
20 #ifndef INCLUDED_SVX_FILLCTRL_HXX
21 #define INCLUDED_SVX_FILLCTRL_HXX
23 #include <memory>
24 #include <sfx2/tbxctrl.hxx>
25 #include <svx/svxdllapi.h>
26 #include <com/sun/star/drawing/FillStyle.hpp>
28 class XFillStyleItem;
29 class XFillColorItem;
30 class XFillGradientItem;
31 class XFillHatchItem;
32 class XFillBitmapItem;
33 class FillControl;
34 class SvxFillTypeBox;
35 class SvxFillAttrBox;
36 class ListBox;
38 /*************************************************************************
40 |* Class for surface attributes (controls and controller)
42 \************************************************************************/
44 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFillToolBoxControl final : public SfxToolBoxControl
46 private:
47 std::unique_ptr< XFillStyleItem > mpStyleItem;
48 std::unique_ptr< XFillColorItem > mpColorItem;
49 std::unique_ptr< XFillGradientItem > mpFillGradientItem;
50 std::unique_ptr< XFillHatchItem > mpHatchItem;
51 std::unique_ptr< XFillBitmapItem > mpBitmapItem;
53 VclPtr<FillControl> mpFillControl;
54 VclPtr<SvxFillTypeBox> mpLbFillType;
55 VclPtr<ToolBox> mpToolBoxColor;
56 VclPtr<SvxFillAttrBox> mpLbFillAttr;
58 css::drawing::FillStyle meLastXFS;
59 sal_Int32 mnLastPosGradient;
60 sal_Int32 mnLastPosHatch;
61 sal_Int32 mnLastPosBitmap;
63 DECL_LINK(SelectFillTypeHdl, ListBox&, void);
64 DECL_LINK(SelectFillAttrHdl, ListBox&, void);
66 public:
67 SFX_DECL_TOOLBOX_CONTROL();
69 SvxFillToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
70 virtual ~SvxFillToolBoxControl() override;
72 virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) override;
73 void Update();
74 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override;
77 class SAL_WARN_UNUSED FillControl : public vcl::Window
79 private:
80 friend class SvxFillToolBoxControl;
82 VclPtr<SvxFillTypeBox> mpLbFillType;
83 VclPtr<ToolBox> mpToolBoxColor;
84 VclPtr<SvxFillAttrBox> mpLbFillAttr;
86 void SetOptimalSize();
88 virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
90 public:
91 FillControl(vcl::Window* pParent);
92 virtual ~FillControl() override;
93 virtual void dispose() override;
95 virtual void Resize() override;
98 #endif // INCLUDED_SVX_FILLCTRL_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */