/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_SVX_FLOAT3D_HXX #define INCLUDED_SVX_FLOAT3D_HXX #include #include #include #include #include #include #include #include #include #include #include enum class ViewType3D { Geo = 1, Representation, Light, Texture, Material }; class FmFormModel; class VirtualDevice; class E3dView; class SdrPageView; class Svx3DCtrlItem; class SvxConvertTo3DItem; class SvxColorListBox; struct Svx3DWinImpl; class SAL_WARN_UNUSED SVX_DLLPUBLIC Svx3DWin : public SfxDockingWindow { friend class Svx3DChildWindow; friend class Svx3DCtrlItem; using Window::Update; private: VclPtr m_pBtnGeo; VclPtr m_pBtnRepresentation; VclPtr m_pBtnLight; VclPtr m_pBtnTexture; VclPtr m_pBtnMaterial; VclPtr m_pBtnUpdate; VclPtr m_pBtnAssign; // geometry VclPtr m_pFLGeometrie; VclPtr m_pFtPercentDiagonal; VclPtr m_pMtrPercentDiagonal; VclPtr m_pFtBackscale; VclPtr m_pMtrBackscale; VclPtr m_pFtEndAngle; VclPtr m_pMtrEndAngle; VclPtr m_pFtDepth; VclPtr m_pMtrDepth; VclPtr m_pFLSegments; VclPtr m_pNumHorizontal; VclPtr m_pNumVertical; VclPtr m_pFLNormals; VclPtr m_pBtnNormalsObj; VclPtr m_pBtnNormalsFlat; VclPtr m_pBtnNormalsSphere; VclPtr m_pBtnNormalsInvert; VclPtr m_pBtnTwoSidedLighting; VclPtr m_pBtnDoubleSided; // presentation VclPtr m_pFLRepresentation; VclPtr m_pLbShademode; VclPtr m_pFLShadow; VclPtr m_pBtnShadow3d; VclPtr m_pFtSlant; VclPtr m_pMtrSlant; VclPtr m_pFLCamera; VclPtr m_pMtrDistance; VclPtr m_pMtrFocalLength; // lighting VclPtr m_pFLLight; VclPtr m_pBtnLight1; VclPtr m_pBtnLight2; VclPtr m_pBtnLight3; VclPtr m_pBtnLight4; VclPtr m_pBtnLight5; VclPtr m_pBtnLight6; VclPtr m_pBtnLight7; VclPtr m_pBtnLight8; VclPtr m_pLbLight1; VclPtr m_pLbLight2; VclPtr m_pLbLight3; VclPtr m_pLbLight4; VclPtr m_pLbLight5; VclPtr m_pLbLight6; VclPtr m_pLbLight7; VclPtr m_pLbLight8; VclPtr m_pBtnLightColor; VclPtr m_pLbAmbientlight; // ListBox VclPtr m_pBtnAmbientColor; // color button // Textures VclPtr m_pFLTexture; VclPtr m_pBtnTexLuminance; VclPtr m_pBtnTexColor; VclPtr m_pBtnTexReplace; VclPtr m_pBtnTexModulate; VclPtr m_pBtnTexBlend; VclPtr m_pBtnTexObjectX; VclPtr m_pBtnTexParallelX; VclPtr m_pBtnTexCircleX; VclPtr m_pBtnTexObjectY; VclPtr m_pBtnTexParallelY; VclPtr m_pBtnTexCircleY; VclPtr m_pBtnTexFilter; // material // material editor VclPtr m_pFLMaterial; VclPtr m_pLbMatFavorites; VclPtr m_pLbMatColor; VclPtr m_pBtnMatColor; VclPtr m_pLbMatEmission; VclPtr m_pBtnEmissionColor; VclPtr m_pFLMatSpecular; VclPtr m_pLbMatSpecular; VclPtr m_pBtnSpecularColor; VclPtr m_pMtrMatSpecularIntensity; VclPtr m_pCtlPreview; VclPtr m_pCtlLightPreview; // bottom part VclPtr m_pBtnConvertTo3D; VclPtr m_pBtnLatheObject; VclPtr m_pBtnPerspective; // the rest ... Image aImgLightOn; Image aImgLightOff; bool bUpdate; ViewType3D eViewType; // Model, Page, View etc. for favourites FmFormModel* pModel; VclPtr pVDev; SfxBindings* pBindings; Svx3DCtrlItem* pControllerItem; SvxConvertTo3DItem* pConvertTo3DItem; SvxConvertTo3DItem* pConvertTo3DLatheItem; std::unique_ptr mpImpl; MapUnit ePoolUnit; FieldUnit eFUnit; // ItemSet used to remember set 2d attributes SfxItemSet* mpRemember2DAttributes; DECL_LINK( ClickViewTypeHdl, Button*, void ); DECL_LINK( ClickUpdateHdl, Button*, void ); DECL_LINK( ClickAssignHdl, Button*, void ); DECL_LINK( ClickHdl, Button*, void ); DECL_LINK( ClickColorHdl, Button*, void ); DECL_LINK( SelectHdl, ListBox&, void ); DECL_LINK( SelectColorHdl, SvxColorListBox&, void ); DECL_LINK( ModifyHdl, Edit&, void ); void ClickLight(PushButton &rBtn); DECL_LINK( ChangeSelectionCallbackHdl, SvxLightCtl3D*, void ); SVX_DLLPRIVATE void Construct(); SVX_DLLPRIVATE void Reset(); SVX_DLLPRIVATE static void LBSelectColor( SvxColorListBox* pLb, const Color& rColor ); SVX_DLLPRIVATE sal_uInt16 GetLightSource( const PushButton* pBtn ); SVX_DLLPRIVATE SvxColorListBox* GetLbByButton( const PushButton* pBtn = nullptr ); SVX_DLLPRIVATE bool GetUILightState( const PushButton& rBtn ) const; SVX_DLLPRIVATE void SetUILightState( PushButton& aBtn, bool bState ); protected: virtual void Resize() override; public: Svx3DWin( SfxBindings* pBindings, SfxChildWindow *pCW, vcl::Window* pParent ); virtual ~Svx3DWin() override; virtual void dispose() override; void InitColorLB(); bool IsUpdateMode() const { return bUpdate; } void Update( SfxItemSet& rSet ); void GetAttr( SfxItemSet& rSet ); void UpdatePreview(); // upward (private) void DocumentReload(); }; /************************************************************************* |* |* Controller item for 3D Window (Floating/Docking) |* \************************************************************************/ class Svx3DCtrlItem : public SfxControllerItem { protected: virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pState ) override; public: Svx3DCtrlItem( sal_uInt16, SfxBindings* ); }; /************************************************************************* |* |* ControllerItem for State of a Slot |* (SID_CONVERT_TO_3D, SID_CONVERT_TO_3D_LATHE_FAST) |* \************************************************************************/ class SvxConvertTo3DItem : public SfxControllerItem { bool bState; protected: virtual void StateChanged(sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pState) override; public: SvxConvertTo3DItem(sal_uInt16 nId, SfxBindings* pBindings); bool GetState() const { return bState; } }; #endif // INCLUDED_SVX_FLOAT3D_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */