Update ooo320-m1
[ooovba.git] / vcl / unx / kde4 / KDESalGraphics.hxx
blob1a6a9c130909a39a80d523d5dcf1e209d102f73e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2009 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #pragma once
30 #include <rtl/string.hxx>
31 #include <saldisp.hxx>
32 #include <salgdi.h>
34 /** handles graphics drawings requests and performs the needed drawing operations */
35 class KDESalGraphics : public X11SalGraphics
37 public:
38 KDESalGraphics() {}
39 virtual ~KDESalGraphics() {}
41 /**
42 What widgets can be drawn the native way.
43 @param type Type of the widget.
44 @param part Specification of the widget's part if it consists of more than one.
45 @return true if the platform supports native drawing of the widget type defined by part.
47 virtual BOOL IsNativeControlSupported( ControlType type, ControlPart part );
49 /** Test whether the position is in the native widget.
50 If the return value is TRUE, bIsInside contains information whether
51 aPos was or was not inside the native widget specified by the
52 type/part combination.
54 virtual BOOL hitTestNativeControl( ControlType type, ControlPart part,
55 const Region& rControlRegion, const Point& aPos,
56 SalControlHandle& rControlHandle, BOOL& rIsInside );
57 /** Draw the requested control described by part/nControlState.
59 @param rControlRegion
60 The bounding region of the complete control in VCL frame coordinates.
62 @param aValue
63 An optional value (tristate/numerical/string).
65 @param rControlHandle
66 Carries platform dependent data and is maintained by the SalFrame implementation.
68 @param aCaption
69 A caption or title string (like button text etc.)
71 virtual BOOL drawNativeControl( ControlType type, ControlPart part,
72 const Region& rControlRegion, ControlState nControlState,
73 const ImplControlValue& aValue, SalControlHandle& rControlHandle,
74 const rtl::OUString& aCaption );
76 /** Draw text on the widget.
77 OPTIONAL. Draws the requested text for the control described by part/nControlState.
78 Used if text is not drawn by DrawNativeControl().
80 @param rControlRegion The bounding region of the complete control in VCL frame coordinates.
81 @param aValue An optional value (tristate/numerical/string)
82 @param rControlHandle Carries platform dependent data and is maintained by the SalFrame implementation.
83 @param aCaption A caption or title string (like button text etc.)
85 virtual BOOL drawNativeControlText( ControlType, ControlPart,
86 const Region&, ControlState,
87 const ImplControlValue&, SalControlHandle&,
88 const rtl::OUString& ) { return false; }
89 /** Check if the bounding regions match.
91 If the return value is TRUE, rNativeBoundingRegion
92 contains the true bounding region covered by the control
93 including any adornment, while rNativeContentRegion contains the area
94 within the control that can be safely drawn into without drawing over
95 the borders of the control.
97 @param rControlRegion
98 The bounding region of the control in VCL frame coordinates.
100 @param aValue
101 An optional value (tristate/numerical/string)
103 @param rControlHandle
104 Carries platform dependent data and is maintained by the SalFrame implementation.
106 @param aCaption
107 A caption or title string (like button text etc.)
109 virtual BOOL getNativeControlRegion( ControlType type, ControlPart part,
110 const Region& rControlRegion, ControlState nControlState,
111 const ImplControlValue& aValue, SalControlHandle& rControlHandle,
112 const rtl::OUString& aCaption,
113 Region &rNativeBoundingRegion, Region &rNativeContentRegion );