merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / frame / XModel2.idl
blob1dc979f7d331d6b5a33d41bdf805fca4a7087d94
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XModel2.idl,v $
10 * $Revision: 1.5 $
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 __com_sun_star_frame_XModel2_idl__
31 #define __com_sun_star_frame_XModel2_idl__
33 #include <com/sun/star/frame/XController2.idl>
34 #include <com/sun/star/frame/XModel.idl>
35 #include <com/sun/star/container/XEnumeration.idl>
36 #include <com/sun/star/awt/XWindow.idl>
37 #include <com/sun/star/lang/IllegalArgumentException.idl>
39 //=============================================================================
41 module com { module sun { module star { module frame {
43 //=============================================================================
44 /** extends interface XModel.
46 The foloowing functions are added:
48 - enumeration of all currently connected controller objects.
49 (not getCurrentController() only, which depends on focus)
51 - establish new view controller factory methods, which will make
52 it possible to create new views for this model.
54 interface XModel2 : com::sun::star::frame::XModel
56 //-------------------------------------------------------------------------
57 /** provides list of all currently connected controller objects.
59 <p>
60 Please note: Because this interface will might be used inside
61 multi threaded environments those list can contain still disposed items
62 or it new added controller will be missing (if they was added after this
63 enumeration was created).
64 </P>
66 @returns
67 list of controller objects.
68 Enumeration can be empty but not NULL.
70 com::sun::star::container::XEnumeration getControllers();
72 //-------------------------------------------------------------------------
73 /** provides the available names of the factory to be used to create views.
75 <p>The names are usually logical view names. The following names have
76 a defined meaning, i.e. every concrete implementation which returns such
77 a name must ensure it has the same meaning, and if a concrete implementation
78 has a view with the given meaning, it must give it the name as defined here:
79 <ul>
80 <li><b>Default</b> specifies the default view of the document.</li>
81 <li><b>Preview</b> specifies a preview of the document. A minimal implementation of such a view
82 is a <em>Default</em> view which is read-only.</li>
83 <li><b>PrintPreview</b> specifies a print preview of the document.</li>
84 </ul>
85 </p>
87 <p>Implementations of this interface might decide to support additional
88 view names, which then are documented in the respective service descriptions.</p>
90 @see createView
92 @returns
93 a sequence of names of all supported views for this document.
95 sequence< string > getAvailableViewControllerNames();
97 //-------------------------------------------------------------------------
98 /** creates the default view instance for this model.
100 <p>Effectively, this method is equivalent to calling <member>createView</member> with
101 the <code>ViewName</code> being <code>&quot;Default&quot;</code>.</p>
103 @param Frame
104 used to place the new created view there
106 @return the new view controller instance
108 @throws ::com::sun::star::lang::IllegalArgumentException
109 if one of the given parameter was wrong
111 @throws ::com::sun::star::uno::Exception
112 if creation of a new view failed by other reasons
114 com::sun::star::frame::XController2 createDefaultViewController( [in] com::sun::star::frame::XFrame Frame )
115 raises (com::sun::star::lang::IllegalArgumentException,
116 com::sun::star::uno::Exception );
118 //-------------------------------------------------------------------------
119 /** creates a new view instance classified by the specified name and arguments.
121 <p>The newly created controller must not be connected with the document and the
122 frame. That is, you should neither call <member>XFrame::setComponent</member>, nor
123 <member>XController::attachFrame</member>, nor <member>XController::attachModel</member>,
124 nor <member>XModel::connectController</member>, not <member>XModel::setCurrentController</member>.
125 All of this is the responsibility of the caller, which will do it in the proper order.</p>
127 @param ViewName
128 classified name of instance
130 @param Arguments
131 arguments used for creation
133 @param Frame
134 used to place the new created view there
136 @return the new view controller instance
138 @throws ::com::sun::star::lang::IllegalArgumentException
139 if one of the given parameter was wrong
141 @throws ::com::sun::star::uno::Exception
142 if creation of a new view failed by other reasons
144 com::sun::star::frame::XController2 createViewController( [in] string ViewName ,
145 [in] sequence< com::sun::star::beans::PropertyValue > Arguments ,
146 [in] com::sun::star::frame::XFrame Frame )
147 raises (com::sun::star::lang::IllegalArgumentException,
148 com::sun::star::uno::Exception );
151 //=============================================================================
153 }; }; }; };
155 #endif