Add a comment to clarify what kind of inputs the class handles
[LibreOffice.git] / sw / source / uibase / inc / pagenumberdlg.hxx
blobf097509b5a68496bd0ba74ccd38eef9ff4e00f83
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 .
20 #pragma once
22 #include <sfx2/basedlgs.hxx>
23 #include <svx/pagenumberlistbox.hxx>
25 class SwWrtShell;
27 /// Page number wizard for easy header/footer page number insertion
28 class SwPageNumberDlg final : public SfxDialogController
30 std::unique_ptr<weld::Button> m_xOk;
31 std::unique_ptr<weld::Button> m_xCancel;
32 std::unique_ptr<weld::ComboBox> m_xPageNumberPosition;
33 std::unique_ptr<weld::ComboBox> m_xPageNumberAlignment;
34 std::unique_ptr<weld::CheckButton> m_xMirrorOnEvenPages;
35 std::unique_ptr<weld::CheckButton> m_xIncludePageTotal;
36 std::unique_ptr<weld::CheckButton> m_xFitIntoExistingMargins;
37 std::unique_ptr<SvxPageNumberListBox> m_xPageNumberTypeLB;
39 std::unique_ptr<weld::Image> m_xPreviewImage;
41 int m_aPageNumberPosition;
42 int m_aPageNumberAlignment;
43 SvxNumType m_nPageNumberType;
45 DECL_LINK(OkHdl, weld::Button&, void);
46 DECL_LINK(IncludePageTotalChangeHdl, weld::Toggleable&, void);
47 DECL_LINK(PositionSelectHdl, weld::ComboBox&, void);
48 DECL_LINK(AlignmentSelectHdl, weld::ComboBox&, void);
49 DECL_LINK(NumberTypeSelectHdl, weld::ComboBox&, void);
51 void updateImage();
53 public:
54 SwPageNumberDlg(weld::Window* pParent);
55 int GetPageNumberPosition() const { return m_aPageNumberPosition; }
56 int GetPageNumberAlignment() const { return m_aPageNumberAlignment; }
57 bool GetMirrorOnEvenPages() const;
58 bool GetIncludePageTotal() const;
59 bool GetFitIntoExistingMargins() const;
60 SvxNumType GetPageNumberType() const { return m_nPageNumberType; }
61 void SetPageNumberType(SvxNumType nSet);
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */