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_SW_SOURCE_UI_ENVELP_ENVFMT_HXX
20 : #define INCLUDED_SW_SOURCE_UI_ENVELP_ENVFMT_HXX
21 :
22 : #include <svtools/stdctrl.hxx>
23 : #include <vcl/field.hxx>
24 : #include <vcl/menubtn.hxx>
25 : #include <vcl/group.hxx>
26 :
27 : #include "envlop.hxx"
28 :
29 : class SwTextFormatColl;
30 :
31 : class SwEnvFormatPage : public SfxTabPage
32 : {
33 : VclPtr<MetricField> m_pAddrLeftField;
34 : VclPtr<MetricField> m_pAddrTopField;
35 : VclPtr<MenuButton> m_pAddrEditButton;
36 : VclPtr<MetricField> m_pSendLeftField;
37 : VclPtr<MetricField> m_pSendTopField;
38 : VclPtr<MenuButton> m_pSendEditButton;
39 : VclPtr<ListBox> m_pSizeFormatBox;
40 : VclPtr<MetricField> m_pSizeWidthField;
41 : VclPtr<MetricField> m_pSizeHeightField;
42 : VclPtr<SwEnvPreview> m_pPreview;
43 :
44 : std::vector<sal_uInt16> aIDs;
45 :
46 : DECL_LINK( ModifyHdl, Edit * );
47 : DECL_LINK_TYPED( EditHdl, MenuButton *, void );
48 : DECL_LINK(FormatHdl, void *);
49 :
50 : void SetMinMax();
51 :
52 : SfxItemSet *GetCollItemSet(SwTextFormatColl* pColl, bool bSender);
53 :
54 0 : SwEnvDlg *GetParentSwEnvDlg() {return static_cast<SwEnvDlg*>(GetParentDialog());}
55 :
56 : using TabPage::ActivatePage;
57 : using TabPage::DeactivatePage;
58 :
59 : public:
60 : SwEnvFormatPage(vcl::Window* pParent, const SfxItemSet& rSet);
61 : virtual ~SwEnvFormatPage();
62 : virtual void dispose() SAL_OVERRIDE;
63 :
64 : static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);
65 :
66 : virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
67 : virtual sfxpg DeactivatePage(SfxItemSet* pSet = 0) SAL_OVERRIDE;
68 : void FillItem(SwEnvItem& rItem);
69 : virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE;
70 : virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE;
71 : };
72 :
73 : #endif
74 :
75 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|