1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef INCLUDED_SVX_SOURCE_INC_FMPROPBRW_HXX
20 #define INCLUDED_SVX_SOURCE_INC_FMPROPBRW_HXX
22 #include <com/sun/star/awt/XControlContainer.hpp>
23 #include <com/sun/star/frame/XFrame2.hpp>
24 #include <com/sun/star/inspection/XObjectInspectorModel.hpp>
25 #include <com/sun/star/uno/XComponentContext.hpp>
27 #include <sfx2/basedlgs.hxx>
28 #include <sfx2/ctrlitem.hxx>
29 #include <sfx2/childwin.hxx>
30 #include <svx/fmtools.hxx>
33 class FmPropBrwMgr
: public SfxChildWindow
36 FmPropBrwMgr(vcl::Window
*pParent
, sal_uInt16 nId
, SfxBindings
*pBindings
, SfxChildWinInfo
*pInfo
);
37 SFX_DECL_CHILDWINDOW(FmPropBrwMgr
);
43 class FmPropBrw final
: public SfxFloatingWindow
, public SfxControllerItem
45 bool m_bInitialStateChange
;
46 OUString m_sLastActivePage
;
47 css::uno::Reference
< css::uno::XComponentContext
>
49 css::uno::Reference
< css::uno::XComponentContext
>
51 css::uno::Reference
< css::frame::XFrame2
>
53 css::uno::Reference
< css::uno::XInterface
>
55 css::uno::Reference
< css::inspection::XObjectInspectorModel
>
57 css::uno::Reference
< css::frame::XController
>
59 css::uno::Reference
< css::awt::XWindow
>
60 m_xBrowserComponentWindow
;
61 css::uno::Reference
< css::awt::XWindow
>
62 m_xFrameContainerWindow
;
64 virtual void StateChanged(sal_uInt16 nSID
, SfxItemState eState
, const SfxPoolItem
* pState
) override
;
65 virtual void FillInfo( SfxChildWinInfo
& rInfo
) const override
;
66 virtual bool Close() override
;
68 DECL_LINK( OnAsyncGetFocus
, void*, void );
70 void implSetNewSelection( const InterfaceBag
& _rSelection
);
71 void implDetachController();
72 bool implIsReadOnlyModel() const;
73 OUString
getCurrentPage() const;
77 const css::uno::Reference
< css::uno::XComponentContext
>& _xORB
,
78 SfxBindings
* pBindings
,
81 const SfxChildWinInfo
* _pInfo
83 virtual ~FmPropBrw() override
;
84 virtual void dispose() override
;
86 using SfxFloatingWindow::StateChanged
;
89 virtual void Resize() override
;
91 /** creates the PropertyBrowser (aka ObjectInspector) and plugs it into our frame
93 This method ensures that a new component is created every time the XModel which
94 we're working for changed. This is necessary since this model is part of the
95 ComponentContext we use to create the ObjectInspector.
97 void impl_ensurePropertyBrowser_nothrow( FmFormShell
* _pFormShell
);
99 /** creates a property browser
101 After this method returns, m_xBrowserController and m_xBrowserComponentWindow are
105 we don't have an ObjectInspector, yet, i.e. m_xBrowserController and m_xBrowserComponentWindow
108 void impl_createPropertyBrowser_throw( FmFormShell
* _pFormShell
);
110 #endif // INCLUDED_SVX_SOURCE_INC_FMPROPBRW_HXX
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */