tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / offapi / com / sun / star / text / TextFrame.idl
blobfae9bcd4226fe08da8ac29e881c82b8b65683c82
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 module com { module sun { module star { module text {
24 /** specifies a rectangular shape which contains a Text object
25 and is attached to a piece of surrounding Text.
27 @see Text
29 <p>This example shows how to create a TextFrame and insert
30 it at the very beginning of Text component. The macro
31 is ready to run, if it is a script within a text document. </p>
33 @code{.bas}
34 Sub Main
35 oFrame = ThisComponent.createInstance( "com.sun.star.text.TextFrame" )
36 oFrame.Width = 6000
37 ThisComponent.Text.insertTextContent( ThisComponent.Text.Start, oFrame, false )
38 oFrame.Text.String = "Hello, this text is within the frame."
39 End Sub
40 @endcode
42 published service TextFrame
44 /** contains the definition of interfaces and properties that are supported by text frames,
45 graphic objects and embedded objects.
47 service BaseFrame;
49 /** This interface makes it possible to access the text within this
50 text frame.
52 interface com::sun::star::text::XTextFrame;
53 /** contains the metric height value of the frame.
55 [property] long FrameHeightAbsolute;
57 /** contains the metric width value of the frame.
59 [property] long FrameWidthAbsolute;
62 /** specifies a width relative to the width of the
63 surrounding text.
64 <p>If the value for "WidthPercent" is 0, the absolute value from
65 is used.</p>
67 [property] byte FrameWidthPercent;
69 /** specifies a width relative to the width of the
70 surrounding text.
72 <p>If the value for "HeightPercent" is 0, the absolute value from
73 is used.</p>
75 [property] byte FrameHeightPercent;
76 /** If "AutomaticHeight" is set, then the object grows if it is required
77 by the frame content.
79 [property] boolean FrameIsAutomaticHeight;
80 /** determines the interpretation of the height and relative
81 height properties.
83 @see SizeType
85 [property] short SizeType;
86 /** determines if the text frame should be editable in a read-only document.
87 (This is usually used in forms.)
90 [optional, property] boolean EditInReadonly;
92 /** determines the interpretation of the width and relative
93 width properties.
95 @see SizeType
96 @since OOo 2.4
98 [optional, property] short WidthType;
100 /** contains the writing direction, as represented by the
101 com::sun::star::text::WritingMode2 constants
103 [optional, property] short WritingMode;
105 /** controls, if the frame follows the text flow or can leave its layout environment
107 <p>If set, the frame follows the text flow and doesn't leaves the layout
108 environment, which is given by its anchor, above and below.
109 E.g.: Anchor resides in the document body then the frame doesn't leave
110 the document body above and below and follows the text flow through
111 the document bodies of the different pages.
113 If not set, the frame doesn't follow the text flow and stays on the page,
114 on which its anchor is found, but it may leave the layout environment,
115 which is given by its anchor.
116 E.g.: Anchor resides in the document body then the frame stays on page,
117 where this document body is, but it could leave the document body above
118 and below, e.g. overlapping with the page header.
120 Note: The areas for the vertical orientation relation at page areas are
121 interpreted in dependence to this property (@see BaseFrameProperties.VertOrientRelation).
122 If property is set, the page area is interpreted as the layout environment,
123 given by its anchor. E.g.: Anchor resides in the page header then the
124 page header determines the page area. If property isn't set, the page area is
125 determined by the document page, the anchor is on. E.g.: Anchor resides
126 in the page header then the document page, the page header is on, determines
127 the page area.
128 An exception of this interpretation rule is applied, if the anchor resides
129 in a table cell. In this situation the page area is always determined by
130 the table cell.</p>
132 [optional, property] boolean IsFollowingTextFlow;
134 /** adjusts the vertical position of the text inside of the frame.
136 @see com::sun::star::drawing::TextVerticalAdjust
137 @since LibreOffice 4.3
139 [optional, property] com::sun::star::drawing::TextVerticalAdjust TextVerticalAdjust;
141 /** Parent text of this text frame.
143 This might be a header text, body text, etc.
145 @since LibreOffice 6.3
147 [optional, readonly, property] com::sun::star::text::XText ParentText;
151 }; }; }; };
153 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */