1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_awt_XControl_idl__
20 #define __com_sun_star_awt_XControl_idl__
22 #include
<com
/sun
/star
/lang
/XComponent.idl
>
24 #include
<com
/sun
/star
/uno
/XInterface.idl
>
26 #include
<com
/sun
/star
/awt
/XToolkit.idl
>
28 #include
<com
/sun
/star
/awt
/XWindowPeer.idl
>
30 #include
<com
/sun
/star
/awt
/XControlModel.idl
>
32 #include
<com
/sun
/star
/awt
/XView.idl
>
36 module com
{ module sun
{ module star
{ module awt
{
39 /** identifies a control.
41 <p>Implementations of this interface are abstract windows.
42 The main reason to instantiate this implementation is to show the window
43 on the screen. Before the window appears on the screen, the
44 XControl::createPeer() method must be called.</p>
46 <p>If the implementation of the control does not distinguish
47 between model, view and controller, it must allow to set
48 a new XGraphics in the view, so that the control can be printed.</p>
50 published
interface XControl
: com
::sun
::star
::lang
::XComponent
53 /** sets the context of the control.
55 void setContext
( [in] com
::sun
::star
::uno
::XInterface Context
);
58 /** gets the context of the control.
60 com
::sun
::star
::uno
::XInterface getContext
();
63 /** creates a "child" window on the screen.
65 <p>If the parent is NULL, then the desktop window of the toolkit
68 void createPeer
( [in] com
::sun
::star
::awt
::XToolkit Toolkit
,
69 [in] com
::sun
::star
::awt
::XWindowPeer Parent
);
72 /** returns the peer which was previously created or set.
74 com
::sun
::star
::awt
::XWindowPeer getPeer
();
77 /** sets a model for the control.
79 boolean setModel
( [in] com
::sun
::star
::awt
::XControlModel Model
);
82 /** returns the model for this control.
84 com
::sun
::star
::awt
::XControlModel getModel
();
87 /** returns the view of this control.
89 com
::sun
::star
::awt
::XView getView
();
92 /** sets the design mode for use in a design editor.
94 <p>Normally the control will be painted directly without a peer.</p>
96 void setDesignMode
( [in] boolean bOn
);
99 /** returns `TRUE` if the control is in design mode, `FALSE` otherwise.
101 boolean isDesignMode
();
104 /** returns `TRUE` if the control is transparent, `FALSE` otherwise.
106 boolean isTransparent
();
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */