summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/drawing/framework/XPaneBorderPainter.idl
blob: e9d875897a40b35c46eb561676eacf6623118788 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*************************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * Copyright 2000, 2010 Oracle and/or its affiliates.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * This file is part of OpenOffice.org.
 *
 * OpenOffice.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * OpenOffice.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License version 3 for more details
 * (a copy is included in the LICENSE file that accompanied this code).
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with OpenOffice.org.  If not, see
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************/

#ifndef __com_sun_star_drawing_framework_XPaneBorderPainter_idl__
#define __com_sun_star_drawing_framework_XPaneBorderPainter_idl__

#ifndef __com_sun_star_awt_Rectangle_idl__
#include <com/sun/star/awt/Rectangle.idl>
#endif
#ifndef __com_sun_star_awt_Point_idl__
#include <com/sun/star/awt/Point.idl>
#endif
#ifndef __com_sun_star_rendering_XCanvas_idl__
#include <com/sun/star/rendering/XCanvas.idl>
#endif

module com { module sun { module star { module drawing { module framework {

/** See XPaneBorderPainter and its addBorder() and removeBorder() methods
    for an explanation of the border type and its values.
*/
enum BorderType
{
    INNER_BORDER,
    OUTER_BORDER,
    TOTAL_BORDER
};


/** Paint the border around a rectangular region, typically a pane.

    <p>Calling objects have to be able to derive inner bounding boxs of the
    border from the outer ones and inner ones from outer ones.  This
    conversion and the painting of the border involves three rectangles.
    The inner and outer bounding box of the border.  This is a logical
    bounding box which the paint methods may paint over.  The center box is
    the third rectangle.  This is the actual border between outer and inner
    background color or bitmap and it is used for placing the bitmaps that are used
    paint the border.  The inner sides and corners are places relative to
    this center box, i.e. when not further offsets are given then the upper
    left corner bitmap is painted with its lower right at the upper left of
    the center box.</p>
*/
interface XPaneBorderPainter
{
    /** Enlarge the given rectangle by the size of the specified part of the
        border.  This method can be used to convert an inner bounding box
        into the center box or the outer bounding box.
        @param sPaneBorderStyleName
            The pane style defines the sizes of the border.
        @param aRectangle
            This rectangle will be converted into a larger one.  This should
            be the center box or the inner bounding box of the border.
        @param eBorderType
            The part of the border to add to the given rectangle.
            Use INNER_BORDER to convert an inner bounding box into the
            center box or TOTAL_BORDER to convert it into the outer bounding
            box.  OUTER_BORDER can be used to convert the center box into
            the outer bounding box.
    */
    ::com::sun::star::awt::Rectangle addBorder (
        [in] string sPaneBorderStyleName,
        [in] ::com::sun::star::awt::Rectangle aRectangle,
        [in] BorderType eBorderType);

    /** Shring the given rectangle by the size of the specified part of the
        border.  This method can be used to convert an outer bounding box
        into the center box or the inner bounding box.
        @param sPaneBorderStyleName
            The pane style defines the sizes of the border.
        @param aRectangle
            This rectangle will be converted into a smaller one that lies
            inside it.  It should be the center box or the outer bounding
            box of the border.
        @param eBorderType
            The part of the border to remove from the given rectangle.
            Use OUTER_BORDER to convert an outer bounding box into the
            center box or TOTAL_BORDER to convert it into the inner bounding
            box.  INNER_BORDER can be used to convert the center box into
            the inner bounding box.
    */
    ::com::sun::star::awt::Rectangle removeBorder (
        [in] string sPaneBorderStyleName,
        [in] ::com::sun::star::awt::Rectangle aRectangle,
        [in] BorderType eBorderType);

    /** Paint the border around a pane.
        @param sPaneBorderStyleName
            The pane style to use for painting the border.
        @param xCanvas
            The canvas onto which the border is painted.
        @param aOuterBorderRectangle
            The outer bounding box of the border.  Use addBorder to convert
            the bounding box of a pane (the inner bounding box of the
            border) into this outer bounding box of the border.
        @param aRepaintArea
            The area in which the border has to be repainted.  The clip
            rectangle.
        @param sTitle
            The pane title.  Supply an empty string for panes without
            title.  It is the responsibility of the caller to supply a title
            only for pane border styles that support a title.
    */
    void paintBorder (
        [in] string sPaneBorderStyleName,
        [in] ::com::sun::star::rendering::XCanvas xCanvas,
        [in] ::com::sun::star::awt::Rectangle aOuterBorderRectangle,
        [in] ::com::sun::star::awt::Rectangle aRepaintArea,
        [in] string sTitle);

    /** Paint the border around a pane where the border includes a callout
        that is anchored at the given point.  Most arguments have the same
        meaning as in the <method>paintBorder</method>.
        @param aCalloutAnchor
            The anchor point of the callout.  It is usually located outside
            the border.
    */
    void paintBorderWithCallout (
        [in] string sPaneBorderStyleName,
        [in] ::com::sun::star::rendering::XCanvas xCanvas,
        [in] ::com::sun::star::awt::Rectangle aOuterBorderRectangle,
        [in] ::com::sun::star::awt::Rectangle aRepaintArea,
        [in] string sTitle,
        [in] ::com::sun::star::awt::Point aCalloutAnchor);

    /** Return the offset of a callout anchor with respect to the outer
        border.  This value is used when the callout is realized by a fixed
        bitmap in order to determine the size and/or location of the outer
        border for a given callout.
    */
    ::com::sun::star::awt::Point getCalloutOffset (
        [in] string sPaneBorderStyleName);
};

}; }; }; }; }; // ::com::sun::star::drawing::framework

#endif