LCOV - code coverage report
Current view: top level - libreoffice/accessibility/inc/accessibility/standard - vclxaccessibletoolboxitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 5 0.0 %
Date: 2012-12-17 Functions: 0 5 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : #ifndef ACCESSIBILITY_STANDARD_VCLXACCESSIBLETOOLBOXITEM_HXX
      20             : #define ACCESSIBILITY_STANDARD_VCLXACCESSIBLETOOLBOXITEM_HXX
      21             : 
      22             : #include <com/sun/star/accessibility/XAccessible.hpp>
      23             : #include <com/sun/star/accessibility/XAccessibleAction.hpp>
      24             : #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
      25             : #include <com/sun/star/accessibility/XAccessibleContext.hpp>
      26             : #include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
      27             : #include <com/sun/star/accessibility/XAccessibleText.hpp>
      28             : #include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
      29             : #include <com/sun/star/accessibility/XAccessibleValue.hpp>
      30             : #include <com/sun/star/lang/XServiceInfo.hpp>
      31             : #include <cppuhelper/implbase4.hxx>
      32             : #include <comphelper/accessibletexthelper.hxx>
      33             : #include <tools/solar.h>
      34             : 
      35             : // class VCLXAccessibleToolBoxItem ---------------------------------------------
      36             : 
      37             : class ToolBox;
      38             : 
      39             : typedef ::comphelper::OAccessibleTextHelper AccessibleTextHelper_BASE;
      40             : typedef ::cppu::ImplHelper4 < ::com::sun::star::accessibility::XAccessible,
      41             :                               ::com::sun::star::accessibility::XAccessibleAction,
      42             :                               ::com::sun::star::accessibility::XAccessibleValue,
      43             :                               ::com::sun::star::lang::XServiceInfo > VCLXAccessibleToolBoxItem_BASE;
      44             : 
      45             : class VCLExternalSolarLock;
      46             : 
      47             : class VCLXAccessibleToolBoxItem : public AccessibleTextHelper_BASE,
      48             :                                   public VCLXAccessibleToolBoxItem_BASE
      49             : {
      50             : private:
      51             :     OUString                m_sOldName;
      52             :     ToolBox*                m_pToolBox;
      53             :     VCLExternalSolarLock*   m_pExternalLock;
      54             :     sal_Int32               m_nIndexInParent;
      55             :     sal_Int16               m_nRole;
      56             :     sal_uInt16                  m_nItemId;
      57             :     sal_Bool                m_bHasFocus;
      58             :     sal_Bool                m_bIsChecked;
      59             :     bool                    m_bIndeterminate;
      60             : 
      61             :     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >    m_xChild;
      62             : 
      63             : public:
      64           0 :     inline sal_Int32    getIndexInParent() const                    { return m_nIndexInParent; }
      65           0 :     inline void         setIndexInParent( sal_Int32 _nNewIndex )    { m_nIndexInParent = _nNewIndex; }
      66             : 
      67             : protected:
      68             :     virtual ~VCLXAccessibleToolBoxItem();
      69             : 
      70             :     virtual void SAL_CALL                   disposing();
      71             : 
      72             :     /// implements the calculation of the bounding rectangle
      73             :     virtual ::com::sun::star::awt::Rectangle SAL_CALL   implGetBounds(  ) throw (::com::sun::star::uno::RuntimeException);
      74             : 
      75             :     // OCommonAccessibleText
      76             :     virtual OUString                                    implGetText();
      77             :     virtual ::com::sun::star::lang::Locale              implGetLocale();
      78             :     virtual void                                        implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex );
      79             : 
      80             :     OUString GetText( bool _bAsName );
      81             : 
      82             : public:
      83             :     VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_Int32 _nPos );
      84             : 
      85             :     void                SetFocus( sal_Bool _bFocus );
      86           0 :     inline sal_Bool     HasFocus() const { return m_bHasFocus; }
      87             :     void                SetChecked( sal_Bool _bCheck );
      88             :     inline sal_Bool     IsChecked() const { return m_bIsChecked; }
      89             :     void                SetIndeterminate( bool _bIndeterminate );
      90             :     inline bool         IsIndeterminate() const { return m_bIndeterminate; }
      91           0 :     inline void         ReleaseToolBox() { m_pToolBox = NULL; }
      92             :     void                NameChanged();
      93             :     void                SetChild( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xChild );
      94             :     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
      95           0 :                         GetChild() const { return m_xChild; }
      96             :     void                NotifyChildEvent( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xChild, bool _bShow );
      97             : 
      98             :     void                ToggleEnableState();
      99             : 
     100             :     // XInterface
     101             :     DECLARE_XINTERFACE( )
     102             :     DECLARE_XTYPEPROVIDER( )
     103             : 
     104             :     // XServiceInfo
     105             :     virtual OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
     106             :     virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (::com::sun::star::uno::RuntimeException);
     107             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
     108             : 
     109             :     // XAccessible
     110             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException);
     111             : 
     112             :     // XAccessibleContext
     113             :     virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
     114             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     115             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent(  ) throw (::com::sun::star::uno::RuntimeException);
     116             :     virtual sal_Int32 SAL_CALL getAccessibleIndexInParent(  ) throw (::com::sun::star::uno::RuntimeException);
     117             :     virtual sal_Int16 SAL_CALL getAccessibleRole(  ) throw (::com::sun::star::uno::RuntimeException);
     118             :     virtual OUString SAL_CALL getAccessibleDescription(  ) throw (::com::sun::star::uno::RuntimeException);
     119             :     virtual OUString SAL_CALL getAccessibleName(  ) throw (::com::sun::star::uno::RuntimeException);
     120             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet(  ) throw (::com::sun::star::uno::RuntimeException);
     121             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet(  ) throw (::com::sun::star::uno::RuntimeException);
     122             : 
     123             :     // XAccessibleText
     124             :     virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
     125             :     virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     126             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     127             :     virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     128             :     virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
     129             :     virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     130             :     virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     131             : 
     132             :     // XAccessibleComponent
     133             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
     134             :     virtual void SAL_CALL grabFocus(  ) throw (::com::sun::star::uno::RuntimeException);
     135             :     virtual sal_Int32 SAL_CALL getForeground(  ) throw (::com::sun::star::uno::RuntimeException);
     136             :     virtual sal_Int32 SAL_CALL getBackground(  ) throw (::com::sun::star::uno::RuntimeException);
     137             : 
     138             :     // XAccessibleExtendedComponent
     139             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont(  ) throw (::com::sun::star::uno::RuntimeException);
     140             :     virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getFontMetrics( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont >& xFont ) throw (::com::sun::star::uno::RuntimeException);
     141             :     virtual OUString SAL_CALL getTitledBorderText(  ) throw (::com::sun::star::uno::RuntimeException);
     142             :     virtual OUString SAL_CALL getToolTipText(  ) throw (::com::sun::star::uno::RuntimeException);
     143             : 
     144             :     // XAccessibleAction
     145             :     virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (::com::sun::star::uno::RuntimeException);
     146             :     virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     147             :     virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     148             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     149             : 
     150             :     // XAccessibleValue
     151             :     virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue(  ) throw (::com::sun::star::uno::RuntimeException);
     152             :     virtual sal_Bool SAL_CALL setCurrentValue( const ::com::sun::star::uno::Any& aNumber ) throw (::com::sun::star::uno::RuntimeException);
     153             :     virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue(  ) throw (::com::sun::star::uno::RuntimeException);
     154             :     virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue(  ) throw (::com::sun::star::uno::RuntimeException);
     155             : };
     156             : 
     157             : #endif // ACCESSIBILITY_STANDARD_VCLXACCESSIBLETOOLBOXITEM_HXX
     158             : 
     159             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10