1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_inspection_XObjectInspector_idl__
29#define __com_sun_star_inspection_XObjectInspector_idl__
30
31#ifndef __com_sun_star_frame_XController_idl__
32#include <com/sun/star/frame/XController.idl>
33#endif
34#ifndef __com_sun_star_frame_XDispatchProvider_idl__
35#include <com/sun/star/frame/XDispatchProvider.idl>
36#endif
37#ifndef __com_sun_star_util_VetoException_idl__
38#include <com/sun/star/util/VetoException.idl>
39#endif
40
41//=============================================================================
42module com {  module sun {  module star {  module inspection {
43
44published interface XObjectInspectorModel;
45published interface XObjectInspectorUI;
46
47//-----------------------------------------------------------------------------
48/** describes the main interface of an <type>ObjectInspector</type>.
49
50    @see ObjectInspector
51
52    @since OOo 2.0.3
53*/
54published interface XObjectInspector
55{
56    /** allows to plug the inspector into an <type scope="com::sun::star::frame">XFrame</type>
57
58        <p>The <member scope="com::sun::star::frame">XController::setModel</member> method
59        accepts only <type>XObjectInspectorModel</type>s, and will return <FALSE/> if the
60        to-be-attached model is not <NULL/>, but does not support this interface.</p>
61
62        <p>If you do not want to support a full-blown <type scope="com::sun::star::frame">XModel</type>,
63        use the <member>InspectorModel</member> attribute instead.</p>
64
65        <p>The <member scope="com::sun::star::frame">XController::getViewData</member> and
66        <member scope="com::sun::star::frame">XController::restoreViewData</member> exchange
67        string values, which describes as much of the current view state as possible.</p>
68    */
69    interface com::sun::star::frame::XController;
70
71    /** allows to intercept functionality
72
73        <p>This interface is inherited from the <type scope="com::sun::star::frame">Controller</type>
74        service, currently, there is no functionality to intercept at an <type>XObjectInspector</type>.</p>
75    */
76    interface com::sun::star::frame::XDispatchProvider;
77
78    /** provides access to the current model of the inspector
79
80        <p>The model is mainly responsible for providing the property handlers. Additionally,
81        it can provide user interface names and help URLs for property categories.</p>
82
83        <p>Note that there are two ways of setting or retrieving the current model: You can either
84        use <member scope="com::sun::star::frame">XModel::setModel</member>, or, if you do not want
85        or need to implement the full-blown <type scope="com::sun::star::frame">XModel</type> interface,
86        you can use this property directly. Both approaches are semantically equivalent.</p>
87
88        <p>If a new model is set at the inspector, the complete UI will be rebuilt to reflect
89        the change, using the new property handlers provided by the new model.</p>
90    */
91    [attribute] XObjectInspectorModel InspectorModel;
92
93    /** provides access to the user interface of the object inspector.
94
95        <p>This interface can be used to access and manipulate various aspects of
96        the user interface. For instance, you can enable and disable certain
97        property controls (or parts thereof), or register observers for all property
98        controls.</p>
99
100        @since OOo 2.2
101    */
102    [attribute, readonly] XObjectInspectorUI InspectorUI;
103
104    /** inspects a new collection of one or more objects.
105
106        <p>If the sequence is empty, the UI of the <type>ObjectInspector</type> will be
107        cleared.</p>
108
109        <p>If the sequence contains more than one object, the <type>XObjectInspector</type>
110        will create a complete set of property handlers (as indicated by
111        <member>XObjectInspectorModel::HandlerFactories</member>) for <em>every</em> of
112        the objects, and compose their output.</p>
113
114        @throws com::sun::star::util::VetoException
115            if the inspector cannot switch to another object set. This typically happens if
116            one of the active <type>XPropertyHandler</type>'s raised a non-modal user interface,
117            and vetoed suspension of this UI.
118
119        @see XPropertyHandler::isComposable
120        @see XPropertyHandler::onInteractivePropertySelection
121        @see XPropertyHandler::suspend
122    */
123    void inspect( [in] sequence< com::sun::star::uno::XInterface > Objects )
124        raises (com::sun::star::util::VetoException);
125};
126
127//=============================================================================
128
129}; }; }; };
130
131#endif
132
133
134