nss: upgrade to release 3.73
[LibreOffice.git] / sfx2 / inc / sidebar / TitleBar.hxx
blob772b349b6a2c2c6528e639a4e40e96f97cfb7929
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 <sidebar/SidebarToolBox.hxx>
22 #include <sfx2/sidebar/Theme.hxx>
23 #include <sfx2/weldutils.hxx>
24 #include <vcl/InterimItemWindow.hxx>
26 namespace sfx2::sidebar {
28 class TitleBar : public InterimItemWindow
30 public:
31 TitleBar(vcl::Window* pParentWindow,
32 const OUString& rUIXMLDescription, const OString& rID,
33 Theme::ThemeItem eThemeItem);
34 virtual void dispose() override;
35 virtual ~TitleBar() override;
37 virtual void SetTitle (const OUString& rsTitle) = 0;
38 virtual OUString GetTitle() const = 0;
40 void SetIcon(const css::uno::Reference<css::graphic::XGraphic>& rIcon);
42 virtual void DataChanged (const DataChangedEvent& rEvent) override;
44 weld::Toolbar& GetToolBox()
46 return *mxToolBox;
48 const weld::Toolbar& GetToolBox() const
50 return *mxToolBox;
53 protected:
54 std::unique_ptr<weld::Image> mxAddonImage;
55 std::unique_ptr<weld::Toolbar> mxToolBox;
56 std::unique_ptr<ToolbarUnoDispatcher> mxToolBoxController;
57 Theme::ThemeItem meThemeItem;
59 virtual void HandleToolBoxItemClick() = 0;
61 DECL_LINK(SelectionHandler, const OString&, void);
64 } // end of namespace sfx2::sidebar
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */