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/.
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 .
19 #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREATRANSPARENCYGRADIENTPOPUP_HXX
20 #define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREATRANSPARENCYGRADIENTPOPUP_HXX
22 #include <vcl/weld.hxx>
23 #include <svtools/toolbarmenu.hxx>
24 #include <basegfx/utils/gradienttools.hxx>
26 class XFillFloatTransparenceItem
;
28 namespace svx::sidebar
30 class AreaTransparencyGradientControl
;
31 class AreaPropertyPanelBase
;
33 class AreaTransparencyGradientPopup final
: public WeldToolbarPopup
36 AreaPropertyPanelBase
& mrAreaPropertyPanel
;
37 std::unique_ptr
<weld::Widget
> mxCenterGrid
;
38 std::unique_ptr
<weld::Widget
> mxAngleGrid
;
39 std::unique_ptr
<weld::MetricSpinButton
> mxMtrTrgrCenterX
;
40 std::unique_ptr
<weld::MetricSpinButton
> mxMtrTrgrCenterY
;
41 std::unique_ptr
<weld::MetricSpinButton
> mxMtrTrgrAngle
;
42 std::unique_ptr
<weld::Toolbar
> mxBtnLeft45
;
43 std::unique_ptr
<weld::Toolbar
> mxBtnRight45
;
44 std::unique_ptr
<weld::MetricSpinButton
> mxMtrTrgrStartValue
;
45 std::unique_ptr
<weld::MetricSpinButton
> mxMtrTrgrEndValue
;
46 std::unique_ptr
<weld::MetricSpinButton
> mxMtrTrgrBorder
;
48 // MCGR: Preserve ColorStops until we have a UI to edit these
49 basegfx::BColorStops maColorStops
;
51 void InitStatus(XFillFloatTransparenceItem
const* pGradientItem
);
52 void ExecuteValueModify();
53 DECL_LINK(ModifiedTrgrHdl_Impl
, weld::MetricSpinButton
&, void);
54 DECL_LINK(Left_Click45_Impl
, const OUString
&, void);
55 DECL_LINK(Right_Click45_Impl
, const OUString
&, void);
58 AreaTransparencyGradientPopup(const css::uno::Reference
<css::frame::XFrame
>& rFrame
,
59 AreaPropertyPanelBase
& rPanel
, weld::Widget
* pParent
);
60 ~AreaTransparencyGradientPopup();
62 void Rearrange(XFillFloatTransparenceItem
const* pItem
);
63 virtual void GrabFocus() override
;
66 } // end of namespace svx::sidebar
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */