LCOV - code coverage report
Current view: top level - include/svx - sdtakitm.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 3 4 75.0 %
Date: 2015-06-13 12:38:46 Functions: 5 6 83.3 %
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_SVX_SDTAKITM_HXX
      20             : #define INCLUDED_SVX_SDTAKITM_HXX
      21             : 
      22             : #include <svl/eitem.hxx>
      23             : #include <svx/svddef.hxx>
      24             : #include <svx/svxdllapi.h>
      25             : 
      26             : /**
      27             :  * Animation type for text frame.
      28             :  */
      29             : enum SdrTextAniKind {
      30             :     SDRTEXTANI_NONE,      /// no animation
      31             :     SDRTEXTANI_BLINK,     /// blinking
      32             :     SDRTEXTANI_SCROLL,    /// scroll through
      33             :     SDRTEXTANI_ALTERNATE, /// scroll back and forth
      34             :     SDRTEXTANI_SLIDE      /// scroll in
      35             : };
      36             : 
      37             : // - SDRTEXTANI_BLINK:
      38             : //   Just blink.  Direction and Amount don't effect things.
      39             : //   Frequency delay: 0 = 0.5Hz (Delay = 250).
      40             : //   Count = number of blinks. (0 = forever)
      41             : //   start inside: sal_False = begin with the blinker off, sal_True  = begin with the blinker on
      42             : //   stop inside: sal_False = end with the blinker off, sal_True = end with the blinker on
      43             : //                (Only if count! = 0)
      44             : // - SDRTEXTANI_SCROLL:
      45             : //   Text just scrolls all the way through, and starts over when it is done.
      46             : 
      47             : //   Delay in ms: (except delay = 0 means 50ms (20Hz) default)
      48             : //   Count = number of passes (0 = go forever)
      49             : //   Direction: the direction to scroll
      50             : //   StartInside: sal_False = on the first pass, scroll the text in (not initially visible)
      51             : //                sal_True = on the first pass, the left part of the text is already visible
      52             : //                           in the scroll area before starting.
      53             : //   StopInside: sal_False = on the last pass, scroll the text all the way out.
      54             : //                sal_True = on the last pass, keep the right part of the text visible.
      55             : //                (Only if count! = 0)
      56             : //   Amount: Step size in logical units. Negative values = use Pixels instead
      57             : //           of logical units. If Amount = 0, then default to 1 Pixel.
      58             : // - SDRTEXTANI_ALTERNATE:
      59             : //   Like SDRTEXTANI_SCROLL, except don't scroll until all of the text is out,
      60             : //        but just until the last part is visible.  Then, change direction and
      61             : //        scroll the text the other way.
      62             : //   Count = number of passes (number of direction changes minus 1)
      63             : //        If count = 1, this is the same as SDRTEXTANI_SCROLL
      64             : //   Direction = the starting direction.
      65             : //   All Other Parameters: just like SDRTEXTANI_SCROLL
      66             : // - SDRTEXTANI_SLIDE:
      67             : //   Text will slide in to the original position.
      68             : //   -> same as SCROLL with StartInside = sal_False, StopInside = sal_True
      69             : //   and Count = 1 (Count = 0 is interpreted as count = 1).
      70             : //   For each count > 1, the text, will be slid out backwards
      71             : //   (much like ALTERNATE) and then slid back in again.
      72             : //   StopInside is not evaluated, because inside is always stopped.
      73             : //   StartInside is not evaluated, because outside is always started.
      74             : //   All other parameters are like SDRTEXTANI_SCROLL
      75             : // StartInside, StopInside: When sal_True, the starting / final position
      76             : //   of the text depends on the anchor of the drawing object.  This
      77             : //   corresponds to the position of the text in normal Paint (without scrolling).
      78             : 
      79       10278 : class SVX_DLLPUBLIC SdrTextAniKindItem: public SfxEnumItem {
      80             : public:
      81             :     TYPEINFO_OVERRIDE();
      82        4823 :     SdrTextAniKindItem(SdrTextAniKind eKind=SDRTEXTANI_NONE): SfxEnumItem(SDRATTR_TEXT_ANIKIND,(sal_uInt16)eKind) {}
      83           0 :     SdrTextAniKindItem(SvStream& rIn)                       : SfxEnumItem(SDRATTR_TEXT_ANIKIND,rIn)  {}
      84             :     virtual SfxPoolItem*      Clone(SfxItemPool* pPool=NULL) const SAL_OVERRIDE;
      85             :     virtual SfxPoolItem*      Create(SvStream& rIn, sal_uInt16 nVer) const SAL_OVERRIDE;
      86             :     virtual sal_uInt16            GetValueCount() const SAL_OVERRIDE; // { return 5; }
      87     1687006 :             SdrTextAniKind GetValue() const      { return (SdrTextAniKind)SfxEnumItem::GetValue(); }
      88             : 
      89             :     virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
      90             :     virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
      91             : 
      92             :     virtual OUString GetValueTextByPos(sal_uInt16 nPos) const SAL_OVERRIDE;
      93             :     virtual bool GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, OUString& rText, const IntlWrapper * = 0) const SAL_OVERRIDE;
      94             : };
      95             : 
      96             : #endif
      97             : 
      98             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11