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_CUI_SOURCE_INC_CONNECT_HXX
20 : #define INCLUDED_CUI_SOURCE_INC_CONNECT_HXX
21 :
22 : #include <svx/connctrl.hxx>
23 : #include <sfx2/tabdlg.hxx>
24 : #include <vcl/fixed.hxx>
25 : #include <vcl/field.hxx>
26 : #include <vcl/lstbox.hxx>
27 : #include <vcl/group.hxx>
28 : #include <sfx2/basedlgs.hxx>
29 :
30 : class SdrView;
31 :
32 : /// Dialog for changing connectors.
33 : class SvxConnectionPage : public SfxTabPage
34 : {
35 : private:
36 : static const sal_uInt16 pRanges[];
37 : VclPtr<ListBox> m_pLbType;
38 :
39 : VclPtr<FixedText> m_pFtLine1;
40 : VclPtr<MetricField> m_pMtrFldLine1;
41 : VclPtr<FixedText> m_pFtLine2;
42 : VclPtr<MetricField> m_pMtrFldLine2;
43 : VclPtr<FixedText> m_pFtLine3;
44 : VclPtr<MetricField> m_pMtrFldLine3;
45 :
46 : VclPtr<MetricField> m_pMtrFldHorz1;
47 : VclPtr<MetricField> m_pMtrFldVert1;
48 : VclPtr<MetricField> m_pMtrFldHorz2;
49 : VclPtr<MetricField> m_pMtrFldVert2;
50 :
51 : VclPtr<SvxXConnectionPreview> m_pCtlPreview;
52 :
53 : const SfxItemSet& rOutAttrs;
54 : SfxItemSet aAttrSet;
55 : const SdrView* pView;
56 : SfxMapUnit eUnit;
57 :
58 : void FillTypeLB();
59 :
60 : DECL_LINK( ChangeAttrHdl_Impl, void * );
61 :
62 : public:
63 :
64 : SvxConnectionPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
65 : virtual ~SvxConnectionPage();
66 : virtual void dispose() SAL_OVERRIDE;
67 :
68 : static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
69 0 : static const sal_uInt16* GetRanges() { return pRanges; }
70 :
71 : virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
72 : virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
73 :
74 : void Construct();
75 0 : void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
76 : virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
77 : };
78 :
79 : /* Derived from SfxSingleTabDialog, in order to be informed about
80 : virtual methods by the control. */
81 0 : class SvxConnectionDialog : public SfxSingleTabDialog
82 : {
83 : public:
84 : SvxConnectionDialog( vcl::Window* pParent, const SfxItemSet& rAttr,
85 : const SdrView* pView );
86 : };
87 :
88 : #endif // INCLUDED_CUI_SOURCE_INC_CONNECT_HXX
89 :
90 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|