1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_VCL_ABSTDLG_HXX
20 #define INCLUDED_VCL_ABSTDLG_HXX
22 #include <rtl/ustring.hxx>
23 #include <tools/link.hxx>
24 #include <vcl/dllapi.h>
25 #include <vcl/vclptr.hxx>
26 #include <vcl/vclreferencebase.hxx>
29 namespace vcl
{ class Window
; }
34 * Some things multiple-inherit from VclAbstractDialog and OutputDevice,
35 * so we need to use virtual inheritance to keep the referencing counting
38 class VCL_DLLPUBLIC VclAbstractDialog
: public virtual VclReferenceBase
41 virtual ~VclAbstractDialog() override
;
43 virtual short Execute() = 0;
45 // Screenshot interface
46 virtual std::vector
<OString
> getAllPageUIXMLDescriptions() const;
47 virtual bool selectPageByUIXMLDescription(const OString
& rUIXMLDescription
);
48 virtual Bitmap
createScreenshot() const;
49 virtual OString
GetScreenshotId() const { return OString(); };
52 class VCL_DLLPUBLIC VclAbstractDialog2
: public virtual VclReferenceBase
55 virtual ~VclAbstractDialog2() override
;
57 virtual void StartExecuteModal( const Link
<Dialog
&,void>& rEndDialogHdl
) = 0;
58 virtual long GetResult() = 0;
61 class VCL_DLLPUBLIC VclAbstractTerminatedDialog
: public VclAbstractDialog
64 virtual ~VclAbstractTerminatedDialog() override
= default;
66 virtual void EndDialog(long nResult
) = 0;
69 class VCL_DLLPUBLIC VclAbstractRefreshableDialog
: public VclAbstractDialog
72 virtual ~VclAbstractRefreshableDialog() override
= default;
74 virtual void Update() = 0;
77 class VCL_DLLPUBLIC AbstractPasswordToOpenModifyDialog
: public VclAbstractDialog
80 virtual ~AbstractPasswordToOpenModifyDialog() override
= default;
82 virtual OUString
GetPasswordToOpen() const = 0;
83 virtual OUString
GetPasswordToModify() const = 0;
84 virtual bool IsRecommendToOpenReadonly() const = 0;
87 class VCL_DLLPUBLIC AbstractScreenshotAnnotationDlg
: public VclAbstractDialog
90 virtual ~AbstractScreenshotAnnotationDlg() override
= default;
93 class VCL_DLLPUBLIC VclAbstractDialogFactory
96 virtual ~VclAbstractDialogFactory(); // needed for export of vtable
97 static VclAbstractDialogFactory
* Create();
98 // The Id is an implementation detail of the factory
99 virtual VclPtr
<VclAbstractDialog
> CreateVclDialog(vcl::Window
* pParent
, sal_uInt32 nId
) = 0;
101 // creates instance of PasswordToOpenModifyDialog from cui
102 virtual VclPtr
<AbstractPasswordToOpenModifyDialog
> CreatePasswordToOpenModifyDialog( vcl::Window
* pParent
, sal_uInt16 nMaxPasswdLen
, bool bIsPasswordToModify
) = 0;
104 // creates instance of ScreenshotAnnotationDlg from cui
105 virtual VclPtr
<AbstractScreenshotAnnotationDlg
> CreateScreenshotAnnotationDlg(
106 vcl::Window
* pParent
,
107 Dialog
& rParentDialog
) = 0;
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */