LCOV - code coverage report
Current view: top level - libreoffice/sd/source/ui/annotations - annotationtag.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 1 0.0 %
Date: 2012-12-27 Functions: 0 1 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 _SD_ANNOTATIONTAG_HXX_
      21             : #define _SD_ANNOTATIONTAG_HXX_
      22             : 
      23             : #include <com/sun/star/office/XAnnotation.hpp>
      24             : #include <basegfx/polygon/b2dpolypolygon.hxx>
      25             : #include <basegfx/polygon/b2dpolypolygontools.hxx>
      26             : #include "smarttag.hxx"
      27             : 
      28             : namespace sd {
      29             : 
      30             : class View;
      31             : class AnnotationManagerImpl;
      32             : class AnnotationWindow;
      33             : 
      34             : class AnnotationTag : public SmartTag
      35             : {
      36             : public:
      37             :     AnnotationTag( AnnotationManagerImpl& rManager, ::sd::View& rView, const css::uno::Reference< css::office::XAnnotation >& xAnnotation, Color& rColor, int nIndex, const Font& rFont );
      38             :     virtual ~AnnotationTag();
      39             : 
      40             :     /// @return true if the SmartTag handled the event.
      41             :     virtual bool MouseButtonDown( const MouseEvent&, SmartHdl& );
      42             : 
      43             :     /// @return true if the SmartTag consumes this event.
      44             :     virtual bool KeyInput( const KeyEvent& rKEvt );
      45             : 
      46             :     /// @return true if the SmartTag consumes this event.
      47             :     virtual bool RequestHelp( const HelpEvent& rHEvt );
      48             : 
      49             :     /// @return true if the SmartTag consumes this event.
      50             :     virtual bool Command( const CommandEvent& rCEvt );
      51             : 
      52             :     // callbacks from sdr view
      53             :     virtual sal_uLong GetMarkablePointCount() const;
      54             :     virtual sal_uLong GetMarkedPointCount() const;
      55             :     virtual sal_Bool MarkPoint(SdrHdl& rHdl, sal_Bool bUnmark=sal_False);
      56             :     virtual void CheckPossibilities();
      57             :     virtual sal_Bool MarkPoints(const Rectangle* pRect, sal_Bool bUnmark);
      58             : 
      59             :     void Move( int nDX, int nDY );
      60             :     bool OnMove( const KeyEvent& rKEvt );
      61             : 
      62             :     BitmapEx CreateAnnotationBitmap(bool);
      63             : 
      64           0 :     css::uno::Reference< css::office::XAnnotation > GetAnnotation() const { return mxAnnotation; }
      65             : 
      66             :     void OpenPopup( bool bEdit );
      67             :     void ClosePopup();
      68             : 
      69             : protected:
      70             :     virtual void addCustomHandles( SdrHdlList& rHandlerList );
      71             :     virtual bool getContext( SdrViewContext& rContext );
      72             :     virtual void disposing();
      73             :     virtual void select();
      74             :     virtual void deselect();
      75             : 
      76             :     DECL_LINK( WindowEventHandler, VclWindowEvent* );
      77             :     DECL_LINK( ClosePopupHdl, void* );
      78             : 
      79             : private:
      80             :     AnnotationManagerImpl& mrManager;
      81             :     css::uno::Reference< css::office::XAnnotation > mxAnnotation;
      82             :     std::auto_ptr<AnnotationWindow>                 mpAnnotationWindow;
      83             :     Color                                           maColor;
      84             :     int                                             mnIndex;
      85             :     const Font&                                     mrFont;
      86             :     Size                                            maSize;
      87             :     sal_uLong                                           mnClosePopupEvent;
      88             :     ::Window*                                       mpListenWindow;
      89             :     Point                                           maMouseDownPos;
      90             : };
      91             : 
      92             : } // end of namespace sd
      93             : 
      94             : #endif      // _SD_ANNOTATIONTAG_HXX_
      95             : 
      96             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10