slidecopy: moved the native widget rendering functions from Window to OutputDevice

This allows to render native widgets onto a virtual device (on platform/theme combinations
where this is possible).
At the same time, removed the SalControlHandle parameter from all thos functions. It was nowehere used, and
all callers always passed *NULL, anyway.
This commit is contained in:
Frank Schoenheit [fs] 2010-03-03 11:08:18 +01:00
parent 270d3a6d94
commit accdb573f7
20 changed files with 462 additions and 482 deletions

View file

@ -233,15 +233,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

View file

@ -378,7 +378,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 )
{
@ -466,7 +466,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,
@ -474,7 +473,6 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
SalControlHandle& rControlHandle,
const rtl::OUString& aCaption )
{
BOOL bOK = FALSE;
@ -1194,12 +1192,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 );
}
@ -1216,11 +1213,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 )
{

View file

@ -42,6 +42,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>
@ -1157,6 +1158,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

View file

@ -162,15 +162,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
@ -444,7 +444,6 @@ public:
ControlPart nPart,
const Region& rControlRegion,
const Point& aPos,
SalControlHandle& rControlHandle,
BOOL& rIsInside,
const OutputDevice *pOutDev );
@ -454,7 +453,6 @@ public:
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
SalControlHandle& rControlHandle,
const rtl::OUString& aCaption,
const OutputDevice *pOutDev );
@ -464,7 +462,6 @@ public:
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
SalControlHandle& rControlHandle,
const rtl::OUString& aCaption,
const OutputDevice *pOutDev );
@ -474,7 +471,6 @@ public:
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
SalControlHandle& rControlHandle,
const rtl::OUString& aCaption,
Region &rNativeBoundingRegion,
Region &rNativeContentRegion,

View file

@ -59,7 +59,6 @@ class VirtualDevice;
class Cursor;
class ImplDevFontList;
class ImplFontCache;
class SalControlHandle;
class SmartId;
class VCLXWindow;
class SalFrame;
@ -123,7 +122,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;

View file

@ -557,14 +557,12 @@ public:
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.
@ -1095,44 +1093,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 );

View file

@ -200,15 +200,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

View file

@ -110,6 +110,7 @@ SLOFILES= $(EXCEPTIONSFILES) \
$(SLO)$/outdev4.obj \
$(SLO)$/outdev5.obj \
$(SLO)$/outdev6.obj \
$(SLO)$/outdevnative.obj \
$(SLO)$/regband.obj \
$(SLO)$/region.obj \
$(SLO)$/wall.obj \

View file

@ -0,0 +1,287 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: window3.cxx,v $
* $Revision: 1.13 $
*
* 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_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;
}

View file

@ -672,7 +672,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()) )
{
@ -680,10 +680,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
@ -719,7 +719,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()) )
@ -727,33 +727,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()) )
@ -761,7 +761,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 );
@ -776,7 +776,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 );
}

View file

