summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-07-20 23:14:02 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-07-26 00:24:35 +0200
commit5b9a9751a99219787113a1de8239c25c5946e4be (patch)
tree4652f47945d0fdae53b5991ecaf115dbd361232f /include
parentf4c094f7ba1da11bffe56adaa65941fe6f82608b (diff)
move header file to public include dir
we will need it in chart2 so make it available Change-Id: I9ef1feebc2e0086e0647349b4e92f9fc9cdd4e8c
Diffstat (limited to 'include')
-rw-r--r--include/svx/sidebar/AreaPropertyPanelBase.hxx166
-rw-r--r--include/svx/sidebar/AreaTransparencyGradientPopup.hxx48
2 files changed, 214 insertions, 0 deletions
diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx
new file mode 100644
index 000000000000..45bda7d34712
--- /dev/null
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -0,0 +1,166 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREAPROPERTYPANELBASE_HXX
+#define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREAPROPERTYPANELBASE_HXX
+
+#include "AreaTransparencyGradientPopup.hxx"
+#include <vcl/ctrl.hxx>
+#include <sfx2/sidebar/SidebarPanelBase.hxx>
+#include <sfx2/sidebar/ControllerItem.hxx>
+#include <svx/xgrad.hxx>
+#include <svx/itemwin.hxx>
+#include <svx/xfillit0.hxx>
+#include <svx/xflclit.hxx>
+#include <svx/xflgrit.hxx>
+#include <svx/xflhtit.hxx>
+#include <svx/xbtmpit.hxx>
+#include <svx/drawitem.hxx>
+#include <svx/sidebar/PanelLayout.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/vclptr.hxx>
+#include <svl/intitem.hxx>
+#include <com/sun/star/ui/XUIElement.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <svx/svxdllapi.h>
+
+class XFillFloatTransparenceItem;
+class XFillTransparenceItem;
+class XFillStyleItem;
+class XFillGradientItem;
+class XFillColorItem;
+class XFillHatchItem;
+class XFillBitmapItem;
+
+namespace svx { namespace sidebar {
+
+class PopupContainer;
+class AreaTransparencyGradientControl;
+
+class SVX_DLLPUBLIC AreaPropertyPanelBase
+: public PanelLayout,
+ public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+{
+public:
+
+ virtual void dispose() SAL_OVERRIDE;
+
+ virtual void DataChanged(
+ const DataChangedEvent& rEvent) SAL_OVERRIDE;
+
+ virtual void NotifyItemUpdate(
+ const sal_uInt16 nSId,
+ const SfxItemState eState,
+ const SfxPoolItem* pState,
+ const bool bIsEnabled) SAL_OVERRIDE;
+
+ const static sal_Int32 DEFAULT_CENTERX;
+ const static sal_Int32 DEFAULT_CENTERY;
+ const static sal_Int32 DEFAULT_ANGLE;
+ const static sal_Int32 DEFAULT_STARTVALUE;
+ const static sal_Int32 DEFAULT_ENDVALUE;
+ const static sal_Int32 DEFAULT_BORDER;
+
+ XGradient GetGradient (const css::awt::GradientStyle eStyle) const;
+ void SetGradient (const XGradient& rGradient);
+ sal_Int32 GetSelectedTransparencyTypeIndex() const;
+
+ // constructor/destuctor
+ AreaPropertyPanelBase(
+ vcl::Window* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame);
+
+ virtual ~AreaPropertyPanelBase();
+
+ virtual void setFillTransparence(const XFillTransparenceItem& rItem) = 0;
+ virtual void setFillFloatTransparence(const XFillFloatTransparenceItem& rItem) = 0;
+ virtual void setFillStyle(const XFillStyleItem& rItem) = 0;
+ virtual void setFillStyleAndColor(const XFillStyleItem* pStyleItem, const XFillColorItem& aColorItem) = 0;
+ virtual void setFillStyleAndGradient(const XFillStyleItem* pStyleItem, const XFillGradientItem& aGradientItem) = 0;
+ virtual void setFillStyleAndHatch(const XFillStyleItem* pStyleItem, const XFillHatchItem& aHatchItem) = 0;
+ virtual void setFillStyleAndBitmap(const XFillStyleItem* pStyleItem, const XFillBitmapItem& aHatchItem) = 0;
+
+protected:
+ sal_uInt16 meLastXFS;
+
+ sal_Int32 mnLastPosGradient;
+ sal_Int32 mnLastPosHatch;
+ sal_Int32 mnLastPosBitmap;
+ sal_uInt16 mnLastTransSolid;
+
+ XGradient maGradientLinear;
+ XGradient maGradientAxial;
+ XGradient maGradientRadial;
+ XGradient maGradientElliptical;
+ XGradient maGradientSquare;
+ XGradient maGradientRect;
+
+ //ui controls
+ VclPtr<FixedText> mpColorTextFT;
+ VclPtr<SvxFillTypeBox> mpLbFillType;
+ VclPtr<SvxFillAttrBox> mpLbFillAttr;
+ VclPtr<ToolBox> mpToolBoxColor; // for new color picker
+ VclPtr<FixedText> mpTrspTextFT;
+ VclPtr<ListBox> mpLBTransType;
+ VclPtr<MetricField> mpMTRTransparent;
+ VclPtr<ToolBox> mpBTNGradient;
+
+ ::boost::scoped_ptr< XFillStyleItem > mpStyleItem;
+ ::boost::scoped_ptr< XFillColorItem > mpColorItem;
+ ::boost::scoped_ptr< XFillGradientItem > mpFillGradientItem;
+ ::boost::scoped_ptr< XFillHatchItem > mpHatchItem;
+ ::boost::scoped_ptr< XFillBitmapItem > mpBitmapItem;
+
+ Image maImgAxial;
+ Image maImgElli;
+ Image maImgQuad;
+ Image maImgRadial;
+ Image maImgSquare;
+ Image maImgLinear;
+
+ AreaTransparencyGradientPopup maTrGrPopup;
+
+ ::boost::scoped_ptr< XFillFloatTransparenceItem > mpFloatTransparenceItem;
+ ::boost::scoped_ptr< SfxUInt16Item > mpTransparanceItem;
+
+ css::uno::Reference<css::frame::XFrame> mxFrame;
+
+ DECL_LINK(SelectFillTypeHdl, ListBox* );
+ DECL_LINK(SelectFillAttrHdl, ListBox* );
+ DECL_LINK(ChangeTrgrTypeHdl_Impl, void*);
+ DECL_LINK(ModifyTransparentHdl_Impl, void*);
+
+ // for transparency gradient
+ VclPtr<PopupControl> CreateTransparencyGradientControl (PopupContainer* pParent);
+ DECL_LINK_TYPED( ClickTrGrHdl_Impl, ToolBox*, void );
+
+ void Initialize();
+ void Update();
+ void ImpUpdateTransparencies();
+};
+
+
+} } // end of namespace svx::sidebar
+
+
+
+#endif // INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREAPROPERTYPANEL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sidebar/AreaTransparencyGradientPopup.hxx b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
new file mode 100644
index 000000000000..b11cb8ce35d5
--- /dev/null
+++ b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREATRANSPARENCYGRADIENTPOPUP_HXX
+#define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREATRANSPARENCYGRADIENTPOPUP_HXX
+
+#include "svx/sidebar/Popup.hxx"
+
+#include <boost/function.hpp>
+
+
+class XFillFloatTransparenceItem;
+
+
+namespace svx { namespace sidebar {
+
+class AreaTransparencyGradientPopup
+ : public Popup
+{
+public:
+ AreaTransparencyGradientPopup (
+ vcl::Window* pParent,
+ const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator);
+ virtual ~AreaTransparencyGradientPopup();
+
+ void Rearrange (XFillFloatTransparenceItem* pItem);
+};
+
+} } // end of namespace svx::sidebar
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */