1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _BMPWIN_HXX 29 #define _BMPWIN_HXX 30 31 #ifndef _GRAPH_HXX //autogen 32 #include <vcl/graph.hxx> 33 #endif 34 #ifndef _BITMAPEX_HXX 35 #include <vcl/bitmapex.hxx> 36 #endif 37 #include <vcl/window.hxx> 38 39 /*-------------------------------------------------------------------- 40 Beschreibung: Extended Page fuer Grafiken 41 --------------------------------------------------------------------*/ 42 43 class BmpWindow : public Window 44 { 45 private: 46 Graphic aGraphic; 47 BitmapEx aBmp; 48 BitmapEx aBmpHC; 49 50 sal_Bool bHorz : 1; 51 sal_Bool bVert : 1; 52 sal_Bool bGraphic : 1; 53 sal_Bool bLeftAlign : 1; 54 55 void Paint(const Rectangle& rRect); 56 57 public: 58 BmpWindow(Window* pPar, sal_uInt16 nId, 59 const Graphic& rGraphic, const BitmapEx& rBmp, const BitmapEx& rBmpHC); 60 BmpWindow(Window* pParent, const ResId rResId) : 61 Window(pParent, rResId), 62 bHorz(sal_False), bVert(sal_False),bGraphic(sal_False), bLeftAlign(sal_True) {} 63 ~BmpWindow(); 64 void MirrorVert(sal_Bool bMirror) { bVert = bMirror; Invalidate(); } 65 void MirrorHorz(sal_Bool bMirror) { bHorz = bMirror; Invalidate(); } 66 void SetGraphic(const Graphic& rGrf); 67 }; 68 69 #endif 70