xref: /AOO41X/main/offapi/com/sun/star/awt/XControl.idl (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
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.
14 *
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).
20 *
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.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_awt_XControl_idl__
28#define __com_sun_star_awt_XControl_idl__
29
30#ifndef __com_sun_star_lang_XComponent_idl__
31#include <com/sun/star/lang/XComponent.idl>
32#endif
33
34#ifndef __com_sun_star_uno_XInterface_idl__
35#include <com/sun/star/uno/XInterface.idl>
36#endif
37
38#ifndef __com_sun_star_awt_XToolkit_idl__
39#include <com/sun/star/awt/XToolkit.idl>
40#endif
41
42#ifndef __com_sun_star_awt_XWindowPeer_idl__
43#include <com/sun/star/awt/XWindowPeer.idl>
44#endif
45
46#ifndef __com_sun_star_awt_XControlModel_idl__
47#include <com/sun/star/awt/XControlModel.idl>
48#endif
49
50#ifndef __com_sun_star_awt_XView_idl__
51#include <com/sun/star/awt/XView.idl>
52#endif
53
54
55//=============================================================================
56
57 module com {  module sun {  module star {  module awt {
58
59//=============================================================================
60
61/** identifies a control.
62
63    <p>Implementations of this interface are abstract windows.
64	The main reason to instantiate this implementation is to show the window
65	on the screen. Before the window appears on the screen, the
66    <member>XControl::createPeer</member> method must be called.</p>
67
68	<p>If the implementation of the control does not distinguish
69	between model, view and controller, it must allow to set
70	a new XGraphics in the view, so that the control can be printed.</p>
71 */
72published interface XControl: com::sun::star::lang::XComponent
73{
74	//-------------------------------------------------------------------------
75
76	/** sets the context of the control.
77	 */
78	[oneway] void setContext( [in] com::sun::star::uno::XInterface Context );
79
80	//-------------------------------------------------------------------------
81
82	/** gets the context of the control.
83	 */
84	com::sun::star::uno::XInterface getContext();
85
86	//-------------------------------------------------------------------------
87
88	/** creates a "child" window on the screen.
89
90        <p>If the parent is NULL, then the desktop window of the toolkit
91        is the parent.</p>
92	 */
93	[oneway] void createPeer( [in] com::sun::star::awt::XToolkit Toolkit,
94			 [in] com::sun::star::awt::XWindowPeer Parent );
95
96	//-------------------------------------------------------------------------
97
98	/** returns the peer which was previously created or set.
99	 */
100	com::sun::star::awt::XWindowPeer getPeer();
101
102	//-------------------------------------------------------------------------
103
104	/** sets a model for the control.
105	 */
106	boolean setModel( [in] com::sun::star::awt::XControlModel Model );
107
108	//-------------------------------------------------------------------------
109
110	/** returns the model for this control.
111	 */
112	com::sun::star::awt::XControlModel getModel();
113
114	//-------------------------------------------------------------------------
115
116	/** returns the view of this control.
117	 */
118	com::sun::star::awt::XView getView();
119
120	//-------------------------------------------------------------------------
121
122	/** sets the design mode for use in a design editor.
123
124		<p>Normally the control will be painted directly without a peer.</p>
125	 */
126	[oneway] void setDesignMode( [in] boolean bOn );
127
128	//-------------------------------------------------------------------------
129
130	/** returns <true/> if the control is in design mode, <false/> otherwise.
131	 */
132	boolean isDesignMode();
133
134	//-------------------------------------------------------------------------
135
136	/** returns <true/> if the control is transparent, <false/> otherwise.
137	 */
138	boolean isTransparent();
139
140};
141
142//=============================================================================
143
144}; }; }; };
145
146#endif
147