1d1766043SAndrew Rist/************************************************************** 2d1766043SAndrew Rist * 3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5d1766043SAndrew Rist * distributed with this work for additional information 6d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10d1766043SAndrew Rist * 11d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12d1766043SAndrew Rist * 13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14d1766043SAndrew Rist * software distributed under the License is distributed on an 15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17d1766043SAndrew Rist * specific language governing permissions and limitations 18d1766043SAndrew Rist * under the License. 19d1766043SAndrew Rist * 20d1766043SAndrew Rist *************************************************************/ 21d1766043SAndrew Rist 22d1766043SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir#ifndef __com_sun_star_inspection_XPropertyControl_idl__ 25cdf0e10cSrcweir#define __com_sun_star_inspection_XPropertyControl_idl__ 26cdf0e10cSrcweir 27cdf0e10cSrcweir#ifndef __com_sun_star_beans_IllegalTypeException_idl__ 28cdf0e10cSrcweir#include <com/sun/star/beans/IllegalTypeException.idl> 29cdf0e10cSrcweir#endif 30cdf0e10cSrcweir#ifndef __com_sun_star_awt_XWindow_idl__ 31cdf0e10cSrcweir#include <com/sun/star/awt/XWindow.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir 34cdf0e10cSrcweir//============================================================================= 35cdf0e10cSrcweirmodule com { module sun { module star { module inspection { 36cdf0e10cSrcweir 37cdf0e10cSrcweirpublished interface XPropertyControlContext; 38cdf0e10cSrcweir 39cdf0e10cSrcweir//----------------------------------------------------------------------------- 40cdf0e10cSrcweir/** defines the interface for a single control in an <type>ObjectInspector</type> 41cdf0e10cSrcweir 42*d695a2a0SJürgen Schmidt @since OpenOffice 2.0.3 43cdf0e10cSrcweir*/ 44cdf0e10cSrcweirpublished interface XPropertyControl 45cdf0e10cSrcweir{ 46cdf0e10cSrcweir /** denotes the type of the control, as one of the <type>PropertyControlType</type> 47cdf0e10cSrcweir constants 48cdf0e10cSrcweir */ 49cdf0e10cSrcweir [attribute, readonly] short ControlType; 50cdf0e10cSrcweir 51cdf0e10cSrcweir /** denotes the current content of the control. 52cdf0e10cSrcweir 53cdf0e10cSrcweir <p>At every point in time, this value is either <void/>, or of the type 54cdf0e10cSrcweir described by <member>ValueType</member>.</p> 55cdf0e10cSrcweir 56cdf0e10cSrcweir @throws com::sun::star::beans::IllegalTypeException 57cdf0e10cSrcweir if an attempt is made to set a value which is not <void/> and whose 58cdf0e10cSrcweir type does not equal <member>ValueType</member>. 59cdf0e10cSrcweir */ 60cdf0e10cSrcweir [attribute] any Value 61cdf0e10cSrcweir { 62cdf0e10cSrcweir set raises ( com::sun::star::beans::IllegalTypeException ); 63cdf0e10cSrcweir }; 64cdf0e10cSrcweir 65cdf0e10cSrcweir /** denotes the value type of the control. 66cdf0e10cSrcweir 67cdf0e10cSrcweir @see Value 68cdf0e10cSrcweir */ 69cdf0e10cSrcweir [attribute, readonly] type ValueType; 70cdf0e10cSrcweir 71cdf0e10cSrcweir /** specifies the context of the control within the <type>ObjectInspector</type>. 72cdf0e10cSrcweir 73cdf0e10cSrcweir <p>The property control should actively notify its state changes to the context. 74cdf0e10cSrcweir In particular, changes in the focus and the value of the control must be notified. 75cdf0e10cSrcweir */ 76cdf0e10cSrcweir [attribute] XPropertyControlContext ControlContext; 77cdf0e10cSrcweir 78cdf0e10cSrcweir /** determines whether the control content is currently modified 79cdf0e10cSrcweir 80cdf0e10cSrcweir <p>An <type>XPropertyControl</type> internally manages a flag indicating whether 81cdf0e10cSrcweir its content is modified. This flag is reset to <FALSE/> every time our 82cdf0e10cSrcweir <member>ControlContext</member> is notified of our current value. Also, the control 83cdf0e10cSrcweir implementation must set this flag to <TRUE/> if and only if the user changed the 84cdf0e10cSrcweir control content.</p> 85cdf0e10cSrcweir 86cdf0e10cSrcweir @see notifyModifiedValue 87cdf0e10cSrcweir @see ControlContext 88cdf0e10cSrcweir @see XPropertyControlContext::valueChanged 89cdf0e10cSrcweir */ 90cdf0e10cSrcweir boolean isModified(); 91cdf0e10cSrcweir 92cdf0e10cSrcweir /** notifies the context in which the control lives of the current control value, 93cdf0e10cSrcweir if this value is currently modified 94cdf0e10cSrcweir 95cdf0e10cSrcweir @see isModified 96cdf0e10cSrcweir @see ControlContext 97cdf0e10cSrcweir @see XPropertyControlListener::valueChanged 98cdf0e10cSrcweir */ 99cdf0e10cSrcweir void notifyModifiedValue(); 100cdf0e10cSrcweir 101cdf0e10cSrcweir /** denotes the window which is the real UI representation of the property control. 102cdf0e10cSrcweir 103cdf0e10cSrcweir <p>The <type>ObjectInspector</type> will automatically position and size this control 104cdf0e10cSrcweir as needed, care for its Z-order, and so on.</p> 105cdf0e10cSrcweir 106cdf0e10cSrcweir <p>This Window must not be <NULL/>, else the whole control is not usable.</p> 107cdf0e10cSrcweir */ 108cdf0e10cSrcweir [attribute, readonly] com::sun::star::awt::XWindow ControlWindow; 109cdf0e10cSrcweir}; 110cdf0e10cSrcweir 111cdf0e10cSrcweir//============================================================================= 112cdf0e10cSrcweir 113cdf0e10cSrcweir}; }; }; }; 114cdf0e10cSrcweir 115cdf0e10cSrcweir#endif 116cdf0e10cSrcweir 117