1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XPaneBorderPainter.idl,v $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifndef __com_sun_star_drawing_framework_XPaneBorderPainter_idl__
33 #define __com_sun_star_drawing_framework_XPaneBorderPainter_idl__
35 #ifndef __com_sun_star_awt_Rectangle_idl__
36 #include
<com
/sun
/star
/awt
/Rectangle.idl
>
38 #ifndef __com_sun_star_awt_Point_idl__
39 #include
<com
/sun
/star
/awt
/Point.idl
>
41 #ifndef __com_sun_star_rendering_XCanvas_idl__
42 #include
<com
/sun
/star
/rendering
/XCanvas.idl
>
45 module com
{ module sun
{ module star
{ module drawing
{ module framework
{
47 /** See XPaneBorderPainter and its addBorder() and removeBorder() methods
48 for an explanation of the border type and its values.
58 /** Paint the border around a rectangular region, typically a pane.
60 <p>Calling objects have to be able to derive inner bounding boxs of the
61 border from the outer ones and inner ones from outer ones. This
62 conversion and the painting of the border involves three rectangles.
63 The inner and outer bounding box of the border. This is a logical
64 bounding box which the paint methods may paint over. The center box is
65 the third rectangle. This is the actual border between outer and inner
66 background color or bitmap and it is used for placing the bitmaps that are used
67 paint the border. The inner sides and corners are places relative to
68 this center box, i.e. when not further offsets are given then the upper
69 left corner bitmap is painted with its lower right at the upper left of
72 interface XPaneBorderPainter
74 /** Enlarge the given rectangle by the size of the specified part of the
75 border. This method can be used to convert an inner bounding box
76 into the center box or the outer bounding box.
77 @param sPaneBorderStyleName
78 The pane style defines the sizes of the border.
80 This rectangle will be converted into a larger one. This should
81 be the center box or the inner bounding box of the border.
83 The part of the border to add to the given rectangle.
84 Use INNER_BORDER to convert an inner bounding box into the
85 center box or TOTAL_BORDER to convert it into the outer bounding
86 box. OUTER_BORDER can be used to convert the center box into
87 the outer bounding box.
89 ::com
::sun
::star
::awt
::Rectangle addBorder
(
90 [in] string sPaneBorderStyleName
,
91 [in] ::com
::sun
::star
::awt
::Rectangle aRectangle
,
92 [in] BorderType eBorderType
);
94 /** Shring the given rectangle by the size of the specified part of the
95 border. This method can be used to convert an outer bounding box
96 into the center box or the inner bounding box.
97 @param sPaneBorderStyleName
98 The pane style defines the sizes of the border.
100 This rectangle will be converted into a smaller one that lies
101 inside it. It should be the center box or the outer bounding
104 The part of the border to remove from the given rectangle.
105 Use OUTER_BORDER to convert an outer bounding box into the
106 center box or TOTAL_BORDER to convert it into the inner bounding
107 box. INNER_BORDER can be used to convert the center box into
108 the inner bounding box.
110 ::com
::sun
::star
::awt
::Rectangle removeBorder
(
111 [in] string sPaneBorderStyleName
,
112 [in] ::com
::sun
::star
::awt
::Rectangle aRectangle
,
113 [in] BorderType eBorderType
);
115 /** Paint the border around a pane.
116 @param sPaneBorderStyleName
117 The pane style to use for painting the border.
119 The canvas onto which the border is painted.
120 @param aOuterBorderRectangle
121 The outer bounding box of the border. Use addBorder to convert
122 the bounding box of a pane (the inner bounding box of the
123 border) into this outer bounding box of the border.
125 The area in which the border has to be repainted. The clip
128 The pane title. Supply an empty string for panes without
129 title. It is the responsibility of the caller to supply a title
130 only for pane border styles that support a title.
133 [in] string sPaneBorderStyleName
,
134 [in] ::com
::sun
::star
::rendering
::XCanvas xCanvas
,
135 [in] ::com
::sun
::star
::awt
::Rectangle aOuterBorderRectangle
,
136 [in] ::com
::sun
::star
::awt
::Rectangle aRepaintArea
,
139 /** Paint the border around a pane where the border includes a callout
140 that is anchored at the given point. Most arguments have the same
141 meaning as in the <method>paintBorder</method>.
142 @param aCalloutAnchor
143 The anchor point of the callout. It is usually located outside
146 void paintBorderWithCallout
(
147 [in] string sPaneBorderStyleName
,
148 [in] ::com
::sun
::star
::rendering
::XCanvas xCanvas
,
149 [in] ::com
::sun
::star
::awt
::Rectangle aOuterBorderRectangle
,
150 [in] ::com
::sun
::star
::awt
::Rectangle aRepaintArea
,
152 [in] ::com
::sun
::star
::awt
::Point aCalloutAnchor
);
154 /** Return the offset of a callout anchor with respect to the outer
155 border. This value is used when the callout is realized by a fixed
156 bitmap in order to determine the size and/or location of the outer
157 border for a given callout.
159 ::com
::sun
::star
::awt
::Point getCalloutOffset
(
160 [in] string sPaneBorderStyleName
);
163 }; }; }; }; }; // ::com::sun::star::drawing::framework