LCOV - code coverage report
Current view: top level - libreoffice/sc/source/ui/inc - select.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 7 0.0 %
Date: 2012-12-27 Functions: 0 9 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             : 
      20             : #ifndef SC_SELECT_HXX
      21             : #define SC_SELECT_HXX
      22             : 
      23             : #include <vcl/seleng.hxx>
      24             : 
      25             : #include "viewdata.hxx"     // ScSplitPos
      26             : 
      27             : // ---------------------------------------------------------------------------
      28             : 
      29             : class ScTabView;
      30             : class ScViewData;
      31             : 
      32             : 
      33           0 : class ScViewSelectionEngine : public SelectionEngine
      34             : {
      35             : private:
      36             :     ScSplitPos      eWhich;
      37             : public:
      38             :                     ScViewSelectionEngine( Window* pWindow, ScTabView* pView,
      39             :                                                     ScSplitPos eSplitPos );
      40             : 
      41           0 :     ScSplitPos      GetWhich() const            { return eWhich; }
      42           0 :     void            SetWhich(ScSplitPos eNew)   { eWhich = eNew; }
      43             : };
      44             : 
      45             : 
      46           0 : class ScViewFunctionSet : public FunctionSet            // View (Gridwin / keyboard)
      47             : {
      48             : private:
      49             :     ScViewData*             pViewData;
      50             :     ScViewSelectionEngine*  pEngine;
      51             : 
      52             :     sal_Bool            bAnchor;
      53             :     sal_Bool            bStarted;
      54             :     ScAddress       aAnchorPos;
      55             : 
      56             :     ScSplitPos      GetWhich();
      57             : 
      58             :     sal_uLong           CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
      59             :                                         bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll );
      60             : 
      61             : public:
      62             :                     ScViewFunctionSet( ScViewData* pNewViewData );
      63             : 
      64             :     void            SetSelectionEngine( ScViewSelectionEngine* pSelEngine );
      65             : 
      66             :     void            SetAnchor( SCCOL nPosX, SCROW nPosY );
      67             :     void            SetAnchorFlag( sal_Bool bSet );
      68             : 
      69             :     virtual void    BeginDrag();
      70             :     virtual void    CreateAnchor();
      71             :     virtual void    DestroyAnchor();
      72             :     virtual sal_Bool    SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = false );
      73             :     virtual sal_Bool    IsSelectionAtPoint( const Point& rPointPixel );
      74             :     virtual void    DeselectAtPoint( const Point& rPointPixel );
      75             :     virtual void    DeselectAll();
      76             : 
      77             :     sal_Bool            SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, sal_Bool bScroll );
      78             : };
      79             : 
      80             : 
      81             : // ---------------------------------------------------------------------------
      82             : 
      83             : 
      84           0 : class ScHeaderFunctionSet : public FunctionSet          // Column / row headers
      85             : {
      86             : private:
      87             :     ScViewData*     pViewData;
      88             :     sal_Bool            bColumn;                // Col- / Rowbar
      89             :     ScSplitPos      eWhich;
      90             : 
      91             :     sal_Bool            bAnchor;
      92             :     SCCOLROW        nCursorPos;
      93             : 
      94             : public:
      95             :                     ScHeaderFunctionSet( ScViewData* pNewViewData );
      96             : 
      97             :     void            SetColumn( sal_Bool bSet );
      98             :     void            SetWhich( ScSplitPos eNew );
      99             : 
     100             :     virtual void    BeginDrag();
     101             :     virtual void    CreateAnchor();
     102             :     virtual void    DestroyAnchor();
     103             :     virtual sal_Bool    SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = false );
     104             :     virtual sal_Bool    IsSelectionAtPoint( const Point& rPointPixel );
     105             :     virtual void    DeselectAtPoint( const Point& rPointPixel );
     106             :     virtual void    DeselectAll();
     107             : 
     108           0 :     void            SetAnchorFlag(sal_Bool bSet)    { bAnchor = bSet; }
     109             : };
     110             : 
     111             : 
     112           0 : class ScHeaderSelectionEngine : public SelectionEngine
     113             : {
     114             : public:
     115             :                     ScHeaderSelectionEngine( Window* pWindow, ScHeaderFunctionSet* pFuncSet );
     116             : };
     117             : 
     118             : 
     119             : 
     120             : #endif
     121             : 
     122             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10