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 28#ifndef __com_sun_star_inspection_XPropertyControl_idl__ 29#define __com_sun_star_inspection_XPropertyControl_idl__ 30 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 37 38//============================================================================= 39module com { module sun { module star { module inspection { 40 41published interface XPropertyControlContext; 42 43//----------------------------------------------------------------------------- 44/** defines the interface for a single control in an <type>ObjectInspector</type> 45 46 @since OOo 2.0.3 47*/ 48published interface XPropertyControl 49{ 50 /** denotes the type of the control, as one of the <type>PropertyControlType</type> 51 constants 52 */ 53 [attribute, readonly] short ControlType; 54 55 /** denotes the current content of the control. 56 57 <p>At every point in time, this value is either <void/>, or of the type 58 described by <member>ValueType</member>.</p> 59 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>. 63 */ 64 [attribute] any Value 65 { 66 set raises ( com::sun::star::beans::IllegalTypeException ); 67 }; 68 69 /** denotes the value type of the control. 70 71 @see Value 72 */ 73 [attribute, readonly] type ValueType; 74 75 /** specifies the context of the control within the <type>ObjectInspector</type>. 76 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. 79 */ 80 [attribute] XPropertyControlContext ControlContext; 81 82 /** determines whether the control content is currently modified 83 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> 89 90 @see notifyModifiedValue 91 @see ControlContext 92 @see XPropertyControlContext::valueChanged 93 */ 94 boolean isModified(); 95 96 /** notifies the context in which the control lives of the current control value, 97 if this value is currently modified 98 99 @see isModified 100 @see ControlContext 101 @see XPropertyControlListener::valueChanged 102 */ 103 void notifyModifiedValue(); 104 105 /** denotes the window which is the real UI representation of the property control. 106 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> 109 110 <p>This Window must not be <NULL/>, else the whole control is not usable.</p> 111 */ 112 [attribute, readonly] com::sun::star::awt::XWindow ControlWindow; 113}; 114 115//============================================================================= 116 117}; }; }; }; 118 119#endif 120 121