1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fmPropBrw.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SVX_FMPROPBRW_HXX
31 #define SVX_FMPROPBRW_HXX
33 /** === begin UNO includes === **/
34 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
35 #include <com/sun/star/awt/XControlContainer.hpp>
36 #include <com/sun/star/frame/XFrame.hpp>
37 #include <com/sun/star/inspection/XObjectInspectorModel.hpp>
38 #include <com/sun/star/uno/XComponentContext.hpp>
39 /** === end UNO includes === **/
40 #include <sfx2/basedlgs.hxx>
41 #include <sfx2/ctrlitem.hxx>
42 #include <sfx2/childwin.hxx>
43 #include "fmtools.hxx"
45 //========================================================================
46 class FmPropBrwMgr
: public SfxChildWindow
49 FmPropBrwMgr(Window
*pParent
, sal_uInt16 nId
, SfxBindings
*pBindings
, SfxChildWinInfo
*pInfo
);
50 SFX_DECL_CHILDWINDOW(FmPropBrwMgr
);
56 //========================================================================
57 class FmPropBrw
: public SfxFloatingWindow
, public SfxControllerItem
59 sal_Bool m_bInitialStateChange
;
60 bool m_bInStateChange
;
61 ::rtl::OUString m_sLastActivePage
;
62 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>
64 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>
66 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>
68 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>
70 ::com::sun::star::uno::Reference
< ::com::sun::star::inspection::XObjectInspectorModel
>
72 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XController
>
74 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
>
75 m_xBrowserComponentWindow
;
76 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
>
77 m_xFrameContainerWindow
;
80 virtual void StateChanged(sal_uInt16 nSID
, SfxItemState eState
, const SfxPoolItem
* pState
);
81 virtual void FillInfo( SfxChildWinInfo
& rInfo
) const;
82 virtual sal_Bool
Close();
84 DECL_LINK( OnAsyncGetFocus
, void* );
86 void implSetNewSelection( const InterfaceBag
& _rSelection
);
87 void implDetachController();
88 bool implIsReadOnlyModel() const;
89 ::rtl::OUString
getCurrentPage() const;
93 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _xORB
,
94 SfxBindings
* pBindings
,
97 const SfxChildWinInfo
* _pInfo
101 using SfxFloatingWindow::StateChanged
;
104 virtual void Resize();
107 /** creates the PropertyBrowser (aka ObjectInspector) and plugs it into our frame
109 This method ensures that a new component is created every time the XModel which
110 we're working for changed. This is necessary since this model is part of the
111 ComponentContext we use to create the ObjectInspector.
113 void impl_ensurePropertyBrowser_nothrow( FmFormShell
* _pFormShell
);
115 /** creates a property browser
117 After this method returns, m_xBrowserController and m_xBrowserComponentWindow are
121 we don't have an ObjectInspector, yet, i.e. m_xBrowserController and m_xBrowserComponentWindow
124 void impl_createPropertyBrowser_throw( FmFormShell
* _pFormShell
);
126 #endif //SVX_FMPROPBRW_HXX