xref: /aoo41x/main/offapi/com/sun/star/text/TextFrame.idl (revision d1766043)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_text_TextFrame_idl__
24#define __com_sun_star_text_TextFrame_idl__
25
26#ifndef __com_sun_star_text_XTextFrame_idl__
27#include <com/sun/star/text/XTextFrame.idl>
28#endif
29
30#ifndef __com_sun_star_text_BaseFrame_idl__
31#include <com/sun/star/text/BaseFrame.idl>
32#endif
33
34//=============================================================================
35
36 module com {  module sun {  module star {  module text {
37
38//=============================================================================
39
40/** specifies a rectangular shape which contains a <type>Text</type> object
41	and is attached to a piece of surrounding <type>Text</type>.
42
43	@see Text
44
45	@example StarBasic
46
47	<p>This example shows how to create a <type>TextFrame</type> and insert
48	it at the very beginning of <type>Text</type> component. The macro
49	is ready to run, if it is a script within a text document. </p>
50
51	<listing>
52	Sub Main
53	oFrame = ThisComponent.createInstance( "com.sun.star.text.TextFrame" )
54	oFrame.Width = 6000
55	ThisComponent.Text.insertTextContent( ThisComponent.Text.Start, oFrame, false )
56	oFrame.Text.String = "Hello, this text is within the frame."
57	End Sub
58	</listing>
59 */
60published service TextFrame
61{
62	/** contains the definition of interfaces and properties that are supported by text frames,
63	 graphic objects and embeddedobjects.
64	 */
65	service BaseFrame;
66
67	/** This interface makes it possible to access the text within this
68				text frame.
69	 */
70	interface com::sun::star::text::XTextFrame;
71	//-------------------------------------------------------------------------
72	/** contains the metric height value of the frame.
73	 */
74	[property] long FrameHeightAbsolute;
75
76	//-------------------------------------------------------------------------
77	/** contains the metric width value of the frame.
78	 */
79	[property] long FrameWidthAbsolute;
80
81	//-------------------------------------------------------------------------
82
83	/** specifies a width relative to the width of the
84		surrounding text.
85		<p>If the value for "WidthPercent" is 0, the absolute value from
86		is used.</p>
87	 */
88	[property] byte FrameWidthPercent;
89
90	//-------------------------------------------------------------------------
91	/** specifies a width relative to the width of the
92		surrounding text.
93
94		<p>If the value for "HeightPercent" is 0, the absolute value from
95		is used.</p>
96	 */
97	[property] byte FrameHeightPercent;
98	//-------------------------------------------------------------------------
99	/** If "AutomaticHeight" is set, then the object grows if it is required
100		by the frame content.
101	 */
102	[property] boolean FrameIsAutomaticHeight;
103	//-------------------------------------------------------------------------
104	/** determines the interpretation of the height and relative
105        height properties.
106
107            @see SizeType
108	 */
109	[property] short SizeType;
110    //-------------------------------------------------------------------------
111    /** determines if the text frame should be editable in a read-only document.
112        (This is usually used in forms.)
113
114     */
115    [optional, property] boolean EditInReadonly;
116
117    //-------------------------------------------------------------------------
118    /** determines the interpretation of the width and relative
119        width properties.
120
121        @see    SizeType
122        @since  OOo 2.4
123     */
124    [optional, property] short WidthType;
125
126    //-----------------------------------------------------------------------------
127    /** contains the writing direction, as represented by the
128        <type scope="com::sun::star::text">WritingMode2</type> constants
129     */
130    [optional, property] short WritingMode;
131
132    //-----------------------------------------------------------------------------
133    /** controls, if the frame follows the text flow or can leave its layout environment
134
135        <p>If set, the frame follows the text flow and doesn't leaves the layout
136        environment, which is given by its anchor, above and below.
137        E.g.: Anchor resides in the document body then the frame doesn't leave
138        the document body above and below and follows the text flow through
139        the document bodies of the different pages.
140
141        If not set, the frame doesn't follow the text flow and stays on the page,
142        on which its anchor is found, but it may leave the layout environment,
143        which is given by its anchor.
144        E.g.: Anchor resides in the document body then the frame stays on page,
145        where this document body is, but it could leave the document body above
146        and below, e.g. overlapping with the page header.
147
148        Note: The areas for the vertical orientation relation at page areas are
149        interpreted in dependence to this property (@see BaseFrameProperties.VertOrientRelation).
150        If property is set, the page area is interpreted as the layout environment,
151        given by its anchor. E.g.: Anchor resides in the page header then the
152        page header determines the page area. If property isn't set, the page area is
153        determined by the document page, the anchor is on. E.g.: Anchor resides
154        in the page header then the document page, the page header is on, determines
155        the page area.
156        An exception of this interpretation rule is applied, if the anchor resides
157        in a table cell. In this situation the page area is always detemined by
158        the table cell.</p>
159     */
160    [optional, property] boolean IsFollowingTextFlow;
161
162};
163
164//=============================================================================
165
166}; }; }; };
167
168#endif
169