update dev300-m58
[ooovba.git] / offapi / com / sun / star / awt / XControl.idl
blob96d7a549d348326b55f1e71fda0a3d74647ce92f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XControl.idl,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_awt_XControl_idl__
31 #define __com_sun_star_awt_XControl_idl__
33 #ifndef __com_sun_star_lang_XComponent_idl__
34 #include <com/sun/star/lang/XComponent.idl>
35 #endif
37 #ifndef __com_sun_star_uno_XInterface_idl__
38 #include <com/sun/star/uno/XInterface.idl>
39 #endif
41 #ifndef __com_sun_star_awt_XToolkit_idl__
42 #include <com/sun/star/awt/XToolkit.idl>
43 #endif
45 #ifndef __com_sun_star_awt_XWindowPeer_idl__
46 #include <com/sun/star/awt/XWindowPeer.idl>
47 #endif
49 #ifndef __com_sun_star_awt_XControlModel_idl__
50 #include <com/sun/star/awt/XControlModel.idl>
51 #endif
53 #ifndef __com_sun_star_awt_XView_idl__
54 #include <com/sun/star/awt/XView.idl>
55 #endif
58 //=============================================================================
60 module com { module sun { module star { module awt {
62 //=============================================================================
64 /** identifies a control.
66 <p>Implementations of this interface are abstract windows.
67 The main reason to instantiate this implementation is to show the window
68 on the screen. Before the window appears on the screen, the
69 <member>XControl::createPeer</member> method must be called.</p>
71 <p>If the implementation of the control does not distinguish
72 between model, view and controller, it must allow to set
73 a new XGraphics in the view, so that the control can be printed.</p>
75 published interface XControl: com::sun::star::lang::XComponent
77 //-------------------------------------------------------------------------
79 /** sets the context of the control.
81 [oneway] void setContext( [in] com::sun::star::uno::XInterface Context );
83 //-------------------------------------------------------------------------
85 /** gets the context of the control.
87 com::sun::star::uno::XInterface getContext();
89 //-------------------------------------------------------------------------
91 /** creates a "child" window on the screen.
93 <p>If the parent is NULL, then the desktop window of the toolkit
94 is the parent.</p>
96 [oneway] void createPeer( [in] com::sun::star::awt::XToolkit Toolkit,
97 [in] com::sun::star::awt::XWindowPeer Parent );
99 //-------------------------------------------------------------------------
101 /** returns the peer which was previously created or set.
103 com::sun::star::awt::XWindowPeer getPeer();
105 //-------------------------------------------------------------------------
107 /** sets a model for the control.
109 boolean setModel( [in] com::sun::star::awt::XControlModel Model );
111 //-------------------------------------------------------------------------
113 /** returns the model for this control.
115 com::sun::star::awt::XControlModel getModel();
117 //-------------------------------------------------------------------------
119 /** returns the view of this control.
121 com::sun::star::awt::XView getView();
123 //-------------------------------------------------------------------------
125 /** sets the design mode for use in a design editor.
127 <p>Normally the control will be painted directly without a peer.</p>
129 [oneway] void setDesignMode( [in] boolean bOn );
131 //-------------------------------------------------------------------------
133 /** returns <true/> if the control is in design mode, <false/> otherwise.
135 boolean isDesignMode();
137 //-------------------------------------------------------------------------
139 /** returns <true/> if the control is transparent, <false/> otherwise.
141 boolean isTransparent();
145 //=============================================================================
147 }; }; }; };
149 #endif