blob: 4dd902a6ca5b2f6ff4b80154df588ed3d5f0ed42 [file] [log] [blame]
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
#ifndef __com_sun_star_awt_XTextComponent_idl__
#define __com_sun_star_awt_XTextComponent_idl__
#ifndef __com_sun_star_uno_XInterface_idl__
#include <com/sun/star/uno/XInterface.idl>
#endif
#ifndef __com_sun_star_awt_XTextListener_idl__
#include <com/sun/star/awt/XTextListener.idl>
#endif
#ifndef __com_sun_star_awt_Selection_idl__
#include <com/sun/star/awt/Selection.idl>
#endif
//=============================================================================
module com { module sun { module star { module awt {
//=============================================================================
/** gives access to the text of a component and makes it possible
to register event listeners.
*/
published interface XTextComponent: com::sun::star::uno::XInterface
{
//-------------------------------------------------------------------------
/** registers a text event listener.
*/
[oneway] void addTextListener( [in] com::sun::star::awt::XTextListener l );
//-------------------------------------------------------------------------
/** unregisters a text event listener.
*/
[oneway] void removeTextListener( [in] com::sun::star::awt::XTextListener l );
//-------------------------------------------------------------------------
/** sets the text of the component.
*/
[oneway] void setText( [in] string aText );
//-------------------------------------------------------------------------
/** inserts text at the specified position.
*/
[oneway] void insertText( [in] com::sun::star::awt::Selection Sel,
[in] string Text );
//-------------------------------------------------------------------------
/** returns the text of the component.
*/
string getText();
//-------------------------------------------------------------------------
/** returns the currently selected text.
*/
string getSelectedText();
//-------------------------------------------------------------------------
/** sets the user selection.
*/
[oneway] void setSelection( [in] com::sun::star::awt::Selection aSelection );
//-------------------------------------------------------------------------
/** returns the current user selection.
*/
com::sun::star::awt::Selection getSelection();
//-------------------------------------------------------------------------
/** returns if the text is editable by the user.
*/
boolean isEditable();
//-------------------------------------------------------------------------
/** makes the text editable for the user or read-only.
*/
[oneway] void setEditable( [in] boolean bEditable );
//-------------------------------------------------------------------------
/** sets the maximum text length.
*/
[oneway] void setMaxTextLen( [in] short nLen );
//-------------------------------------------------------------------------
/** returns the currently set maximum text length.
*/
short getMaxTextLen();
};
//=============================================================================
}; }; }; };
#endif