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 .
23 #include <o3tl/deleter.hxx>
24 #include <svtools/svtdllapi.h>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <cppuhelper/implbase.hxx>
29 #include <svtools/toolboxcontroller.hxx>
30 #include <vcl/vclptr.hxx>
37 class InterimToolbarPopup
;
38 class ToolbarPopupContainer
;
39 class WeldToolbarPopup
;
43 class PopupWindowControllerImpl
;
45 //HACK to avoid duplicate ImplInheritanceHelper symbols with MSVC:
46 class SAL_DLLPUBLIC_TEMPLATE PopupWindowController_Base
47 : public cppu::ImplInheritanceHelper
<svt::ToolboxController
, css::lang::XServiceInfo
>
49 using ImplInheritanceHelper::ImplInheritanceHelper
;
52 class SVT_DLLPUBLIC PopupWindowController
: public PopupWindowController_Base
55 PopupWindowController(const css::uno::Reference
<css::uno::XComponentContext
>& rxContext
,
56 const css::uno::Reference
<css::frame::XFrame
>& xFrame
,
57 const OUString
& aCommandURL
);
59 virtual ~PopupWindowController() override
;
63 virtual VclPtr
<vcl::Window
> createVclPopupWindow(vcl::Window
* pParent
);
64 virtual std::unique_ptr
<WeldToolbarPopup
> weldPopupWindow() = 0;
67 virtual OUString SAL_CALL
getImplementationName() override
= 0;
68 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
69 virtual css::uno::Sequence
<OUString
> SAL_CALL
getSupportedServiceNames() override
= 0;
72 virtual void SAL_CALL
dispose() override
;
75 virtual void SAL_CALL
statusChanged(const css::frame::FeatureStateEvent
& Event
) override
;
78 virtual css::uno::Reference
<css::awt::XWindow
> SAL_CALL
createPopupWindow() override
;
79 virtual void SAL_CALL
click() override
;
82 std::unique_ptr
<ToolbarPopupContainer
> mxPopoverContainer
;
83 VclPtr
<InterimToolbarPopup
> mxInterimPopover
;
86 std::unique_ptr
<PopupWindowControllerImpl
, o3tl::default_delete
<PopupWindowControllerImpl
>>
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */