bump product version to 4.1.6.2
[LibreOffice.git] / svx / source / tbxctrls / extrusioncontrols.hxx
blob9f5f5ff02c7b06123194945293674aba48e06c24
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 _SVX_EXTRUSION_CONTROLS_HXX
20 #define _SVX_EXTRUSION_CONTROLS_HXX
22 #include "svx/svxdllapi.h"
24 #include <svtools/treelistbox.hxx>
25 #include <vcl/button.hxx>
26 #include <vcl/dialog.hxx>
27 #include <vcl/field.hxx>
28 #include <vcl/fixed.hxx>
30 #include <svtools/toolbarmenu.hxx>
31 #include <svtools/popupwindowcontroller.hxx>
32 #include <svtools/popupmenucontrollerbase.hxx>
34 class ValueSet;
36 //========================================================================
38 namespace svx
40 class ExtrusionDirectionWindow : public svtools::ToolbarMenu
42 public:
43 ExtrusionDirectionWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow );
45 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
46 virtual void DataChanged( const DataChangedEvent& rDCEvt );
48 private:
49 svt::ToolboxController& mrController;
50 ValueSet* mpDirectionSet;
52 Image maImgDirection[9];
53 Image maImgPerspective;
54 Image maImgParallel;
56 const OUString msExtrusionDirection;
57 const OUString msExtrusionProjection;
59 DECL_LINK( SelectHdl, void * );
60 void FillValueSet();
62 void implSetDirection( sal_Int32 nSkew, bool bEnabled = true );
63 void implSetProjection( sal_Int32 nProjection, bool bEnabled = true );
67 //========================================================================
69 class ExtrusionDirectionControl : public svt::PopupWindowController
71 public:
72 ExtrusionDirectionControl( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
74 virtual ::Window* createPopupWindow( ::Window* pParent );
76 // XServiceInfo
77 virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
78 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
80 using svt::PopupWindowController::createPopupWindow;
83 //========================================================================
85 class ExtrusionDepthWindow : public svtools::ToolbarMenu
87 private:
88 svt::ToolboxController& mrController;
90 Image maImgDepth0;
91 Image maImgDepth1;
92 Image maImgDepth2;
93 Image maImgDepth3;
94 Image maImgDepth4;
95 Image maImgDepthInfinity;
97 FieldUnit meUnit;
98 double mfDepth;
100 const OUString msExtrusionDepth;
101 const OUString msMetricUnit;
103 DECL_LINK( SelectHdl, void * );
105 void implFillStrings( FieldUnit eUnit );
106 void implSetDepth( double fDepth );
108 public:
109 ExtrusionDepthWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow );
111 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
112 virtual void DataChanged( const DataChangedEvent& rDCEvt );
115 //========================================================================
117 class ExtrusionDepthController : public svt::PopupWindowController
119 public:
120 ExtrusionDepthController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
122 virtual ::Window* createPopupWindow( ::Window* pParent );
124 // XServiceInfo
125 virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
126 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
128 using svt::PopupWindowController::createPopupWindow;
131 //========================================================================
133 class ExtrusionLightingWindow : public svtools::ToolbarMenu
135 private:
136 svt::ToolboxController& mrController;
137 ValueSet* mpLightingSet;
139 Image maImgLightingOff[9];
140 Image maImgLightingOn[9];
141 Image maImgLightingPreview[9];
143 Image maImgBright;
144 Image maImgNormal;
145 Image maImgDim;
147 int mnLevel;
148 bool mbLevelEnabled;
149 int mnDirection;
150 bool mbDirectionEnabled;
152 const OUString msExtrusionLightingDirection;
153 const OUString msExtrusionLightingIntensity;
155 void implSetIntensity( int nLevel, bool bEnabled );
156 void implSetDirection( int nDirection, bool bEnabled );
158 DECL_LINK( SelectHdl, void * );
159 public:
160 ExtrusionLightingWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow );
162 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
163 virtual void DataChanged( const DataChangedEvent& rDCEvt );
166 //========================================================================
168 class ExtrusionLightingControl : public svt::PopupWindowController
170 public:
171 ExtrusionLightingControl( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
173 virtual ::Window* createPopupWindow( ::Window* pParent );
175 // XServiceInfo
176 virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
177 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
179 using svt::PopupWindowController::createPopupWindow;
182 //========================================================================
184 class ExtrusionSurfaceWindow : public svtools::ToolbarMenu
186 private:
187 svt::ToolboxController& mrController;
189 Image maImgSurface1;
190 Image maImgSurface2;
191 Image maImgSurface3;
192 Image maImgSurface4;
194 const OUString msExtrusionSurface;
196 DECL_LINK( SelectHdl, void * );
198 void implSetSurface( int nSurface, bool bEnabled );
200 public:
201 ExtrusionSurfaceWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow );
203 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
206 //========================================================================
208 class ExtrusionSurfaceControl : public svt::PopupWindowController
210 public:
211 ExtrusionSurfaceControl( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
213 virtual ::Window* createPopupWindow( ::Window* pParent );
215 // XServiceInfo
216 virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
217 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
219 using svt::PopupWindowController::createPopupWindow;
222 //========================================================================
225 #endif
227 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */