LibreOffice Module dbaccess (master) 1
subcomponentloader.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 <com/sun/star/awt/XWindowListener.hpp>
23#include <com/sun/star/frame/XController.hpp>
24#include <com/sun/star/lang/XComponent.hpp>
25#include <com/sun/star/ucb/XCommandProcessor.hpp>
26
28
29namespace dbaccess
30{
31
32 // SubComponentLoader
33 typedef ::cppu::WeakImplHelper< css::awt::XWindowListener
39 {
40 public:
42 const css::uno::Reference< css::frame::XController >& i_rApplicationController,
43 const css::uno::Reference< css::ucb::XCommandProcessor >& i_rSubDocumentDefinition
44 );
45
47 const css::uno::Reference< css::frame::XController >& i_rApplicationController,
48 const css::uno::Reference< css::lang::XComponent >& i_rNonDocumentComponent
49 );
50
51 // XWindowListener
52 virtual void SAL_CALL windowResized( const css::awt::WindowEvent& e ) override;
53 virtual void SAL_CALL windowMoved( const css::awt::WindowEvent& e ) override;
54 virtual void SAL_CALL windowShown( const css::lang::EventObject& e ) override;
55 virtual void SAL_CALL windowHidden( const css::lang::EventObject& e ) override;
56
57 // XEventListener
58 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
59
60 protected:
61 virtual ~SubComponentLoader() override;
62
63 private:
64 const css::uno::Reference< css::ucb::XCommandProcessor > mxDocDefCommands;
65 const css::uno::Reference< css::lang::XComponent > mxNonDocComponent;
66 css::uno::Reference< css::awt::XWindow > mxAppComponentWindow;
67 };
68
69} // namespace dbaccess
70
71/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
is a helper class which loads/opens a given sub component as soon as the main application window beco...
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual void SAL_CALL windowResized(const css::awt::WindowEvent &e) override
virtual ~SubComponentLoader() override
virtual void SAL_CALL windowShown(const css::lang::EventObject &e) override
virtual void SAL_CALL windowHidden(const css::lang::EventObject &e) override
const css::uno::Reference< css::lang::XComponent > mxNonDocComponent
virtual void SAL_CALL windowMoved(const css::awt::WindowEvent &e) override
SubComponentLoader(const css::uno::Reference< css::frame::XController > &i_rApplicationController, const css::uno::Reference< css::lang::XComponent > &i_rNonDocumentComponent)
const css::uno::Reference< css::ucb::XCommandProcessor > mxDocDefCommands
SubComponentLoader(const css::uno::Reference< css::frame::XController > &i_rApplicationController, const css::uno::Reference< css::ucb::XCommandProcessor > &i_rSubDocumentDefinition)
css::uno::Reference< css::awt::XWindow > mxAppComponentWindow
::cppu::WeakImplHelper< css::awt::XWindowListener > SubComponentLoader_Base