merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / frame / XController.idl
blob50d58246fb1abdb5f836227359cfb67a196f7fea
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_frame_XController_idl__
28 #define __com_sun_star_frame_XController_idl__
30 #ifndef __com_sun_star_lang_XComponent_idl__
31 #include <com/sun/star/lang/XComponent.idl>
32 #endif
34 //=============================================================================
36 module com { module sun { module star { module frame {
38 published interface XFrame;
39 published interface XModel;
41 //=============================================================================
42 /** With this interface, components viewed in a <type>Frame</type> can serve
43 events (by supplying dispatches).
45 @see XFrame
46 @see com::sun::star::awt::XWindow
47 @see XModel
49 published interface XController: com::sun::star::lang::XComponent
51 //-------------------------------------------------------------------------
52 /** is called to attach the controller with its managing frame.
54 @param Frame
55 the new owner frame of this controller
57 void attachFrame( [in] XFrame Frame );
59 //-------------------------------------------------------------------------
60 /** is called to attach the controller to a new model.
62 @param Model
63 the new model for this controller
65 @return
66 <TRUE/>if attach was successfully
67 <br>
68 <FALSE/>otherwise
70 boolean attachModel( [in] XModel Model );
72 //-------------------------------------------------------------------------
73 /** is called to prepare the controller for closing the view
75 @param Suspend
76 <TRUE/>force the controller to suspend his work
77 <FALSE/>try to reactivate the controller
79 @return
80 <TRUE/>if request was accepted and of course successfully finished
81 <br>
82 <FALSE/>otherwise
84 boolean suspend( [in] boolean Suspend );
86 //-------------------------------------------------------------------------
87 /** provides access to current view status
89 @returns
90 set of data that can be used to restore the current view status
91 at later time by using <member>XController::restoreViewData()</member>
93 any getViewData();
95 //-------------------------------------------------------------------------
96 /** restores the view status using the data gotten from a previous call to
97 <member>XController::getViewData()</member>.
99 @param Data
100 set of data to restore it
102 void restoreViewData( [in] any Data );
104 //-------------------------------------------------------------------------
105 /** provides access to currently attached model
107 @returns
108 the currently attached model.
110 XModel getModel();
112 //-------------------------------------------------------------------------
113 /** provides access to owner frame of this controller
115 @returns
116 the frame containing this controller.
118 XFrame getFrame();
121 //=============================================================================
123 }; }; }; };
125 #endif