@ -63,7 +63,6 @@ BOOL SalGraphics::hitTestNativeControl( ControlType,
ControlPart,
const Region&,
const Point&,
SalControlHandle&,
BOOL& )
{
return( FALSE );
@ -77,7 +76,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,
@ -85,7 +83,6 @@ BOOL SalGraphics::drawNativeControl( ControlType,
const Region&,
ControlState,
const ImplControlValue&,
SalControlHandle&,
const OUString& )
{
return( FALSE );
@ -100,7 +97,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,
@ -108,7 +104,6 @@ BOOL SalGraphics::drawNativeControlText( ControlType,
const Region&,
ControlState,
const ImplControlValue&,
SalControlHandle&,
const OUString& )
{
return( FALSE );
@ -126,7 +121,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,
@ -134,7 +128,6 @@ BOOL SalGraphics::getNativeControlRegion( ControlType,
const Region&,
ControlState,
const ImplControlValue&,
SalControlHandle&,
const OUString&,
Region &,
Region & )

View file

@ -1318,7 +1318,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;
}
@ -4718,10 +4717,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 )

View file

@ -31,263 +31,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_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()

View file

@ -187,34 +187,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,
@ -222,7 +222,6 @@ static Rectangle NWGetToolbarRect( int nScreen,
Rectangle aAreaRect,
ControlState nState,
const ImplControlValue& aValue,
SalControlHandle& rControlHandle,
const OUString& rCaption );
//---
@ -611,7 +610,6 @@ BOOL GtkSalGraphics::hitTestNativeControl( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
const Point& aPos,
SalControlHandle&,
BOOL& rIsInside )
{
if ( ( nType == CTRL_SCROLLBAR ) &&
@ -716,7 +714,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,
@ -724,13 +721,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;
@ -793,61 +789,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)
@ -857,19 +853,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) )
{
@ -891,7 +887,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
@ -914,7 +909,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 )
{
@ -925,7 +920,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
@ -944,7 +939,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,
@ -952,7 +946,6 @@ BOOL GtkSalGraphics::drawNativeControlText( ControlType,
const Region&,
ControlState,
const ImplControlValue&,
SalControlHandle&,
const OUString& )
{
return( FALSE );
@ -970,7 +963,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,
@ -978,7 +970,6 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
SalControlHandle& rControlHandle,
const OUString& rCaption,
Region &rNativeBoundingRegion,
Region &rNativeContentRegion )
@ -990,7 +981,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;
@ -998,7 +989,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;
@ -1007,7 +998,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
{
rNativeBoundingRegion = NWGetSpinButtonRect( m_nScreen, nType, nPart, rControlRegion.GetBoundRect(), nState,
aValue, rControlHandle, rCaption );
aValue, rCaption );
rNativeContentRegion = rNativeBoundingRegion;
returnVal = TRUE;
@ -1015,7 +1006,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;
@ -1028,7 +1019,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;
}
@ -1118,7 +1109,7 @@ BOOL GtkSalGraphics::NWPaintGTKButton(
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue&,
SalControlHandle&, const OUString& )
const OUString& )
{
GtkStateType stateType;
GtkShadowType shadowType;
@ -1231,7 +1222,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;
@ -1287,7 +1278,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;
@ -1346,7 +1337,7 @@ BOOL GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
const clipList& rClipList,
ControlState nState,
const ImplControlValue& aValue,
SalControlHandle&, const OUString& )
const OUString& )
{
GtkStateType stateType;
GtkShadowType shadowType;
@ -1401,7 +1392,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());
@ -1807,7 +1798,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;
@ -1816,7 +1807,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();
@ -1824,7 +1815,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 );
@ -1841,7 +1832,6 @@ static Rectangle NWGetEditBoxPixmapRect(int nScreen,
Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
SalControlHandle&,
const OUString& )
{
Rectangle pixmapRect = aAreaRect;
@ -1878,7 +1868,6 @@ static void NWPaintOneEditBox( int nScreen,
Rectangle aEditBoxRect,
ControlState nState,
const ImplControlValue&,
SalControlHandle&,
const OUString& )
{
GtkStateType stateType;
@ -1947,7 +1936,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;
@ -1995,8 +1984,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) )
{
@ -2006,7 +1995,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 );
@ -2023,8 +2012,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) )
{
@ -2044,7 +2033,6 @@ static Rectangle NWGetSpinButtonRect( int nScreen,
Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
SalControlHandle&,
const OUString& )
{
gint buttonSize;
@ -2088,7 +2076,6 @@ static void NWPaintOneSpinButton( int nScreen,
Rectangle aAreaRect,
ControlState nState,
const ImplControlValue& aValue,
SalControlHandle& rControlHandle,
const OUString& rCaption )
{
Rectangle buttonRect;
@ -2100,7 +2087,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,
@ -2132,7 +2119,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;
@ -2157,7 +2144,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;
@ -2179,7 +2166,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,
@ -2210,7 +2197,6 @@ static Rectangle NWGetComboBoxButtonRect( int nScreen,
Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
SalControlHandle&,
const OUString& )
{
Rectangle aButtonRect;
@ -2265,7 +2251,7 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
const clipList&,
ControlState nState,
const ImplControlValue& aValue,
SalControlHandle&, const OUString& )
const OUString& )
{
GdkPixmap * pixmap;
Rectangle pixmapRect;
@ -2407,7 +2393,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;
@ -2474,7 +2460,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()),
@ -2501,7 +2487,7 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
SalControlHandle&, const OUString& )
const OUString& )
{
GtkStateType stateType;
GtkShadowType shadowType;
@ -2648,7 +2634,7 @@ BOOL GtkSalGraphics::NWPaintGTKMenubar(
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue&,
SalControlHandle&, const OUString& )
const OUString& )
{
GtkStateType stateType;
GtkShadowType shadowType;
@ -2733,7 +2719,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.
@ -2863,7 +2849,7 @@ BOOL GtkSalGraphics::NWPaintGTKTooltip(
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState, const ImplControlValue&,
SalControlHandle&, const OUString& )
const OUString& )
{
NWEnsureGTKTooltip( m_nScreen );
@ -2901,7 +2887,7 @@ BOOL GtkSalGraphics::NWPaintGTKListNode(
const Rectangle& rControlRectangle,
const clipList&,
ControlState nState, const ImplControlValue& rValue,
SalControlHandle&, const OUString& )
const OUString& )
{
NWEnsureGTKTreeView( m_nScreen );
@ -2955,7 +2941,7 @@ BOOL GtkSalGraphics::NWPaintGTKProgress(
const Rectangle& rControlRectangle,
const clipList&,
ControlState, const ImplControlValue& rValue,
SalControlHandle&, const OUString& )
const OUString& )
{
NWEnsureGTKProgressBar( m_nScreen );
@ -3021,7 +3007,6 @@ static Rectangle NWGetListBoxButtonRect( int nScreen,
Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
SalControlHandle&,
const OUString& )
{
Rectangle aPartRect;
@ -3084,7 +3069,6 @@ static Rectangle NWGetListBoxIndicatorRect( int nScreen,
Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
SalControlHandle&,
const OUString& )
{
Rectangle aIndicatorRect;
@ -3131,7 +3115,6 @@ static Rectangle NWGetToolbarRect( int nScreen,
Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
SalControlHandle&,
const OUString& )
{
Rectangle aRet;

View file

@ -67,15 +67,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
@ -104,81 +104,81 @@ 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 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 );
};

View file

@ -1180,18 +1180,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 );
};
@ -1245,7 +1245,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 )
{
@ -1347,15 +1347,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;
@ -1492,15 +1489,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;
@ -1520,15 +1514,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 )
{

View file

@ -146,7 +146,7 @@ BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart par
BOOL KDESalGraphics::hitTestNativeControl( ControlType, ControlPart,
const Region&, const Point&,
SalControlHandle&, BOOL& )
BOOL& )
{
return FALSE;
}
@ -177,7 +177,7 @@ void lcl_drawFrame( QRect& i_rRect, QPainter& i_rPainter, QStyle::PrimitiveEleme
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
@ -554,7 +554,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 )
{

View file

@ -53,7 +53,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
@ -62,15 +62,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.
@ -79,12 +76,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.
@ -100,15 +96,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 );
};

