1ff12d537SAndre Fischer /************************************************************** 2ff12d537SAndre Fischer * 3ff12d537SAndre Fischer * Licensed to the Apache Software Foundation (ASF) under one 4ff12d537SAndre Fischer * or more contributor license agreements. See the NOTICE file 5ff12d537SAndre Fischer * distributed with this work for additional information 6ff12d537SAndre Fischer * regarding copyright ownership. The ASF licenses this file 7ff12d537SAndre Fischer * to you under the Apache License, Version 2.0 (the 8ff12d537SAndre Fischer * "License"); you may not use this file except in compliance 9ff12d537SAndre Fischer * with the License. You may obtain a copy of the License at 10ff12d537SAndre Fischer * 11ff12d537SAndre Fischer * http://www.apache.org/licenses/LICENSE-2.0 12ff12d537SAndre Fischer * 13ff12d537SAndre Fischer * Unless required by applicable law or agreed to in writing, 14ff12d537SAndre Fischer * software distributed under the License is distributed on an 15ff12d537SAndre Fischer * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16ff12d537SAndre Fischer * KIND, either express or implied. See the License for the 17ff12d537SAndre Fischer * specific language governing permissions and limitations 18ff12d537SAndre Fischer * under the License. 19ff12d537SAndre Fischer * 20ff12d537SAndre Fischer *************************************************************/ 21ff12d537SAndre Fischer 22ff12d537SAndre Fischer #ifndef SFX_SIDEBAR_DRAW_HELPER_HXX 23ff12d537SAndre Fischer #define SFX_SIDEBAR_DRAW_HELPER_HXX 24ff12d537SAndre Fischer 25ff12d537SAndre Fischer #include "vcl/window.hxx" 26ff12d537SAndre Fischer 27*95a18594SAndre Fischer #include <tools/svborder.hxx> 28ff12d537SAndre Fischer 29ff12d537SAndre Fischer class Color; 30ff12d537SAndre Fischer 31ff12d537SAndre Fischer namespace sfx2 { namespace sidebar { 32ff12d537SAndre Fischer 33ff12d537SAndre Fischer class Paint; 34ff12d537SAndre Fischer 35ff12d537SAndre Fischer /** Some convenience functions for painting backgrounds and borders. 36ff12d537SAndre Fischer */ 37ff12d537SAndre Fischer class DrawHelper 38ff12d537SAndre Fischer { 39ff12d537SAndre Fischer public: 40ff12d537SAndre Fischer static void DrawBorder ( 41ff12d537SAndre Fischer OutputDevice& rDevice, 42ff12d537SAndre Fischer const Rectangle rBox, 43ff12d537SAndre Fischer const SvBorder aBorderSize, 44ff12d537SAndre Fischer const Paint& rHorizontalPaint, 45ff12d537SAndre Fischer const Paint& rVerticalPaint); 46*95a18594SAndre Fischer static void DrawBevelBorder ( 47*95a18594SAndre Fischer OutputDevice& rDevice, 48*95a18594SAndre Fischer const Rectangle rBox, 49*95a18594SAndre Fischer const SvBorder aBorderSize, 50*95a18594SAndre Fischer const Paint& rTopLeftPaint, 51*95a18594SAndre Fischer const Paint& rCenterPaint, 52*95a18594SAndre Fischer const Paint& rBottomRightPaint); 53ff12d537SAndre Fischer static void DrawHorizontalLine( 54ff12d537SAndre Fischer OutputDevice& rDevice, 55b9e67834SAndre Fischer const sal_Int32 nLeft, 56b9e67834SAndre Fischer const sal_Int32 nRight, 57b9e67834SAndre Fischer const sal_Int32 nY, 58b9e67834SAndre Fischer const sal_Int32 nHeight, 59ff12d537SAndre Fischer const Paint& rPaint); 60ff12d537SAndre Fischer static void DrawVerticalLine( 61ff12d537SAndre Fischer OutputDevice& rDevice, 62b9e67834SAndre Fischer const sal_Int32 nTop, 63b9e67834SAndre Fischer const sal_Int32 nBottom, 64b9e67834SAndre Fischer const sal_Int32 nX, 65b9e67834SAndre Fischer const sal_Int32 nWidth, 66ff12d537SAndre Fischer const Paint& rPaint); 67ff12d537SAndre Fischer static void DrawRoundedRectangle ( 68ff12d537SAndre Fischer OutputDevice& rDevice, 69ff12d537SAndre Fischer const Rectangle& rBox, 70b9e67834SAndre Fischer const sal_Int32 nCornerRadius, 71ff12d537SAndre Fischer const Color& rBorderColor, 72ff12d537SAndre Fischer const Paint& rFillPaint); 73ff12d537SAndre Fischer }; 74ff12d537SAndre Fischer 75ff12d537SAndre Fischer 76ff12d537SAndre Fischer } } // end of namespace sfx2::sidebar 77ff12d537SAndre Fischer 78ff12d537SAndre Fischer #endif 79