From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:51:28 +0200 Subject: Adding upstream version 1:7.0.4. Signed-off-by: Daniel Baumann --- include/sfx2/infobar.hxx | 124 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 include/sfx2/infobar.hxx (limited to 'include/sfx2/infobar.hxx') diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx new file mode 100644 index 000000000..40a1b1ff9 --- /dev/null +++ b/include/sfx2/infobar.hxx @@ -0,0 +1,124 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef INCLUDED_SFX2_INFOBAR_HXX +#define INCLUDED_SFX2_INFOBAR_HXX + +#include + +#include + +#include +#include + +class FixedImage; +class FixedText; +class Button; +class PushButton; + +// These must match the values in offapi/com/sun/star/frame/InfobarType.idl +enum class InfobarType +{ + INFO = 0, + SUCCESS = 1, + WARNING = 2, + DANGER = 3 +}; + +class InfobarData +{ +public: + OUString msId; + OUString msPrimaryMessage; + OUString msSecondaryMessage; + InfobarType maInfobarType; + bool mbShowCloseButton; +}; + +/** SfxChildWindow for positioning the InfoBar in the view. + */ +class SFX2_DLLPUBLIC SfxInfoBarContainerChild final : public SfxChildWindow +{ +private: + SfxBindings* m_pBindings; + +public: + SfxInfoBarContainerChild(vcl::Window* pParent, sal_uInt16 nId, SfxBindings* pBindings, + SfxChildWinInfo* pInfo); + virtual ~SfxInfoBarContainerChild() override; + + SFX_DECL_CHILDWINDOW_WITHID(SfxInfoBarContainerChild); + + void Update(); +}; + +/** Class representing a single InfoBar to be added in a SfxInfoBarContainerWindow. + */ +class SFX2_DLLPUBLIC SfxInfoBarWindow final : public vcl::Window +{ +private: + OUString m_sId; + InfobarType m_eType; + VclPtr m_pImage; + VclPtr m_pPrimaryMessage; + VclPtr m_pSecondaryMessage; + VclPtr