LCOV - code coverage report
Current view: top level - include/svx - float3d.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 4 0.0 %
Date: 2015-06-13 12:38:46 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 SAL_WARN_UNUSED Svx3DWin : public SfxDockingWindow
      57             : {
      58             :     friend class        Svx3DChildWindow;
      59             :     friend class        Svx3DCtrlItem;
      60             :     using Window::Update;
      61             : 
      62             : private:
      63             :     VclPtr<PushButton>         m_pBtnGeo;
      64             :     VclPtr<PushButton>         m_pBtnRepresentation;
      65             :     VclPtr<PushButton>         m_pBtnLight;
      66             :     VclPtr<PushButton>         m_pBtnTexture;
      67             :     VclPtr<PushButton>         m_pBtnMaterial;
      68             :     VclPtr<PushButton>         m_pBtnUpdate;
      69             :     VclPtr<PushButton>         m_pBtnAssign;
      70             : 
      71             : // geometry
      72             :     VclPtr<VclContainer>       m_pFLGeometrie;
      73             :     VclPtr<FixedText>          m_pFtPercentDiagonal;
      74             :     VclPtr<MetricField>        m_pMtrPercentDiagonal;
      75             :     VclPtr<FixedText>          m_pFtBackscale;
      76             :     VclPtr<MetricField>        m_pMtrBackscale;
      77             :     VclPtr<FixedText>          m_pFtEndAngle;
      78             :     VclPtr<MetricField>        m_pMtrEndAngle;
      79             :     VclPtr<FixedText>          m_pFtDepth;
      80             :     VclPtr<MetricField>        m_pMtrDepth;
      81             : 
      82             :     VclPtr<VclContainer>       m_pFLSegments;
      83             :     VclPtr<NumericField>       m_pNumHorizontal;
      84             :     VclPtr<NumericField>       m_pNumVertical;
      85             : 
      86             :     VclPtr<VclContainer>       m_pFLNormals;
      87             :     VclPtr<PushButton>         m_pBtnNormalsObj;
      88             :     VclPtr<PushButton>         m_pBtnNormalsFlat;
      89             :     VclPtr<PushButton>         m_pBtnNormalsSphere;
      90             :     VclPtr<PushButton>         m_pBtnNormalsInvert;
      91             :     VclPtr<PushButton>         m_pBtnTwoSidedLighting;
      92             :     VclPtr<PushButton>         m_pBtnDoubleSided;
      93             : 
      94             : // presentation
      95             :     VclPtr<VclContainer>       m_pFLRepresentation;
      96             :     VclPtr<ListBox>            m_pLbShademode;
      97             : 
      98             :     VclPtr<VclContainer>       m_pFLShadow;
      99             :     VclPtr<PushButton>         m_pBtnShadow3d;
     100             :     VclPtr<FixedText>          m_pFtSlant;
     101             :     VclPtr<MetricField>        m_pMtrSlant;
     102             : 
     103             :     VclPtr<VclContainer>       m_pFLCamera;
     104             :     VclPtr<MetricField>        m_pMtrDistance;
     105             :     VclPtr<MetricField>        m_pMtrFocalLength;
     106             : 
     107             : // lighting
     108             :     VclPtr<VclContainer>       m_pFLLight;
     109             :     VclPtr<PushButton>         m_pBtnLight1;
     110             :     VclPtr<PushButton>         m_pBtnLight2;
     111             :     VclPtr<PushButton>         m_pBtnLight3;
     112             :     VclPtr<PushButton>         m_pBtnLight4;
     113             :     VclPtr<PushButton>         m_pBtnLight5;
     114             :     VclPtr<PushButton>         m_pBtnLight6;
     115             :     VclPtr<PushButton>         m_pBtnLight7;
     116             :     VclPtr<PushButton>         m_pBtnLight8;
     117             :     VclPtr<ColorLB>            m_pLbLight1;
     118             :     VclPtr<ColorLB>            m_pLbLight2;
     119             :     VclPtr<ColorLB>            m_pLbLight3;
     120             :     VclPtr<ColorLB>            m_pLbLight4;
     121             :     VclPtr<ColorLB>            m_pLbLight5;
     122             :     VclPtr<ColorLB>            m_pLbLight6;
     123             :     VclPtr<ColorLB>            m_pLbLight7;
     124             :     VclPtr<ColorLB>            m_pLbLight8;
     125             :     VclPtr<PushButton>         m_pBtnLightColor;
     126             :     VclPtr<ColorLB>            m_pLbAmbientlight;    // ListBox
     127             :     VclPtr<PushButton>         m_pBtnAmbientColor;   // color button
     128             : 
     129             : // Textures
     130             :     VclPtr<VclContainer>       m_pFLTexture;
     131             :     VclPtr<PushButton>         m_pBtnTexLuminance;
     132             :     VclPtr<PushButton>         m_pBtnTexColor;
     133             :     VclPtr<PushButton>         m_pBtnTexReplace;
     134             :     VclPtr<PushButton>         m_pBtnTexModulate;
     135             :     VclPtr<PushButton>         m_pBtnTexBlend;
     136             :     VclPtr<PushButton>         m_pBtnTexObjectX;
     137             :     VclPtr<PushButton>         m_pBtnTexParallelX;
     138             :     VclPtr<PushButton>         m_pBtnTexCircleX;
     139             :     VclPtr<PushButton>         m_pBtnTexObjectY;
     140             :     VclPtr<PushButton>         m_pBtnTexParallelY;
     141             :     VclPtr<PushButton>         m_pBtnTexCircleY;
     142             :     VclPtr<PushButton>         m_pBtnTexFilter;
     143             : 
     144             : // material
     145             : // material editor
     146             :     VclPtr<VclContainer>       m_pFLMaterial;
     147             :     VclPtr<ListBox>            m_pLbMatFavorites;
     148             :     VclPtr<ColorLB>            m_pLbMatColor;
     149             :     VclPtr<PushButton>         m_pBtnMatColor;
     150             :     VclPtr<ColorLB>            m_pLbMatEmission;
     151             :     VclPtr<PushButton>         m_pBtnEmissionColor;
     152             : 
     153             :     VclPtr<VclContainer>       m_pFLMatSpecular;
     154             :     VclPtr<ColorLB>            m_pLbMatSpecular;
     155             :     VclPtr<PushButton>         m_pBtnSpecularColor;
     156             :     VclPtr<MetricField>        m_pMtrMatSpecularIntensity;
     157             : 
     158             :     VclPtr<Svx3DPreviewControl> m_pCtlPreview;
     159             :     VclPtr<SvxLightCtl3D>      m_pCtlLightPreview;
     160             : 
     161             : // bottom part
     162             :     VclPtr<PushButton>         m_pBtnConvertTo3D;
     163             :     VclPtr<PushButton>         m_pBtnLatheObject;
     164             :     VclPtr<PushButton>         m_pBtnPerspective;
     165             : 
     166             : // the rest ...
     167             :     Image               aImgLightOn;
     168             :     Image               aImgLightOff;
     169             :     bool                bUpdate;
     170             :     ViewType3D          eViewType;
     171             : 
     172             :     // Model, Page, View etc. for favourites
     173             :     FmFormModel*        pModel;
     174             :     VclPtr<VirtualDevice> pVDev;
     175             :     E3dView*            p3DView;
     176             : 
     177             :     SfxBindings*                pBindings;
     178             :     Svx3DCtrlItem*              pControllerItem;
     179             : 
     180             :     SvxConvertTo3DItem*         pConvertTo3DItem;
     181             :     SvxConvertTo3DItem*         pConvertTo3DLatheItem;
     182             : 
     183             :     Svx3DWinImpl*       mpImpl;
     184             :     SfxMapUnit          ePoolUnit;
     185             :     FieldUnit           eFUnit;
     186             : 
     187             :     // ItemSet used to remember set 2d attributes
     188             :     SfxItemSet*         mpRemember2DAttributes;
     189             : 
     190             :     bool                bOnly3DChanged;
     191             : 
     192             :     DECL_LINK( ClickViewTypeHdl, void * );
     193             :     DECL_LINK( ClickUpdateHdl, void * );
     194             :     DECL_LINK( ClickAssignHdl, void * );
     195             :     DECL_LINK( ClickHdl, PushButton * );
     196             :     DECL_LINK( ClickColorHdl, PushButton * );
     197             :     DECL_LINK( SelectHdl, void * );
     198             :     DECL_LINK( ModifyHdl, void * );
     199             :     void ClickLight(PushButton &rBtn);
     200             : 
     201             :     DECL_LINK( ChangeSelectionCallbackHdl, void * );
     202             : 
     203             :     SVX_DLLPRIVATE void         Construct();
     204             :     SVX_DLLPRIVATE void         Reset();
     205             : 
     206             :     SVX_DLLPRIVATE bool         LBSelectColor( ColorLB* pLb, const Color& rColor );
     207             :     SVX_DLLPRIVATE sal_uInt16   GetLightSource( const PushButton* pBtn = NULL );
     208             :     SVX_DLLPRIVATE ColorLB*     GetLbByButton( const PushButton* pBtn = NULL );
     209             : 
     210             :     SVX_DLLPRIVATE bool         GetUILightState( const PushButton& rBtn ) const;
     211             :     SVX_DLLPRIVATE void         SetUILightState( PushButton& aBtn, bool bState );
     212             : 
     213             : protected:
     214             :     virtual void    Resize() SAL_OVERRIDE;
     215             : 
     216             : public:
     217             :             Svx3DWin( SfxBindings* pBindings, SfxChildWindow *pCW,
     218             :                         vcl::Window* pParent );
     219             :             virtual ~Svx3DWin();
     220             :     virtual void dispose() SAL_OVERRIDE;
     221             : 
     222             :     void    InitColorLB( const SdrModel* pDoc );
     223           0 :     bool    IsUpdateMode() const { return bUpdate; }
     224             : 
     225             :     void    Update( SfxItemSet& rSet );
     226             :     void    GetAttr( SfxItemSet& rSet );
     227             : 
     228             :     void UpdatePreview(); // nach oben (private)
     229             :     void DocumentReload(); // #83951#
     230             : };
     231             : 
     232             : /*************************************************************************
     233             : |*
     234             : |* Controller item for 3D Window (Floating/Docking)
     235             : |*
     236             : \************************************************************************/
     237             : 
     238           0 : class Svx3DCtrlItem : public SfxControllerItem
     239             : {
     240             :  protected:
     241             :     virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
     242             :                                 const SfxPoolItem* pState ) SAL_OVERRIDE;
     243             : 
     244             :  public:
     245             :     Svx3DCtrlItem( sal_uInt16, SfxBindings* );
     246             : };
     247             : 
     248             : /*************************************************************************
     249             : |*
     250             : |* ControllerItem for State of a Slot
     251             : |* (SID_CONVERT_TO_3D, SID_CONVERT_TO_3D_LATHE_FAST)
     252             : |*
     253             : \************************************************************************/
     254             : 
     255           0 : class SvxConvertTo3DItem : public SfxControllerItem
     256             : {
     257             :     bool                        bState;
     258             : 
     259             : protected:
     260             :     virtual void StateChanged(sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pState) SAL_OVERRIDE;
     261             : 
     262             : public:
     263             :     SvxConvertTo3DItem(sal_uInt16 nId, SfxBindings* pBindings);
     264           0 :     bool GetState() const { return bState; }
     265             : };
     266             : 
     267             : #endif // INCLUDED_SVX_FLOAT3D_HXX
     268             : 
     269             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11