xref: /trunk/main/sfx2/source/sidebar/DrawHelper.hxx (revision 95a18594)
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 #ifndef SFX_SIDEBAR_DRAW_HELPER_HXX
23 #define SFX_SIDEBAR_DRAW_HELPER_HXX
24 
25 #include "vcl/window.hxx"
26 
27 #include <tools/svborder.hxx>
28 
29 class Color;
30 
31 namespace sfx2 { namespace sidebar {
32 
33 class Paint;
34 
35 /** Some convenience functions for painting backgrounds and borders.
36 */
37 class DrawHelper
38 {
39 public:
40     static void DrawBorder (
41         OutputDevice& rDevice,
42         const Rectangle rBox,
43         const SvBorder aBorderSize,
44         const Paint& rHorizontalPaint,
45         const Paint& rVerticalPaint);
46     static void DrawBevelBorder (
47         OutputDevice& rDevice,
48         const Rectangle rBox,
49         const SvBorder aBorderSize,
50         const Paint& rTopLeftPaint,
51         const Paint& rCenterPaint,
52         const Paint& rBottomRightPaint);
53     static void DrawHorizontalLine(
54         OutputDevice& rDevice,
55         const sal_Int32 nLeft,
56         const sal_Int32 nRight,
57         const sal_Int32 nY,
58         const sal_Int32 nHeight,
59         const Paint& rPaint);
60     static void DrawVerticalLine(
61         OutputDevice& rDevice,
62         const sal_Int32 nTop,
63         const sal_Int32 nBottom,
64         const sal_Int32 nX,
65         const sal_Int32 nWidth,
66         const Paint& rPaint);
67     static void DrawRoundedRectangle (
68         OutputDevice& rDevice,
69         const Rectangle& rBox,
70         const sal_Int32 nCornerRadius,
71         const Color& rBorderColor,
72         const Paint& rFillPaint);
73 };
74 
75 
76 } } // end of namespace sfx2::sidebar
77 
78 #endif
79