xref: /trunk/main/offapi/com/sun/star/drawing/framework/XPaneBorderPainter.idl (revision ffd38472365e95f6a578737bc9a5eb0fac624a86)
1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
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
10cdf0e10cSrcweir *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
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.
19cdf0e10cSrcweir *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_drawing_framework_XPaneBorderPainter_idl__
25cdf0e10cSrcweir#define __com_sun_star_drawing_framework_XPaneBorderPainter_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_awt_Rectangle_idl__
28cdf0e10cSrcweir#include <com/sun/star/awt/Rectangle.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir#ifndef __com_sun_star_awt_Point_idl__
31cdf0e10cSrcweir#include <com/sun/star/awt/Point.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir#ifndef __com_sun_star_rendering_XCanvas_idl__
34cdf0e10cSrcweir#include <com/sun/star/rendering/XCanvas.idl>
35cdf0e10cSrcweir#endif
36*b63233d8Sdamjan#ifndef __com_sun_star_rendering_drawing_framework_BorderType_idl__
37*b63233d8Sdamjan#include <com/sun/star/drawing/framework/BorderType.idl>
38*b63233d8Sdamjan#endif
39cdf0e10cSrcweir
40cdf0e10cSrcweirmodule com { module sun { module star { module drawing { module framework {
41cdf0e10cSrcweir
42cdf0e10cSrcweir/** Paint the border around a rectangular region, typically a pane.
43cdf0e10cSrcweir
44cdf0e10cSrcweir    <p>Calling objects have to be able to derive inner bounding boxs of the
45cdf0e10cSrcweir    border from the outer ones and inner ones from outer ones.  This
46cdf0e10cSrcweir    conversion and the painting of the border involves three rectangles.
47cdf0e10cSrcweir    The inner and outer bounding box of the border.  This is a logical
48cdf0e10cSrcweir    bounding box which the paint methods may paint over.  The center box is
49cdf0e10cSrcweir    the third rectangle.  This is the actual border between outer and inner
50cdf0e10cSrcweir    background color or bitmap and it is used for placing the bitmaps that are used
51cdf0e10cSrcweir    paint the border.  The inner sides and corners are places relative to
52cdf0e10cSrcweir    this center box, i.e. when not further offsets are given then the upper
53cdf0e10cSrcweir    left corner bitmap is painted with its lower right at the upper left of
54cdf0e10cSrcweir    the center box.</p>
55cdf0e10cSrcweir*/
56cdf0e10cSrcweirpublished interface XPaneBorderPainter
57cdf0e10cSrcweir{
58cdf0e10cSrcweir    /** Enlarge the given rectangle by the size of the specified part of the
59cdf0e10cSrcweir        border.  This method can be used to convert an inner bounding box
60cdf0e10cSrcweir        into the center box or the outer bounding box.
61cdf0e10cSrcweir        @param sPaneBorderStyleName
62cdf0e10cSrcweir            The pane style defines the sizes of the border.
63cdf0e10cSrcweir        @param aRectangle
64cdf0e10cSrcweir            This rectangle will be converted into a larger one.  This should
65cdf0e10cSrcweir            be the center box or the inner bounding box of the border.
66cdf0e10cSrcweir        @param eBorderType
67cdf0e10cSrcweir            The part of the border to add to the given rectangle.
68cdf0e10cSrcweir            Use INNER_BORDER to convert an inner bounding box into the
69cdf0e10cSrcweir            center box or TOTAL_BORDER to convert it into the outer bounding
70cdf0e10cSrcweir            box.  OUTER_BORDER can be used to convert the center box into
71cdf0e10cSrcweir            the outer bounding box.
72cdf0e10cSrcweir    */
73cdf0e10cSrcweir    ::com::sun::star::awt::Rectangle addBorder (
74cdf0e10cSrcweir        [in] string sPaneBorderStyleName,
75cdf0e10cSrcweir        [in] ::com::sun::star::awt::Rectangle aRectangle,
76cdf0e10cSrcweir        [in] BorderType eBorderType);
77cdf0e10cSrcweir
78cdf0e10cSrcweir    /** Shring the given rectangle by the size of the specified part of the
79cdf0e10cSrcweir        border.  This method can be used to convert an outer bounding box
80cdf0e10cSrcweir        into the center box or the inner bounding box.
81cdf0e10cSrcweir        @param sPaneBorderStyleName
82cdf0e10cSrcweir            The pane style defines the sizes of the border.
83cdf0e10cSrcweir        @param aRectangle
84cdf0e10cSrcweir            This rectangle will be converted into a smaller one that lies
85cdf0e10cSrcweir            inside it.  It should be the center box or the outer bounding
86cdf0e10cSrcweir            box of the border.
87cdf0e10cSrcweir        @param eBorderType
88cdf0e10cSrcweir            The part of the border to remove from the given rectangle.
89cdf0e10cSrcweir            Use OUTER_BORDER to convert an outer bounding box into the
90cdf0e10cSrcweir            center box or TOTAL_BORDER to convert it into the inner bounding
91cdf0e10cSrcweir            box.  INNER_BORDER can be used to convert the center box into
92cdf0e10cSrcweir            the inner bounding box.
93cdf0e10cSrcweir    */
94cdf0e10cSrcweir    ::com::sun::star::awt::Rectangle removeBorder (
95cdf0e10cSrcweir        [in] string sPaneBorderStyleName,
96cdf0e10cSrcweir        [in] ::com::sun::star::awt::Rectangle aRectangle,
97cdf0e10cSrcweir        [in] BorderType eBorderType);
98cdf0e10cSrcweir
99cdf0e10cSrcweir    /** Paint the border around a pane.
100cdf0e10cSrcweir        @param sPaneBorderStyleName
101cdf0e10cSrcweir            The pane style to use for painting the border.
102cdf0e10cSrcweir        @param xCanvas
103cdf0e10cSrcweir            The canvas onto which the border is painted.
104cdf0e10cSrcweir        @param aOuterBorderRectangle
105cdf0e10cSrcweir            The outer bounding box of the border.  Use addBorder to convert
106cdf0e10cSrcweir            the bounding box of a pane (the inner bounding box of the
107cdf0e10cSrcweir            border) into this outer bounding box of the border.
108cdf0e10cSrcweir        @param aRepaintArea
109cdf0e10cSrcweir            The area in which the border has to be repainted.  The clip
110cdf0e10cSrcweir            rectangle.
111cdf0e10cSrcweir        @param sTitle
112cdf0e10cSrcweir            The pane title.  Supply an empty string for panes without
113cdf0e10cSrcweir            title.  It is the responsibility of the caller to supply a title
114cdf0e10cSrcweir            only for pane border styles that support a title.
115cdf0e10cSrcweir    */
116cdf0e10cSrcweir    void paintBorder (
117cdf0e10cSrcweir        [in] string sPaneBorderStyleName,
118cdf0e10cSrcweir        [in] ::com::sun::star::rendering::XCanvas xCanvas,
119cdf0e10cSrcweir        [in] ::com::sun::star::awt::Rectangle aOuterBorderRectangle,
120cdf0e10cSrcweir        [in] ::com::sun::star::awt::Rectangle aRepaintArea,
121cdf0e10cSrcweir        [in] string sTitle);
122cdf0e10cSrcweir
123cdf0e10cSrcweir    /** Paint the border around a pane where the border includes a callout
124cdf0e10cSrcweir        that is anchored at the given point.  Most arguments have the same
125cdf0e10cSrcweir        meaning as in the <method>paintBorder</method>.
126cdf0e10cSrcweir        @param aCalloutAnchor
127cdf0e10cSrcweir            The anchor point of the callout.  It is usually located outside
128cdf0e10cSrcweir            the border.
129cdf0e10cSrcweir    */
130cdf0e10cSrcweir    void paintBorderWithCallout (
131cdf0e10cSrcweir        [in] string sPaneBorderStyleName,
132cdf0e10cSrcweir        [in] ::com::sun::star::rendering::XCanvas xCanvas,
133cdf0e10cSrcweir        [in] ::com::sun::star::awt::Rectangle aOuterBorderRectangle,
134cdf0e10cSrcweir        [in] ::com::sun::star::awt::Rectangle aRepaintArea,
135cdf0e10cSrcweir        [in] string sTitle,
136cdf0e10cSrcweir        [in] ::com::sun::star::awt::Point aCalloutAnchor);
137cdf0e10cSrcweir
138cdf0e10cSrcweir    /** Return the offset of a callout anchor with respect to the outer
139cdf0e10cSrcweir        border.  This value is used when the callout is realized by a fixed
140cdf0e10cSrcweir        bitmap in order to determine the size and/or location of the outer
141cdf0e10cSrcweir        border for a given callout.
142cdf0e10cSrcweir    */
143cdf0e10cSrcweir    ::com::sun::star::awt::Point getCalloutOffset (
144cdf0e10cSrcweir        [in] string sPaneBorderStyleName);
145cdf0e10cSrcweir};
146cdf0e10cSrcweir
147cdf0e10cSrcweir}; }; }; }; }; // ::com::sun::star::drawing::framework
148cdf0e10cSrcweir
149cdf0e10cSrcweir#endif
150