View file

@ -231,15 +231,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&,

View file

@ -314,7 +314,6 @@ BOOL WinSalGraphics::hitTestNativeControl( ControlType,
ControlPart,
const Region&,
const Point&,
SalControlHandle&,
BOOL& )
{
return FALSE;
@ -420,7 +419,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
@ -903,7 +901,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,
@ -911,7 +908,6 @@ BOOL WinSalGraphics::drawNativeControl( ControlType nType,
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
SalControlHandle& rControlHandle,
const OUString& aCaption )
{
BOOL bOk = false;
@ -994,7 +990,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 );
@ -1014,7 +1010,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,
@ -1022,7 +1017,6 @@ BOOL WinSalGraphics::drawNativeControlText( ControlType,
const Region&,
ControlState,
const ImplControlValue&,
SalControlHandle&,
const OUString& )
{
return( false );
@ -1040,7 +1034,6 @@ 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,
@ -1048,7 +1041,6 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
const Region& rControlRegion,
ControlState,
const ImplControlValue&,
SalControlHandle&,
const OUString&,
Region &rNativeBoundingRegion,
Region &rNativeContentRegion )
@ -1166,6 +1158,10 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
}
}
if ( ( nType == CTRL_TAB_ITEM ) && ( nType == PART_ENTIRE_CONTROL ) )
{
}
ReleaseDC( mhWnd, hDC );
return( bRet );
}