Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef _SV_DECOVIEW_HXX
21 : #define _SV_DECOVIEW_HXX
22 :
23 : #include <tools/solar.h>
24 : #include <vcl/dllapi.h>
25 : #include <rsc/rsc-vcl-shared-types.hxx>
26 :
27 : class Rectangle;
28 : class Point;
29 : class Color;
30 : class OutputDevice;
31 :
32 : // ------------------------
33 : // - DecorationView-Types -
34 : // ------------------------
35 :
36 : // Flags for DrawSymbol()
37 : #define SYMBOL_DRAW_MONO ((sal_uInt16)0x0001)
38 : #define SYMBOL_DRAW_DISABLE ((sal_uInt16)0x0002)
39 :
40 : // Flags for DrawFrame()
41 : #define FRAME_DRAW_IN ((sal_uInt16)0x0001)
42 : #define FRAME_DRAW_OUT ((sal_uInt16)0x0002)
43 : #define FRAME_DRAW_GROUP ((sal_uInt16)0x0003)
44 : #define FRAME_DRAW_DOUBLEIN ((sal_uInt16)0x0004)
45 : #define FRAME_DRAW_DOUBLEOUT ((sal_uInt16)0x0005)
46 : #define FRAME_DRAW_NWF ((sal_uInt16)0x0006)
47 : #define FRAME_DRAW_MENU ((sal_uInt16)0x0010)
48 : #define FRAME_DRAW_WINDOWBORDER ((sal_uInt16)0x0020)
49 : #define FRAME_DRAW_BORDERWINDOWBORDER ((sal_uInt16)0x0040)
50 : #define FRAME_DRAW_MONO ((sal_uInt16)0x1000)
51 : #define FRAME_DRAW_NODRAW ((sal_uInt16)0x8000)
52 : #define FRAME_DRAW_STYLE ((sal_uInt16)0x000F)
53 :
54 : // Flags for DrawHighlightFrame()
55 : #define FRAME_HIGHLIGHT_IN ((sal_uInt16)0x0001)
56 : #define FRAME_HIGHLIGHT_OUT ((sal_uInt16)0x0002)
57 : #define FRAME_HIGHLIGHT_TESTBACKGROUND ((sal_uInt16)0x4000)
58 : #define FRAME_HIGHLIGHT_STYLE ((sal_uInt16)0x000F)
59 :
60 : // Flags for DrawButton()
61 : #define BUTTON_DRAW_DEFAULT ((sal_uInt16)0x0001)
62 : #define BUTTON_DRAW_NOLIGHTBORDER ((sal_uInt16)0x0002)
63 : #define BUTTON_DRAW_PRESSED ((sal_uInt16)0x0004)
64 : #define BUTTON_DRAW_CHECKED ((sal_uInt16)0x0008)
65 : #define BUTTON_DRAW_DONTKNOW ((sal_uInt16)0x0010)
66 : #define BUTTON_DRAW_MONO ((sal_uInt16)0x0020)
67 : #define BUTTON_DRAW_NOFILL ((sal_uInt16)0x0040)
68 : #define BUTTON_DRAW_DISABLED ((sal_uInt16)0x0080)
69 : #define BUTTON_DRAW_HIGHLIGHT ((sal_uInt16)0x0100)
70 : #define BUTTON_DRAW_FLAT ((sal_uInt16)0x0200)
71 : #define BUTTON_DRAW_NOLEFTLIGHTBORDER ((sal_uInt16)0x1000)
72 : #define BUTTON_DRAW_NOTEXT ((sal_uInt16)0x2000)
73 : #define BUTTON_DRAW_NOIMAGE ((sal_uInt16)0x4000)
74 :
75 : // ------------------
76 : // - DecorationView -
77 : // ------------------
78 :
79 : class VCL_DLLPUBLIC DecorationView
80 : {
81 : private:
82 : OutputDevice* mpOutDev;
83 :
84 : public:
85 54508 : DecorationView( OutputDevice* pOutDev )
86 54508 : { mpOutDev = pOutDev; }
87 :
88 : void DrawSymbol( const Rectangle& rRect, SymbolType eType,
89 : const Color& rColor, sal_uInt16 nStyle = 0 );
90 : void DrawFrame( const Rectangle& rRect,
91 : const Color& rLeftTopColor,
92 : const Color& rRightBottomColor );
93 : void DrawHighlightFrame( const Rectangle& rRect,
94 : sal_uInt16 nStyle = FRAME_HIGHLIGHT_OUT );
95 : Rectangle DrawFrame( const Rectangle& rRect, sal_uInt16 nStyle = FRAME_DRAW_OUT );
96 : Rectangle DrawButton( const Rectangle& rRect, sal_uInt16 nStyle );
97 : void DrawSeparator( const Point& rStart, const Point& rStop, bool bVertical = true );
98 : };
99 :
100 : #endif // _SV_DECOVIEW_HXX
101 :
102 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|