Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _SV_SALOBJ_H
30 : : #define _SV_SALOBJ_H
31 : :
32 : : #include <tools/solar.h>
33 : : #include <vcl/sysdata.hxx>
34 : :
35 : : #include <vclpluginapi.h>
36 : : #include <salobj.hxx>
37 : :
38 : : class SalClipRegion
39 : : {
40 : :
41 : : public:
42 : :
43 : : SalClipRegion();
44 : : ~SalClipRegion();
45 : :
46 : : void BeginSetClipRegion( sal_uIntPtr nRects );
47 : : void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
48 : :
49 : 0 : XRectangle *EndSetClipRegion() {
50 : 0 : return ClipRectangleList; }
51 : 0 : void ResetClipRegion() {
52 : 0 : numClipRectangles = 0; }
53 : 0 : sal_uInt16 GetClipRegionType() {
54 : 0 : return nClipRegionType; }
55 : : void SetClipRegionType( sal_uInt16 nType ) {
56 : : nClipRegionType = nType; }
57 : 0 : int GetRectangleCount() {
58 : 0 : return numClipRectangles; }
59 : :
60 : : private:
61 : :
62 : : XRectangle* ClipRectangleList;
63 : : int numClipRectangles;
64 : : int maxClipRectangles;
65 : : sal_uInt16 nClipRegionType;
66 : : };
67 : :
68 : :
69 : : class VCLPLUG_GEN_PUBLIC X11SalObject : public SalObject
70 : : {
71 : : public:
72 : : SystemChildData maSystemChildData;
73 : : SalFrame* mpParent;
74 : : XLIB_Window maPrimary;
75 : : XLIB_Window maSecondary;
76 : : Colormap maColormap;
77 : : SalClipRegion maClipRegion;
78 : : sal_Bool mbVisible;
79 : :
80 : : static VCL_DLLPUBLIC long Dispatch( XEvent* pEvent );
81 : : static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True );
82 : :
83 : : X11SalObject();
84 : : virtual ~X11SalObject();
85 : :
86 : : // overload all pure virtual methods
87 : : virtual void ResetClipRegion();
88 : : virtual sal_uInt16 GetClipRegionType();
89 : : virtual void BeginSetClipRegion( sal_uIntPtr nRects );
90 : : virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
91 : : virtual void EndSetClipRegion();
92 : :
93 : : virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
94 : : virtual void Show( sal_Bool bVisible );
95 : : virtual void GrabFocus();
96 : :
97 : : virtual const SystemEnvData* GetSystemData() const;
98 : : };
99 : :
100 : : #endif // _SV_SALOBJ_H
101 : :
102 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|