lok: use "None" string item in the ListBox control
[LibreOffice.git] / include / svtools / popupwindowcontroller.hxx
blob7aa1ca08f39aed21b25c808df885b46acf917a8b
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_SVTOOLS_POPUPWINDOWCONTROLLER_HXX
21 #define INCLUDED_SVTOOLS_POPUPWINDOWCONTROLLER_HXX
23 #include <memory>
24 #include <o3tl/deleter.hxx>
25 #include <svtools/svtdllapi.h>
27 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <cppuhelper/implbase.hxx>
30 #include <svtools/toolboxcontroller.hxx>
31 #include <vcl/vclptr.hxx>
33 namespace vcl { class Window; }
35 class InterimToolbarPopup;
36 class ToolbarPopupContainer;
37 class WeldToolbarPopup;
39 namespace svt
41 class PopupWindowControllerImpl;
43 //HACK to avoid duplicate ImplInheritanceHelper symbols with MSVC:
44 class SAL_DLLPUBLIC_TEMPLATE PopupWindowController_Base:
45 public cppu::ImplInheritanceHelper<svt::ToolboxController, css::lang::XServiceInfo>
47 using ImplInheritanceHelper::ImplInheritanceHelper;
50 class SVT_DLLPUBLIC PopupWindowController : public PopupWindowController_Base
52 public:
53 PopupWindowController( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
54 const css::uno::Reference< css::frame::XFrame >& xFrame,
55 const OUString& aCommandURL );
57 virtual ~PopupWindowController() override;
59 void EndPopupMode();
61 virtual VclPtr<vcl::Window> createVclPopupWindow( vcl::Window* pParent ) = 0;
62 virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow();
64 // XServiceInfo
65 virtual OUString SAL_CALL getImplementationName() override = 0;
66 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
67 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override = 0;
69 // XComponent
70 virtual void SAL_CALL dispose() override;
72 // XStatusListener
73 virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) override;
75 // XToolbarController
76 virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createPopupWindow() override;
77 virtual void SAL_CALL click() override;
79 protected:
80 std::unique_ptr<ToolbarPopupContainer> mxPopoverContainer;
81 VclPtr<InterimToolbarPopup> mxInterimPopover;
83 private:
84 std::unique_ptr<PopupWindowControllerImpl, o3tl::default_delete<PopupWindowControllerImpl>> mxImpl;
87 } // namespace svt
89 #endif // INCLUDED_SVTOOLS_POPUPWINDOWCONTROLLER_HXX
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */