LCOV - code coverage report
Current view: top level - dbaccess/source/ui/app - AppSwapWindow.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 3 10 30.0 %
Date: 2014-11-03 Functions: 3 10 30.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 INCLUDED_DBACCESS_SOURCE_UI_APP_APPSWAPWINDOW_HXX
      20             : #define INCLUDED_DBACCESS_SOURCE_UI_APP_APPSWAPWINDOW_HXX
      21             : 
      22             : #include "IClipBoardTest.hxx"
      23             : #include <vcl/lstbox.hxx>
      24             : #include "AppIconControl.hxx"
      25             : #include "AppElementType.hxx"
      26             : 
      27             : namespace dbaui
      28             : {
      29             :     class OAppBorderWindow;
      30             :     class OApplicationSwapWindow :  public vcl::Window,
      31             :                                     public IClipboardTest
      32             :     {
      33             :         OApplicationIconControl             m_aIconControl;
      34             :         ElementType                         m_eLastType;
      35             :         OAppBorderWindow&                   m_rBorderWin;
      36             : 
      37             :         void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
      38             : 
      39             :         DECL_LINK( OnContainerSelectHdl,    SvtIconChoiceCtrl* );
      40             :         DECL_LINK( ChangeToLastSelected, void* );
      41             :     protected:
      42             :         virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE;
      43             :     public:
      44             :         OApplicationSwapWindow( vcl::Window* _pParent, OAppBorderWindow& _rBorderWindow );
      45             :         virtual ~OApplicationSwapWindow();
      46             :         // window overloads
      47             :         virtual void Resize() SAL_OVERRIDE;
      48             : 
      49           0 :         bool isCutAllowed() SAL_OVERRIDE      { return false; }
      50           0 :         bool isCopyAllowed() SAL_OVERRIDE     { return false; }
      51           0 :         bool isPasteAllowed() SAL_OVERRIDE    { return false; }
      52           0 :         virtual bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); }
      53           0 :         void copy() SAL_OVERRIDE  { }
      54           0 :         void cut() SAL_OVERRIDE   { }
      55           0 :         void paste() SAL_OVERRIDE { }
      56             : 
      57          50 :         inline sal_uLong                    GetEntryCount() const { return m_aIconControl.GetEntryCount(); }
      58          50 :         inline SvxIconChoiceCtrlEntry*  GetEntry( sal_uLong nPos ) const { return m_aIconControl.GetEntry(nPos); }
      59          50 :         inline Rectangle                GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return m_aIconControl.GetBoundingBox(pEntry); }
      60             : 
      61             :         /** automatically creates mnemonics for the icon/texts in our left hand side panel
      62             :         */
      63             :         void    createIconAutoMnemonics( MnemonicGenerator& _rMnemonics );
      64             : 
      65             :         /** called to give the window the chance to intercept key events, while it has not
      66             :             the focus
      67             : 
      68             :             @return <TRUE/> if and only if the event has been handled, and should not
      69             :                 not be further processed
      70             :         */
      71             :         bool    interceptKeyInput( const KeyEvent& _rEvent );
      72             : 
      73             :         /// return the element of currently select entry
      74             :         ElementType getElementType() const;
      75             : 
      76             :         /** clears the selection in the icon choice control and calls the handler
      77             :         */
      78             :         void clearSelection();
      79             : 
      80             :         /** changes the container which should be displayed. The select handler will also be called.
      81             :             @param  _eType
      82             :                 Which container to show.
      83             :         */
      84             :         void selectContainer(ElementType _eType);
      85             : 
      86             :     private:
      87             :         bool onContainerSelected( ElementType _eType );
      88             :     };
      89             : } // namespace dbaui
      90             : #endif // INCLUDED_DBACCESS_SOURCE_UI_APP_APPSWAPWINDOW_HXX
      91             : 
      92             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10