LibreOffice Module svtools (master) 1
popupwindowcontroller.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <memory>
23#include <o3tl/deleter.hxx>
24#include <svtools/svtdllapi.h>
25
26#include <com/sun/star/lang/XServiceInfo.hpp>
27
30#include <vcl/vclptr.hxx>
31
32namespace vcl
33{
34class Window;
35}
36
40
41namespace svt
42{
43class PopupWindowControllerImpl;
44
45//HACK to avoid duplicate ImplInheritanceHelper symbols with MSVC:
46class SAL_DLLPUBLIC_TEMPLATE PopupWindowController_Base
47 : public cppu::ImplInheritanceHelper<svt::ToolboxController, css::lang::XServiceInfo>
48{
49 using ImplInheritanceHelper::ImplInheritanceHelper;
50};
51
53{
54public:
55 PopupWindowController(const css::uno::Reference<css::uno::XComponentContext>& rxContext,
56 const css::uno::Reference<css::frame::XFrame>& xFrame,
57 const OUString& aCommandURL);
58
59 virtual ~PopupWindowController() override;
60
61 void EndPopupMode();
62
63 virtual VclPtr<vcl::Window> createVclPopupWindow(vcl::Window* pParent);
64 virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow() = 0;
65
66 // XServiceInfo
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;
70
71 // XComponent
72 virtual void SAL_CALL dispose() override;
73
74 // XStatusListener
75 virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& Event) override;
76
77 // XToolbarController
78 virtual css::uno::Reference<css::awt::XWindow> SAL_CALL createPopupWindow() override;
79 virtual void SAL_CALL click() override;
80
81protected:
82 std::unique_ptr<ToolbarPopupContainer> mxPopoverContainer;
84
85private:
86 std::unique_ptr<PopupWindowControllerImpl, o3tl::default_delete<PopupWindowControllerImpl>>
88};
89
90} // namespace svt
91
92/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual std::unique_ptr< WeldToolbarPopup > weldPopupWindow()=0
std::unique_ptr< PopupWindowControllerImpl, o3tl::default_delete< PopupWindowControllerImpl > > mxImpl
VclPtr< InterimToolbarPopup > mxInterimPopover
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override=0
std::unique_ptr< ToolbarPopupContainer > mxPopoverContainer
virtual OUString SAL_CALL getImplementationName() override=0
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
void dispose()
Reference< XFrame > xFrame
#define SVT_DLLPUBLIC
Definition: svtdllapi.h:27
unsigned char sal_Bool