LibreOffice Module sd (master) 1
ChildWindowPane.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <framework/Pane.hxx>
23
24#include <com/sun/star/lang/XEventListener.hpp>
26#include <comphelper/uno3.hxx>
27#include <memory>
28
29class SfxShell;
30
31namespace sd { class ViewShellBase; }
32namespace com::sun::star::awt { class XWindow; }
33namespace com::sun::star::drawing::framework { class XResourceId; }
34
35namespace sd::framework {
36
37typedef ::cppu::ImplInheritanceHelper <
39 css::lang::XEventListener
41
48{
49public:
51 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
52 sal_uInt16 nChildWindowId,
53 ViewShellBase& rViewShellBase,
54 ::std::unique_ptr<SfxShell> && pShell);
55 virtual ~ChildWindowPane() override;
56
59 void Hide();
60
61 virtual void SAL_CALL disposing() override;
62
70 virtual vcl::Window* GetWindow() override;
71
75 virtual css::uno::Reference<css::awt::XWindow>
76 SAL_CALL getWindow() override;
77
80
81 // XEventListener
82
83 virtual void SAL_CALL disposing(
84 const css::lang::EventObject& rEvent) override;
85
86private:
87 sal_uInt16 mnChildWindowId;
89 ::std::unique_ptr<SfxShell> mpShell;
90
97};
98
99} // end of namespace sd::framework
100
101/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
The ChildWindowPane listens to the child window and disposes itself when the child window becomes ina...
bool mbHasBeenActivated
This flag is set when the pane shell has been activated at least once.
virtual vcl::Window * GetWindow() override
This returns the content window when the child window is already visible.
ChildWindowPane(const css::uno::Reference< css::drawing::framework::XResourceId > &rxPaneId, sal_uInt16 nChildWindowId, ViewShellBase &rViewShellBase, ::std::unique_ptr< SfxShell > &&pShell)
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getWindow() override
The local getWindow() first calls GetWindow() to provide a valid window pointer before forwarding the...
virtual ~ChildWindowPane() override
::std::unique_ptr< SfxShell > mpShell
virtual void SAL_CALL disposing() override
A pane is a wrapper for a window and possibly for a tab bar (for view switching).
Definition: Pane.hxx:51
::cppu::ImplInheritanceHelper< ::sd::framework::Pane, css::lang::XEventListener > ChildWindowPaneInterfaceBase
#define DECLARE_XTYPEPROVIDER()
#define DECLARE_XINTERFACE()