LCOV - code coverage report
Current view: top level - svx/source/tbxctrls - extrusioncontrols.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 4 6 66.7 %
Date: 2015-06-13 12:38:46 Functions: 8 12 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      22             : #include "svx/svxdllapi.h"
      23             : 
      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>
      29             : 
      30             : #include <svtools/toolbarmenu.hxx>
      31             : #include <svtools/popupwindowcontroller.hxx>
      32             : #include <svtools/popupmenucontrollerbase.hxx>
      33             : 
      34             : class ValueSet;
      35             : 
      36             : 
      37             : 
      38             : namespace svx
      39             : {
      40             : class ExtrusionDirectionWindow : public svtools::ToolbarMenu
      41             : {
      42             : public:
      43             :     ExtrusionDirectionWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
      44             :     virtual ~ExtrusionDirectionWindow();
      45             :     virtual void dispose() SAL_OVERRIDE;
      46             : 
      47             :     virtual void statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) SAL_OVERRIDE;
      48             :     virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
      49             : 
      50             : private:
      51             :     svt::ToolboxController& mrController;
      52             :     VclPtr<ValueSet>        mpDirectionSet;
      53             : 
      54             :     Image       maImgDirection[9];
      55             :     Image       maImgPerspective;
      56             :     Image       maImgParallel;
      57             : 
      58             :     const OUString msExtrusionDirection;
      59             :     const OUString msExtrusionProjection;
      60             : 
      61             :     DECL_LINK( SelectHdl, void * );
      62             :     void            FillValueSet();
      63             : 
      64             :     void implSetDirection( sal_Int32 nSkew, bool bEnabled = true );
      65             :     void implSetProjection( sal_Int32 nProjection, bool bEnabled = true );
      66             : 
      67             : };
      68             : 
      69             : 
      70             : 
      71           2 : class ExtrusionDirectionControl : public svt::PopupWindowController
      72             : {
      73             : public:
      74             :     explicit ExtrusionDirectionControl( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
      75             : 
      76             :     virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
      77             : 
      78             :     // XInitialization
      79             :     virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
      80             :         throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      81             : 
      82             :     // XServiceInfo
      83             :     virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      84             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      85             : 
      86             :     using svt::PopupWindowController::createPopupWindow;
      87             : };
      88             : 
      89           0 : class ExtrusionDepthWindow : public svtools::ToolbarMenu
      90             : {
      91             : private:
      92             :     svt::ToolboxController& mrController;
      93             : 
      94             :     Image maImgDepth0;
      95             :     Image maImgDepth1;
      96             :     Image maImgDepth2;
      97             :     Image maImgDepth3;
      98             :     Image maImgDepth4;
      99             :     Image maImgDepthInfinity;
     100             : 
     101             :     FieldUnit   meUnit;
     102             :     double      mfDepth;
     103             : 
     104             :     const OUString msExtrusionDepth;
     105             :     const OUString msMetricUnit;
     106             : 
     107             :     DECL_LINK( SelectHdl, void * );
     108             : 
     109             :     void    implFillStrings( FieldUnit eUnit );
     110             :     void    implSetDepth( double fDepth );
     111             : 
     112             : public:
     113             :     ExtrusionDepthWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
     114             : 
     115             :     virtual void statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) SAL_OVERRIDE;
     116             : };
     117             : 
     118           2 : class ExtrusionDepthController : public svt::PopupWindowController
     119             : {
     120             : public:
     121             :     explicit ExtrusionDepthController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
     122             : 
     123             :     virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
     124             : 
     125             :     // XInitialization
     126             :     virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
     127             :         throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     128             : 
     129             :     // XServiceInfo
     130             :     virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     131             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     132             : 
     133             :     using svt::PopupWindowController::createPopupWindow;
     134             : };
     135             : 
     136             : 
     137             : 
     138             : class ExtrusionLightingWindow : public svtools::ToolbarMenu
     139             : {
     140             : private:
     141             :     svt::ToolboxController& mrController;
     142             :     VclPtr<ValueSet>        mpLightingSet;
     143             : 
     144             :     Image maImgLightingOff[9];
     145             :     Image maImgLightingOn[9];
     146             :     Image maImgLightingPreview[9];
     147             : 
     148             :     Image maImgBright;
     149             :     Image maImgNormal;
     150             :     Image maImgDim;
     151             : 
     152             :     int     mnLevel;
     153             :     bool    mbLevelEnabled;
     154             :     int     mnDirection;
     155             :     bool    mbDirectionEnabled;
     156             : 
     157             :     const OUString msExtrusionLightingDirection;
     158             :     const OUString msExtrusionLightingIntensity;
     159             : 
     160             :     void    implSetIntensity( int nLevel, bool bEnabled );
     161             :     void    implSetDirection( int nDirection, bool bEnabled );
     162             : 
     163             :     DECL_LINK( SelectHdl, void * );
     164             : public:
     165             :     ExtrusionLightingWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
     166             :     virtual ~ExtrusionLightingWindow();
     167             :     virtual void dispose() SAL_OVERRIDE;
     168             : 
     169             :     virtual void statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) SAL_OVERRIDE;
     170             :     virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
     171             : };
     172             : 
     173             : 
     174             : 
     175           2 : class ExtrusionLightingControl : public svt::PopupWindowController
     176             : {
     177             : public:
     178             :     explicit ExtrusionLightingControl( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
     179             : 
     180             :     virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
     181             : 
     182             :     // XInitialization
     183             :     virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
     184             :         throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     185             : 
     186             :     // XServiceInfo
     187             :     virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     188             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     189             : 
     190             :     using svt::PopupWindowController::createPopupWindow;
     191             : };
     192             : 
     193             : 
     194             : 
     195           0 : class ExtrusionSurfaceWindow : public svtools::ToolbarMenu
     196             : {
     197             : private:
     198             :     svt::ToolboxController& mrController;
     199             : 
     200             :     Image maImgSurface1;
     201             :     Image maImgSurface2;
     202             :     Image maImgSurface3;
     203             :     Image maImgSurface4;
     204             : 
     205             :     const OUString msExtrusionSurface;
     206             : 
     207             :     DECL_LINK( SelectHdl, void * );
     208             : 
     209             :     void    implSetSurface( int nSurface, bool bEnabled );
     210             : 
     211             : public:
     212             :     ExtrusionSurfaceWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
     213             : 
     214             :     virtual void statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) SAL_OVERRIDE;
     215             : };
     216             : 
     217             : 
     218             : 
     219           2 : class ExtrusionSurfaceControl : public svt::PopupWindowController
     220             : {
     221             : public:
     222             :     explicit ExtrusionSurfaceControl( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
     223             : 
     224             :     virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
     225             : 
     226             :     // XInitialization
     227             :     virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
     228             :         throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     229             : 
     230             :     // XServiceInfo
     231             :     virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     232             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     233             : 
     234             :     using svt::PopupWindowController::createPopupWindow;
     235             : };
     236             : 
     237             : 
     238             : 
     239             : }
     240             : #endif
     241             : 
     242             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11