xref: /aoo41x/main/offapi/com/sun/star/awt/XControl.idl (revision d1766043)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_awt_XControl_idl__
24#define __com_sun_star_awt_XControl_idl__
25
26#ifndef __com_sun_star_lang_XComponent_idl__
27#include <com/sun/star/lang/XComponent.idl>
28#endif
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33
34#ifndef __com_sun_star_awt_XToolkit_idl__
35#include <com/sun/star/awt/XToolkit.idl>
36#endif
37
38#ifndef __com_sun_star_awt_XWindowPeer_idl__
39#include <com/sun/star/awt/XWindowPeer.idl>
40#endif
41
42#ifndef __com_sun_star_awt_XControlModel_idl__
43#include <com/sun/star/awt/XControlModel.idl>
44#endif
45
46#ifndef __com_sun_star_awt_XView_idl__
47#include <com/sun/star/awt/XView.idl>
48#endif
49
50
51//=============================================================================
52
53 module com {  module sun {  module star {  module awt {
54
55//=============================================================================
56
57/** identifies a control.
58
59    <p>Implementations of this interface are abstract windows.
60	The main reason to instantiate this implementation is to show the window
61	on the screen. Before the window appears on the screen, the
62    <member>XControl::createPeer</member> method must be called.</p>
63
64	<p>If the implementation of the control does not distinguish
65	between model, view and controller, it must allow to set
66	a new XGraphics in the view, so that the control can be printed.</p>
67 */
68published interface XControl: com::sun::star::lang::XComponent
69{
70	//-------------------------------------------------------------------------
71
72	/** sets the context of the control.
73	 */
74	[oneway] void setContext( [in] com::sun::star::uno::XInterface Context );
75
76	//-------------------------------------------------------------------------
77
78	/** gets the context of the control.
79	 */
80	com::sun::star::uno::XInterface getContext();
81
82	//-------------------------------------------------------------------------
83
84	/** creates a "child" window on the screen.
85
86        <p>If the parent is NULL, then the desktop window of the toolkit
87        is the parent.</p>
88	 */
89	[oneway] void createPeer( [in] com::sun::star::awt::XToolkit Toolkit,
90			 [in] com::sun::star::awt::XWindowPeer Parent );
91
92	//-------------------------------------------------------------------------
93
94	/** returns the peer which was previously created or set.
95	 */
96	com::sun::star::awt::XWindowPeer getPeer();
97
98	//-------------------------------------------------------------------------
99
100	/** sets a model for the control.
101	 */
102	boolean setModel( [in] com::sun::star::awt::XControlModel Model );
103
104	//-------------------------------------------------------------------------
105
106	/** returns the model for this control.
107	 */
108	com::sun::star::awt::XControlModel getModel();
109
110	//-------------------------------------------------------------------------
111
112	/** returns the view of this control.
113	 */
114	com::sun::star::awt::XView getView();
115
116	//-------------------------------------------------------------------------
117
118	/** sets the design mode for use in a design editor.
119
120		<p>Normally the control will be painted directly without a peer.</p>
121	 */
122	[oneway] void setDesignMode( [in] boolean bOn );
123
124	//-------------------------------------------------------------------------
125
126	/** returns <true/> if the control is in design mode, <false/> otherwise.
127	 */
128	boolean isDesignMode();
129
130	//-------------------------------------------------------------------------
131
132	/** returns <true/> if the control is transparent, <false/> otherwise.
133	 */
134	boolean isTransparent();
135
136};
137
138//=============================================================================
139
140}; }; }; };
141
142#endif
143