2010-10-14 01:27:31 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2007-04-11 12:08:04 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 01:57:07 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2007-04-11 12:08:04 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2007-04-11 12:08:04 -05:00
|
|
|
*
|
2008-04-11 01:57:07 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2007-04-11 12:08:04 -05:00
|
|
|
*
|
2008-04-11 01:57:07 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2007-04-11 12:08:04 -05:00
|
|
|
*
|
2008-04-11 01:57:07 -05:00
|
|
|
* 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.
|
2007-04-11 12:08:04 -05:00
|
|
|
*
|
2008-04-11 01:57:07 -05:00
|
|
|
* 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).
|
2007-04-11 12:08:04 -05:00
|
|
|
*
|
2008-04-11 01:57:07 -05:00
|
|
|
* 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.
|
2007-04-11 12:08:04 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _SV_SALOBJ_HXX
|
|
|
|
#define _SV_SALOBJ_HXX
|
|
|
|
|
2012-06-10 11:26:30 -05:00
|
|
|
#include <tools/solar.h>
|
2007-04-11 12:08:04 -05:00
|
|
|
#include <vcl/dllapi.h>
|
|
|
|
#include <vcl/salgtype.hxx>
|
2011-01-24 09:34:14 -06:00
|
|
|
#include <salwtype.hxx>
|
2007-04-11 12:08:04 -05:00
|
|
|
|
|
|
|
struct SystemEnvData;
|
|
|
|
|
|
|
|
// -------------------
|
|
|
|
// - SalObject-Types -
|
|
|
|
// -------------------
|
|
|
|
|
2010-09-29 02:46:40 -05:00
|
|
|
#define SAL_OBJECT_CLIP_INCLUDERECTS ((sal_uInt16)0x0001)
|
|
|
|
#define SAL_OBJECT_CLIP_EXCLUDERECTS ((sal_uInt16)0x0002)
|
|
|
|
#define SAL_OBJECT_CLIP_ABSOLUTE ((sal_uInt16)0x0004)
|
2007-04-11 12:08:04 -05:00
|
|
|
|
|
|
|
// -------------
|
|
|
|
// - SalObject -
|
|
|
|
// -------------
|
|
|
|
|
2010-12-08 06:53:30 -06:00
|
|
|
class VCL_PLUGIN_PUBLIC SalObject
|
2007-04-11 12:08:04 -05:00
|
|
|
{
|
|
|
|
void* m_pInst;
|
|
|
|
SALOBJECTPROC m_pCallback;
|
2010-09-29 02:46:40 -05:00
|
|
|
sal_Bool m_bMouseTransparent:1,
|
2007-04-11 12:08:04 -05:00
|
|
|
m_bEraseBackground:1;
|
|
|
|
public:
|
2010-09-29 02:46:40 -05:00
|
|
|
SalObject() : m_pInst( NULL ), m_pCallback( NULL ), m_bMouseTransparent( sal_False ), m_bEraseBackground( sal_True ) {}
|
2007-04-11 12:08:04 -05:00
|
|
|
virtual ~SalObject();
|
|
|
|
|
|
|
|
virtual void ResetClipRegion() = 0;
|
2010-09-29 02:46:40 -05:00
|
|
|
virtual sal_uInt16 GetClipRegionType() = 0;
|
2011-01-12 08:07:10 -06:00
|
|
|
virtual void BeginSetClipRegion( sal_uLong nRects ) = 0;
|
2007-04-11 12:08:04 -05:00
|
|
|
virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
|
|
|
|
virtual void EndSetClipRegion() = 0;
|
|
|
|
|
|
|
|
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) = 0;
|
2010-09-29 02:46:40 -05:00
|
|
|
virtual void Show( sal_Bool bVisible ) = 0;
|
2012-02-22 04:38:31 -06:00
|
|
|
virtual void Enable( sal_Bool /* nEnable */ ) {}
|
2012-02-22 03:37:42 -06:00
|
|
|
virtual void GrabFocus() {}
|
2007-04-11 12:08:04 -05:00
|
|
|
|
2012-02-22 03:37:42 -06:00
|
|
|
virtual void SetBackground() {}
|
2012-02-22 04:38:31 -06:00
|
|
|
virtual void SetBackground( SalColor /* nSalColor */ ) {}
|
2007-04-11 12:08:04 -05:00
|
|
|
|
2012-02-22 04:38:31 -06:00
|
|
|
virtual void SetForwardKey( sal_Bool /* bEnable */ ) {}
|
2010-09-16 08:34:55 -05:00
|
|
|
|
2007-04-11 12:08:04 -05:00
|
|
|
virtual const SystemEnvData* GetSystemData() const = 0;
|
|
|
|
|
|
|
|
void SetCallback( void* pInst, SALOBJECTPROC pProc )
|
|
|
|
{ m_pInst = pInst; m_pCallback = pProc; }
|
2010-09-29 02:46:40 -05:00
|
|
|
long CallCallback( sal_uInt16 nEvent, const void* pEvent )
|
2007-04-11 12:08:04 -05:00
|
|
|
{ return m_pCallback ? m_pCallback( m_pInst, this, nEvent, pEvent ) : 0; }
|
2010-09-29 02:46:40 -05:00
|
|
|
void SetMouseTransparent( sal_Bool bMouseTransparent )
|
2007-04-11 12:08:04 -05:00
|
|
|
{ m_bMouseTransparent = bMouseTransparent; }
|
2010-09-29 02:46:40 -05:00
|
|
|
sal_Bool IsMouseTransparent()
|
2007-04-11 12:08:04 -05:00
|
|
|
{ return m_bMouseTransparent; }
|
2010-09-29 02:46:40 -05:00
|
|
|
void EnableEraseBackground( sal_Bool bEnable )
|
2007-04-11 12:08:04 -05:00
|
|
|
{ m_bEraseBackground = bEnable; }
|
2010-09-29 02:46:40 -05:00
|
|
|
sal_Bool IsEraseBackgroundEnabled()
|
2007-04-11 12:08:04 -05:00
|
|
|
{ return m_bEraseBackground; }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _SV_SALOBJ_HXX
|
2010-10-14 01:27:31 -05:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|