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 _BMPWIN_HXX 23 #define _BMPWIN_HXX 24 25 #ifndef _GRAPH_HXX //autogen 26 #include <vcl/graph.hxx> 27 #endif 28 #ifndef _BITMAPEX_HXX 29 #include <vcl/bitmapex.hxx> 30 #endif 31 #include <vcl/window.hxx> 32 33 /*-------------------------------------------------------------------- 34 Description: Extended page for graphics 35 --------------------------------------------------------------------*/ 36 37 class BmpWindow : public Window 38 { 39 private: 40 Graphic aGraphic; 41 BitmapEx aBmp; 42 BitmapEx aBmpHC; 43 44 sal_Bool bHorz : 1; 45 sal_Bool bVert : 1; 46 sal_Bool bGraphic : 1; 47 sal_Bool bLeftAlign : 1; 48 49 void Paint(const Rectangle& rRect); 50 51 public: 52 BmpWindow(Window* pPar, sal_uInt16 nId, 53 const Graphic& rGraphic, const BitmapEx& rBmp, const BitmapEx& rBmpHC); 54 BmpWindow(Window* pParent, const ResId rResId) : 55 Window(pParent, rResId), 56 bHorz(sal_False), bVert(sal_False),bGraphic(sal_False), bLeftAlign(sal_True) {} 57 ~BmpWindow(); 58 void MirrorVert(sal_Bool bMirror) { bVert = bMirror; Invalidate(); } 59 void MirrorHorz(sal_Bool bMirror) { bHorz = bMirror; Invalidate(); } 60 void SetGraphic(const Graphic& rGrf); 61 }; 62 63 #endif 64 65 /* vim: set noet sw=4 ts=4: */ 66