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