1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <rtl/string.hxx>
23 #include <unx/saldisp.hxx>
24 #include <unx/salgdi.h>
26 #define Region QtXRegion
30 /** handles graphics drawings requests and performs the needed drawing operations */
31 class KDESalGraphics
: public X11SalGraphics
38 virtual ~KDESalGraphics();
41 What widgets can be drawn the native way.
42 @param type Type of the widget.
43 @param part Specification of the widget's part if it consists of more than one.
44 @return true if the platform supports native drawing of the widget type defined by part.
46 virtual bool IsNativeControlSupported( ControlType type
, ControlPart part
) SAL_OVERRIDE
;
48 /** Test whether the position is in the native widget.
49 If the return value is TRUE, bIsInside contains information whether
50 aPos was or was not inside the native widget specified by the
51 type/part combination.
53 virtual bool hitTestNativeControl( ControlType type
, ControlPart part
,
54 const Rectangle
& rControlRegion
, const Point
& aPos
,
55 bool& rIsInside
) SAL_OVERRIDE
;
56 /** Draw the requested control described by part/nControlState.
59 The bounding Rectangle of the complete control in VCL frame coordinates.
62 An optional value (tristate/numerical/string).
65 A caption or title string (like button text etc.)
67 virtual bool drawNativeControl( ControlType type
, ControlPart part
,
68 const Rectangle
& rControlRegion
, ControlState nControlState
,
69 const ImplControlValue
& aValue
,
70 const OUString
& aCaption
) SAL_OVERRIDE
;
72 /** Check if the bounding regions match.
74 If the return value is TRUE, rNativeBoundingRegion
75 contains the true bounding region covered by the control
76 including any adornment, while rNativeContentRegion contains the area
77 within the control that can be safely drawn into without drawing over
78 the borders of the control.
81 The bounding region of the control in VCL frame coordinates.
84 An optional value (tristate/numerical/string)
87 A caption or title string (like button text etc.)
89 virtual bool getNativeControlRegion( ControlType type
, ControlPart part
,
90 const Rectangle
& rControlRegion
, ControlState nControlState
,
91 const ImplControlValue
& aValue
,
92 const OUString
& aCaption
,
93 Rectangle
&rNativeBoundingRegion
, Rectangle
&rNativeContentRegion
) SAL_OVERRIDE
;
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */