summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/frame/XModel2.idl
blob: 390d07720fbf57ab3d8d550434d8ffecac80e40e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/*************************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * Copyright 2008 by Sun Microsystems, Inc.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * $RCSfile: XModel2.idl,v $
 * $Revision: 1.4 $
 *
 * This file is part of OpenOffice.org.
 *
 * OpenOffice.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * OpenOffice.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License version 3 for more details
 * (a copy is included in the LICENSE file that accompanied this code).
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with OpenOffice.org.  If not, see
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************/
#ifndef __com_sun_star_frame_XModel2_idl__
#define __com_sun_star_frame_XModel2_idl__

#ifndef __com_sun_star_frame_XModel_idl__
#include <com/sun/star/frame/XModel.idl>
#endif

#ifndef __com_sun_star_container_XEnumeration_idl__
#include <com/sun/star/container/XEnumeration.idl>
#endif

#ifndef __com_sun_star_awt_XWindow_idl__
#include <com/sun/star/awt/XWindow.idl>
#endif

#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
#include <com/sun/star/lang/IllegalArgumentException.idl>
#endif

//=============================================================================

 module com {  module sun {  module star {  module frame {

//=============================================================================
/** extends interface XModel.

    The foloowing functions are added:

    - enumeration of all currently connected controller objects.
      (not getCurrentController() only, which depends on focus)

    - establish new view controller factory methods, which will make
      it possible to create new views for this model.
 */
interface XModel2 : com::sun::star::frame::XModel
{
    //-------------------------------------------------------------------------
    /** provides list of all currently connected controller objects.

        <p>
        Please note: Because this interface will might be used inside
        multi threaded environments those list can contain still disposed items
        or it new added controller will be missing (if they was added after this
        enumeration was created).
        </P>

        @returns
            list of controller objects.
            Enumeration can be empty but not NULL.
     */
    com::sun::star::container::XEnumeration getControllers();

    //-------------------------------------------------------------------------
    /** provides the available names of the factory to be used to create views.

        @see createView()

        @returns
            sequence of all view names
     */
    sequence< string > getAvailableViewControllerNames();

    //-------------------------------------------------------------------------
    /** creates the default view instance for this model.

        @param Frame
               used to place the new created view there

        @param ComponentWindow
               returns a suitable component window for the new created view controller

        @return the new view controller instance

        @throws ::com::sun::star::lang::IllegalArgumentException
                if one of the given parameter was wrong

        @throws ::com::sun::star::uno::Exception
                if creation of a new view failed by other reasons
     */
    com::sun::star::frame::XController createDefaultViewController( [in]  com::sun::star::frame::XFrame Frame          ,
                                                                    [out] com::sun::star::awt::XWindow  ComponentWindow)
        raises (com::sun::star::lang::IllegalArgumentException,
                com::sun::star::uno::Exception                );

    //-------------------------------------------------------------------------
    /** creates a new view instance classified by the specified name and arguments.

        @param ViewName
               classified name of instance

        @param Arguments
               arguments used for creation

        @param Frame
               used to place the new created view there

        @param ComponentWindow
               returns a suitable component window for the new created view controller

        @return the new view controller instance

        @throws ::com::sun::star::lang::IllegalArgumentException
                if one of the given parameter was wrong

        @throws ::com::sun::star::uno::Exception
                if creation of a new view failed by other reasons
     */
    com::sun::star::frame::XController createViewController( [in]  string                                           ViewName       ,
                                                             [in]  sequence< com::sun::star::beans::PropertyValue > Arguments      ,
                                                             [in]  com::sun::star::frame::XFrame                    Frame          ,
                                                             [out] com::sun::star::awt::XWindow                     ComponentWindow)
        raises (com::sun::star::lang::IllegalArgumentException,
                com::sun::star::uno::Exception                );
};

//=============================================================================

}; }; }; };

#endif