bump product version to 4.2.0.1
[LibreOffice.git] / include / svx / hdft.hxx
blob54066bbaf65cb54b08f9e872f0ecf9a03649c11b
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 #ifndef INCLUDED_SVX_HDFT_HXX
20 #define INCLUDED_SVX_HDFT_HXX
22 #include <sfx2/tabdlg.hxx>
24 #include <vcl/fixed.hxx>
25 #include <vcl/field.hxx>
26 #include <vcl/group.hxx>
27 #include <vcl/layout.hxx>
29 #include <svx/pagectrl.hxx>
30 #include <svx/svxdllapi.h>
32 namespace svx
34 SVX_DLLPUBLIC bool ShowBorderBackgroundDlg( Window* pParent, SfxItemSet* pBBSet,
35 bool bEnableBackgroundSelector );
38 // class SvxHFPage ------------------------------------------------------
40 class SVX_DLLPUBLIC SvxHFPage: public SfxTabPage
42 using TabPage::ActivatePage;
43 using TabPage::DeactivatePage;
45 public:
47 virtual sal_Bool FillItemSet( SfxItemSet& rOutSet );
48 virtual void Reset( const SfxItemSet& rSet );
50 virtual ~SvxHFPage();
52 void DisableDeleteQueryBox() { bDisableQueryBox = sal_True; }
53 void EnableBackgroundSelector( sal_Bool bNew ) { bEnableBackgroundSelector = bNew; }
54 void EnableDynamicSpacing();
56 protected:
57 virtual void ActivatePage( const SfxItemSet& rSet );
58 virtual int DeactivatePage( SfxItemSet* pSet = 0 );
60 SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId );
62 FixedText* m_pPageLbl;
63 CheckBox* m_pTurnOnBox;
64 CheckBox* m_pCntSharedBox;
65 CheckBox* m_pCntSharedFirstBox;
66 FixedText* m_pLMLbl;
67 MetricField* m_pLMEdit;
68 FixedText* m_pRMLbl;
69 MetricField* m_pRMEdit;
70 FixedText* m_pDistFT;
71 MetricField* m_pDistEdit;
72 CheckBox* m_pDynSpacingCB;
73 FixedText* m_pHeightFT;
74 MetricField* m_pHeightEdit;
75 CheckBox* m_pHeightDynBtn;
76 SvxPageWindow* m_pBspWin;
77 PushButton* m_pBackgroundBtn;
79 sal_uInt16 nId;
80 SfxItemSet* pBBSet;
81 sal_Bool bDisableQueryBox;
82 sal_Bool bEnableBackgroundSelector;
83 bool bInReset;
85 void InitHandler();
86 DECL_LINK( TurnOnHdl, CheckBox*);
87 DECL_LINK(DistModify, void *);
88 DECL_LINK(HeightModify, void *);
89 DECL_LINK(BorderModify, void *);
90 DECL_LINK(BackgroundHdl, void *);
92 void UpdateExample();
93 DECL_LINK(RangeHdl, void *);
95 private:
96 SVX_DLLPRIVATE void ResetBackground_Impl( const SfxItemSet& rSet );
99 // class SvxHeaderPage ---------------------------------------------------
101 class SVX_DLLPUBLIC SvxHeaderPage : public SvxHFPage
103 public:
104 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
105 static sal_uInt16* GetRanges();
107 private:
108 SvxHeaderPage( Window* pParent, const SfxItemSet& rSet );
111 // class SvxFooterPage ---------------------------------------------------
113 class SVX_DLLPUBLIC SvxFooterPage : public SvxHFPage
115 public:
116 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
117 static sal_uInt16* GetRanges();
119 private:
120 SVX_DLLPRIVATE SvxFooterPage( Window* pParent, const SfxItemSet& rSet );
123 class SVX_DLLPUBLIC DeleteHeaderDialog : public MessageDialog
125 public:
126 DeleteHeaderDialog(Window *pParent)
127 : MessageDialog(pParent, "DeleteHeaderDialog",
128 "svx/ui/deleteheaderdialog.ui")
133 class SVX_DLLPUBLIC DeleteFooterDialog : public MessageDialog
135 public:
136 DeleteFooterDialog(Window *pParent)
137 : MessageDialog(pParent, "DeleteFooterDialog",
138 "svx/ui/deletefooterdialog.ui")
143 #endif
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */