summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/aqua/inc/salgdi.h8
-rw-r--r--vcl/aqua/source/gdi/salnativewidgets.cxx10
-rw-r--r--vcl/inc/vcl/outdev.hxx44
-rw-r--r--vcl/inc/vcl/salgdi.hxx12
-rwxr-xr-x[-rw-r--r--]vcl/inc/vcl/textlayout.hxx0
-rw-r--r--vcl/inc/vcl/vclevent.hxx4
-rw-r--r--vcl/inc/vcl/window.h2
-rw-r--r--vcl/inc/vcl/window.hxx46
-rw-r--r--vcl/os2/inc/salgdi.h8
-rw-r--r--vcl/source/control/tabctrl.cxx5
-rw-r--r--vcl/source/gdi/image.cxx22
-rw-r--r--vcl/source/gdi/makefile.mk1
-rw-r--r--vcl/source/gdi/outdevnative.cxx290
-rw-r--r--vcl/source/gdi/salgdilayout.cxx24
-rw-r--r--vcl/source/gdi/salnativewidgets-none.cxx7
-rwxr-xr-x[-rw-r--r--]vcl/source/gdi/textlayout.cxx0
-rwxr-xr-x[-rw-r--r--]vcl/source/glyphs/gcach_layout.cxx0
-rwxr-xr-x[-rw-r--r--]vcl/source/glyphs/gcach_rbmp.cxx0
-rw-r--r--vcl/source/window/window.cxx51
-rw-r--r--vcl/source/window/window3.cxx259
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx139
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkgdi.hxx42
-rw-r--r--vcl/unx/kde/salnativewidgets-kde.cxx25
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx6
-rw-r--r--vcl/unx/kde4/KDESalGraphics.hxx15
-rw-r--r--vcl/win/inc/salgdi.h8
-rw-r--r--vcl/win/source/gdi/salnativewidgets-luna.cxx46
-rwxr-xr-x[-rw-r--r--]vcl/win/source/gdi/winlayout.cxx0
28 files changed, 553 insertions, 521 deletions
diff --git a/vcl/aqua/inc/salgdi.h b/vcl/aqua/inc/salgdi.h
index d83067cb64b8..247de1b95dec 100644
--- a/vcl/aqua/inc/salgdi.h
+++ b/vcl/aqua/inc/salgdi.h
@@ -230,15 +230,15 @@ public:
CGPoint* makeCGptArray(ULONG nPoints, const SalPoint* pPtAry);
// native widget rendering methods that require mirroring
virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- const Point& aPos, SalControlHandle& rControlHandle, BOOL& rIsInside );
+ const Point& aPos, BOOL& rIsInside );
virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const rtl::OUString& aCaption );
+ const rtl::OUString& aCaption );
virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, const rtl::OUString& aCaption,
+ const ImplControlValue& aValue, const rtl::OUString& aCaption,
Region &rNativeBoundingRegion, Region &rNativeContentRegion );
// get device resolution
diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx
index b4b843eaca58..5eccf88dc523 100644
--- a/vcl/aqua/source/gdi/salnativewidgets.cxx
+++ b/vcl/aqua/source/gdi/salnativewidgets.cxx
@@ -380,7 +380,7 @@ BOOL AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart n
* nType/nPart combination.
*/
BOOL AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- const Point& rPos, SalControlHandle& rControlHandle, BOOL& rIsInside )
+ const Point& rPos, BOOL& rIsInside )
{
if ( nType == CTRL_SCROLLBAR )
{
@@ -468,7 +468,6 @@ UInt32 AquaSalGraphics::getTrackState( ControlState nState )
*
* rControlRegion: The bounding region of the complete control in VCL frame coordinates.
* aValue: An optional value (tristate/numerical/string)
- * rControlHandle: Carries platform dependent data and is maintained by the AquaSalGraphics implementation.
* aCaption: A caption or title string (like button text etc)
*/
BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
@@ -476,7 +475,6 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle,
const rtl::OUString& aCaption )
{
BOOL bOK = FALSE;
@@ -1226,12 +1224,11 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
*
* rControlRegion: The bounding region of the complete control in VCL frame coordinates.
* aValue: An optional value (tristate/numerical/string)
- * rControlHandle: Carries platform dependent data and is maintained by the AquaSalGraphics implementation.
* aCaption: A caption or title string (like button text etc)
*/
BOOL AquaSalGraphics::drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const rtl::OUString& aCaption )
+ const rtl::OUString& aCaption )
{
return( FALSE );
}
@@ -1248,11 +1245,10 @@ BOOL AquaSalGraphics::drawNativeControlText( ControlType nType, ControlPart nPar
*
* rControlRegion: The bounding region of the control in VCL frame coordinates.
* aValue: An optional value (tristate/numerical/string)
- * rControlHandle: Carries platform dependent data and is maintained by the AquaSalGraphics implementation.
* aCaption: A caption or title string (like button text etc)
*/
BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, const rtl::OUString& aCaption,
+ const ImplControlValue& aValue, const rtl::OUString& aCaption,
Region &rNativeBoundingRegion, Region &rNativeContentRegion )
{
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index 70c1e6aa624d..9b748f2b5937 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -39,6 +39,7 @@
#include <vcl/mapmod.hxx>
#include <vcl/wall.hxx>
#include <vcl/settings.hxx>
+#include <vcl/salnativewidgets.hxx>
#include <tools/poly.hxx>
#include <basegfx/vector/b2enums.hxx>
#include <com/sun/star/uno/Reference.h>
@@ -1177,6 +1178,49 @@ public:
BitmapEx GetDownsampledBitmapEx( const Size& rDstSz,
const Point& rSrcPt, const Size& rSrcSz,
const BitmapEx& rBmpEx, long nMaxBmpDPIX, long nMaxBmpDPIY );
+
+ //-------------------------------------
+ // Native Widget Rendering functions
+ //-------------------------------------
+
+ // These all just call through to the private mpGraphics functions of the same name.
+
+ // Query the platform layer for control support
+ BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
+
+ // Query the native control to determine if it was acted upon
+ BOOL HitTestNativeControl( ControlType nType,
+ ControlPart nPart,
+ const Region& rControlRegion,
+ const Point& aPos,
+ BOOL& rIsInside );
+
+ // Request rendering of a particular control and/or part
+ BOOL DrawNativeControl( ControlType nType,
+ ControlPart nPart,
+ const Region& rControlRegion,
+ ControlState nState,
+ const ImplControlValue& aValue,
+ ::rtl::OUString aCaption );
+
+ // Request rendering of a caption string for a control
+ BOOL DrawNativeControlText( ControlType nType,
+ ControlPart nPart,
+ const Region& rControlRegion,
+ ControlState nState,
+ const ImplControlValue& aValue,
+ ::rtl::OUString aCaption );
+
+ // Query the native control's actual drawing region (including adornment)
+ BOOL GetNativeControlRegion( ControlType nType,
+ ControlPart nPart,
+ const Region& rControlRegion,
+ ControlState nState,
+ const ImplControlValue& aValue,
+ ::rtl::OUString aCaption,
+ Region &rNativeBoundingRegion,
+ Region &rNativeContentRegion );
+
};
#endif // _SV_OUTDEV_HXX
diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx
index 02e9efbc0f94..510e797678b0 100644
--- a/vcl/inc/vcl/salgdi.hxx
+++ b/vcl/inc/vcl/salgdi.hxx
@@ -159,15 +159,15 @@ protected:
// native widget rendering methods that require mirroring
virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- const Point& aPos, SalControlHandle& rControlHandle, BOOL& rIsInside );
+ const Point& aPos, BOOL& rIsInside );
virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const rtl::OUString& aCaption );
+ const rtl::OUString& aCaption );
virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, const rtl::OUString& aCaption,
+ const ImplControlValue& aValue, const rtl::OUString& aCaption,
Region &rNativeBoundingRegion, Region &rNativeContentRegion );
/** Render bitmap with alpha channel
@@ -442,7 +442,6 @@ public:
ControlPart nPart,
const Region& rControlRegion,
const Point& aPos,
- SalControlHandle& rControlHandle,
BOOL& rIsInside,
const OutputDevice *pOutDev );
@@ -452,7 +451,6 @@ public:
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle,
const rtl::OUString& aCaption,
const OutputDevice *pOutDev );
@@ -462,7 +460,6 @@ public:
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle,
const rtl::OUString& aCaption,
const OutputDevice *pOutDev );
@@ -472,7 +469,6 @@ public:
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle,
const rtl::OUString& aCaption,
Region &rNativeBoundingRegion,
Region &rNativeContentRegion,
diff --git a/vcl/inc/vcl/textlayout.hxx b/vcl/inc/vcl/textlayout.hxx
index 418e1aa8bf64..418e1aa8bf64 100644..100755
--- a/vcl/inc/vcl/textlayout.hxx
+++ b/vcl/inc/vcl/textlayout.hxx
diff --git a/vcl/inc/vcl/vclevent.hxx b/vcl/inc/vcl/vclevent.hxx
index fcf1d2ee0387..8ccb880fce34 100644
--- a/vcl/inc/vcl/vclevent.hxx
+++ b/vcl/inc/vcl/vclevent.hxx
@@ -154,8 +154,8 @@ namespace com { namespace sun { namespace star {
#define VCLEVENT_TOOLBOX_FORMATCHANGED 1172 // request new layout
#define VCLEVENT_COMBOBOX_SETTEXT 1173
// --> OD 2009-04-01 #i92103#
-#define VCLEVENT_LISTBOX_ENTRY_EXPANDED 1174
-#define VCLEVENT_LISTBOX_ENTRY_COLLAPSED 1175
+#define VCLEVENT_ITEM_EXPANDED 1174
+#define VCLEVENT_ITEM_COLLAPSED 1175
// <--
#define VCLEVENT_DROPDOWN_PRE_OPEN 1176
diff --git a/vcl/inc/vcl/window.h b/vcl/inc/vcl/window.h
index 9d917a09b6de..691c3ed18421 100644
--- a/vcl/inc/vcl/window.h
+++ b/vcl/inc/vcl/window.h
@@ -56,7 +56,6 @@ class VirtualDevice;
class Cursor;
class ImplDevFontList;
class ImplFontCache;
-class SalControlHandle;
class SmartId;
class VCLXWindow;
class SalFrame;
@@ -120,7 +119,6 @@ struct ImplWinData
USHORT mnTrackFlags;
USHORT mnIsTopWindow;
BOOL mbMouseOver; // tracks mouse over for native widget paint effect
- SalControlHandle* mpSalControlHandle; // native data for NWF
BOOL mbEnableNativeWidget; // toggle native widget rendering
SmartId* mpSmartHelpId;
SmartId* mpSmartUniqueId;
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index 3d1cc91ee468..d8c429ef64d2 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -548,20 +548,18 @@ public:
SAL_DLLPRIVATE ::std::vector<Window *>& ImplGetOwnerDrawList();
SAL_DLLPRIVATE Window* ImplGetTopmostFrameWindow();
- SAL_DLLPRIVATE Rectangle ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bClientOnly );
+ SAL_DLLPRIVATE Rectangle ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bClientOnly ) const;
SAL_DLLPRIVATE void ImplNotifyIconifiedState( BOOL bIconified );
SAL_DLLPRIVATE bool ImplStopDnd();
SAL_DLLPRIVATE void ImplStartDnd();
SAL_DLLPRIVATE static void ImplInitAppFontData( Window* pWindow );
- SAL_DLLPRIVATE void ImplInitSalControlHandle();
SAL_DLLPRIVATE void ImplPaintToDevice( OutputDevice* pTargetOutDev, const Point& rPos );
SAL_DLLPRIVATE BOOL ImplIsInTaskPaneList();
SAL_DLLPRIVATE void ImplIsInTaskPaneList( BOOL mbIsInTaskList );
SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas >
ImplGetCanvas( const Size& rFullscreenSize, bool bFullscreen, bool bSpriteCanvas ) const;
- SAL_DLLPRIVATE void ImplMoveControlValue( ControlType, const ImplControlValue&, const Point& ) const;
private:
// Default construction is forbidden and not implemented.
@@ -856,9 +854,9 @@ public:
Point AbsoluteScreenToOutputPixel( const Point& rPos ) const;
Rectangle GetDesktopRectPixel() const;
// window extents including border and decoratrion
- Rectangle GetWindowExtentsRelative( Window *pRelativeWindow );
+ Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const;
// window extents of the client window, coordinates to be used in SetPosPixel
- Rectangle GetClientWindowExtentsRelative( Window *pRelativeWindow );
+ Rectangle GetClientWindowExtentsRelative( Window *pRelativeWindow ) const;
virtual BOOL IsScrollable() const;
virtual void Scroll( long nHorzScroll, long nVertScroll,
@@ -1092,44 +1090,6 @@ public:
void EnableNativeWidget( BOOL bEnable = TRUE );
BOOL IsNativeWidgetEnabled() const;
- // These all just call through to the private mpWindowImpl->mpFrame functions of the same name.
-
- // Query the platform layer for control support
- BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
-
- // Query the native control to determine if it was acted upon
- BOOL HitTestNativeControl( ControlType nType,
- ControlPart nPart,
- const Region& rControlRegion,
- const Point& aPos,
- BOOL& rIsInside );
-
- // Request rendering of a particular control and/or part
- BOOL DrawNativeControl( ControlType nType,
- ControlPart nPart,
- const Region& rControlRegion,
- ControlState nState,
- const ImplControlValue& aValue,
- rtl::OUString aCaption );
-
- // Request rendering of a caption string for a control
- BOOL DrawNativeControlText( ControlType nType,
- ControlPart nPart,
- const Region& rControlRegion,
- ControlState nState,
- const ImplControlValue& aValue,
- rtl::OUString aCaption );
-
- // Query the native control's actual drawing region (including adornment)
- BOOL GetNativeControlRegion( ControlType nType,
- ControlPart nPart,
- const Region& rControlRegion,
- ControlState nState,
- const ImplControlValue& aValue,
- rtl::OUString aCaption,
- Region &rNativeBoundingRegion,
- Region &rNativeContentRegion );
-
// a helper method for a Control's Draw method
void PaintToDevice( OutputDevice* pDevice, const Point& rPos, const Size& rSize );
diff --git a/vcl/os2/inc/salgdi.h b/vcl/os2/inc/salgdi.h
index ce486084a5b1..b8dc4eba0199 100644
--- a/vcl/os2/inc/salgdi.h
+++ b/vcl/os2/inc/salgdi.h
@@ -197,15 +197,15 @@ protected:
#if 0
// native widget rendering methods that require mirroring
virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- const Point& aPos, SalControlHandle& rControlHandle, BOOL& rIsInside );
+ const Point& aPos, BOOL& rIsInside );
virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ ControlState nState, const ImplControlValue& aValue,
rtl::OUString aCaption );
virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, rtl::OUString aCaption );
+ rtl::OUString aCaption );
virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, rtl::OUString aCaption,
+ const ImplControlValue& aValue, rtl::OUString aCaption,
Region &rNativeBoundingRegion, Region &rNativeContentRegion );
#endif
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 89fbe6d3db78..95f84626b582 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -408,6 +408,9 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
if( aImageSize.Height() > aSize.Height() )
aSize.Height() = aImageSize.Height();
+ aSize.Width() += TAB_TABOFFSET_X*2;
+ aSize.Height() += TAB_TABOFFSET_Y*2;
+
Region aCtrlRegion( Rectangle( (const Point&)Point( 0, 0 ), aSize ) );
Region aBoundingRgn, aContentRgn;
const ImplControlValue aControlValue( BUTTONVALUE_DONTKNOW, rtl::OUString(), 0 );
@@ -419,8 +422,6 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
return aCont.GetSize();
}
- aSize.Width() += TAB_TABOFFSET_X*2;
- aSize.Height() += TAB_TABOFFSET_Y*2;
// For systems without synthetic bold support
if ( mbExtraSpace )
aSize.Width() += TAB_EXTRASPACE_X;
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index e3f63a03d081..e79308b2664e 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -50,6 +50,10 @@
#include <vcl/image.h>
#include <vcl/image.hxx>
+#if OSL_DEBUG_LEVEL > 0
+#include <rtl/strbuf.hxx>
+#endif
+
DBG_NAME( Image )
DBG_NAME( ImageList )
@@ -543,11 +547,19 @@ void ImageAryData::Load(const rtl::OUString &rPrefix)
rtl::OUString aFileName = rPrefix;
aFileName += maName;
-#ifdef DBG_UTIL
- bool bSuccess = aImageTree->loadImage( aFileName, aSymbolsStyle, maBitmapEx, true );
- DBG_ASSERT (bSuccess, "ImageAryData::Failed to load image");
-#else
- aImageTree->loadImage( aFileName, aSymbolsStyle, maBitmapEx, true );
+#if OSL_DEBUG_LEVEL > 0
+ bool bSuccess =
+#endif
+ aImageTree->loadImage( aFileName, aSymbolsStyle, maBitmapEx, true );
+#if OSL_DEBUG_LEVEL > 0
+ if ( !bSuccess )
+ {
+ ::rtl::OStringBuffer aMessage;
+ aMessage.append( "ImageAryData::Load: failed to load image '" );
+ aMessage.append( ::rtl::OUStringToOString( aFileName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ aMessage.append( "'" );
+ OSL_ENSURE( false, aMessage.makeStringAndClear().getStr() );
+ }
#endif
}
diff --git a/vcl/source/gdi/makefile.mk b/vcl/source/gdi/makefile.mk
index 75f2b3fffc64..f069828f25f9 100644
--- a/vcl/source/gdi/makefile.mk
+++ b/vcl/source/gdi/makefile.mk
@@ -106,6 +106,7 @@ SLOFILES= $(EXCEPTIONSFILES) \
$(SLO)$/outdev4.obj \
$(SLO)$/outdev5.obj \
$(SLO)$/outdev6.obj \
+ $(SLO)$/outdevnative.obj \
$(SLO)$/regband.obj \
$(SLO)$/region.obj \
$(SLO)$/wall.obj \
diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx
new file mode 100644
index 000000000000..fed41ec4de85
--- /dev/null
+++ b/vcl/source/gdi/outdevnative.cxx
@@ -0,0 +1,290 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_vcl.hxx"
+
+#include "vcl/outdev.hxx"
+#include "vcl/window.hxx"
+#include "vcl/salgdi.hxx"
+#include "vcl/salnativewidgets.hxx"
+#include "vcl/pdfextoutdevdata.hxx"
+
+// -----------------------------------------------------------------------
+
+static bool lcl_enableNativeWidget( const OutputDevice& i_rDevice )
+{
+ const OutDevType eType( i_rDevice.GetOutDevType() );
+ switch ( eType )
+ {
+
+ case OUTDEV_WINDOW:
+ return dynamic_cast< const Window* >( &i_rDevice )->IsNativeWidgetEnabled();
+
+ case OUTDEV_VIRDEV:
+ {
+ const ::vcl::ExtOutDevData* pOutDevData( i_rDevice.GetExtOutDevData() );
+ const ::vcl::PDFExtOutDevData* pPDFData( dynamic_cast< const ::vcl::PDFExtOutDevData* >( pOutDevData ) );
+ if ( pPDFData != NULL )
+ return false;
+ return true;
+ }
+
+ default:
+ return false;
+ }
+}
+
+// -----------------------------------------------------------------------
+// These functions are mainly passthrough functions that allow access to
+// the SalFrame behind a Window object for native widget rendering purposes.
+// -----------------------------------------------------------------------
+
+// -----------------------------------------------------------------------
+
+BOOL OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPart )
+{
+ if( !lcl_enableNativeWidget( *this ) )
+ return FALSE;
+
+ if ( !mpGraphics )
+ if ( !ImplGetGraphics() )
+ return FALSE;
+
+ return( mpGraphics->IsNativeControlSupported(nType, nPart) );
+}
+
+
+// -----------------------------------------------------------------------
+
+BOOL OutputDevice::HitTestNativeControl( ControlType nType,
+ ControlPart nPart,
+ const Region& rControlRegion,
+ const Point& aPos,
+ BOOL& rIsInside )
+{
+ if( !lcl_enableNativeWidget( *this ) )
+ return FALSE;
+
+ if ( !mpGraphics )
+ if ( !ImplGetGraphics() )
+ return FALSE;
+
+ Point aWinOffs( mnOutOffX, mnOutOffY );
+ Region screenRegion( rControlRegion );
+ screenRegion.Move( aWinOffs.X(), aWinOffs.Y());
+
+ return( mpGraphics->HitTestNativeControl(nType, nPart, screenRegion, Point( aPos.X() + mnOutOffX, aPos.Y() + mnOutOffY ),
+ rIsInside, this ) );
+}
+
+// -----------------------------------------------------------------------
+
+static void lcl_moveControlValue( ControlType nType, const ImplControlValue& aValue, const Point& rDelta )
+{
+ if( aValue.getOptionalVal() )
+ {
+ switch( nType )
+ {
+ case CTRL_SLIDER:
+ {
+ SliderValue* pSlVal = reinterpret_cast<SliderValue*>(aValue.getOptionalVal());
+ pSlVal->maThumbRect.Move( rDelta.X(), rDelta.Y() );
+ }
+ break;
+ case CTRL_SCROLLBAR:
+ {
+ ScrollbarValue* pScVal = reinterpret_cast<ScrollbarValue*>(aValue.getOptionalVal());
+ pScVal->maThumbRect.Move( rDelta.X(), rDelta.Y() );
+ pScVal->maButton1Rect.Move( rDelta.X(), rDelta.Y() );
+ pScVal->maButton2Rect.Move( rDelta.X(), rDelta.Y() );
+ }
+ break;
+ case CTRL_SPINBOX:
+ case CTRL_SPINBUTTONS:
+ {
+ SpinbuttonValue* pSpVal = reinterpret_cast<SpinbuttonValue*>(aValue.getOptionalVal());
+ pSpVal->maUpperRect.Move( rDelta.X(), rDelta.Y() );
+ pSpVal->maLowerRect.Move( rDelta.X(), rDelta.Y() );
+ }
+ break;
+ case CTRL_TOOLBAR:
+ {
+ ToolbarValue* pTVal = reinterpret_cast<ToolbarValue*>(aValue.getOptionalVal());
+ pTVal->maGripRect.Move( rDelta.X(), rDelta.Y() );
+ }
+ break;
+ }
+ }
+}
+
+BOOL OutputDevice::DrawNativeControl( ControlType nType,
+ ControlPart nPart,
+ const Region& rControlRegion,
+ ControlState nState,
+ const ImplControlValue& aValue,
+ ::rtl::OUString aCaption )
+{
+ if( !lcl_enableNativeWidget( *this ) )
+ return FALSE;
+
+ /*
+ if( !IsInPaint() && IsPaintTransparent() )
+ {
+ // only required if called directly (ie, we're not in Paint() ):
+ // force redraw (Paint()) for transparent controls
+ // to trigger a repaint of the background
+ Region aClipRgn( GetClipRegion() );
+ if( !rControlRegion.IsEmpty() )
+ aClipRgn.Intersect( rControlRegion );
+ Invalidate( aClipRgn, INVALIDATE_UPDATE );
+ return TRUE;
+ }
+ */
+
+ // make sure the current clip region is initialized correctly
+ if ( !mpGraphics )
+ if ( !ImplGetGraphics() )
+ return FALSE;
+
+ if ( mbInitClipRegion )
+ ImplInitClipRegion();
+ if ( mbOutputClipped )
+ return TRUE;
+
+ if ( mbInitLineColor )
+ ImplInitLineColor();
+ if ( mbInitFillColor )
+ ImplInitFillColor();
+
+ // Convert the coordinates from relative to Window-absolute, so we draw
+ // in the correct place in platform code
+ Point aWinOffs( mnOutOffX, mnOutOffY );
+ Region screenRegion( rControlRegion );
+ screenRegion.Move( aWinOffs.X(), aWinOffs.Y());
+
+ // do so for ImplControlValue members, also
+ lcl_moveControlValue( nType, aValue, aWinOffs );
+
+ Region aTestRegion( GetActiveClipRegion() );
+ aTestRegion.Intersect( rControlRegion );
+ if( aTestRegion == rControlRegion )
+ nState |= CTRL_CACHING_ALLOWED; // control is not clipped, caching allowed
+
+ BOOL bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, aValue, aCaption, this );
+
+ // transform back ImplControlValue members
+ lcl_moveControlValue( nType, aValue, Point()-aWinOffs );
+
+ return bRet;
+}
+
+
+// -----------------------------------------------------------------------
+
+BOOL OutputDevice::DrawNativeControlText(ControlType nType,
+ ControlPart nPart,
+ const Region& rControlRegion,
+ ControlState nState,
+ const ImplControlValue& aValue,
+ ::rtl::OUString aCaption )
+{
+ if( !lcl_enableNativeWidget( *this ) )
+ return FALSE;
+
+ // make sure the current clip region is initialized correctly
+ if ( !mpGraphics )
+ if ( !ImplGetGraphics() )
+ return false;
+
+ if ( mbInitClipRegion )
+ ImplInitClipRegion();
+ if ( mbOutputClipped )
+ return true;
+
+ if ( mbInitLineColor )
+ ImplInitLineColor();
+ if ( mbInitFillColor )
+ ImplInitFillColor();
+
+ // Convert the coordinates from relative to Window-absolute, so we draw
+ // in the correct place in platform code
+ Point aWinOffs( mnOutOffX, mnOutOffY );
+ Region screenRegion( rControlRegion );
+ screenRegion.Move( aWinOffs.X(), aWinOffs.Y());
+ lcl_moveControlValue( nType, aValue, aWinOffs );
+
+ BOOL bRet = mpGraphics->DrawNativeControlText(nType, nPart, screenRegion, nState, aValue, aCaption, this );
+
+ // transform back ImplControlValue members
+ lcl_moveControlValue( nType, aValue, Point()-aWinOffs );
+
+ return bRet;
+}
+
+
+// -----------------------------------------------------------------------
+
+BOOL OutputDevice::GetNativeControlRegion( ControlType nType,
+ ControlPart nPart,
+ const Region& rControlRegion,
+ ControlState nState,
+ const ImplControlValue& aValue,
+ ::rtl::OUString aCaption,
+ Region &rNativeBoundingRegion,
+ Region &rNativeContentRegion )
+{
+ if( !lcl_enableNativeWidget( *this ) )
+ return FALSE;
+
+ if ( !mpGraphics )
+ if ( !ImplGetGraphics() )
+ return FALSE;
+
+ // Convert the coordinates from relative to Window-absolute, so we draw
+ // in the correct place in platform code
+ Point aWinOffs( mnOutOffX, mnOutOffY );
+ Region screenRegion( rControlRegion );
+ screenRegion.Move( aWinOffs.X(), aWinOffs.Y());
+ lcl_moveControlValue( nType, aValue, aWinOffs );
+
+ BOOL bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, aValue,
+ aCaption, rNativeBoundingRegion,
+ rNativeContentRegion, this );
+ if( bRet )
+ {
+ // transform back native regions
+ rNativeBoundingRegion.Move( -aWinOffs.X(), -aWinOffs.Y() );
+ rNativeContentRegion.Move( -aWinOffs.X(), -aWinOffs.Y() );
+ }
+ // transform back ImplControlValue members
+ lcl_moveControlValue( nType, aValue, Point()-aWinOffs );
+
+ return bRet;
+}
+
+
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 55d6f7bdd892..84e45979d679 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -669,7 +669,7 @@ BOOL SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void*
}
BOOL SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- const Point& aPos, SalControlHandle& rControlHandle, BOOL& rIsInside, const OutputDevice *pOutDev )
+ const Point& aPos, BOOL& rIsInside, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
@@ -677,10 +677,10 @@ BOOL SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, co
Region rgn( rControlRegion );
mirror( pt.X(), pOutDev );
mirror( rgn, pOutDev );
- return hitTestNativeControl( nType, nPart, rgn, pt, rControlHandle, rIsInside );
+ return hitTestNativeControl( nType, nPart, rgn, pt, rIsInside );
}
else
- return hitTestNativeControl( nType, nPart, rControlRegion, aPos, rControlHandle, rIsInside );
+ return hitTestNativeControl( nType, nPart, rControlRegion, aPos, rIsInside );
}
void SalGraphics::mirror( ControlType nType, const ImplControlValue& rVal, const OutputDevice* pOutDev, bool bBack ) const
@@ -722,7 +722,7 @@ void SalGraphics::mirror( ControlType nType, const ImplControlValue& rVal, const
}
BOOL SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ ControlState nState, const ImplControlValue& aValue,
const OUString& aCaption, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
@@ -730,33 +730,33 @@ BOOL SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const
Region rgn( rControlRegion );
mirror( rgn, pOutDev );
mirror( nType, aValue, pOutDev );
- BOOL bRet = drawNativeControl( nType, nPart, rgn, nState, aValue, rControlHandle, aCaption );
+ BOOL bRet = drawNativeControl( nType, nPart, rgn, nState, aValue, aCaption );
mirror( nType, aValue, pOutDev, true );
return bRet;
}
else
- return drawNativeControl( nType, nPart, rControlRegion, nState, aValue, rControlHandle, aCaption );
+ return drawNativeControl( nType, nPart, rControlRegion, nState, aValue, aCaption );
}
BOOL SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& aCaption, const OutputDevice *pOutDev )
+ const OUString& aCaption, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
Region rgn( rControlRegion );
mirror( rgn, pOutDev );
mirror( nType, aValue, pOutDev );
- BOOL bRet = drawNativeControlText( nType, nPart, rgn, nState, aValue, rControlHandle, aCaption );
+ BOOL bRet = drawNativeControlText( nType, nPart, rgn, nState, aValue, aCaption );
mirror( nType, aValue, pOutDev, true );
return bRet;
}
else
- return drawNativeControlText( nType, nPart, rControlRegion, nState, aValue, rControlHandle, aCaption );
+ return drawNativeControlText( nType, nPart, rControlRegion, nState, aValue, aCaption );
}
BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, const OUString& aCaption,
+ const ImplControlValue& aValue, const OUString& aCaption,
Region &rNativeBoundingRegion, Region &rNativeContentRegion, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
@@ -764,7 +764,7 @@ BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart,
Region rgn( rControlRegion );
mirror( rgn, pOutDev );
mirror( nType, aValue, pOutDev );
- if( getNativeControlRegion( nType, nPart, rgn, nState, aValue, rControlHandle, aCaption,
+ if( getNativeControlRegion( nType, nPart, rgn, nState, aValue, aCaption,
rNativeBoundingRegion, rNativeContentRegion ) )
{
mirror( rNativeBoundingRegion, pOutDev, true );
@@ -779,7 +779,7 @@ BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart,
}
}
else
- return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, rControlHandle, aCaption,
+ return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, aCaption,
rNativeBoundingRegion, rNativeContentRegion );
}
diff --git a/vcl/source/gdi/salnativewidgets-none.cxx b/vcl/source/gdi/salnativewidgets-none.cxx
index 8b87f142ba25..7faf12d062fe 100644
--- a/vcl/source/gdi/salnativewidgets-none.cxx
+++ b/vcl/source/gdi/salnativewidgets-none.cxx
@@ -60,7 +60,6 @@ BOOL SalGraphics::hitTestNativeControl( ControlType,
ControlPart,
const Region&,
const Point&,
- SalControlHandle&,
BOOL& )
{
return( FALSE );
@@ -74,7 +73,6 @@ BOOL SalGraphics::hitTestNativeControl( ControlType,
*
* rControlRegion: The bounding region of the complete control in VCL frame coordinates.
* aValue: An optional value (tristate/numerical/string)
- * rControlHandle: Carries platform dependent data and is maintained by the SalFrame implementation.
* aCaption: A caption or title string (like button text etc)
*/
BOOL SalGraphics::drawNativeControl( ControlType,
@@ -82,7 +80,6 @@ BOOL SalGraphics::drawNativeControl( ControlType,
const Region&,
ControlState,
const ImplControlValue&,
- SalControlHandle&,
const OUString& )
{
return( FALSE );
@@ -97,7 +94,6 @@ BOOL SalGraphics::drawNativeControl( ControlType,
*
* rControlRegion: The bounding region of the complete control in VCL frame coordinates.
* aValue: An optional value (tristate/numerical/string)
- * rControlHandle: Carries platform dependent data and is maintained by the SalFrame implementation.
* aCaption: A caption or title string (like button text etc)
*/
BOOL SalGraphics::drawNativeControlText( ControlType,
@@ -105,7 +101,6 @@ BOOL SalGraphics::drawNativeControlText( ControlType,
const Region&,
ControlState,
const ImplControlValue&,
- SalControlHandle&,
const OUString& )
{
return( FALSE );
@@ -123,7 +118,6 @@ BOOL SalGraphics::drawNativeControlText( ControlType,
*
* rControlRegion: The bounding region of the control in VCL frame coordinates.
* aValue: An optional value (tristate/numerical/string)
- * rControlHandle: Carries platform dependent data and is maintained by the SalFrame implementation.
* aCaption: A caption or title string (like button text etc)
*/
BOOL SalGraphics::getNativeControlRegion( ControlType,
@@ -131,7 +125,6 @@ BOOL SalGraphics::getNativeControlRegion( ControlType,
const Region&,
ControlState,
const ImplControlValue&,
- SalControlHandle&,
const OUString&,
Region &,
Region & )
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 78ce197525ec..78ce197525ec 100644..100755
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
diff --git a/vcl/source/glyphs/gcach_layout.cxx b/vcl/source/glyphs/gcach_layout.cxx
index a9f9167062ba..a9f9167062ba 100644..100755
--- a/vcl/source/glyphs/gcach_layout.cxx
+++ b/vcl/source/glyphs/gcach_layout.cxx
diff --git a/vcl/source/glyphs/gcach_rbmp.cxx b/vcl/source/glyphs/gcach_rbmp.cxx
index 5ea80da77794..5ea80da77794 100644..100755
--- a/vcl/source/glyphs/gcach_rbmp.cxx
+++ b/vcl/source/glyphs/gcach_rbmp.cxx
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index b47aa50a2e72..ca92d9ed6c5b 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -98,6 +98,7 @@
#include "vcl/lazydelete.hxx"
#include <set>
+#include <typeinfo>
using namespace rtl;
using namespace ::com::sun::star::uno;
@@ -1322,7 +1323,6 @@ ImplWinData* Window::ImplGetWinData() const
mpWindowImpl->mpWinData->mnIsTopWindow = (USHORT) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow())
mpWindowImpl->mpWinData->mbMouseOver = FALSE;
mpWindowImpl->mpWinData->mbEnableNativeWidget = (pNoNWF && *pNoNWF) ? FALSE : TRUE; // TRUE: try to draw this control with native theme API
- mpWindowImpl->mpWinData->mpSalControlHandle = NULL;
mpWindowImpl->mpWinData->mpSmartHelpId = NULL;
mpWindowImpl->mpWinData->mpSmartUniqueId = NULL;
}
@@ -4328,6 +4328,27 @@ Window::Window( Window* pParent, const ResId& rResId )
}
// -----------------------------------------------------------------------
+#if OSL_DEBUG_LEVEL > 0
+namespace
+{
+ void lcl_appendWindowInfo( ByteString& io_rErrorString, const Window& i_rWindow )
+ {
+ // skip border windows, they don't carry information which helps diagnosing the problem
+ const Window* pWindow( &i_rWindow );
+ while ( pWindow && ( pWindow->GetType() == WINDOW_BORDERWINDOW ) )
+ pWindow = pWindow->GetWindow( WINDOW_FIRSTCHILD );
+ if ( !pWindow )
+ pWindow = &i_rWindow;
+
+ io_rErrorString += char(13);
+ io_rErrorString += typeid( *pWindow ).name();
+ io_rErrorString += " (window text: '";
+ io_rErrorString += ByteString( pWindow->GetText(), RTL_TEXTENCODING_UTF8 );
+ io_rErrorString += "')";
+ }
+}
+#endif
+// -----------------------------------------------------------------------
Window::~Window()
{
@@ -4460,9 +4481,7 @@ Window::~Window()
if ( ImplIsRealParentPath( pTempWin ) )
{
bError = TRUE;
- if ( aErrorStr.Len() )
- aErrorStr += "; ";
- aErrorStr += ByteString( pTempWin->GetText(), RTL_TEXTENCODING_UTF8 );
+ lcl_appendWindowInfo( aErrorStr, *pTempWin );
}
pTempWin = pTempWin->mpWindowImpl->mpNextOverlap;
}
@@ -4483,9 +4502,7 @@ Window::~Window()
if ( ImplIsRealParentPath( pTempWin ) )
{
bError = TRUE;
- if ( aErrorStr.Len() )
- aErrorStr += "; ";
- aErrorStr += ByteString( pTempWin->GetText(), RTL_TEXTENCODING_UTF8 );
+ lcl_appendWindowInfo( aErrorStr, *pTempWin );
}
pTempWin = pTempWin->mpWindowImpl->mpFrameData->mpNextFrame;
}
@@ -4507,10 +4524,8 @@ Window::~Window()
pTempWin = mpWindowImpl->mpFirstChild;
while ( pTempWin )
{
- aTempStr += ByteString( pTempWin->GetText(), RTL_TEXTENCODING_UTF8 );
+ lcl_appendWindowInfo( aTempStr, *pTempWin );
pTempWin = pTempWin->mpWindowImpl->mpNext;
- if ( pTempWin )
- aTempStr += "; ";
}
DBG_ERROR( aTempStr.GetBuffer() );
GetpApp()->Abort( String( aTempStr, RTL_TEXTENCODING_UTF8 ) ); // abort in non-pro version, this must be fixed!
@@ -4524,10 +4539,8 @@ Window::~Window()
pTempWin = mpWindowImpl->mpFirstOverlap;
while ( pTempWin )
{
- aTempStr += ByteString( pTempWin->GetText(), RTL_TEXTENCODING_UTF8 );
+ lcl_appendWindowInfo( aTempStr, *pTempWin );
pTempWin = pTempWin->mpWindowImpl->mpNext;
- if ( pTempWin )
- aTempStr += "; ";
}
DBG_ERROR( aTempStr.GetBuffer() );
GetpApp()->Abort( String( aTempStr, RTL_TEXTENCODING_UTF8 ) ); // abort in non-pro version, this must be fixed!
@@ -4722,10 +4735,6 @@ Window::~Window()
delete mpWindowImpl->mpWinData->mpFocusRect;
if ( mpWindowImpl->mpWinData->mpTrackRect )
delete mpWindowImpl->mpWinData->mpTrackRect;
- // Native widget support
- delete mpWindowImpl->mpWinData->mpSalControlHandle;
- mpWindowImpl->mpWinData->mpSalControlHandle = NULL;
-
if ( mpWindowImpl->mpWinData->mpSmartHelpId )
delete mpWindowImpl->mpWinData->mpSmartHelpId;
if ( mpWindowImpl->mpWinData->mpSmartUniqueId )
@@ -7444,13 +7453,13 @@ Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rR
// -----------------------------------------------------------------------
-Rectangle Window::GetWindowExtentsRelative( Window *pRelativeWindow )
+Rectangle Window::GetWindowExtentsRelative( Window *pRelativeWindow ) const
{
// with decoration
return ImplGetWindowExtentsRelative( pRelativeWindow, FALSE );
}
-Rectangle Window::GetClientWindowExtentsRelative( Window *pRelativeWindow )
+Rectangle Window::GetClientWindowExtentsRelative( Window *pRelativeWindow ) const
{
// without decoration
return ImplGetWindowExtentsRelative( pRelativeWindow, TRUE );
@@ -7458,12 +7467,12 @@ Rectangle Window::GetClientWindowExtentsRelative( Window *pRelativeWindow )
// -----------------------------------------------------------------------
-Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bClientOnly )
+Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bClientOnly ) const
{
SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry();
// make sure we use the extent of our border window,
// otherwise we miss a few pixels
- Window *pWin = (!bClientOnly && mpWindowImpl->mpBorderWindow) ? mpWindowImpl->mpBorderWindow : this;
+ const Window *pWin = (!bClientOnly && mpWindowImpl->mpBorderWindow) ? mpWindowImpl->mpBorderWindow : this;
Point aPos( pWin->OutputToScreenPixel( Point(0,0) ) );
aPos.X() += g.nX;
diff --git a/vcl/source/window/window3.cxx b/vcl/source/window/window3.cxx
index aecbc9c3ef0c..65019ba2a4af 100644
--- a/vcl/source/window/window3.cxx
+++ b/vcl/source/window/window3.cxx
@@ -28,269 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#define _SV_WINDOW_CXX
-
-#include "svsys.h"
-#include "vcl/window.h"
#include "vcl/window.hxx"
#include "vcl/waitobj.hxx"
-#include "vcl/salgdi.hxx"
-#include "vcl/salnativewidgets.hxx"
-#include "vcl/salctrlhandle.hxx"
-#include "rtl/ustring.hxx"
#include "vcl/button.hxx"
-using namespace rtl;
-
-// -----------------------------------------------------------------------
-// These functions are mainly passthrough functions that allow access to
-// the SalFrame behind a Window object for native widget rendering purposes.
-// -----------------------------------------------------------------------
-
-void Window::ImplInitSalControlHandle()
-{
- // create SalControlHandle on demand
- // not needed for ordinary windows
- // TODO: move creation to SalGraphics
- //if( !ImplGetWinData()->mpSalControlHandle )
- // ImplGetWinData()->mpSalControlHandle = new SalControlHandle;
-}
-
-// -----------------------------------------------------------------------
-
-BOOL Window::IsNativeControlSupported( ControlType nType, ControlPart nPart )
-{
- if( !IsNativeWidgetEnabled() )
- return FALSE;
-
- if ( !mpGraphics )
- if ( !ImplGetGraphics() )
- return FALSE;
-
- return( mpGraphics->IsNativeControlSupported(nType, nPart) );
-}
-
-
-// -----------------------------------------------------------------------
-
-BOOL Window::HitTestNativeControl( ControlType nType,
- ControlPart nPart,
- const Region& rControlRegion,
- const Point& aPos,
- BOOL& rIsInside )
-{
- if( !IsNativeWidgetEnabled() )
- return FALSE;
-
- if ( !mpGraphics )
- if ( !ImplGetGraphics() )
- return FALSE;
-
- ImplInitSalControlHandle();
-
- Point aWinOffs;
- aWinOffs = OutputToScreenPixel( aWinOffs );
- Region screenRegion( rControlRegion );
- screenRegion.Move( aWinOffs.X(), aWinOffs.Y());
-
- return( mpGraphics->HitTestNativeControl(nType, nPart, screenRegion, OutputToScreenPixel( aPos ), *ImplGetWinData()->mpSalControlHandle, rIsInside, this ) );
-}
-
-// -----------------------------------------------------------------------
-
-void Window::ImplMoveControlValue( ControlType nType, const ImplControlValue& aValue, const Point& rDelta ) const
-{
- if( aValue.getOptionalVal() )
- {
- switch( nType )
- {
- case CTRL_SLIDER:
- {
- SliderValue* pSlVal = reinterpret_cast<SliderValue*>(aValue.getOptionalVal());
- pSlVal->maThumbRect.Move( rDelta.X(), rDelta.Y() );
- }
- break;
- case CTRL_SCROLLBAR:
- {
- ScrollbarValue* pScVal = reinterpret_cast<ScrollbarValue*>(aValue.getOptionalVal());
- pScVal->maThumbRect.Move( rDelta.X(), rDelta.Y() );
- pScVal->maButton1Rect.Move( rDelta.X(), rDelta.Y() );
- pScVal->maButton2Rect.Move( rDelta.X(), rDelta.Y() );
- }
- break;
- case CTRL_SPINBOX:
- case CTRL_SPINBUTTONS:
- {
- SpinbuttonValue* pSpVal = reinterpret_cast<SpinbuttonValue*>(aValue.getOptionalVal());
- pSpVal->maUpperRect.Move( rDelta.X(), rDelta.Y() );
- pSpVal->maLowerRect.Move( rDelta.X(), rDelta.Y() );
- }
- break;
- case CTRL_TOOLBAR:
- {
- ToolbarValue* pTVal = reinterpret_cast<ToolbarValue*>(aValue.getOptionalVal());
- pTVal->maGripRect.Move( rDelta.X(), rDelta.Y() );
- }
- break;
- }
- }
-}
-
-BOOL Window::DrawNativeControl( ControlType nType,
- ControlPart nPart,
- const Region& rControlRegion,
- ControlState nState,
- const ImplControlValue& aValue,
- OUString aCaption )
-{
- if( !IsNativeWidgetEnabled() )
- return FALSE;
-
- /*
- if( !IsInPaint() && IsPaintTransparent() )
- {
- // only required if called directly (ie, we're not in Paint() ):
- // force redraw (Paint()) for transparent controls
- // to trigger a repaint of the background
- Region aClipRgn( GetClipRegion() );
- if( !rControlRegion.IsEmpty() )
- aClipRgn.Intersect( rControlRegion );
- Invalidate( aClipRgn, INVALIDATE_UPDATE );
- return TRUE;
- }
- */
-
- ImplInitSalControlHandle();
-
- // make sure the current clip region is initialized correctly
- if ( !mpGraphics )
- if ( !ImplGetGraphics() )
- return FALSE;
-
- if ( mbInitClipRegion )
- ImplInitClipRegion();
- if ( mbOutputClipped )
- return TRUE;
-
- if ( mbInitLineColor )
- ImplInitLineColor();
- if ( mbInitFillColor )
- ImplInitFillColor();
-
- // Convert the coordinates from relative to Window-absolute, so we draw
- // in the correct place in platform code
- Point aWinOffs;
- aWinOffs = OutputToScreenPixel( aWinOffs );
- Region screenRegion( rControlRegion );
- screenRegion.Move( aWinOffs.X(), aWinOffs.Y());
-
- // do so for ImplControlValue members, also
- ImplMoveControlValue( nType, aValue, aWinOffs );
-
- Region aTestRegion( GetActiveClipRegion() );
- aTestRegion.Intersect( rControlRegion );
- if( aTestRegion == rControlRegion )
- nState |= CTRL_CACHING_ALLOWED; // control is not clipped, caching allowed
-
- BOOL bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, aValue, *ImplGetWinData()->mpSalControlHandle, aCaption, this );
-
- // transform back ImplControlValue members
- ImplMoveControlValue( nType, aValue, Point()-aWinOffs );
-
- return bRet;
-}
-
-
-// -----------------------------------------------------------------------
-
-BOOL Window::DrawNativeControlText(ControlType nType,
- ControlPart nPart,
- const Region& rControlRegion,
- ControlState nState,
- const ImplControlValue& aValue,
- OUString aCaption )
-{
- if( !IsNativeWidgetEnabled() )
- return FALSE;
-
- ImplInitSalControlHandle();
-
- // make sure the current clip region is initialized correctly
- if ( !mpGraphics )
- if ( !ImplGetGraphics() )
- return false;
-
- if ( mbInitClipRegion )
- ImplInitClipRegion();
- if ( mbOutputClipped )
- return true;
-
- if ( mbInitLineColor )
- ImplInitLineColor();
- if ( mbInitFillColor )
- ImplInitFillColor();
-
- // Convert the coordinates from relative to Window-absolute, so we draw
- // in the correct place in platform code
- Point aWinOffs;
- aWinOffs = OutputToScreenPixel( aWinOffs );
- Region screenRegion( rControlRegion );
- screenRegion.Move( aWinOffs.X(), aWinOffs.Y());
- ImplMoveControlValue( nType, aValue, aWinOffs );
-
- BOOL bRet = mpGraphics->DrawNativeControlText(nType, nPart, screenRegion, nState, aValue, *ImplGetWinData()->mpSalControlHandle, aCaption, this );
-
- // transform back ImplControlValue members
- ImplMoveControlValue( nType, aValue, Point()-aWinOffs );
-
- return bRet;
-}
-
-
-// -----------------------------------------------------------------------
-
-BOOL Window::GetNativeControlRegion( ControlType nType,
- ControlPart nPart,
- const Region& rControlRegion,
- ControlState nState,
- const ImplControlValue& aValue,
- OUString aCaption,
- Region &rNativeBoundingRegion,
- Region &rNativeContentRegion )
-{
- if( !IsNativeWidgetEnabled() )
- return FALSE;
-
- if ( !mpGraphics )
- if ( !ImplGetGraphics() )
- return FALSE;
-
- ImplInitSalControlHandle();
-
- // Convert the coordinates from relative to Window-absolute, so we draw
- // in the correct place in platform code
- Point aWinOffs;
- aWinOffs = OutputToScreenPixel( aWinOffs );
- Region screenRegion( rControlRegion );
- screenRegion.Move( aWinOffs.X(), aWinOffs.Y());
- ImplMoveControlValue( nType, aValue, aWinOffs );
-
- BOOL bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, aValue,
- *ImplGetWinData()->mpSalControlHandle, aCaption, rNativeBoundingRegion,
- rNativeContentRegion, this );
- if( bRet )
- {
- // transform back native regions
- rNativeBoundingRegion.Move( -aWinOffs.X(), -aWinOffs.Y() );
- rNativeContentRegion.Move( -aWinOffs.X(), -aWinOffs.Y() );
- }
- // transform back ImplControlValue members
- ImplMoveControlValue( nType, aValue, Point()-aWinOffs );
-
- return bRet;
-}
-
-
// -----------------------------------------------------------------------
WaitObject::~WaitObject()
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index de4d55b0230a..244c001b3aa0 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -191,34 +191,34 @@ static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow );
//---
static Rectangle NWGetButtonArea( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, const OUString& rCaption );
+ const ImplControlValue& aValue, const OUString& rCaption );
//---
static Rectangle NWGetEditBoxPixmapRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, const OUString& rCaption );
+ const ImplControlValue& aValue, const OUString& rCaption );
static void NWPaintOneEditBox( int nScreen, GdkDrawable * gdkDrawable, GdkRectangle *gdkRect,
ControlType nType, ControlPart nPart, Rectangle aEditBoxRect,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
//---
static Rectangle NWGetSpinButtonRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, const OUString& rCaption );
+ const ImplControlValue& aValue, const OUString& rCaption );
static void NWPaintOneSpinButton( int nScreen, GdkPixmap * pixmap, ControlType nType, ControlPart nPart, Rectangle aAreaRect,
- ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
//---
static Rectangle NWGetComboBoxButtonRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, const OUString& rCaption );
+ const ImplControlValue& aValue, const OUString& rCaption );
//---
static Rectangle NWGetListBoxButtonRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, const OUString& rCaption );
+ const ImplControlValue& aValue, const OUString& rCaption );
static Rectangle NWGetListBoxIndicatorRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, const OUString& rCaption );
+ const ImplControlValue& aValue, const OUString& rCaption );
static Rectangle NWGetToolbarRect( int nScreen,
ControlType nType,
@@ -226,7 +226,6 @@ static Rectangle NWGetToolbarRect( int nScreen,
Rectangle aAreaRect,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle,
const OUString& rCaption );
//---
@@ -620,7 +619,6 @@ BOOL GtkSalGraphics::hitTestNativeControl( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
const Point& aPos,
- SalControlHandle&,
BOOL& rIsInside )
{
if ( ( nType == CTRL_SCROLLBAR ) &&
@@ -725,7 +723,6 @@ BOOL GtkSalGraphics::hitTestNativeControl( ControlType nType,
*
* rControlRegion: The bounding region of the complete control in VCL frame coordinates.
* aValue: An optional value (tristate/numerical/string)
- * rControlHandle: Carries platform dependent data and is maintained by the SalFrame implementation.
* rCaption: A caption or title string (like button text etc)
*/
BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
@@ -733,13 +730,12 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle,
const OUString& rCaption )
{
if( (nType==CTRL_CHECKBOX) && (nPart==PART_ENTIRE_CONTROL) &&
aValue.getTristateVal() == BUTTONVALUE_MIXED )
{
- return drawNativeMixedStateCheck( nType, nPart, rControlRegion, nState, aValue, rControlHandle, rCaption );
+ return drawNativeMixedStateCheck( nType, nPart, rControlRegion, nState, aValue, rCaption );
}
BOOL returnVal = FALSE;
@@ -802,61 +798,61 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
if ( (nType==CTRL_PUSHBUTTON) && (nPart==PART_ENTIRE_CONTROL) )
{
- returnVal = NWPaintGTKButton( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKButton( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if ( (nType==CTRL_RADIOBUTTON) && (nPart==PART_ENTIRE_CONTROL) )
{
- returnVal = NWPaintGTKRadio( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKRadio( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if ( (nType==CTRL_CHECKBOX) && (nPart==PART_ENTIRE_CONTROL) )
{
- returnVal = NWPaintGTKCheck( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKCheck( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if ( (nType==CTRL_SCROLLBAR) && ((nPart==PART_DRAW_BACKGROUND_HORZ) || (nPart==PART_DRAW_BACKGROUND_VERT)) )
{
- returnVal = NWPaintGTKScrollbar( nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKScrollbar( nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if ( ((nType==CTRL_EDITBOX) && ((nPart==PART_ENTIRE_CONTROL) || (nPart==HAS_BACKGROUND_TEXTURE)) )
|| ((nType==CTRL_SPINBOX) && (nPart==HAS_BACKGROUND_TEXTURE))
|| ((nType==CTRL_COMBOBOX) && (nPart==HAS_BACKGROUND_TEXTURE))
|| ((nType==CTRL_LISTBOX) && (nPart==HAS_BACKGROUND_TEXTURE)) )
{
- returnVal = NWPaintGTKEditBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKEditBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if ( ((nType==CTRL_MULTILINE_EDITBOX) && ((nPart==PART_ENTIRE_CONTROL) || (nPart==HAS_BACKGROUND_TEXTURE)) ) )
{
- returnVal = NWPaintGTKEditBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKEditBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if ( ((nType==CTRL_SPINBOX) || (nType==CTRL_SPINBUTTONS))
&& ((nPart==PART_ENTIRE_CONTROL) || (nPart==PART_ALL_BUTTONS)) )
{
- returnVal = NWPaintGTKSpinBox( nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKSpinBox( nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if ( (nType == CTRL_COMBOBOX) &&
( (nPart==PART_ENTIRE_CONTROL)
||(nPart==PART_BUTTON_DOWN)
) )
{
- returnVal = NWPaintGTKComboBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKComboBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if ( (nType==CTRL_TAB_ITEM) || (nType==CTRL_TAB_PANE) || (nType==CTRL_TAB_BODY) || (nType==CTRL_FIXEDBORDER) )
{
if ( nType == CTRL_TAB_BODY )
returnVal = TRUE;
else
- returnVal = NWPaintGTKTabItem( nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption);
+ returnVal = NWPaintGTKTabItem( nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption);
}
else if ( (nType==CTRL_LISTBOX) && ((nPart==PART_ENTIRE_CONTROL) || (nPart==PART_WINDOW)) )
{
- returnVal = NWPaintGTKListBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKListBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if ( (nType== CTRL_TOOLBAR) )
{
- returnVal = NWPaintGTKToolbar( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKToolbar( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if ( (nType== CTRL_MENUBAR) )
{
- returnVal = NWPaintGTKMenubar( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKMenubar( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if( (nType == CTRL_MENU_POPUP)
&& ( (nPart == PART_ENTIRE_CONTROL)
@@ -866,19 +862,19 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
)
)
{
- returnVal = NWPaintGTKPopupMenu( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKPopupMenu( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if( (nType == CTRL_TOOLTIP) && (nPart == PART_ENTIRE_CONTROL) )
{
- returnVal = NWPaintGTKTooltip( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKTooltip( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if( (nType == CTRL_PROGRESS) && (nPart == PART_ENTIRE_CONTROL) )
{
- returnVal = NWPaintGTKProgress( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKProgress( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if( (nType == CTRL_LISTNODE) && (nPart == PART_ENTIRE_CONTROL) )
{
- returnVal = NWPaintGTKListNode( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKListNode( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
else if( (nType == CTRL_LISTNET) && (nPart == PART_ENTIRE_CONTROL) )
{
@@ -887,7 +883,7 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
}
else if( (nType == CTRL_SLIDER) )
{
- returnVal = NWPaintGTKSlider( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ returnVal = NWPaintGTKSlider( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
if( pixmap )
@@ -904,7 +900,6 @@ BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType,
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle,
const OUString& rCaption )
{
// need to emulate something for mixed state
@@ -927,7 +922,7 @@ BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType,
SetClipRegion( pFontGC_, aRegion );
XDestroyRegion( aRegion );
- returnVal = drawNativeControl( nType, nPart, rControlRegion, nState, aValue, rControlHandle, rCaption );
+ returnVal = drawNativeControl( nType, nPart, rControlRegion, nState, aValue, rCaption );
if( returnVal )
{
@@ -938,7 +933,7 @@ BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType,
XUnionRectWithRegion( &aXRect, aRegion, aRegion );
SetClipRegion( pFontGC_, aRegion );
XDestroyRegion( aRegion );
- returnVal = drawNativeControl( nType, nPart, rControlRegion, nState, aValue, rControlHandle, rCaption );
+ returnVal = drawNativeControl( nType, nPart, rControlRegion, nState, aValue, rCaption );
}
// clean up
@@ -957,7 +952,6 @@ BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType,
*
* rControlRegion: The bounding region of the complete control in VCL frame coordinates.
* aValue: An optional value (tristate/numerical/string)
- * rControlHandle: Carries platform dependent data and is maintained by the SalFrame implementation.
* rCaption: A caption or title string (like button text etc)
*/
BOOL GtkSalGraphics::drawNativeControlText( ControlType,
@@ -965,7 +959,6 @@ BOOL GtkSalGraphics::drawNativeControlText( ControlType,
const Region&,
ControlState,
const ImplControlValue&,
- SalControlHandle&,
const OUString& )
{
return( FALSE );
@@ -983,7 +976,6 @@ BOOL GtkSalGraphics::drawNativeControlText( ControlType,
*
* rControlRegion: The bounding region of the control in VCL frame coordinates.
* aValue: An optional value (tristate/numerical/string)
- * rControlHandle: Carries platform dependent data and is maintained by the SalFrame implementation.
* rCaption: A caption or title string (like button text etc)
*/
BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
@@ -991,7 +983,6 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle,
const OUString& rCaption,
Region &rNativeBoundingRegion,
Region &rNativeContentRegion )
@@ -1003,7 +994,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
&& (rControlRegion.GetBoundRect().GetHeight() > 16) )
{
rNativeBoundingRegion = NWGetButtonArea( m_nScreen, nType, nPart, rControlRegion.GetBoundRect(),
- nState, aValue, rControlHandle, rCaption );
+ nState, aValue, rCaption );
rNativeContentRegion = rControlRegion;
returnVal = TRUE;
@@ -1011,7 +1002,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
if ( (nType==CTRL_COMBOBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
{
rNativeBoundingRegion = NWGetComboBoxButtonRect( m_nScreen, nType, nPart, rControlRegion.GetBoundRect(), nState,
- aValue, rControlHandle, rCaption );
+ aValue, rCaption );
rNativeContentRegion = rNativeBoundingRegion;
returnVal = TRUE;
@@ -1020,7 +1011,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
{
rNativeBoundingRegion = NWGetSpinButtonRect( m_nScreen, nType, nPart, rControlRegion.GetBoundRect(), nState,
- aValue, rControlHandle, rCaption );
+ aValue, rCaption );
rNativeContentRegion = rNativeBoundingRegion;
returnVal = TRUE;
@@ -1028,7 +1019,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
if ( (nType==CTRL_LISTBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
{
rNativeBoundingRegion = NWGetListBoxButtonRect( m_nScreen, nType, nPart, rControlRegion.GetBoundRect(), nState,
- aValue, rControlHandle, rCaption );
+ aValue, rCaption );
rNativeContentRegion = rNativeBoundingRegion;
returnVal = TRUE;
@@ -1041,7 +1032,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
(nPart==PART_BUTTON)
))
{
- rNativeBoundingRegion = NWGetToolbarRect( m_nScreen, nType, nPart, rControlRegion.GetBoundRect(), nState, aValue, rControlHandle, rCaption );
+ rNativeBoundingRegion = NWGetToolbarRect( m_nScreen, nType, nPart, rControlRegion.GetBoundRect(), nState, aValue, rCaption );
rNativeContentRegion = rNativeBoundingRegion;
returnVal = TRUE;
}
@@ -1155,7 +1146,7 @@ BOOL GtkSalGraphics::NWPaintGTKButton(
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue&,
- SalControlHandle&, const OUString& )
+ const OUString& )
{
GtkStateType stateType;
GtkShadowType shadowType;
@@ -1268,7 +1259,7 @@ BOOL GtkSalGraphics::NWPaintGTKButton(
static Rectangle NWGetButtonArea( int nScreen,
ControlType, ControlPart, Rectangle aAreaRect, ControlState nState,
- const ImplControlValue&, SalControlHandle&, const OUString& )
+ const ImplControlValue&, const OUString& )
{
gboolean interiorFocus;
gint focusWidth;
@@ -1324,7 +1315,7 @@ BOOL GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState,
- const ImplControlValue& aValue, SalControlHandle&,
+ const ImplControlValue& aValue,
const OUString& )
{
GtkStateType stateType;
@@ -1383,7 +1374,7 @@ BOOL GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
const clipList& rClipList,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle&, const OUString& )
+ const OUString& )
{
GtkStateType stateType;
GtkShadowType shadowType;
@@ -1438,7 +1429,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList&,
ControlState nState,
- const ImplControlValue& aValue, SalControlHandle&,
+ const ImplControlValue& aValue,
const OUString& )
{
ScrollbarValue* pScrollbarVal = (ScrollbarValue *)(aValue.getOptionalVal());
@@ -1844,7 +1835,7 @@ BOOL GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ const ImplControlValue& aValue,
const OUString& rCaption )
{
Rectangle pixmapRect;
@@ -1853,7 +1844,7 @@ BOOL GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable,
// Find the overall bounding rect of the buttons's drawing area,
// plus its actual draw rect excluding adornment
pixmapRect = NWGetEditBoxPixmapRect( m_nScreen, nType, nPart, rControlRectangle,
- nState, aValue, rControlHandle, rCaption );
+ nState, aValue, rCaption );
for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
@@ -1861,7 +1852,7 @@ BOOL GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable,
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
- NWPaintOneEditBox( m_nScreen, gdkDrawable, &clipRect, nType, nPart, pixmapRect, nState, aValue, rControlHandle, rCaption );
+ NWPaintOneEditBox( m_nScreen, gdkDrawable, &clipRect, nType, nPart, pixmapRect, nState, aValue, rCaption );
}
return( TRUE );
@@ -1878,7 +1869,6 @@ static Rectangle NWGetEditBoxPixmapRect(int nScreen,
Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
- SalControlHandle&,
const OUString& )
{
Rectangle pixmapRect = aAreaRect;
@@ -1915,7 +1905,6 @@ static void NWPaintOneEditBox( int nScreen,
Rectangle aEditBoxRect,
ControlState nState,
const ImplControlValue&,
- SalControlHandle&,
const OUString& )
{
GtkStateType stateType;
@@ -1984,7 +1973,7 @@ BOOL GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
const clipList&,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption )
+ const OUString& rCaption )
{
GdkPixmap * pixmap;
Rectangle pixmapRect;
@@ -2032,8 +2021,8 @@ BOOL GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
if ( !pixmap )
return( FALSE );
- upBtnRect = NWGetSpinButtonRect( m_nScreen, nType, upBtnPart, pixmapRect, upBtnState, aValue, rControlHandle, rCaption );
- downBtnRect = NWGetSpinButtonRect( m_nScreen, nType, downBtnPart, pixmapRect, downBtnState, aValue, rControlHandle, rCaption );
+ upBtnRect = NWGetSpinButtonRect( m_nScreen, nType, upBtnPart, pixmapRect, upBtnState, aValue, rCaption );
+ downBtnRect = NWGetSpinButtonRect( m_nScreen, nType, downBtnPart, pixmapRect, downBtnState, aValue, rCaption );
if ( (nType==CTRL_SPINBOX) && (nPart!=PART_ALL_BUTTONS) )
{
@@ -2043,7 +2032,7 @@ BOOL GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
aEditBoxRect.setX( 0 );
aEditBoxRect.setY( 0 );
- NWPaintOneEditBox( m_nScreen, pixmap, NULL, nType, nPart, aEditBoxRect, nState, aValue, rControlHandle, rCaption );
+ NWPaintOneEditBox( m_nScreen, pixmap, NULL, nType, nPart, aEditBoxRect, nState, aValue, rCaption );
}
NWSetWidgetState( gWidgetData[m_nScreen].gSpinButtonWidget, nState, stateType );
@@ -2060,8 +2049,8 @@ BOOL GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
shadowRect.GetWidth(), shadowRect.GetHeight() );
}
- NWPaintOneSpinButton( m_nScreen, pixmap, nType, upBtnPart, pixmapRect, upBtnState, aValue, rControlHandle, rCaption );
- NWPaintOneSpinButton( m_nScreen, pixmap, nType, downBtnPart, pixmapRect, downBtnState, aValue, rControlHandle, rCaption );
+ NWPaintOneSpinButton( m_nScreen, pixmap, nType, upBtnPart, pixmapRect, upBtnState, aValue, rCaption );
+ NWPaintOneSpinButton( m_nScreen, pixmap, nType, downBtnPart, pixmapRect, downBtnState, aValue, rCaption );
if( !NWRenderPixmapToScreen(pixmap, pixmapRect) )
{
@@ -2081,7 +2070,6 @@ static Rectangle NWGetSpinButtonRect( int nScreen,
Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
- SalControlHandle&,
const OUString& )
{
gint buttonSize;
@@ -2125,7 +2113,6 @@ static void NWPaintOneSpinButton( int nScreen,
Rectangle aAreaRect,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle,
const OUString& rCaption )
{
Rectangle buttonRect;
@@ -2137,7 +2124,7 @@ static void NWPaintOneSpinButton( int nScreen,
NWEnsureGTKSpinButton( nScreen );
NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
- buttonRect = NWGetSpinButtonRect( nScreen, nType, nPart, aAreaRect, nState, aValue, rControlHandle, rCaption );
+ buttonRect = NWGetSpinButtonRect( nScreen, nType, nPart, aAreaRect, nState, aValue, rCaption );
NWSetWidgetState( gWidgetData[nScreen].gSpinButtonWidget, nState, stateType );
gtk_paint_box( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, shadowType, NULL, gWidgetData[nScreen].gSpinButtonWidget,
@@ -2169,7 +2156,7 @@ BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
const clipList& rClipList,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption )
+ const OUString& rCaption )
{
Rectangle pixmapRect;
Rectangle buttonRect;
@@ -2194,7 +2181,7 @@ BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
NWSetWidgetState( gWidgetData[m_nScreen].gComboWidget, nState, stateType );
NWSetWidgetState( gWidgetData[m_nScreen].gArrowWidget, nState, stateType );
- buttonRect = NWGetComboBoxButtonRect( m_nScreen, nType, PART_BUTTON_DOWN, pixmapRect, nState, aValue, rControlHandle, rCaption );
+ buttonRect = NWGetComboBoxButtonRect( m_nScreen, nType, PART_BUTTON_DOWN, pixmapRect, nState, aValue, rCaption );
if( nPart == PART_BUTTON_DOWN )
buttonRect.Left() += 1;
@@ -2216,7 +2203,7 @@ BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
if( nPart == PART_ENTIRE_CONTROL )
NWPaintOneEditBox( m_nScreen, gdkDrawable, &clipRect, nType, nPart, aEditBoxRect,
- nState, aValue, rControlHandle, rCaption );
+ nState, aValue, rCaption );
// Buttons must paint opaque since some themes have alpha-channel enabled buttons
gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE,
@@ -2247,7 +2234,6 @@ static Rectangle NWGetComboBoxButtonRect( int nScreen,
Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
- SalControlHandle&,
const OUString& )
{
Rectangle aButtonRect;
@@ -2302,7 +2288,7 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
const clipList&,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle&, const OUString& )
+ const OUString& )
{
GdkPixmap * pixmap;
Rectangle pixmapRect;
@@ -2444,7 +2430,7 @@ BOOL GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable,
const clipList& rClipList,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption )
+ const OUString& rCaption )
{
Rectangle pixmapRect;
Rectangle widgetRect;
@@ -2511,7 +2497,7 @@ BOOL GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable,
y+(widgetRect.Top() - pixmapRect.Top()),
widgetRect.GetWidth(), widgetRect.GetHeight() );
aIndicatorRect = NWGetListBoxIndicatorRect( m_nScreen, nType, nPart, widgetRect, nState,
- aValue, rControlHandle, rCaption );
+ aValue, rCaption );
gtk_paint_tab( gWidgetData[m_nScreen].gOptionMenuWidget->style, gdkDrawable, stateType, shadowType, &clipRect,
gWidgetData[m_nScreen].gOptionMenuWidget, "optionmenutab",
x+(aIndicatorRect.Left() - pixmapRect.Left()),
@@ -2538,7 +2524,7 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle&, const OUString& )
+ const OUString& )
{
GtkStateType stateType;
GtkShadowType shadowType;
@@ -2685,7 +2671,7 @@ BOOL GtkSalGraphics::NWPaintGTKMenubar(
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue&,
- SalControlHandle&, const OUString& )
+ const OUString& )
{
GtkStateType stateType;
GtkShadowType shadowType;
@@ -2770,7 +2756,7 @@ BOOL GtkSalGraphics::NWPaintGTKPopupMenu(
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue&,
- SalControlHandle&, const OUString& )
+ const OUString& )
{
// #i50745# gtk does not draw disabled menu entries (and crux theme
// even crashes), draw them using vcl functionality.
@@ -2900,7 +2886,7 @@ BOOL GtkSalGraphics::NWPaintGTKTooltip(
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState, const ImplControlValue&,
- SalControlHandle&, const OUString& )
+ const OUString& )
{
NWEnsureGTKTooltip( m_nScreen );
@@ -2938,7 +2924,7 @@ BOOL GtkSalGraphics::NWPaintGTKListNode(
const Rectangle& rControlRectangle,
const clipList&,
ControlState nState, const ImplControlValue& rValue,
- SalControlHandle&, const OUString& )
+ const OUString& )
{
NWEnsureGTKTreeView( m_nScreen );
@@ -2992,7 +2978,7 @@ BOOL GtkSalGraphics::NWPaintGTKProgress(
const Rectangle& rControlRectangle,
const clipList&,
ControlState, const ImplControlValue& rValue,
- SalControlHandle&, const OUString& )
+ const OUString& )
{
NWEnsureGTKProgressBar( m_nScreen );
@@ -3056,7 +3042,7 @@ BOOL GtkSalGraphics::NWPaintGTKSlider(
const Rectangle& rControlRectangle,
const clipList&,
ControlState nState, const ImplControlValue& rValue,
- SalControlHandle&, const OUString& )
+ const OUString& )
{
NWEnsureGTKSlider( m_nScreen );
@@ -3185,7 +3171,6 @@ static Rectangle NWGetListBoxButtonRect( int nScreen,
Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
- SalControlHandle&,
const OUString& )
{
Rectangle aPartRect;
@@ -3248,7 +3233,6 @@ static Rectangle NWGetListBoxIndicatorRect( int nScreen,
Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
- SalControlHandle&,
const OUString& )
{
Rectangle aIndicatorRect;
@@ -3295,7 +3279,6 @@ static Rectangle NWGetToolbarRect( int nScreen,
Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
- SalControlHandle&,
const OUString& )
{
Rectangle aRet;
diff --git a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
index ed3f782c8576..065b5435eeb0 100644
--- a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
@@ -64,15 +64,15 @@ public:
// native widget methods
virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- const Point& aPos, SalControlHandle& rControlHandle, BOOL& rIsInside );
+ const Point& aPos, BOOL& rIsInside );
virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& rCaption );
virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const rtl::OUString& rCaption );
+ const rtl::OUString& rCaption );
virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, const rtl::OUString& rCaption,
+ const ImplControlValue& aValue, const rtl::OUString& rCaption,
Region &rNativeBoundingRegion, Region &rNativeContentRegion );
//helper methods for frame's UpdateSettings
@@ -101,86 +101,86 @@ protected:
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKRadio( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKCheck( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKScrollbar( ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKEditBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKTabItem( ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKMenubar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKPopupMenu( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKTooltip( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKProgress( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKSlider( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL NWPaintGTKListNode( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const OUString& rCaption );
+ const OUString& rCaption );
BOOL drawNativeMixedStateCheck( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& rCaption );
};
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index ea9161235ac9..3adc9f5c679a 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -1177,18 +1177,18 @@ class KDESalGraphics : public X11SalGraphics
virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart,
const Region& rControlRegion, const Point& aPos,
- SalControlHandle& rControlHandle, BOOL& rIsInside );
+ BOOL& rIsInside );
virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart,
const Region& rControlRegion, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ const ImplControlValue& aValue,
const OUString& aCaption );
virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart,
const Region& rControlRegion, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ const ImplControlValue& aValue,
const OUString& aCaption );
virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart,
const Region& rControlRegion, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ const ImplControlValue& aValue,
const OUString& aCaption,
Region &rNativeBoundingRegion, Region &rNativeContentRegion );
};
@@ -1242,7 +1242,7 @@ BOOL KDESalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
*/
BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
const Region& rControlRegion, const Point& rPos,
- SalControlHandle&, BOOL& rIsInside )
+ BOOL& rIsInside )
{
if ( nType == CTRL_SCROLLBAR )
{
@@ -1344,15 +1344,12 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
@param aValue
An optional value (tristate/numerical/string).
- @param rControlHandle
- Carries platform dependent data and is maintained by the SalFrame implementation.
-
@param aCaption
A caption or title string (like button text etc.)
*/
BOOL KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart,
const Region& rControlRegion, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle&,
+ const ImplControlValue& aValue,
const OUString& )
{
BOOL bReturn = FALSE;
@@ -1489,15 +1486,12 @@ BOOL KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart,
@param aValue
An optional value (tristate/numerical/string)
- @param rControlHandle
- Carries platform dependent data and is maintained by the SalFrame implementation.
-
@param aCaption
A caption or title string (like button text etc.)
*/
BOOL KDESalGraphics::drawNativeControlText( ControlType, ControlPart,
const Region&, ControlState,
- const ImplControlValue&, SalControlHandle&,
+ const ImplControlValue&,
const OUString& )
{
return FALSE;
@@ -1517,15 +1511,12 @@ BOOL KDESalGraphics::drawNativeControlText( ControlType, ControlPart,
@param aValue
An optional value (tristate/numerical/string)
- @param rControlHandle
- Carries platform dependent data and is maintained by the SalFrame implementation.
-
@param aCaption
A caption or title string (like button text etc.)
*/
BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart,
const Region& rControlRegion, ControlState nState,
- const ImplControlValue&, SalControlHandle&,
+ const ImplControlValue&,
const OUString&,
Region &rNativeBoundingRegion, Region &rNativeContentRegion )
{
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 25dd50ce3958..e8d184e6539b 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -158,7 +158,7 @@ BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart par
BOOL KDESalGraphics::hitTestNativeControl( ControlType, ControlPart,
const Region&, const Point&,
- SalControlHandle&, BOOL& )
+ BOOL& )
{
return FALSE;
}
@@ -220,7 +220,7 @@ namespace
BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
const Region& rControlRegion, ControlState nControlState,
- const ImplControlValue& value, SalControlHandle&,
+ const ImplControlValue& value,
const OUString& )
{
// put not implemented types here
@@ -567,7 +567,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
const Region& controlRegion, ControlState controlState,
- const ImplControlValue& val, SalControlHandle&,
+ const ImplControlValue& val,
const OUString&,
Region &nativeBoundingRegion, Region &nativeContentRegion )
{
diff --git a/vcl/unx/kde4/KDESalGraphics.hxx b/vcl/unx/kde4/KDESalGraphics.hxx
index b5328f462a16..5661d743e0cd 100644
--- a/vcl/unx/kde4/KDESalGraphics.hxx
+++ b/vcl/unx/kde4/KDESalGraphics.hxx
@@ -59,7 +59,7 @@ class KDESalGraphics : public X11SalGraphics
*/
virtual BOOL hitTestNativeControl( ControlType type, ControlPart part,
const Region& rControlRegion, const Point& aPos,
- SalControlHandle& rControlHandle, BOOL& rIsInside );
+ BOOL& rIsInside );
/** Draw the requested control described by part/nControlState.
@param rControlRegion
@@ -68,15 +68,12 @@ class KDESalGraphics : public X11SalGraphics
@param aValue
An optional value (tristate/numerical/string).
- @param rControlHandle
- Carries platform dependent data and is maintained by the SalFrame implementation.
-
@param aCaption
A caption or title string (like button text etc.)
*/
virtual BOOL drawNativeControl( ControlType type, ControlPart part,
const Region& rControlRegion, ControlState nControlState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ const ImplControlValue& aValue,
const rtl::OUString& aCaption );
/** Draw text on the widget.
@@ -85,12 +82,11 @@ class KDESalGraphics : public X11SalGraphics
@param rControlRegion The bounding region of the complete control in VCL frame coordinates.
@param aValue An optional value (tristate/numerical/string)
- @param rControlHandle Carries platform dependent data and is maintained by the SalFrame implementation.
@param aCaption A caption or title string (like button text etc.)
*/
virtual BOOL drawNativeControlText( ControlType, ControlPart,
const Region&, ControlState,
- const ImplControlValue&, SalControlHandle&,
+ const ImplControlValue&,
const rtl::OUString& ) { return false; }
/** Check if the bounding regions match.
@@ -106,15 +102,12 @@ class KDESalGraphics : public X11SalGraphics
@param aValue
An optional value (tristate/numerical/string)
- @param rControlHandle
- Carries platform dependent data and is maintained by the SalFrame implementation.
-
@param aCaption
A caption or title string (like button text etc.)
*/
virtual BOOL getNativeControlRegion( ControlType type, ControlPart part,
const Region& rControlRegion, ControlState nControlState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ const ImplControlValue& aValue,
const rtl::OUString& aCaption,
Region &rNativeBoundingRegion, Region &rNativeContentRegion );
}; \ No newline at end of file
diff --git a/vcl/win/inc/salgdi.h b/vcl/win/inc/salgdi.h
index 6b58e0c5375a..4b97eeb98c0b 100644
--- a/vcl/win/inc/salgdi.h
+++ b/vcl/win/inc/salgdi.h
@@ -228,15 +228,15 @@ protected:
// native widget rendering methods that require mirroring
virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- const Point& aPos, SalControlHandle& rControlHandle, BOOL& rIsInside );
+ const Point& aPos, BOOL& rIsInside );
virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
- SalControlHandle& rControlHandle, const rtl::OUString& aCaption );
+ const rtl::OUString& aCaption );
virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
- const ImplControlValue& aValue, SalControlHandle& rControlHandle, const rtl::OUString& aCaption,
+ const ImplControlValue& aValue, const rtl::OUString& aCaption,
Region &rNativeBoundingRegion, Region &rNativeContentRegion );
virtual bool drawAlphaBitmap( const SalTwoRect&,
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index d1f11433d532..be5d7f8360bc 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -319,7 +319,6 @@ BOOL WinSalGraphics::hitTestNativeControl( ControlType,
ControlPart,
const Region&,
const Point&,
- SalControlHandle&,
BOOL& )
{
return FALSE;
@@ -425,7 +424,6 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
ControlPart nPart,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle&,
OUString aCaption )
{
// a listbox dropdown is actually a combobox dropdown
@@ -961,7 +959,6 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
*
* rControlRegion: The bounding region of the complete control in VCL frame coordinates.
* aValue: An optional value (tristate/numerical/string)
- * rControlHandle: Carries platform dependent data and is maintained by the WinSalGraphics implementation.
* aCaption: A caption or title string (like button text etc)
*/
BOOL WinSalGraphics::drawNativeControl( ControlType nType,
@@ -969,7 +966,6 @@ BOOL WinSalGraphics::drawNativeControl( ControlType nType,
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
- SalControlHandle& rControlHandle,
const OUString& aCaption )
{
BOOL bOk = false;
@@ -1060,7 +1056,7 @@ BOOL WinSalGraphics::drawNativeControl( ControlType nType,
OUString aCaptionStr( aCaption.replace('~', '&') ); // translate mnemonics
bOk = ImplDrawNativeControl(mhDC, hTheme, rc,
nType, nPart, nState, aValue,
- rControlHandle, aCaptionStr );
+ aCaptionStr );
// restore alignment
SetTextAlign( mhDC, ta );
@@ -1080,7 +1076,6 @@ BOOL WinSalGraphics::drawNativeControl( ControlType nType,
*
* rControlRegion: The bounding region of the complete control in VCL frame coordinates.
* aValue: An optional value (tristate/numerical/string)
- * rControlHandle: Carries platform dependent data and is maintained by the WinSalGraphics implementation.
* aCaption: A caption or title string (like button text etc)
*/
BOOL WinSalGraphics::drawNativeControlText( ControlType,
@@ -1088,7 +1083,6 @@ BOOL WinSalGraphics::drawNativeControlText( ControlType,
const Region&,
ControlState,
const ImplControlValue&,
- SalControlHandle&,
const OUString& )
{
return( false );
@@ -1106,15 +1100,13 @@ BOOL WinSalGraphics::drawNativeControlText( ControlType,
*
* rControlRegion: The bounding region of the control in VCL frame coordinates.
* aValue: An optional value (tristate/numerical/string)
- * rControlHandle: Carries platform dependent data and is maintained by the WinSalGraphics implementation.
* aCaption: A caption or title string (like button text etc)
*/
BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
- ControlState,
- const ImplControlValue&,
- SalControlHandle&,
+ ControlState nState,
+ const ImplControlValue& rControlValue,
const OUString&,
Region &rNativeBoundingRegion,
Region &rNativeContentRegion )
@@ -1230,6 +1222,7 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
}
}
}
+
if( nType == CTRL_SLIDER && ( (nPart == PART_THUMB_HORZ) || (nPart == PART_THUMB_VERT) ) )
{
HTHEME hTheme = getThemeHandle( mhWnd, L"Trackbar");
@@ -1258,6 +1251,37 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
}
}
+ if ( ( nType == CTRL_TAB_ITEM ) && ( nPart == PART_ENTIRE_CONTROL ) )
+ {
+ Rectangle aControlRect( rControlRegion.GetBoundRect() );
+ rNativeContentRegion = aControlRect;
+
+ --aControlRect.Bottom();
+
+ TabitemValue *pValue = static_cast< TabitemValue* >( rControlValue.getOptionalVal() );
+ if ( pValue )
+ {
+ if ( pValue->isBothAligned() )
+ --aControlRect.Right();
+ }
+
+ if ( nState & CTRL_STATE_SELECTED )
+ {
+ aControlRect.Left() -= 2;
+ if ( pValue && !pValue->isBothAligned() )
+ {
+ if ( pValue->isLeftAligned() || pValue->isNotAligned() )
+ aControlRect.Right() += 2;
+ if ( pValue->isRightAligned() )
+ aControlRect.Right() += 1;
+ }
+ aControlRect.Top() -= 2;
+ aControlRect.Bottom() += 2;
+ }
+ rNativeBoundingRegion = aControlRect;
+ bRet = TRUE;
+ }
+
ReleaseDC( mhWnd, hDC );
return( bRet );
}
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index ba19f2255646..ba19f2255646 100644..100755
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx