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