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 : ListBox* m_pLbType;
37 :
38 : FixedText* m_pFtLine1;
39 : MetricField* m_pMtrFldLine1;
40 : FixedText* m_pFtLine2;
41 : MetricField* m_pMtrFldLine2;
42 : FixedText* m_pFtLine3;
43 : MetricField* m_pMtrFldLine3;
44 :
45 : MetricField* m_pMtrFldHorz1;
46 : MetricField* m_pMtrFldVert1;
47 : MetricField* m_pMtrFldHorz2;
48 : MetricField* m_pMtrFldVert2;
49 :
50 : SvxXConnectionPreview* m_pCtlPreview;
51 :
52 : const SfxItemSet& rOutAttrs;
53 : SfxItemSet aAttrSet;
54 : const SdrView* pView;
55 : SfxMapUnit eUnit;
56 :
57 : void FillTypeLB();
58 :
59 : DECL_LINK( ChangeAttrHdl_Impl, void * );
60 :
61 : public:
62 :
63 : SvxConnectionPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
64 : virtual ~SvxConnectionPage();
65 :
66 : static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
67 : static const sal_uInt16* GetRanges();
68 :
69 : virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
70 : virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
71 :
72 : void Construct();
73 0 : void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
74 : virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
75 : };
76 :
77 : /* Derived from SfxSingleTabDialog, in order to be informed about
78 : virtual methods by the control. */
79 : class SvxConnectionDialog : public SfxSingleTabDialog
80 : {
81 : public:
82 : SvxConnectionDialog( vcl::Window* pParent, const SfxItemSet& rAttr,
83 : const SdrView* pView );
84 : virtual ~SvxConnectionDialog();
85 : };
86 :
87 : #endif // INCLUDED_CUI_SOURCE_INC_CONNECT_HXX
88 :
89 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|