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 SwTxtFmtColl;
30 :
31 : // class SwEnvFmtPage ---------------------------------------------------------
32 :
33 0 : class SwEnvFmtPage : public SfxTabPage
34 : {
35 : MetricField* m_pAddrLeftField;
36 : MetricField* m_pAddrTopField;
37 : MenuButton* m_pAddrEditButton;
38 : MetricField* m_pSendLeftField;
39 : MetricField* m_pSendTopField;
40 : MenuButton* m_pSendEditButton;
41 : ListBox* m_pSizeFormatBox;
42 : MetricField* m_pSizeWidthField;
43 : MetricField* m_pSizeHeightField;
44 : SwEnvPreview* m_pPreview;
45 :
46 : std::vector<sal_uInt16> aIDs;
47 :
48 : SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet);
49 :
50 : DECL_LINK( ModifyHdl, Edit * );
51 : DECL_LINK( EditHdl, MenuButton * );
52 : DECL_LINK(FormatHdl, void *);
53 :
54 : void SetMinMax();
55 :
56 : SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, bool bSender);
57 :
58 0 : SwEnvDlg *GetParentSwEnvDlg() {return (SwEnvDlg*) GetParentDialog();}
59 :
60 : using TabPage::ActivatePage;
61 : using TabPage::DeactivatePage;
62 :
63 : public:
64 :
65 : static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
66 :
67 : virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
68 : virtual int DeactivatePage(SfxItemSet* pSet = 0) SAL_OVERRIDE;
69 : void FillItem(SwEnvItem& rItem);
70 : virtual bool FillItemSet(SfxItemSet& rSet) SAL_OVERRIDE;
71 : virtual void Reset(const SfxItemSet& rSet) SAL_OVERRIDE;
72 : };
73 :
74 : #endif
75 :
76 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|