merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / inspection / XPropertyControl.idl
blobb48f730fa7d996ddadeb2fbefae2bdbfd354ca1b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef __com_sun_star_inspection_XPropertyControl_idl__
29 #define __com_sun_star_inspection_XPropertyControl_idl__
31 #ifndef __com_sun_star_beans_IllegalTypeException_idl__
32 #include <com/sun/star/beans/IllegalTypeException.idl>
33 #endif
34 #ifndef __com_sun_star_awt_XWindow_idl__
35 #include <com/sun/star/awt/XWindow.idl>
36 #endif
38 //=============================================================================
39 module com { module sun { module star { module inspection {
41 interface XPropertyControlContext;
43 //-----------------------------------------------------------------------------
44 /** defines the interface for a single control in an <type>ObjectInspector</type>
46 @since OOo 2.0.3
48 interface XPropertyControl
50 /** denotes the type of the control, as one of the <type>PropertyControlType</type>
51 constants
53 [attribute, readonly] short ControlType;
55 /** denotes the current content of the control.
57 <p>At every point in time, this value is either <void/>, or of the type
58 described by <member>ValueType</member>.</p>
60 @throws com::sun::star::beans::IllegalTypeException
61 if an attempt is made to set a value which is not <void/> and whose
62 type does not equal <member>ValueType</member>.
64 [attribute] any Value
66 set raises ( com::sun::star::beans::IllegalTypeException );
69 /** denotes the value type of the control.
71 @see Value
73 [attribute, readonly] type ValueType;
75 /** specifies the context of the control within the <type>ObjectInspector</type>.
77 <p>The property control should actively notify its state changes to the context.
78 In particular, changes in the focus and the value of the control must be notified.
80 [attribute] XPropertyControlContext ControlContext;
82 /** determines whether the control content is currently modified
84 <p>An <type>XPropertyControl</type> internally manages a flag indicating whether
85 its content is modified. This flag is reset to <FALSE/> every time our
86 <member>ControlContext</member> is notified of our current value. Also, the control
87 implementation must set this flag to <TRUE/> if and only if the user changed the
88 control content.</p>
90 @see notifyModifiedValue
91 @see ControlContext
92 @see XPropertyControlContext::valueChanged
94 boolean isModified();
96 /** notifies the context in which the control lives of the current control value,
97 if this value is currently modified
99 @see isModified
100 @see ControlContext
101 @see XPropertyControlListener::valueChanged
103 void notifyModifiedValue();
105 /** denotes the window which is the real UI representation of the property control.
107 <p>The <type>ObjectInspector</type> will automatically position and size this control
108 as needed, care for its Z-order, and so on.</p>
110 <p>This Window must not be <NULL/>, else the whole control is not usable.</p>
112 [attribute, readonly] com::sun::star::awt::XWindow ControlWindow;
115 //=============================================================================
117 }; }; }; };
119 #endif