1*b1cdbd2cSJim Jagielski/**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski
24*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_inspection_XObjectInspector_idl__
25*b1cdbd2cSJim Jagielski#define __com_sun_star_inspection_XObjectInspector_idl__
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_frame_XController_idl__
28*b1cdbd2cSJim Jagielski#include <com/sun/star/frame/XController.idl>
29*b1cdbd2cSJim Jagielski#endif
30*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_frame_XDispatchProvider_idl__
31*b1cdbd2cSJim Jagielski#include <com/sun/star/frame/XDispatchProvider.idl>
32*b1cdbd2cSJim Jagielski#endif
33*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_util_VetoException_idl__
34*b1cdbd2cSJim Jagielski#include <com/sun/star/util/VetoException.idl>
35*b1cdbd2cSJim Jagielski#endif
36*b1cdbd2cSJim Jagielski
37*b1cdbd2cSJim Jagielski//=============================================================================
38*b1cdbd2cSJim Jagielskimodule com {  module sun {  module star {  module inspection {
39*b1cdbd2cSJim Jagielski
40*b1cdbd2cSJim Jagielskipublished interface XObjectInspectorModel;
41*b1cdbd2cSJim Jagielskipublished interface XObjectInspectorUI;
42*b1cdbd2cSJim Jagielski
43*b1cdbd2cSJim Jagielski//-----------------------------------------------------------------------------
44*b1cdbd2cSJim Jagielski/** describes the main interface of an <type>ObjectInspector</type>.
45*b1cdbd2cSJim Jagielski
46*b1cdbd2cSJim Jagielski    @see ObjectInspector
47*b1cdbd2cSJim Jagielski
48*b1cdbd2cSJim Jagielski    @since OpenOffice 2.0.3
49*b1cdbd2cSJim Jagielski*/
50*b1cdbd2cSJim Jagielskipublished interface XObjectInspector
51*b1cdbd2cSJim Jagielski{
52*b1cdbd2cSJim Jagielski    /** allows to plug the inspector into an <type scope="com::sun::star::frame">XFrame</type>
53*b1cdbd2cSJim Jagielski
54*b1cdbd2cSJim Jagielski        <p>The <member scope="com::sun::star::frame">XController::setModel</member> method
55*b1cdbd2cSJim Jagielski        accepts only <type>XObjectInspectorModel</type>s, and will return <FALSE/> if the
56*b1cdbd2cSJim Jagielski        to-be-attached model is not <NULL/>, but does not support this interface.</p>
57*b1cdbd2cSJim Jagielski
58*b1cdbd2cSJim Jagielski        <p>If you do not want to support a full-blown <type scope="com::sun::star::frame">XModel</type>,
59*b1cdbd2cSJim Jagielski        use the <member>InspectorModel</member> attribute instead.</p>
60*b1cdbd2cSJim Jagielski
61*b1cdbd2cSJim Jagielski        <p>The <member scope="com::sun::star::frame">XController::getViewData</member> and
62*b1cdbd2cSJim Jagielski        <member scope="com::sun::star::frame">XController::restoreViewData</member> exchange
63*b1cdbd2cSJim Jagielski        string values, which describes as much of the current view state as possible.</p>
64*b1cdbd2cSJim Jagielski    */
65*b1cdbd2cSJim Jagielski    interface com::sun::star::frame::XController;
66*b1cdbd2cSJim Jagielski
67*b1cdbd2cSJim Jagielski    /** allows to intercept functionality
68*b1cdbd2cSJim Jagielski
69*b1cdbd2cSJim Jagielski        <p>This interface is inherited from the <type scope="com::sun::star::frame">Controller</type>
70*b1cdbd2cSJim Jagielski        service, currently, there is no functionality to intercept at an <type>XObjectInspector</type>.</p>
71*b1cdbd2cSJim Jagielski    */
72*b1cdbd2cSJim Jagielski    interface com::sun::star::frame::XDispatchProvider;
73*b1cdbd2cSJim Jagielski
74*b1cdbd2cSJim Jagielski    /** provides access to the current model of the inspector
75*b1cdbd2cSJim Jagielski
76*b1cdbd2cSJim Jagielski        <p>The model is mainly responsible for providing the property handlers. Additionally,
77*b1cdbd2cSJim Jagielski        it can provide user interface names and help URLs for property categories.</p>
78*b1cdbd2cSJim Jagielski
79*b1cdbd2cSJim Jagielski        <p>Note that there are two ways of setting or retrieving the current model: You can either
80*b1cdbd2cSJim Jagielski        use <member scope="com::sun::star::frame">XModel::setModel</member>, or, if you do not want
81*b1cdbd2cSJim Jagielski        or need to implement the full-blown <type scope="com::sun::star::frame">XModel</type> interface,
82*b1cdbd2cSJim Jagielski        you can use this property directly. Both approaches are semantically equivalent.</p>
83*b1cdbd2cSJim Jagielski
84*b1cdbd2cSJim Jagielski        <p>If a new model is set at the inspector, the complete UI will be rebuilt to reflect
85*b1cdbd2cSJim Jagielski        the change, using the new property handlers provided by the new model.</p>
86*b1cdbd2cSJim Jagielski    */
87*b1cdbd2cSJim Jagielski    [attribute] XObjectInspectorModel InspectorModel;
88*b1cdbd2cSJim Jagielski
89*b1cdbd2cSJim Jagielski    /** provides access to the user interface of the object inspector.
90*b1cdbd2cSJim Jagielski
91*b1cdbd2cSJim Jagielski        <p>This interface can be used to access and manipulate various aspects of
92*b1cdbd2cSJim Jagielski        the user interface. For instance, you can enable and disable certain
93*b1cdbd2cSJim Jagielski        property controls (or parts thereof), or register observers for all property
94*b1cdbd2cSJim Jagielski        controls.</p>
95*b1cdbd2cSJim Jagielski
96*b1cdbd2cSJim Jagielski        @since OpenOffice 2.2
97*b1cdbd2cSJim Jagielski    */
98*b1cdbd2cSJim Jagielski    [attribute, readonly] XObjectInspectorUI InspectorUI;
99*b1cdbd2cSJim Jagielski
100*b1cdbd2cSJim Jagielski    /** inspects a new collection of one or more objects.
101*b1cdbd2cSJim Jagielski
102*b1cdbd2cSJim Jagielski        <p>If the sequence is empty, the UI of the <type>ObjectInspector</type> will be
103*b1cdbd2cSJim Jagielski        cleared.</p>
104*b1cdbd2cSJim Jagielski
105*b1cdbd2cSJim Jagielski        <p>If the sequence contains more than one object, the <type>XObjectInspector</type>
106*b1cdbd2cSJim Jagielski        will create a complete set of property handlers (as indicated by
107*b1cdbd2cSJim Jagielski        <member>XObjectInspectorModel::HandlerFactories</member>) for <em>every</em> of
108*b1cdbd2cSJim Jagielski        the objects, and compose their output.</p>
109*b1cdbd2cSJim Jagielski
110*b1cdbd2cSJim Jagielski        @throws com::sun::star::util::VetoException
111*b1cdbd2cSJim Jagielski            if the inspector cannot switch to another object set. This typically happens if
112*b1cdbd2cSJim Jagielski            one of the active <type>XPropertyHandler</type>'s raised a non-modal user interface,
113*b1cdbd2cSJim Jagielski            and vetoed suspension of this UI.
114*b1cdbd2cSJim Jagielski
115*b1cdbd2cSJim Jagielski        @see XPropertyHandler::isComposable
116*b1cdbd2cSJim Jagielski        @see XPropertyHandler::onInteractivePropertySelection
117*b1cdbd2cSJim Jagielski        @see XPropertyHandler::suspend
118*b1cdbd2cSJim Jagielski    */
119*b1cdbd2cSJim Jagielski    void inspect( [in] sequence< com::sun::star::uno::XInterface > Objects )
120*b1cdbd2cSJim Jagielski        raises (com::sun::star::util::VetoException);
121*b1cdbd2cSJim Jagielski};
122*b1cdbd2cSJim Jagielski
123*b1cdbd2cSJim Jagielski//=============================================================================
124*b1cdbd2cSJim Jagielski
125*b1cdbd2cSJim Jagielski}; }; }; };
126*b1cdbd2cSJim Jagielski
127*b1cdbd2cSJim Jagielski#endif
128*b1cdbd2cSJim Jagielski
129*b1cdbd2cSJim Jagielski
130