tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / cui / source / inc / textanim.hxx
blob02a75bab849a326ee0d01c563ac369cb04beb005
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #pragma once
21 #include <sfx2/tabdlg.hxx>
22 #include <svx/sdtakitm.hxx>
23 #include <svx/sdtaditm.hxx>
24 #include <vcl/weld.hxx>
26 class SdrView;
28 /*************************************************************************
30 |* Page for changing TextAnimations (running text etc.)
32 \************************************************************************/
34 class SvxTextAnimationPage : public SfxTabPage
36 private:
37 static const WhichRangesContainer pRanges;
39 SdrTextAniKind eAniKind;
40 FieldUnit eFUnit;
41 MapUnit eUnit;
43 TriState m_aUpState;
44 TriState m_aLeftState;
45 TriState m_aRightState;
46 TriState m_aDownState;
48 std::unique_ptr<weld::ComboBox> m_xLbEffect;
49 std::unique_ptr<weld::Widget> m_xBoxDirection;
50 std::unique_ptr<weld::ToggleButton> m_xBtnUp;
51 std::unique_ptr<weld::ToggleButton> m_xBtnLeft;
52 std::unique_ptr<weld::ToggleButton> m_xBtnRight;
53 std::unique_ptr<weld::ToggleButton> m_xBtnDown;
55 std::unique_ptr<weld::Frame> m_xFlProperties;
56 std::unique_ptr<weld::CheckButton> m_xTsbStartInside;
57 std::unique_ptr<weld::CheckButton> m_xTsbStopInside;
59 std::unique_ptr<weld::Widget> m_xBoxCount;
60 std::unique_ptr<weld::CheckButton> m_xTsbEndless;
61 std::unique_ptr<weld::SpinButton> m_xNumFldCount;
63 std::unique_ptr<weld::CheckButton> m_xTsbPixel;
64 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldAmount;
66 std::unique_ptr<weld::CheckButton> m_xTsbAuto;
67 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldDelay;
69 DECL_LINK( SelectEffectHdl_Impl, weld::ComboBox&, void );
70 DECL_LINK( ClickEndlessHdl_Impl, weld::Toggleable&, void );
71 DECL_LINK( ClickAutoHdl_Impl, weld::Toggleable&, void );
72 DECL_LINK( ClickPixelHdl_Impl, weld::Toggleable&, void );
73 DECL_LINK( ClickDirectionHdl_Impl, weld::Button&, void );
75 void SelectDirection( SdrTextAniDirection nValue );
76 sal_uInt16 GetSelectedDirection() const;
78 public:
79 SvxTextAnimationPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
80 virtual ~SvxTextAnimationPage() override;
82 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
83 static const WhichRangesContainer & GetRanges() { return pRanges; }
85 virtual bool FillItemSet( SfxItemSet* ) override;
86 virtual void Reset( const SfxItemSet * ) override;
89 /*************************************************************************
91 |* Text-Tab-Dialog
93 \************************************************************************/
94 class SvxTextTabDialog : public SfxTabDialogController
96 private:
97 const SdrView* pView;
99 virtual void PageCreated(const OUString& rId, SfxTabPage &rPage) override;
101 public:
102 SvxTextTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrView* pView);
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */