Simplify using designated initializers
[LibreOffice.git] / include / sfx2 / sidebar / SidebarDockingWindow.hxx
blob84b87b837611ce0dd7a6c8c47bdac48c9692fcaf
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 .
19 #pragma once
21 #include <sfx2/dockwin.hxx>
23 #include <rtl/ref.hxx>
25 namespace svt { class AcceleratorExecute; }
27 namespace sfx2::sidebar {
29 class SidebarChildWindow;
31 class SidebarController;
33 class SFX2_DLLPUBLIC SidebarDockingWindow final : public SfxDockingWindow
35 public:
36 SidebarDockingWindow(SfxBindings* pBindings, SidebarChildWindow& rChildWindow,
37 vcl::Window* pParent, WinBits nBits);
38 virtual ~SidebarDockingWindow() override;
39 virtual void dispose() override;
40 virtual bool EventNotify(NotifyEvent& rEvent) override;
41 virtual bool Close() override;
43 /// Force generation of all panels by completion.
44 void SyncUpdate();
46 rtl::Reference<sfx2::sidebar::SidebarController>& GetOrCreateSidebarController();
47 using SfxDockingWindow::Close;
49 private:
50 // Window overridables
51 virtual void GetFocus() override;
53 virtual SfxChildAlignment CheckAlignment (
54 SfxChildAlignment eCurrentAlignment,
55 SfxChildAlignment eRequestedAlignment) override;
57 ::rtl::Reference<sfx2::sidebar::SidebarController> mpSidebarController;
58 bool mbIsReadyToDrag;
59 std::unique_ptr<svt::AcceleratorExecute> mpAccel;
62 } // end of namespace sfx2::sidebar
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */