Bump version to 6.4-15
[LibreOffice.git] / include / svx / fontwork.hxx
blob0fba454718df3958ec7eac13d5fa27e09b10516f
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 .
19 #ifndef INCLUDED_SVX_FONTWORK_HXX
20 #define INCLUDED_SVX_FONTWORK_HXX
22 #include <vcl/toolbox.hxx>
23 #include <vcl/fixed.hxx>
24 #include <vcl/field.hxx>
25 #include <vcl/idle.hxx>
26 #include <sfx2/dockwin.hxx>
27 #include <sfx2/ctrlitem.hxx>
28 #include <svx/svxdllapi.h>
30 class SvxColorListBox;
32 class XFormTextAdjustItem;
33 class XFormTextDistanceItem;
34 class XFormTextStartItem;
35 class XFormTextStyleItem;
36 class XFormTextMirrorItem;
37 class XFormTextHideFormItem;
38 class XFormTextOutlineItem;
39 class XFormTextShadowItem;
40 class XFormTextShadowColorItem;
41 class XFormTextShadowXValItem;
42 class XFormTextShadowYValItem;
44 /** ControllerItem for Fontwork
48 class SvxFontWorkDialog;
50 class SvxFontWorkControllerItem final : public SfxControllerItem
52 SvxFontWorkDialog &rFontWorkDlg;
54 virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
55 const SfxPoolItem* pState) override;
57 public:
58 SvxFontWorkControllerItem(sal_uInt16 nId, SvxFontWorkDialog&, SfxBindings&);
61 /** Derived from SfxChildWindow as "container" for fontwork dialog
64 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFontWorkChildWindow final : public SfxChildWindow
66 public:
67 SvxFontWorkChildWindow(vcl::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo*);
68 SFX_DECL_CHILDWINDOW_WITHID(SvxFontWorkChildWindow);
71 /** Floating window for setting attributes of text effects
74 class SAL_WARN_UNUSED SvxFontWorkDialog : public SfxDockingWindow
76 #define CONTROLLER_COUNT 11
78 SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT];
80 VclPtr<ToolBox> m_pTbxStyle;
81 VclPtr<ToolBox> m_pTbxAdjust;
83 VclPtr<MetricField> m_pMtrFldDistance;
84 VclPtr<MetricField> m_pMtrFldTextStart;
86 VclPtr<ToolBox> m_pTbxShadow;
88 VclPtr<FixedImage> m_pFbShadowX;
89 VclPtr<MetricField> m_pMtrFldShadowX;
90 VclPtr<FixedImage> m_pFbShadowY;
91 VclPtr<MetricField> m_pMtrFldShadowY;
93 VclPtr<SvxColorListBox> m_pShadowColorLB;
95 SfxBindings& rBindings;
96 Idle aInputIdle;
98 sal_uInt16 nLastStyleTbxId;
99 sal_uInt16 nStyleOffId;
100 sal_uInt16 nStyleRotateId;
101 sal_uInt16 nStyleUprightId;
102 sal_uInt16 nStyleSlantXId;
103 sal_uInt16 nStyleSlantYId;
105 sal_uInt16 nLastAdjustTbxId;
106 sal_uInt16 nAdjustMirrorId;
107 sal_uInt16 nAdjustLeftId;
108 sal_uInt16 nAdjustCenterId;
109 sal_uInt16 nAdjustRightId;
110 sal_uInt16 nAdjustAutoSizeId;
112 sal_uInt16 nLastShadowTbxId;
113 sal_uInt16 nShowFormId;
114 sal_uInt16 nOutlineId;
115 sal_uInt16 nShadowOffId;
116 sal_uInt16 nShadowNormalId;
117 sal_uInt16 nShadowSlantId;
119 long nSaveShadowX;
120 long nSaveShadowY;
121 long nSaveShadowAngle;
122 long nSaveShadowSize;
124 friend class SvxFontWorkChildWindow;
125 friend class SvxFontWorkControllerItem;
127 DECL_LINK( SelectStyleHdl_Impl, ToolBox *, void );
128 DECL_LINK( SelectAdjustHdl_Impl, ToolBox *, void );
129 DECL_LINK( SelectShadowHdl_Impl, ToolBox *, void );
131 DECL_LINK( ModifyInputHdl_Impl, Edit&, void );
132 DECL_LINK( InputTimeoutHdl_Impl, Timer *, void );
134 DECL_LINK( ColorSelectHdl_Impl, SvxColorListBox&, void );
136 void SetStyle_Impl(const XFormTextStyleItem*);
137 void SetAdjust_Impl(const XFormTextAdjustItem*);
138 void SetDistance_Impl(const XFormTextDistanceItem*);
139 void SetStart_Impl(const XFormTextStartItem*);
140 void SetMirror_Impl(const XFormTextMirrorItem*);
141 void SetShowForm_Impl(const XFormTextHideFormItem*);
142 void SetOutline_Impl(const XFormTextOutlineItem*);
143 void SetShadow_Impl(const XFormTextShadowItem*, bool bRestoreValues = false);
144 void SetShadowColor_Impl(const XFormTextShadowColorItem*);
145 void SetShadowXVal_Impl(const XFormTextShadowXValItem*);
146 void SetShadowYVal_Impl(const XFormTextShadowYValItem*);
148 void ApplyImageList();
150 protected:
151 virtual SfxChildAlignment CheckAlignment( SfxChildAlignment eActAlign,
152 SfxChildAlignment eAlign ) override;
154 public:
155 SvxFontWorkDialog(SfxBindings *pBinding, SfxChildWindow *pCW,
156 vcl::Window* pParent);
157 virtual ~SvxFontWorkDialog() override;
158 virtual void dispose() override;
161 #endif // INCLUDED_SVX_FONTWORK_HXX
163 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */