xref: /trunk/main/vcl/inc/vcl/decoview.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_DECOVIEW_HXX
25 #define _SV_DECOVIEW_HXX
26 
27 #include <vcl/sv.h>
28 #include <vcl/dllapi.h>
29 #include <vcl/symbol.hxx>
30 
31 class Rectangle;
32 class Point;
33 class Color;
34 class OutputDevice;
35 
36 // ------------------------
37 // - DecorationView-Types -
38 // ------------------------
39 
40 // Flags for DrawSymbol()
41 #define SYMBOL_DRAW_MONO					((sal_uInt16)0x0001)
42 #define SYMBOL_DRAW_DISABLE 				((sal_uInt16)0x0002)
43 
44 // Flags for DrawFrame()
45 #define FRAME_DRAW_IN						((sal_uInt16)0x0001)
46 #define FRAME_DRAW_OUT						((sal_uInt16)0x0002)
47 #define FRAME_DRAW_GROUP					((sal_uInt16)0x0003)
48 #define FRAME_DRAW_DOUBLEIN 				((sal_uInt16)0x0004)
49 #define FRAME_DRAW_DOUBLEOUT				((sal_uInt16)0x0005)
50 #define FRAME_DRAW_MENU                     ((sal_uInt16)0x0010)
51 #define FRAME_DRAW_WINDOWBORDER             ((sal_uInt16)0x0020)
52 #define FRAME_DRAW_BORDERWINDOWBORDER       ((sal_uInt16)0x0040)
53 #define FRAME_DRAW_MONO 					((sal_uInt16)0x1000)
54 #define FRAME_DRAW_NODRAW					((sal_uInt16)0x8000)
55 #define FRAME_DRAW_STYLE					((sal_uInt16)0x000F)
56 
57 // Flags for DrawHighlightFrame()
58 #define FRAME_HIGHLIGHT_IN					((sal_uInt16)0x0001)
59 #define FRAME_HIGHLIGHT_OUT 				((sal_uInt16)0x0002)
60 #define FRAME_HIGHLIGHT_TESTBACKGROUND		((sal_uInt16)0x4000)
61 #define FRAME_HIGHLIGHT_STYLE				((sal_uInt16)0x000F)
62 
63 // Flags for DrawButton()
64 #define BUTTON_DRAW_DEFAULT 				((sal_uInt16)0x0001)
65 #define BUTTON_DRAW_NOLIGHTBORDER			((sal_uInt16)0x0002)
66 #define BUTTON_DRAW_PRESSED 				((sal_uInt16)0x0004)
67 #define BUTTON_DRAW_CHECKED 				((sal_uInt16)0x0008)
68 #define BUTTON_DRAW_DONTKNOW				((sal_uInt16)0x0010)
69 #define BUTTON_DRAW_MONO					((sal_uInt16)0x0020)
70 #define BUTTON_DRAW_NOFILL					((sal_uInt16)0x0040)
71 #define BUTTON_DRAW_DISABLED				((sal_uInt16)0x0080)
72 #define BUTTON_DRAW_HIGHLIGHT				((sal_uInt16)0x0100)
73 #define BUTTON_DRAW_FLAT					((sal_uInt16)0x0200)
74 #define BUTTON_DRAW_NOTOPLIGHTBORDER		((sal_uInt16)0x0400)
75 #define BUTTON_DRAW_NOBOTTOMSHADOWBORDER	((sal_uInt16)0x0800)
76 #define BUTTON_DRAW_NOLEFTLIGHTBORDER		((sal_uInt16)0x1000)
77 #define BUTTON_DRAW_NOTEXT					((sal_uInt16)0x2000)
78 #define BUTTON_DRAW_NOIMAGE				((sal_uInt16)0x4000)
79 #define BUTTON_DRAW_NODRAW					((sal_uInt16)0x8000)
80 
81 // ------------------
82 // - DecorationView -
83 // ------------------
84 
85 class VCL_DLLPUBLIC DecorationView
86 {
87 private:
88 	OutputDevice*		mpOutDev;
89 
90 public:
DecorationView(OutputDevice * pOutDev)91 						DecorationView( OutputDevice* pOutDev )
92 							{ mpOutDev = pOutDev; }
93 
94 	void				DrawSymbol( const Rectangle& rRect, SymbolType eType,
95 									const Color& rColor, sal_uInt16 nStyle = 0 );
96 	void				DrawFrame( const Rectangle& rRect,
97 								   const Color& rLeftTopColor,
98 								   const Color& rRightBottomColor );
99 	void				DrawHighlightFrame( const Rectangle& rRect,
100 											sal_uInt16 nStyle = FRAME_HIGHLIGHT_OUT );
101 	Rectangle			DrawFrame( const Rectangle& rRect, sal_uInt16 nStyle = FRAME_DRAW_OUT );
102 	Rectangle			DrawButton( const Rectangle& rRect, sal_uInt16 nStyle );
103     void                DrawSeparator( const Point& rStart, const Point& rStop, bool bVertical = true );
104 };
105 
106 #endif // _SV_DECOVIEW_HXX
107