From 5e80dd672fe64d44e05a2025e9569afdd62bb0d7 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 6 May 2014 15:00:41 +0300 Subject: Move a few more headers that are included only in sfx2 to sfx2 Change-Id: I8bd81a45f5ef1b76fce1563b06e05a4eefcff0ec --- sfx2/inc/sidebar/ContextChangeBroadcaster.hxx | 68 +++++++++++++++++++++++++++ sfx2/inc/sidebar/PopupContainer.hxx | 40 ++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 sfx2/inc/sidebar/ContextChangeBroadcaster.hxx create mode 100644 sfx2/inc/sidebar/PopupContainer.hxx (limited to 'sfx2/inc') diff --git a/sfx2/inc/sidebar/ContextChangeBroadcaster.hxx b/sfx2/inc/sidebar/ContextChangeBroadcaster.hxx new file mode 100644 index 000000000000..de381929c05d --- /dev/null +++ b/sfx2/inc/sidebar/ContextChangeBroadcaster.hxx @@ -0,0 +1,68 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SFX2_SIDEBAR_CONTEXTCHANGEBROADCASTER_HXX +#define INCLUDED_SFX2_SIDEBAR_CONTEXTCHANGEBROADCASTER_HXX + +#include + +namespace cssu = ::com::sun::star::uno; + +namespace sfx2 { namespace sidebar { + + +/** This class is a helper for broadcasting context changes that are + tied to shells being activated or deactivated. +*/ +class ContextChangeBroadcaster +{ +public: + ContextChangeBroadcaster (void); + ~ContextChangeBroadcaster (void); + + void Initialize (const ::rtl::OUString& rsContextName); + + void Activate (const cssu::Reference& rxFrame); + void Deactivate (const cssu::Reference& rxFrame); + + /** Enable or disable the broadcaster. + @param bIsEnabled + The new value of the "enabled" state. + @return + The old value of the "enabled" state is returned. + */ + bool SetBroadcasterEnabled (const bool bIsEnabled); + +private: + rtl::OUString msContextName; + bool mbIsBroadcasterEnabled; + + void BroadcastContextChange ( + const cssu::Reference& rxFrame, + const ::rtl::OUString& rsModuleName, + const ::rtl::OUString& rsContextName); + ::rtl::OUString GetModuleName ( + const cssu::Reference& rxFrame); +}; + + +} } // end of namespace ::sd::sidebar + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/PopupContainer.hxx b/sfx2/inc/sidebar/PopupContainer.hxx new file mode 100644 index 000000000000..435b43b00969 --- /dev/null +++ b/sfx2/inc/sidebar/PopupContainer.hxx @@ -0,0 +1,40 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SFX2_SIDEBAR_POPUPCONTAINER_HXX +#define INCLUDED_SFX2_SIDEBAR_POPUPCONTAINER_HXX + +#include +#include + +namespace sfx2 { namespace sidebar { + +class SFX2_DLLPUBLIC PopupContainer : public FloatingWindow +{ +public: + PopupContainer (Window* pParent); + virtual ~PopupContainer (void); + + virtual long Notify (NotifyEvent& rNEvt); +}; + +} } // end of namespace sfx2::sidebar + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3