915bd2f5f1
2007/02/28 07:29:11 fs 1.1.2.4: #i10000# 2007/02/27 12:37:30 fs 1.1.2.3: manual RESYNC: merge MWS-changes which happened from m185 to m204 2005/09/28 11:35:33 fs 1.1.2.2: manual resync (files have been moved herein from another location): licence change 2005/03/07 08:29:06 fs 1.1.2.1: #i44293# moved implementations herein from toolkit module
127 lines
4.2 KiB
C++
127 lines
4.2 KiB
C++
/*************************************************************************
|
|
*
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
|
*
|
|
* $RCSfile: vclxaccessiblepopupmenu.cxx,v $
|
|
*
|
|
* $Revision: 1.2 $
|
|
*
|
|
* last change: $Author: hr $ $Date: 2007-06-27 15:40:03 $
|
|
*
|
|
* The Contents of this file are made available subject to
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
|
*
|
|
*
|
|
* GNU Lesser General Public License Version 2.1
|
|
* =============================================
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License version 2.1, as published by the Free Software Foundation.
|
|
*
|
|
* This library 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 for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
* MA 02111-1307 USA
|
|
*
|
|
************************************************************************/
|
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
#include "precompiled_accessibility.hxx"
|
|
|
|
#ifndef ACCESSIBILITY_STANDARD_VCLXACCESSIBLEPOPUPMENU_HXX
|
|
#include <accessibility/standard/vclxaccessiblepopupmenu.hxx>
|
|
#endif
|
|
|
|
#ifndef _COM_SUN_STAR_ACCESSIBILITY_STANDARD_ACCESSIBLEROLE_HPP_
|
|
#include <com/sun/star/accessibility/AccessibleRole.hpp>
|
|
#endif
|
|
|
|
#ifndef _SV_SVAPP_HXX
|
|
#include <vcl/svapp.hxx>
|
|
#endif
|
|
|
|
using namespace ::com::sun::star::accessibility;
|
|
using namespace ::com::sun::star::uno;
|
|
using namespace ::comphelper;
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// class VCLXAccessiblePopupMenu
|
|
// -----------------------------------------------------------------------------
|
|
|
|
VCLXAccessiblePopupMenu::VCLXAccessiblePopupMenu( Menu* pMenu )
|
|
:OAccessibleMenuComponent( pMenu )
|
|
{
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
VCLXAccessiblePopupMenu::~VCLXAccessiblePopupMenu()
|
|
{
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
sal_Bool VCLXAccessiblePopupMenu::IsFocused()
|
|
{
|
|
return !IsChildHighlighted();
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// XServiceInfo
|
|
// -----------------------------------------------------------------------------
|
|
|
|
::rtl::OUString VCLXAccessiblePopupMenu::getImplementationName() throw (RuntimeException)
|
|
{
|
|
return ::rtl::OUString::createFromAscii( "com.sun.star.comp.toolkit.AccessiblePopupMenu" );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
Sequence< ::rtl::OUString > VCLXAccessiblePopupMenu::getSupportedServiceNames() throw (RuntimeException)
|
|
{
|
|
Sequence< ::rtl::OUString > aNames(1);
|
|
aNames[0] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.AccessiblePopupMenu" );
|
|
return aNames;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// XAccessibleContext
|
|
// -----------------------------------------------------------------------------
|
|
|
|
sal_Int32 VCLXAccessiblePopupMenu::getAccessibleIndexInParent( ) throw (RuntimeException)
|
|
{
|
|
OExternalLockGuard aGuard( this );
|
|
|
|
return 0;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
sal_Int16 VCLXAccessiblePopupMenu::getAccessibleRole( ) throw (RuntimeException)
|
|
{
|
|
OExternalLockGuard aGuard( this );
|
|
|
|
return AccessibleRole::POPUP_MENU;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// XAccessibleExtendedComponent
|
|
// -----------------------------------------------------------------------------
|
|
|
|
sal_Int32 VCLXAccessiblePopupMenu::getBackground( ) throw (RuntimeException)
|
|
{
|
|
OExternalLockGuard aGuard( this );
|
|
|
|
return Application::GetSettings().GetStyleSettings().GetMenuColor().GetColor();
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|