LibreOffice Module svx (master) 1
fillctrl.hxx
Go to the documentation of this file.
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#ifndef INCLUDED_SVX_FILLCTRL_HXX
21#define INCLUDED_SVX_FILLCTRL_HXX
22
23#include <memory>
25#include <sfx2/tbxctrl.hxx>
26#include <sfx2/weldutils.hxx>
27#include <svx/svxdllapi.h>
28
29class XFillStyleItem;
30class XFillColorItem;
32class XFillHatchItem;
33class XFillBitmapItem;
34class FillControl;
35
36/*************************************************************************
37|*
38|* Class for surface attributes (controls and controller)
39|*
40\************************************************************************/
41
43{
44private:
45 std::unique_ptr< XFillStyleItem > mpStyleItem;
46 std::unique_ptr< XFillColorItem > mpColorItem;
47 std::unique_ptr< XFillGradientItem > mpFillGradientItem;
48 std::unique_ptr< XFillHatchItem > mpHatchItem;
49 std::unique_ptr< XFillBitmapItem > mpBitmapItem;
50
55
56 sal_Int32 mnLastXFS;
58 sal_Int32 mnLastPosHatch;
59 sal_Int32 mnLastPosBitmap;
61
62 DECL_DLLPRIVATE_LINK(SelectFillTypeHdl, weld::ComboBox&, void);
63 DECL_DLLPRIVATE_LINK(SelectFillAttrHdl, weld::ComboBox&, void);
64
65public:
67
68 SvxFillToolBoxControl(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx);
69 virtual ~SvxFillToolBoxControl() override;
70
71 virtual void StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) override;
72 void Update();
74};
75
77{
78private:
80
81 std::unique_ptr<weld::ComboBox> mxLbFillType;
82 std::unique_ptr<weld::Toolbar> mxToolBoxColor;
83 std::unique_ptr<ToolbarUnoDispatcher> mxColorDispatch;
84 std::unique_ptr<weld::ComboBox> mxLbFillAttr;
87
88 DECL_LINK(AttrKeyInputHdl, const KeyEvent&, bool);
89 DECL_LINK(TypeKeyInputHdl, const KeyEvent&, bool);
90 DECL_LINK(ColorKeyInputHdl, const KeyEvent&, bool);
91 DECL_STATIC_LINK(FillControl, DumpAsPropertyTreeHdl, tools::JsonWriter&, void);
92 DECL_LINK(AttrFocusHdl, weld::Widget&, void);
93 DECL_LINK(TypeFocusHdl, weld::Widget&, void);
94
95 void SetOptimalSize();
96
97 virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
98 virtual void GetFocus() override;
99
100 static void ReleaseFocus_Impl();
101
102public:
103 FillControl(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame);
104 virtual void dispose() override;
105 virtual ~FillControl() override;
106};
107
108#endif // INCLUDED_SVX_FILLCTRL_HXX
109
110/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< ToolbarUnoDispatcher > mxColorDispatch
Definition: fillctrl.hxx:83
int mnAttrCurPos
Definition: fillctrl.hxx:86
std::unique_ptr< weld::ComboBox > mxLbFillType
Definition: fillctrl.hxx:81
DECL_STATIC_LINK(FillControl, DumpAsPropertyTreeHdl, tools::JsonWriter &, void)
std::unique_ptr< weld::Toolbar > mxToolBoxColor
Definition: fillctrl.hxx:82
int mnTypeCurPos
Definition: fillctrl.hxx:85
DECL_LINK(TypeKeyInputHdl, const KeyEvent &, bool)
DECL_LINK(TypeFocusHdl, weld::Widget &, void)
std::unique_ptr< weld::ComboBox > mxLbFillAttr
Definition: fillctrl.hxx:84
DECL_LINK(AttrFocusHdl, weld::Widget &, void)
DECL_LINK(ColorKeyInputHdl, const KeyEvent &, bool)
DECL_LINK(AttrKeyInputHdl, const KeyEvent &, bool)
virtual void SAL_CALL dispose() override
virtual VclPtr< InterimItemWindow > CreateItemWindow(vcl::Window *pParent)
virtual void StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState)
sal_Int32 mnLastPosBitmap
Definition: fillctrl.hxx:59
weld::Toolbar * mpToolBoxColor
Definition: fillctrl.hxx:53
std::unique_ptr< XFillGradientItem > mpFillGradientItem
Definition: fillctrl.hxx:47
std::unique_ptr< XFillBitmapItem > mpBitmapItem
Definition: fillctrl.hxx:49
sal_Int32 mnLastPosGradient
Definition: fillctrl.hxx:57
std::unique_ptr< XFillColorItem > mpColorItem
Definition: fillctrl.hxx:46
weld::ComboBox * mpLbFillAttr
Definition: fillctrl.hxx:54
VclPtr< FillControl > mxFillControl
Definition: fillctrl.hxx:51
std::unique_ptr< XFillHatchItem > mpHatchItem
Definition: fillctrl.hxx:48
weld::ComboBox * mpLbFillType
Definition: fillctrl.hxx:52
sal_Int32 mnLastPosHatch
Definition: fillctrl.hxx:58
std::unique_ptr< XFillStyleItem > mpStyleItem
Definition: fillctrl.hxx:45
DECL_DLLPRIVATE_LINK(SelectFillAttrHdl, weld::ComboBox &, void)
DECL_DLLPRIVATE_LINK(SelectFillTypeHdl, weld::ComboBox &, void)
sal_Int32 mnLastPosPattern
Definition: fillctrl.hxx:60
SfxItemState
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
#define SAL_WARN_UNUSED