LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/accessibility/inc/accessibility/extended - listboxaccessible.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 3 100.0 %
Date: 2013-07-09 Functions: 2 2 100.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             : 
      20             : #ifndef ACCESSIBILITY_EXT_LISTBOX_ACCESSIBLE
      21             : #define ACCESSIBILITY_EXT_LISTBOX_ACCESSIBLE
      22             : 
      23             : #include <com/sun/star/uno/RuntimeException.hpp>
      24             : #include <tools/link.hxx>
      25             : 
      26             : class SvTreeListBox;
      27             : class VclSimpleEvent;
      28             : class VclWindowEvent;
      29             : 
      30             : //........................................................................
      31             : namespace accessibility
      32             : {
      33             : //........................................................................
      34             : 
      35             :     //====================================================================
      36             :     //= ListBoxAccessibleBase
      37             :     //====================================================================
      38             :     /** helper class which couples it's life time to the life time of an
      39             :         SvTreeListBox
      40             :     */
      41             :     class ListBoxAccessibleBase
      42             :     {
      43             :     private:
      44             :         SvTreeListBox* m_pWindow;
      45             : 
      46             :     protected:
      47        2165 :         inline SvTreeListBox*       getListBox() const
      48             :         {
      49        2165 :             return  const_cast< ListBoxAccessibleBase* >( this )->m_pWindow;
      50             :         }
      51             : 
      52        1095 :         inline  bool                    isAlive() const     { return NULL != m_pWindow; }
      53             : 
      54             :     public:
      55             :         ListBoxAccessibleBase( SvTreeListBox& _rWindow );
      56             : 
      57             :     protected:
      58             :         virtual ~ListBoxAccessibleBase( );
      59             : 
      60             :         // own overridables
      61             :         /// will be called for any VclWindowEvent events broadcasted by our VCL window
      62             :         virtual void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent );
      63             : 
      64             :         /** will be called when our window broadcasts the VCLEVENT_OBJECT_DYING event
      65             : 
      66             :             <p>Usually, you derive your class from both ListBoxAccessibleBase and XComponent,
      67             :             and call XComponent::dispose here.</p>
      68             :         */
      69             :         virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException ) = 0;
      70             : 
      71             :         /// to be called in the dispose method of your derived class
      72             :         void disposing();
      73             : 
      74             :     private:
      75             :         DECL_LINK( WindowEventListener, VclSimpleEvent* );
      76             : 
      77             :     private:
      78             :         ListBoxAccessibleBase( );                                           // never implemented
      79             :         ListBoxAccessibleBase( const ListBoxAccessibleBase& );              // never implemented
      80             :         ListBoxAccessibleBase& operator=( const ListBoxAccessibleBase& );   // never implemented
      81             :     };
      82             : 
      83             : //........................................................................
      84             : }   // namespace accessibility
      85             : //........................................................................
      86             : 
      87             : #endif // ACCESSIBILITY_EXT_LISTBOX_ACCESSIBLE
      88             : 
      89             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10