bump product version to 6.3.0.0.beta1
[LibreOffice.git] / cui / source / inc / cuihyperdlg.hxx
blobc832f17f7f49c7b54ade32b4c29a688473ed91b0
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 #ifndef INCLUDED_CUI_SOURCE_INC_CUIHYPERDLG_HXX
21 #define INCLUDED_CUI_SOURCE_INC_CUIHYPERDLG_HXX
23 #include <sal/config.h>
25 #include <memory>
27 #include <svx/hlnkitem.hxx>
28 #include <sfx2/childwin.hxx>
29 #include <sfx2/ctrlitem.hxx>
30 #include <sfx2/bindings.hxx>
31 #include <vcl/image.hxx>
33 #include "iconcdlg.hxx"
35 // hyperlink dialog
36 enum class HyperLinkPageType
38 Internet,
39 Mail,
40 Document,
41 NewDocument,
42 NONE = USHRT_MAX
45 /*************************************************************************
47 |* Hyperlink-Dialog
49 \************************************************************************/
51 class SvxHpLinkDlg;
52 class SvxHlinkCtrl : public SfxControllerItem
54 private:
55 VclPtr<SvxHpLinkDlg> pParent;
57 SfxStatusForwarder aRdOnlyForwarder;
59 public:
60 SvxHlinkCtrl( sal_uInt16 nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg);
61 virtual void dispose() override;
63 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
64 const SfxPoolItem* pState ) override;
68 /*************************************************************************
70 |* Hyperlink-Dialog
72 \************************************************************************/
74 class SvxHpLinkDlg : public IconChoiceDialog
76 private:
77 SvxHlinkCtrl maCtrl; ///< Controller
78 SfxBindings* mpBindings;
79 std::unique_ptr<SfxItemSet> mpItemSet;
81 bool mbGrabFocus : 1;
82 bool mbIsHTMLDoc : 1;
84 DECL_LINK (ClickOkHdl_Impl, Button *, void );
85 DECL_LINK (ClickApplyHdl_Impl, Button *, void );
86 DECL_LINK (ClickCloseHdl_Impl, Button *, void );
88 protected:
89 virtual bool Close() override;
90 virtual void Move() override;
91 void Apply();
93 public:
94 SvxHpLinkDlg (vcl::Window* pParent, SfxBindings* pBindings );
95 virtual ~SvxHpLinkDlg () override;
96 virtual void dispose() override;
98 virtual void PageCreated( HyperLinkPageType nId, IconChoicePage& rPage ) override;
100 void SetPage( SvxHyperlinkItem const * pItem );
101 void SetReadOnlyMode( bool bReadOnly );
102 bool IsHTMLDoc() const { return mbIsHTMLDoc; }
104 SfxDispatcher* GetDispatcher() const { return mpBindings->GetDispatcher(); }
108 #endif // INCLUDED_CUI_SOURCE_INC_CUIHYPERDLG_HXX
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */