xref: /trunk/main/vcl/inc/vcl/fixbrd.hxx (revision 0d63794c)
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 _SV_FIXBRD_HXX
25 #define _SV_FIXBRD_HXX
26 
27 #include <vcl/sv.h>
28 #include <vcl/dllapi.h>
29 #include <vcl/decoview.hxx>
30 #include <vcl/ctrl.hxx>
31 
32 // ---------------------
33 // - FixedBorder-Types -
34 // ---------------------
35 
36 #define FIXEDBORDER_TYPE_IN 					(FRAME_DRAW_IN)
37 #define FIXEDBORDER_TYPE_OUT					(FRAME_DRAW_OUT)
38 #define FIXEDBORDER_TYPE_GROUP					(FRAME_DRAW_GROUP)
39 #define FIXEDBORDER_TYPE_DOUBLEIN				(FRAME_DRAW_DOUBLEIN)
40 #define FIXEDBORDER_TYPE_DOUBLEOUT				(FRAME_DRAW_DOUBLEOUT)
41 
42 // ---------------
43 // - FixedBorder -
44 // ---------------
45 
46 class VCL_DLLPUBLIC FixedBorder : public Control
47 {
48 private:
49 	sal_uInt16			mnType;
50 	sal_Bool			mbTransparent;
51 
52 private:
53     using Control::ImplInitSettings;
54     using Window::ImplInit;
55 	SAL_DLLPRIVATE void    ImplInit( Window* pParent, WinBits nStyle );
56 	SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
57 	SAL_DLLPRIVATE void	   ImplInitSettings();
58 	SAL_DLLPRIVATE void	   ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
59 							  const Point& rPos, const Size& rSize );
60 
61 public:
62 					FixedBorder( Window* pParent, WinBits nStyle = 0 );
63 					FixedBorder( Window* pParent, const ResId& rResId );
64 					~FixedBorder();
65 
66 	virtual void	Paint( const Rectangle& rRect );
67 	virtual void	Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
68 	virtual void	Resize();
69 	virtual void	StateChanged( StateChangedType nType );
70 	virtual void	DataChanged( const DataChangedEvent& rDCEvt );
71 
72 	void			SetTransparent( sal_Bool bTransparent );
IsTransparent() const73 	sal_Bool			IsTransparent() const { return mbTransparent; }
74 	void			SetBorderType( sal_uInt16 nType );
GetBorderType() const75 	sal_uInt16			GetBorderType() const { return mnType; }
76 };
77 
78 #endif	// _SV_FIXBRD_HXX
79