LCOV - code coverage report
Current view: top level - include/svx - float3d.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 4 0.0 %
Date: 2014-04-14 Functions: 0 6 0.0 %
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             : 
      20             : #ifndef INCLUDED_SVX_FLOAT3D_HXX
      21             : #define INCLUDED_SVX_FLOAT3D_HXX
      22             : 
      23             : #include <sfx2/ctrlitem.hxx>
      24             : #include <vcl/fixed.hxx>
      25             : #include <vcl/field.hxx>
      26             : #include <sfx2/dockwin.hxx>
      27             : #include <vcl/button.hxx>
      28             : #include <svtools/stdctrl.hxx>
      29             : #include <svx/svxdllapi.h>
      30             : 
      31             : #include <svx/f3dchild.hxx>
      32             : #include <svx/dlgctl3d.hxx>
      33             : #include <svx/dlgctrl.hxx>
      34             : #include <svx/svdmodel.hxx>
      35             : 
      36             : enum ViewType3D
      37             : {
      38             :     VIEWTYPE_GEO = 1,
      39             :     VIEWTYPE_REPRESENTATION,
      40             :     VIEWTYPE_LIGHT,
      41             :     VIEWTYPE_TEXTURE,
      42             :     VIEWTYPE_MATERIAL
      43             : };
      44             : 
      45             : class SdrModel;
      46             : class FmFormModel;
      47             : class VirtualDevice;
      48             : class E3dView;
      49             : class SdrPageView;
      50             : class Svx3DCtrlItem;
      51             : class SvxConvertTo3DItem;
      52             : 
      53             : 
      54             : struct Svx3DWinImpl;
      55             : 
      56             : class SVX_DLLPUBLIC Svx3DWin : public SfxDockingWindow
      57             : {
      58             :     friend class        Svx3DChildWindow;
      59             :     friend class        Svx3DCtrlItem;
      60             :     using Window::Update;
      61             : 
      62             : private:
      63             :     ImageButton         aBtnGeo;
      64             :     ImageButton         aBtnRepresentation;
      65             :     ImageButton         aBtnLight;
      66             :     ImageButton         aBtnTexture;
      67             :     ImageButton         aBtnMaterial;
      68             :     ImageButton         aBtnUpdate;
      69             :     ImageButton         aBtnAssign;
      70             : 
      71             : // geometry
      72             :     FixedLine           aFLGeometrie;
      73             :     FixedText           aFtPercentDiagonal;
      74             :     MetricField         aMtrPercentDiagonal;
      75             :     FixedText           aFtBackscale;
      76             :     MetricField         aMtrBackscale;
      77             :     FixedText           aFtEndAngle;
      78             :     MetricField         aMtrEndAngle;
      79             :     FixedText           aFtDepth;
      80             :     MetricField         aMtrDepth;
      81             :       FixedLine           aFLSegments;
      82             : 
      83             :     FixedText           aFtHorizontal;
      84             :     NumericField        aNumHorizontal;
      85             :     FixedText           aFtVertical;
      86             :     NumericField        aNumVertical;
      87             :        FixedLine           aFLNormals;
      88             : 
      89             :     ImageButton         aBtnNormalsObj;
      90             :     ImageButton         aBtnNormalsFlat;
      91             :     ImageButton         aBtnNormalsSphere;
      92             :     ImageButton         aBtnNormalsInvert;
      93             :     ImageButton         aBtnTwoSidedLighting;
      94             : 
      95             :     ImageButton         aBtnDoubleSided;
      96             :     FixedLine           aFLRepresentation;
      97             : // presentation
      98             :     FixedText           aFtShademode;
      99             :     ListBox             aLbShademode;
     100             :     FixedLine           aFLShadow;
     101             :     ImageButton         aBtnShadow3d;
     102             :     FixedText           aFtSlant;
     103             :     MetricField         aMtrSlant;
     104             :     FixedText           aFtDistance;
     105             :     MetricField         aMtrDistance;
     106             :     FixedText           aFtFocalLeng;
     107             :     MetricField         aMtrFocalLength;
     108             :     FixedLine           aFLCamera;
     109             :     FixedLine           aFLLight;
     110             : 
     111             : // lighting
     112             :     ImageButton         aBtnLight1;
     113             :     ImageButton         aBtnLight2;
     114             :     ImageButton         aBtnLight3;
     115             :     ImageButton         aBtnLight4;
     116             :     ImageButton         aBtnLight5;
     117             :     ImageButton         aBtnLight6;
     118             :     ImageButton         aBtnLight7;
     119             :     ImageButton         aBtnLight8;
     120             :     FixedText           aFTLightsource;
     121             :     ColorLB             aLbLight1;
     122             :     ColorLB             aLbLight2;
     123             :     ColorLB             aLbLight3;
     124             :     ColorLB             aLbLight4;
     125             :     ColorLB             aLbLight5;
     126             :     ColorLB             aLbLight6;
     127             :     ColorLB             aLbLight7;
     128             :     ColorLB             aLbLight8;
     129             : 
     130             :     ImageButton         aBtnLightColor;
     131             : 
     132             :     // #99694# Keyboard shortcuts activate the next control, so the
     133             :     // order needed to be changed here
     134             :     FixedText           aFTAmbientlight;    // Text label
     135             :     ColorLB             aLbAmbientlight;    // ListBox
     136             :     ImageButton         aBtnAmbientColor;   // color button
     137             : 
     138             :        FixedLine           aFLTexture;
     139             : 
     140             : // Textures
     141             :     FixedText           aFtTexKind;
     142             :     ImageButton         aBtnTexLuminance;
     143             :     ImageButton         aBtnTexColor;
     144             :     FixedText           aFtTexMode;
     145             :     ImageButton         aBtnTexReplace;
     146             :     ImageButton         aBtnTexModulate;
     147             :     ImageButton         aBtnTexBlend;
     148             :     FixedText           aFtTexProjectionX;
     149             :     ImageButton         aBtnTexObjectX;
     150             :     ImageButton         aBtnTexParallelX;
     151             :     ImageButton         aBtnTexCircleX;
     152             :     FixedText           aFtTexProjectionY;
     153             :     ImageButton         aBtnTexObjectY;
     154             :     ImageButton         aBtnTexParallelY;
     155             :     ImageButton         aBtnTexCircleY;
     156             :     FixedText           aFtTexFilter;
     157             :     ImageButton         aBtnTexFilter;
     158             : 
     159             : // material
     160             : // material editor
     161             :        FixedLine           aFLMaterial;
     162             :     FixedText           aFtMatFavorites;
     163             :     ListBox             aLbMatFavorites;
     164             :     FixedText           aFtMatColor;
     165             :     ColorLB             aLbMatColor;
     166             :     ImageButton         aBtnMatColor;
     167             :     FixedText           aFtMatEmission;
     168             :     ColorLB             aLbMatEmission;
     169             :     ImageButton         aBtnEmissionColor;
     170             :        FixedLine           aFLMatSpecular;
     171             :     FixedText           aFtMatSpecular;
     172             :     ColorLB             aLbMatSpecular;
     173             :     ImageButton         aBtnSpecularColor;
     174             :     FixedText           aFtMatSpecularIntensity;
     175             :     MetricField         aMtrMatSpecularIntensity;
     176             : 
     177             :     Svx3DPreviewControl aCtlPreview;
     178             :     SvxLightCtl3D       aCtlLightPreview;
     179             : 
     180             : // bottom part
     181             :     ImageButton         aBtnConvertTo3D;
     182             :     ImageButton         aBtnLatheObject;
     183             :     ImageButton         aBtnPerspective;
     184             : 
     185             : // the rest ...
     186             :     Image               aImgLightOn;
     187             :     Image               aImgLightOff;
     188             :     bool                bUpdate;
     189             :     ViewType3D          eViewType;
     190             :     Size                aSize;
     191             : 
     192             :     // Model, Page, View etc. for favourites
     193             :     FmFormModel*        pModel;
     194             :     VirtualDevice*      pVDev;
     195             :     E3dView*            p3DView;
     196             : 
     197             :     SfxBindings*                pBindings;
     198             :     Svx3DCtrlItem*              pControllerItem;
     199             : 
     200             :     SvxConvertTo3DItem*         pConvertTo3DItem;
     201             :     SvxConvertTo3DItem*         pConvertTo3DLatheItem;
     202             : 
     203             :     Svx3DWinImpl*       mpImpl;
     204             :     SfxMapUnit          ePoolUnit;
     205             :     FieldUnit           eFUnit;
     206             : 
     207             :     // ItemSet used to remember set 2d attributes
     208             :     SfxItemSet*         mpRemember2DAttributes;
     209             : 
     210             :     bool                bOnly3DChanged;
     211             : 
     212             : 
     213             : 
     214             :     DECL_LINK( ClickViewTypeHdl, void * );
     215             :     DECL_LINK( ClickUpdateHdl, void * );
     216             :     DECL_LINK( ClickAssignHdl, void * );
     217             :     DECL_LINK( ClickHdl, PushButton * );
     218             :     DECL_LINK( ClickColorHdl, PushButton * );
     219             :     DECL_LINK( SelectHdl, void * );
     220             :     DECL_LINK( ModifyHdl, void * );
     221             :     void ClickLight(PushButton &rBtn);
     222             : 
     223             :     DECL_LINK( ChangeLightCallbackHdl, void * );
     224             :     DECL_LINK( ChangeSelectionCallbackHdl, void * );
     225             : 
     226             :     SVX_DLLPRIVATE void         Construct();
     227             :     SVX_DLLPRIVATE void         Reset();
     228             : 
     229             :     SVX_DLLPRIVATE bool         LBSelectColor( ColorLB* pLb, const Color& rColor );
     230             :     SVX_DLLPRIVATE sal_uInt16   GetLightSource( const PushButton* pBtn = NULL );
     231             :     SVX_DLLPRIVATE ColorLB*     GetLbByButton( const PushButton* pBtn = NULL );
     232             : 
     233             :     SVX_DLLPRIVATE bool         GetUILightState( const ImageButton& rBtn ) const;
     234             :     SVX_DLLPRIVATE void         SetUILightState( ImageButton& aBtn, bool bState );
     235             : 
     236             : protected:
     237             :     virtual void    Resize() SAL_OVERRIDE;
     238             : 
     239             : public:
     240             :             Svx3DWin( SfxBindings* pBindings, SfxChildWindow *pCW,
     241             :                         Window* pParent );
     242             :             virtual ~Svx3DWin();
     243             : 
     244             :     void    InitColorLB( const SdrModel* pDoc );
     245           0 :     bool    IsUpdateMode() const { return bUpdate; }
     246             : 
     247             :     void    Update( SfxItemSet& rSet );
     248             :     void    GetAttr( SfxItemSet& rSet );
     249             : 
     250             :     void UpdatePreview(); // nach oben (private)
     251             :     void DocumentReload(); // #83951#
     252             : };
     253             : 
     254             : /*************************************************************************
     255             : |*
     256             : |* Controller item for 3D Window (Floating/Docking)
     257             : |*
     258             : \************************************************************************/
     259             : 
     260           0 : class Svx3DCtrlItem : public SfxControllerItem
     261             : {
     262             :  protected:
     263             :     virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
     264             :                                 const SfxPoolItem* pState ) SAL_OVERRIDE;
     265             : 
     266             :  public:
     267             :     Svx3DCtrlItem( sal_uInt16, SfxBindings* );
     268             : };
     269             : 
     270             : /*************************************************************************
     271             : |*
     272             : |* ControllerItem for State of a Slot
     273             : |* (SID_CONVERT_TO_3D, SID_CONVERT_TO_3D_LATHE_FAST)
     274             : |*
     275             : \************************************************************************/
     276             : 
     277           0 : class SvxConvertTo3DItem : public SfxControllerItem
     278             : {
     279             :     bool                        bState;
     280             : 
     281             : protected:
     282             :     virtual void StateChanged(sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pState) SAL_OVERRIDE;
     283             : 
     284             : public:
     285             :     SvxConvertTo3DItem(sal_uInt16 nId, SfxBindings* pBindings);
     286           0 :     bool GetState() const { return bState; }
     287             : };
     288             : 
     289             : #endif // INCLUDED_SVX_FLOAT3D_HXX
     290             : 
     291             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10