xref: /aoo42x/main/offapi/com/sun/star/chart2/Legend.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_chart2_Legend_idl
24#define com_sun_star_chart2_Legend_idl
25
26#include <com/sun/star/chart2/XLegend.idl>
27#include <com/sun/star/chart2/LegendPosition.idl>
28#include <com/sun/star/chart/ChartLegendExpansion.idl>
29
30#include <com/sun/star/beans/PropertySet.idl>
31#include <com/sun/star/drawing/LineProperties.idl>
32#include <com/sun/star/drawing/FillProperties.idl>
33
34module com
35{
36module sun
37{
38module star
39{
40module chart2
41{
42
43/** Describes a legend for a <type>Diagram</type>.
44 */
45service Legend
46{
47    service                ::com::sun::star::drawing::FillProperties;
48    service                ::com::sun::star::drawing::LineProperties;
49    service                ::com::sun::star::beans::PropertySet;
50
51    /** The interface for registering and removing legend entries.
52     */
53    interface ::com::sun::star::chart2::XLegend;
54
55    /** Provides an automated position
56     */
57    [property] LegendPosition AnchorPosition;
58
59    /** Determines how the aspect ratio of the legend should roughly
60        be.
61
62        <p>Set the Expansion to <member>::com::sun::star::chart::ChartLegendExpansion::HIGH</member>
63        for a legend that is positioned on the right or left hand
64        side.  Use <member>LegendExpansion::WIDE</member> for a legend
65        that is positioned on top or the bottom.</p>
66     */
67    [property] ::com::sun::star::chart::ChartLegendExpansion Expansion;
68
69    /** Determines, whether the legend should be redered by the view.
70     */
71    [property] boolean Show;
72
73    /** contains the size of the page at the time when properties were
74        set (e.g. the CharHeight).
75
76        <p>This way it is possible to resize objects (like text) in
77        the view without modifying the model.</p>
78     */
79    [property, maybevoid]  com::sun::star::awt::Size   ReferencePageSize;
80
81    /** The position is as a relative position on the page.
82
83        <p>If a relative position is given the legend is not automatically placed,
84        but instead is placed relative on the page.</p>
85
86        <p>If <void/>, the legend position is solely determined by the
87        <member>AnchorPosition</member>.</p>
88     */
89    [property, maybevoid] ::com::sun::star::chart2::RelativePosition RelativePosition;
90};
91
92} ; // chart2
93} ; // com
94} ; // sun
95} ; // star
96
97#endif
98