tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / offapi / com / sun / star / frame / XModel2.idl
blob093c584a53d91a6875966a10b06be832f99ace27
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
21 module com { module sun { module star { module frame {
23 /** extends interface XModel.
25 The following functions are added:
27 - enumeration of all currently connected controller objects.
28 (not getCurrentController() only, which depends on focus)
30 - establish new view controller factory methods, which will make
31 it possible to create new views for this model.
33 interface XModel2 : com::sun::star::frame::XModel
35 /** provides list of all currently connected controller objects.
37 <p>
38 Please note: Because this interface will might be used inside
39 multi threaded environments those list can contain still disposed items
40 or it new added controller will be missing (if they were added after this
41 enumeration was created).
42 </P>
44 @returns
45 list of controller objects.
46 Enumeration can be empty but not NULL.
48 com::sun::star::container::XEnumeration getControllers();
50 /** provides the available names of the factory to be used to create views.
52 <p>The names are usually logical view names. The following names have
53 a defined meaning, i.e. every concrete implementation which returns such
54 a name must ensure it has the same meaning, and if a concrete implementation
55 has a view with the given meaning, it must give it the name as defined here:
56 <ul>
57 <li><b>Default</b> specifies the default view of the document.</li>
58 <li><b>Preview</b> specifies a preview of the document. A minimal implementation of such a view
59 is a <em>Default</em> view which is read-only.</li>
60 <li><b>PrintPreview</b> specifies a print preview of the document.</li>
61 </ul>
62 </p>
64 <p>Implementations of this interface might decide to support additional
65 view names, which then are documented in the respective service descriptions.</p>
67 @see createView
69 @returns
70 a sequence of names of all supported views for this document.
72 sequence< string > getAvailableViewControllerNames();
74 /** creates the default view instance for this model.
76 <p>Effectively, this method is equivalent to calling createView() with
77 the <code>ViewName</code> being <code>&quot;Default&quot;</code>.</p>
79 @param Frame
80 used to place the new created view there
82 @return the new view controller instance
84 @throws ::com::sun::star::lang::IllegalArgumentException
85 if one of the given parameter was wrong
87 @throws ::com::sun::star::uno::Exception
88 if creation of a new view failed by other reasons
90 com::sun::star::frame::XController2 createDefaultViewController( [in] com::sun::star::frame::XFrame Frame )
91 raises (com::sun::star::lang::IllegalArgumentException,
92 com::sun::star::uno::Exception );
94 /** creates a new view instance classified by the specified name and arguments.
96 <p>The newly created controller must not be connected with the document and the
97 frame. That is, you should neither call XFrame::setComponent(), nor
98 XController::attachFrame(), nor XController::attachModel(),
99 nor XModel::connectController(), not XModel::setCurrentController().
100 All of this is the responsibility of the caller, which will do it in the proper order.</p>
102 @param ViewName
103 classified name of instance
105 @param Arguments
106 arguments used for creation
108 @param Frame
109 used to place the new created view there
111 @return the new view controller instance
113 @throws ::com::sun::star::lang::IllegalArgumentException
114 if one of the given parameter was wrong
116 @throws ::com::sun::star::uno::Exception
117 if creation of a new view failed by other reasons
119 com::sun::star::frame::XController2 createViewController( [in] string ViewName ,
120 [in] sequence< com::sun::star::beans::PropertyValue > Arguments ,
121 [in] com::sun::star::frame::XFrame Frame )
122 raises (com::sun::star::lang::IllegalArgumentException,
123 com::sun::star::uno::Exception );
125 /** Sets com::sun::star::document::MediaDescriptor properties
126 of the current model during runtime.
128 @since LibreOffice 6.3
130 @param Arguments
131 Properties which should be set
132 Supported properties:
133 <ul>
134 <li>com::sun::star::document::MediaDescriptor::SuggestedSaveAsDir</li>
135 <li>com::sun::star::document::MediaDescriptor::SuggestedSaveAsName</li>
136 <li>com::sun::star::document::MediaDescriptor::LockContentExtraction</li>
137 <li>com::sun::star::document::MediaDescriptor::LockExport</li>
138 <li>com::sun::star::document::MediaDescriptor::LockPrint</li>
139 <li>com::sun::star::document::MediaDescriptor::LockSave</li>
140 <li>com::sun::star::document::MediaDescriptor::LockEditDoc</li>
141 <li>com::sun::star::document::MediaDescriptor::EncryptionData (since LibreOffice 7.0)</li>
142 </ul>
144 @throws com::sun::star::lang::IllegalArgumentException When trying to set an unsupported property
145 @throws com::sun::star::util::InvalidStateException When the document model can not be retrieved
147 void setArgs([in] sequence< com::sun::star::beans::PropertyValue > Arguments)
148 raises(com::sun::star::lang::IllegalArgumentException,
149 com::sun::star::util::InvalidStateException);
153 }; }; }; };
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */