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 .
22 module com
{ module sun
{ module star
{ module awt
{
25 /** identifies a control.
27 <p>Implementations of this interface are abstract windows.
28 The main reason to instantiate this implementation is to show the window
29 on the screen. Before the window appears on the screen, the
30 XControl::createPeer() method must be called.</p>
32 <p>If the implementation of the control does not distinguish
33 between model, view and controller, it must allow to set
34 a new XGraphics in the view, so that the control can be printed.</p>
36 published
interface XControl
: com
::sun
::star
::lang
::XComponent
39 /** sets the context of the control.
41 void setContext
( [in] com
::sun
::star
::uno
::XInterface Context
);
44 /** gets the context of the control.
46 com
::sun
::star
::uno
::XInterface getContext
();
49 /** creates a "child" window on the screen.
51 <p>If the parent is NULL, then the desktop window of the toolkit
54 void createPeer
( [in] com
::sun
::star
::awt
::XToolkit Toolkit
,
55 [in] com
::sun
::star
::awt
::XWindowPeer Parent
);
58 /** returns the peer which was previously created or set.
60 com
::sun
::star
::awt
::XWindowPeer getPeer
();
63 /** sets a model for the control.
65 boolean setModel
( [in] com
::sun
::star
::awt
::XControlModel Model
);
68 /** returns the model for this control.
70 com
::sun
::star
::awt
::XControlModel getModel
();
73 /** returns the view of this control.
75 com
::sun
::star
::awt
::XView getView
();
78 /** sets the design mode for use in a design editor.
80 <p>Normally the control will be painted directly without a peer.</p>
82 void setDesignMode
( [in] boolean bOn
);
85 /** returns `TRUE` if the control is in design mode, `FALSE` otherwise.
87 boolean isDesignMode
();
90 /** returns `TRUE` if the control is transparent, `FALSE` otherwise.
92 boolean isTransparent
();
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */