LCOV - code coverage report
Current view: top level - libreoffice/svtools/source/hatchwindow - ipwin.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 6 0.0 %
Date: 2012-12-27 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             : 
      20             : #ifndef _IPWIN_HXX
      21             : #define _IPWIN_HXX
      22             : 
      23             : #include <tools/gen.hxx>
      24             : #include <vcl/window.hxx>
      25             : 
      26             : /********************** SvResizeHelper ***********************************
      27             : *************************************************************************/
      28             : class SvResizeHelper
      29             : {
      30             :     Size        aBorder;
      31             :     Rectangle   aOuter;
      32             :     short       nGrab; // -1 kein Grab,  0 - 7, 8 = Move, siehe FillHandle...
      33             :     Point       aSelPos;
      34             :     sal_Bool        bResizeable;
      35             : public:
      36             :                 SvResizeHelper();
      37             : 
      38             :     void        SetResizeable( sal_Bool b ) { bResizeable = b; }
      39           0 :     short       GetGrab() const { return nGrab; }
      40           0 :     void        SetBorderPixel( const Size & rBorderP )
      41           0 :                 { aBorder = rBorderP; }
      42             :     const Size & GetBorderPixel() const { return aBorder; }
      43             :     const Rectangle & GetOuterRectPixel() const
      44             :                 { return aOuter; }
      45           0 :     void        SetOuterRectPixel( const Rectangle & rRect )
      46           0 :                 { aOuter = rRect; }
      47             :     Rectangle   GetInnerRectPixel() const
      48             :                 {
      49             :                     Rectangle aRect( aOuter );
      50             :                     aRect.Top()    += aBorder.Height();
      51             :                     aRect.Left()   += aBorder.Width();
      52             :                     aRect.Bottom() -= aBorder.Height();
      53             :                     aRect.Right()  -= aBorder.Width();
      54             :                     return aRect;
      55             :                 }
      56             :                 // Im Uhrzeigersinn, beginnend bei Linksoben
      57             :     void        FillHandleRectsPixel( Rectangle aRects[ 8 ] ) const;
      58             :     void        FillMoveRectsPixel( Rectangle aRects[ 4 ] ) const;
      59             :     void        Draw( OutputDevice * );
      60             :     void        InvalidateBorder( Window * );
      61             :     sal_Bool        SelectBegin( Window *, const Point & rPos );
      62             :     short       SelectMove( Window * pWin, const Point & rPos );
      63             :     Point       GetTrackPosPixel( const Rectangle & rRect ) const;
      64             :     Rectangle   GetTrackRectPixel( const Point & rTrackPos ) const;
      65             :     void        ValidateRect( Rectangle & rValidate ) const;
      66             :     sal_Bool        SelectRelease( Window *, const Point & rPos, Rectangle & rOutPosSize );
      67             :     void        Release( Window * pWin );
      68             : };
      69             : 
      70             : /********************** SvResizeWindow ***********************************
      71             : *************************************************************************/
      72             : class VCLXHatchWindow;
      73           0 : class SvResizeWindow : public Window
      74             : {
      75             :     Pointer         m_aOldPointer;
      76             :     short           m_nMoveGrab;  // Letzer Pointertyp
      77             :     SvResizeHelper  m_aResizer;
      78             :     sal_Bool        m_bActive;
      79             : 
      80             :     VCLXHatchWindow* m_pWrapper;
      81             : public:
      82             :     SvResizeWindow( Window* pParent, VCLXHatchWindow* pWrapper );
      83             : 
      84             :     void    SetHatchBorderPixel( const Size & rSize );
      85             : 
      86             :     void    SelectMouse( const Point & rPos );
      87             :     virtual void    MouseButtonUp( const MouseEvent & rEvt );
      88             :     virtual void    MouseMove( const MouseEvent & rEvt );
      89             :     virtual void    MouseButtonDown( const MouseEvent & rEvt );
      90             :     virtual void    KeyInput( const KeyEvent & rEvt );
      91             :     virtual void    Resize();
      92             :     virtual void    Paint( const Rectangle & );
      93             :     virtual long    Notify( NotifyEvent& rNEvt );
      94             :     virtual long    PreNotify( NotifyEvent& rNEvt );
      95             : 
      96             :     void    QueryObjAreaPixel( Rectangle & );
      97             :     void    RequestObjAreaPixel( const Rectangle & );
      98             : };
      99             : 
     100             : #endif // _IPWIN_HXX
     101             : 
     102             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10