Version 3.6.0.2, tag libreoffice-3.6.0.2
[LibreOffice.git] / svx / source / tbxctrls / extrusioncontrols.hxx
blob5ff022bd0cf59d17ee74c15ae64cc0790cab0439
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _SVX_EXTRUSION_CONTROLS_HXX
29 #define _SVX_EXTRUSION_CONTROLS_HXX
31 #include "svx/svxdllapi.h"
33 #include <svtools/svtreebx.hxx>
34 #include <vcl/button.hxx>
35 #include <vcl/dialog.hxx>
36 #include <vcl/field.hxx>
37 #include <vcl/fixed.hxx>
39 #include <svtools/toolbarmenu.hxx>
40 #include <svtools/popupwindowcontroller.hxx>
41 #include <svtools/popupmenucontrollerbase.hxx>
43 class SfxBindings;
44 class SfxStatusForwarder;
45 class ValueSet;
47 //========================================================================
49 namespace svx
51 class ToolboxButtonColorUpdater;
53 class ExtrusionDirectionWindow : public svtools::ToolbarMenu
55 public:
56 ExtrusionDirectionWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow );
58 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
59 virtual void DataChanged( const DataChangedEvent& rDCEvt );
61 private:
62 svt::ToolboxController& mrController;
63 ValueSet* mpDirectionSet;
65 Image maImgDirection[9];
66 Image maImgPerspective;
67 Image maImgParallel;
69 const rtl::OUString msExtrusionDirection;
70 const rtl::OUString msExtrusionProjection;
72 DECL_LINK( SelectHdl, void * );
73 void FillValueSet();
75 void implSetDirection( sal_Int32 nSkew, bool bEnabled = true );
76 void implSetProjection( sal_Int32 nProjection, bool bEnabled = true );
80 //========================================================================
82 class ExtrusionDirectionControl : public svt::PopupWindowController
84 public:
85 ExtrusionDirectionControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
87 virtual ::Window* createPopupWindow( ::Window* pParent );
89 // XServiceInfo
90 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
91 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
93 using svt::PopupWindowController::createPopupWindow;
96 //========================================================================
98 class ExtrusionDepthWindow : public svtools::ToolbarMenu
100 private:
101 svt::ToolboxController& mrController;
103 Image maImgDepth0;
104 Image maImgDepth1;
105 Image maImgDepth2;
106 Image maImgDepth3;
107 Image maImgDepth4;
108 Image maImgDepthInfinity;
110 FieldUnit meUnit;
111 double mfDepth;
113 const rtl::OUString msExtrusionDepth;
114 const rtl::OUString msMetricUnit;
116 DECL_LINK( SelectHdl, void * );
118 void implFillStrings( FieldUnit eUnit );
119 void implSetDepth( double fDepth );
121 public:
122 ExtrusionDepthWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow );
124 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
125 virtual void DataChanged( const DataChangedEvent& rDCEvt );
128 //========================================================================
130 class ExtrusionDepthController : public svt::PopupWindowController
132 public:
133 ExtrusionDepthController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
135 virtual ::Window* createPopupWindow( ::Window* pParent );
137 // XServiceInfo
138 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
139 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
141 using svt::PopupWindowController::createPopupWindow;
144 //========================================================================
146 class ExtrusionLightingWindow : public svtools::ToolbarMenu
148 private:
149 svt::ToolboxController& mrController;
150 ValueSet* mpLightingSet;
152 Image maImgLightingOff[9];
153 Image maImgLightingOn[9];
154 Image maImgLightingPreview[9];
156 Image maImgBright;
157 Image maImgNormal;
158 Image maImgDim;
160 int mnLevel;
161 bool mbLevelEnabled;
162 int mnDirection;
163 bool mbDirectionEnabled;
165 const rtl::OUString msExtrusionLightingDirection;
166 const rtl::OUString msExtrusionLightingIntensity;
168 void implSetIntensity( int nLevel, bool bEnabled );
169 void implSetDirection( int nDirection, bool bEnabled );
171 DECL_LINK( SelectHdl, void * );
172 public:
173 ExtrusionLightingWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow );
175 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
176 virtual void DataChanged( const DataChangedEvent& rDCEvt );
179 //========================================================================
181 class ExtrusionLightingControl : public svt::PopupWindowController
183 public:
184 ExtrusionLightingControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
186 virtual ::Window* createPopupWindow( ::Window* pParent );
188 // XServiceInfo
189 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
190 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
192 using svt::PopupWindowController::createPopupWindow;
195 //========================================================================
197 class ExtrusionSurfaceWindow : public svtools::ToolbarMenu
199 private:
200 svt::ToolboxController& mrController;
202 Image maImgSurface1;
203 Image maImgSurface2;
204 Image maImgSurface3;
205 Image maImgSurface4;
207 const rtl::OUString msExtrusionSurface;
209 DECL_LINK( SelectHdl, void * );
211 void implSetSurface( int nSurface, bool bEnabled );
213 public:
214 ExtrusionSurfaceWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow );
216 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
219 //========================================================================
221 class ExtrusionSurfaceControl : public svt::PopupWindowController
223 public:
224 ExtrusionSurfaceControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
226 virtual ::Window* createPopupWindow( ::Window* pParent );
228 // XServiceInfo
229 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
230 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
232 using svt::PopupWindowController::createPopupWindow;
235 //========================================================================
238 #endif
240 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */