xref: /aoo41x/main/vcl/inc/vcl/fixbrd.hxx (revision 0d63794c)
1*0d63794cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*0d63794cSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*0d63794cSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*0d63794cSAndrew Rist  * distributed with this work for additional information
6*0d63794cSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*0d63794cSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*0d63794cSAndrew Rist  * "License"); you may not use this file except in compliance
9*0d63794cSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*0d63794cSAndrew Rist  *
11*0d63794cSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*0d63794cSAndrew Rist  *
13*0d63794cSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*0d63794cSAndrew Rist  * software distributed under the License is distributed on an
15*0d63794cSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*0d63794cSAndrew Rist  * KIND, either express or implied.  See the License for the
17*0d63794cSAndrew Rist  * specific language governing permissions and limitations
18*0d63794cSAndrew Rist  * under the License.
19*0d63794cSAndrew Rist  *
20*0d63794cSAndrew Rist  *************************************************************/
21*0d63794cSAndrew Rist 
22*0d63794cSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SV_FIXBRD_HXX
25cdf0e10cSrcweir #define _SV_FIXBRD_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <vcl/sv.h>
28cdf0e10cSrcweir #include <vcl/dllapi.h>
29cdf0e10cSrcweir #include <vcl/decoview.hxx>
30cdf0e10cSrcweir #include <vcl/ctrl.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir // ---------------------
33cdf0e10cSrcweir // - FixedBorder-Types -
34cdf0e10cSrcweir // ---------------------
35cdf0e10cSrcweir 
36cdf0e10cSrcweir #define FIXEDBORDER_TYPE_IN 					(FRAME_DRAW_IN)
37cdf0e10cSrcweir #define FIXEDBORDER_TYPE_OUT					(FRAME_DRAW_OUT)
38cdf0e10cSrcweir #define FIXEDBORDER_TYPE_GROUP					(FRAME_DRAW_GROUP)
39cdf0e10cSrcweir #define FIXEDBORDER_TYPE_DOUBLEIN				(FRAME_DRAW_DOUBLEIN)
40cdf0e10cSrcweir #define FIXEDBORDER_TYPE_DOUBLEOUT				(FRAME_DRAW_DOUBLEOUT)
41cdf0e10cSrcweir 
42cdf0e10cSrcweir // ---------------
43cdf0e10cSrcweir // - FixedBorder -
44cdf0e10cSrcweir // ---------------
45cdf0e10cSrcweir 
46cdf0e10cSrcweir class VCL_DLLPUBLIC FixedBorder : public Control
47cdf0e10cSrcweir {
48cdf0e10cSrcweir private:
49cdf0e10cSrcweir 	sal_uInt16			mnType;
50cdf0e10cSrcweir 	sal_Bool			mbTransparent;
51cdf0e10cSrcweir 
52cdf0e10cSrcweir private:
53cdf0e10cSrcweir     using Control::ImplInitSettings;
54cdf0e10cSrcweir     using Window::ImplInit;
55cdf0e10cSrcweir 	SAL_DLLPRIVATE void    ImplInit( Window* pParent, WinBits nStyle );
56cdf0e10cSrcweir 	SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
57cdf0e10cSrcweir 	SAL_DLLPRIVATE void	   ImplInitSettings();
58cdf0e10cSrcweir 	SAL_DLLPRIVATE void	   ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
59cdf0e10cSrcweir 							  const Point& rPos, const Size& rSize );
60cdf0e10cSrcweir 
61cdf0e10cSrcweir public:
62cdf0e10cSrcweir 					FixedBorder( Window* pParent, WinBits nStyle = 0 );
63cdf0e10cSrcweir 					FixedBorder( Window* pParent, const ResId& rResId );
64cdf0e10cSrcweir 					~FixedBorder();
65cdf0e10cSrcweir 
66cdf0e10cSrcweir 	virtual void	Paint( const Rectangle& rRect );
67cdf0e10cSrcweir 	virtual void	Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
68cdf0e10cSrcweir 	virtual void	Resize();
69cdf0e10cSrcweir 	virtual void	StateChanged( StateChangedType nType );
70cdf0e10cSrcweir 	virtual void	DataChanged( const DataChangedEvent& rDCEvt );
71cdf0e10cSrcweir 
72cdf0e10cSrcweir 	void			SetTransparent( sal_Bool bTransparent );
IsTransparent() const73cdf0e10cSrcweir 	sal_Bool			IsTransparent() const { return mbTransparent; }
74cdf0e10cSrcweir 	void			SetBorderType( sal_uInt16 nType );
GetBorderType() const75cdf0e10cSrcweir 	sal_uInt16			GetBorderType() const { return mnType; }
76cdf0e10cSrcweir };
77cdf0e10cSrcweir 
78cdf0e10cSrcweir #endif	// _SV_FIXBRD_HXX
79