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 __com_sun_star_frame_XModel2_idl__
20 #define __com_sun_star_frame_XModel2_idl__
22 #include
<com
/sun
/star
/frame
/XController2.idl
>
23 #include
<com
/sun
/star
/frame
/XModel.idl
>
24 #include
<com
/sun
/star
/container
/XEnumeration.idl
>
25 #include
<com
/sun
/star
/awt
/XWindow.idl
>
26 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
29 module com
{ module sun
{ module star
{ module frame
{
31 /** extends interface XModel.
33 The following functions are added:
35 - enumeration of all currently connected controller objects.
36 (not getCurrentController() only, which depends on focus)
38 - establish new view controller factory methods, which will make
39 it possible to create new views for this model.
41 interface XModel2
: com
::sun
::star
::frame
::XModel
43 /** provides list of all currently connected controller objects.
46 Please note: Because this interface will might be used inside
47 multi threaded environments those list can contain still disposed items
48 or it new added controller will be missing (if they was added after this
49 enumeration was created).
53 list of controller objects.
54 Enumeration can be empty but not NULL.
56 com
::sun
::star
::container
::XEnumeration getControllers
();
58 /** provides the available names of the factory to be used to create views.
60 <p>The names are usually logical view names. The following names have
61 a defined meaning, i.e. every concrete implementation which returns such
62 a name must ensure it has the same meaning, and if a concrete implementation
63 has a view with the given meaning, it must give it the name as defined here:
65 <li><b>Default</b> specifies the default view of the document.</li>
66 <li><b>Preview</b> specifies a preview of the document. A minimal implementation of such a view
67 is a <em>Default</em> view which is read-only.</li>
68 <li><b>PrintPreview</b> specifies a print preview of the document.</li>
72 <p>Implementations of this interface might decide to support additional
73 view names, which then are documented in the respective service descriptions.</p>
78 a sequence of names of all supported views for this document.
80 sequence
< string > getAvailableViewControllerNames
();
82 /** creates the default view instance for this model.
84 <p>Effectively, this method is equivalent to calling createView() with
85 the <code>ViewName</code> being <code>"Default"</code>.</p>
88 used to place the new created view there
90 @return the new view controller instance
92 @throws ::com::sun::star::lang::IllegalArgumentException
93 if one of the given parameter was wrong
95 @throws ::com::sun::star::uno::Exception
96 if creation of a new view failed by other reasons
98 com
::sun
::star
::frame
::XController2 createDefaultViewController
( [in] com
::sun
::star
::frame
::XFrame Frame
)
99 raises
(com
::sun
::star
::lang
::IllegalArgumentException
,
100 com
::sun
::star
::uno
::Exception
);
102 /** creates a new view instance classified by the specified name and arguments.
104 <p>The newly created controller must not be connected with the document and the
105 frame. That is, you should neither call XFrame::setComponent(), nor
106 XController::attachFrame(), nor XController::attachModel(),
107 nor XModel::connectController(), not XModel::setCurrentController().
108 All of this is the responsibility of the caller, which will do it in the proper order.</p>
111 classified name of instance
114 arguments used for creation
117 used to place the new created view there
119 @return the new view controller instance
121 @throws ::com::sun::star::lang::IllegalArgumentException
122 if one of the given parameter was wrong
124 @throws ::com::sun::star::uno::Exception
125 if creation of a new view failed by other reasons
127 com
::sun
::star
::frame
::XController2 createViewController
( [in] string ViewName
,
128 [in] sequence
< com
::sun
::star
::beans
::PropertyValue
> Arguments
,
129 [in] com
::sun
::star
::frame
::XFrame Frame
)
130 raises
(com
::sun
::star
::lang
::IllegalArgumentException
,
131 com
::sun
::star
::uno
::Exception
);
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */