LibreOffice Module svx (master) 1
extrusioncontrols.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#ifndef INCLUDED_SVX_SOURCE_TBXCTRLS_EXTRUSIONCONTROLS_HXX
20#define INCLUDED_SVX_SOURCE_TBXCTRLS_EXTRUSIONCONTROLS_HXX
21
24#include <svtools/valueset.hxx>
25#include <vcl/customweld.hxx>
26
27// enum to index light images
28#define FROM_TOP_LEFT 0
29#define FROM_TOP 1
30#define FROM_TOP_RIGHT 2
31#define FROM_LEFT 3
32#define FROM_FRONT 4
33#define FROM_RIGHT 5
34#define FROM_BOTTOM_LEFT 6
35#define FROM_BOTTOM 7
36#define FROM_BOTTOM_RIGHT 8
37
38#define DIRECTION_NW 0
39#define DIRECTION_N 1
40#define DIRECTION_NE 2
41#define DIRECTION_W 3
42#define DIRECTION_NONE 4
43#define DIRECTION_E 5
44#define DIRECTION_SW 6
45#define DIRECTION_S 7
46#define DIRECTION_SE 8
47
48namespace svx
49{
51{
52public:
54 virtual void GrabFocus() override;
55 virtual ~ExtrusionDirectionWindow() override;
56
57 virtual void statusChanged( const css::frame::FeatureStateEvent& Event ) override;
58
59private:
61 std::unique_ptr<ValueSet> mxDirectionSet;
62 std::unique_ptr<weld::CustomWeld> mxDirectionSetWin;
63 std::unique_ptr<weld::RadioButton> mxPerspective;
64 std::unique_ptr<weld::RadioButton> mxParallel;
65
67
68 DECL_LINK( SelectToolbarMenuHdl, weld::Toggleable&, void );
69 DECL_LINK( SelectValueSetHdl, ValueSet*, void );
70
71 void implSetDirection( sal_Int32 nSkew, bool bEnabled );
72 void implSetProjection( sal_Int32 nProjection, bool bEnabled );
73
74};
75
77{
78public:
79 explicit ExtrusionDirectionControl( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
80
81 virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow() override;
82 virtual VclPtr<vcl::Window> createVclPopupWindow( vcl::Window* pParent ) override;
83
84 // XInitialization
85 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
86
87 // XServiceInfo
88 virtual OUString SAL_CALL getImplementationName() override;
89 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
90};
91
93{
94private:
96 std::unique_ptr<weld::RadioButton> mxDepth0;
97 std::unique_ptr<weld::RadioButton> mxDepth1;
98 std::unique_ptr<weld::RadioButton> mxDepth2;
99 std::unique_ptr<weld::RadioButton> mxDepth3;
100 std::unique_ptr<weld::RadioButton> mxDepth4;
101 std::unique_ptr<weld::RadioButton> mxInfinity;
102 std::unique_ptr<weld::RadioButton> mxCustom;
103
105 double mfDepth;
108
109 DECL_LINK( SelectHdl, weld::Toggleable&, void );
110 DECL_LINK( MouseReleaseHdl, const MouseEvent&, bool );
111
112 void implFillStrings( FieldUnit eUnit );
113 void implSetDepth( double fDepth );
114
115 void DispatchDepthDialog();
116
117public:
119 virtual void GrabFocus() override;
120
121 virtual void statusChanged( const css::frame::FeatureStateEvent& Event ) override;
122};
123
125{
126public:
127 explicit ExtrusionDepthController( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
128
129 virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow() override;
130 virtual VclPtr<vcl::Window> createVclPopupWindow( vcl::Window* pParent ) override;
131
132 // XInitialization
133 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
134
135 // XServiceInfo
136 virtual OUString SAL_CALL getImplementationName() override;
137 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
138};
139
141{
142private:
144 std::unique_ptr<ValueSet> mxLightingSet;
145 std::unique_ptr<weld::CustomWeld> mxLightingSetWin;
146 std::unique_ptr<weld::RadioButton> mxBright;
147 std::unique_ptr<weld::RadioButton> mxNormal;
148 std::unique_ptr<weld::RadioButton> mxDim;
149
153
154 void implSetIntensity( int nLevel, bool bEnabled );
155 void implSetDirection( int nDirection, bool bEnabled );
156
157 DECL_LINK( SelectToolbarMenuHdl, weld::Toggleable&, void );
158 DECL_LINK( SelectValueSetHdl, ValueSet*, void );
159public:
161 virtual void GrabFocus() override;
162 virtual ~ExtrusionLightingWindow() override;
163
164 virtual void statusChanged( const css::frame::FeatureStateEvent& Event ) override;
165};
166
168{
169public:
170 explicit ExtrusionLightingControl( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
171
172 virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow() override;
173 virtual VclPtr<vcl::Window> createVclPopupWindow( vcl::Window* pParent ) override;
174
175 // XInitialization
176 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
177
178 // XServiceInfo
179 virtual OUString SAL_CALL getImplementationName() override;
180 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
181};
182
184{
185private:
187 std::unique_ptr<weld::RadioButton> mxWireFrame;
188 std::unique_ptr<weld::RadioButton> mxMatt;
189 std::unique_ptr<weld::RadioButton> mxPlastic;
190 std::unique_ptr<weld::RadioButton> mxMetal;
191 std::unique_ptr<weld::RadioButton> mxMetalMSO;
192
193 DECL_LINK( SelectHdl, weld::Toggleable&, void );
194
195 void implSetSurface( int nSurface, bool bEnabled );
196
197public:
199 virtual void GrabFocus() override;
200
201 virtual void statusChanged( const css::frame::FeatureStateEvent& Event ) override;
202};
203
204
206{
207public:
208 explicit ExtrusionSurfaceControl( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
209
210 virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow() override;
211 virtual VclPtr<vcl::Window> createVclPopupWindow( vcl::Window* pParent ) override;
212
213 // XInitialization
214 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
215
216 // XServiceInfo
217 virtual OUString SAL_CALL getImplementationName() override;
218 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
219};
220
221}
222#endif
223
224/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL getImplementationName() override
ExtrusionDepthController(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
virtual VclPtr< vcl::Window > createVclPopupWindow(vcl::Window *pParent) override
virtual std::unique_ptr< WeldToolbarPopup > weldPopupWindow() override
std::unique_ptr< weld::RadioButton > mxDepth4
void implSetDepth(double fDepth)
virtual void GrabFocus() override
ExtrusionDepthWindow(svt::PopupWindowController *pControl, weld::Widget *pParentWindow)
DECL_LINK(MouseReleaseHdl, const MouseEvent &, bool)
std::unique_ptr< weld::RadioButton > mxDepth0
void implFillStrings(FieldUnit eUnit)
std::unique_ptr< weld::RadioButton > mxCustom
std::unique_ptr< weld::RadioButton > mxDepth3
virtual void statusChanged(const css::frame::FeatureStateEvent &Event) override
std::unique_ptr< weld::RadioButton > mxDepth2
std::unique_ptr< weld::RadioButton > mxInfinity
std::unique_ptr< weld::RadioButton > mxDepth1
rtl::Reference< svt::PopupWindowController > mxControl
DECL_LINK(SelectHdl, weld::Toggleable &, void)
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
virtual VclPtr< vcl::Window > createVclPopupWindow(vcl::Window *pParent) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
ExtrusionDirectionControl(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual std::unique_ptr< WeldToolbarPopup > weldPopupWindow() override
ExtrusionDirectionWindow(svt::PopupWindowController *pControl, weld::Widget *pParentWindow)
std::unique_ptr< weld::RadioButton > mxParallel
void implSetDirection(sal_Int32 nSkew, bool bEnabled)
virtual void GrabFocus() override
DECL_LINK(SelectToolbarMenuHdl, weld::Toggleable &, void)
DECL_LINK(SelectValueSetHdl, ValueSet *, void)
std::unique_ptr< weld::RadioButton > mxPerspective
void implSetProjection(sal_Int32 nProjection, bool bEnabled)
rtl::Reference< svt::PopupWindowController > mxControl
virtual void statusChanged(const css::frame::FeatureStateEvent &Event) override
std::unique_ptr< ValueSet > mxDirectionSet
std::unique_ptr< weld::CustomWeld > mxDirectionSetWin
virtual ~ExtrusionDirectionWindow() override
virtual VclPtr< vcl::Window > createVclPopupWindow(vcl::Window *pParent) override
virtual OUString SAL_CALL getImplementationName() override
virtual std::unique_ptr< WeldToolbarPopup > weldPopupWindow() override
ExtrusionLightingControl(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
ExtrusionLightingWindow(svt::PopupWindowController *pControl, weld::Widget *pParentWindow)
rtl::Reference< svt::PopupWindowController > mxControl
DECL_LINK(SelectValueSetHdl, ValueSet *, void)
std::unique_ptr< weld::CustomWeld > mxLightingSetWin
std::unique_ptr< weld::RadioButton > mxDim
std::unique_ptr< ValueSet > mxLightingSet
virtual ~ExtrusionLightingWindow() override
std::unique_ptr< weld::RadioButton > mxNormal
std::unique_ptr< weld::RadioButton > mxBright
void implSetDirection(int nDirection, bool bEnabled)
DECL_LINK(SelectToolbarMenuHdl, weld::Toggleable &, void)
void implSetIntensity(int nLevel, bool bEnabled)
virtual void GrabFocus() override
virtual void statusChanged(const css::frame::FeatureStateEvent &Event) override
ExtrusionSurfaceControl(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual std::unique_ptr< WeldToolbarPopup > weldPopupWindow() override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
virtual VclPtr< vcl::Window > createVclPopupWindow(vcl::Window *pParent) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
std::unique_ptr< weld::RadioButton > mxMetalMSO
DECL_LINK(SelectHdl, weld::Toggleable &, void)
std::unique_ptr< weld::RadioButton > mxMetal
rtl::Reference< svt::PopupWindowController > mxControl
ExtrusionSurfaceWindow(svt::PopupWindowController *pControl, weld::Widget *pParentWindow)
std::unique_ptr< weld::RadioButton > mxWireFrame
std::unique_ptr< weld::RadioButton > mxPlastic
virtual void GrabFocus() override
virtual void statusChanged(const css::frame::FeatureStateEvent &Event) override
void implSetSurface(int nSurface, bool bEnabled)
std::unique_ptr< weld::RadioButton > mxMatt
FieldUnit
Sequence< PropertyValue > aArguments