1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef SDTAKITM_HXX 24 #define SDTAKITM_HXX 25 26 #include <svl/eitem.hxx> 27 #include <svx/svddef.hxx> 28 #include "svx/svxdllapi.h" 29 30 //------------------------------ 31 // class SdrTextAniKindItem 32 //------------------------------ 33 34 enum SdrTextAniKind {SDRTEXTANI_NONE, 35 SDRTEXTANI_BLINK, 36 SDRTEXTANI_SCROLL, 37 SDRTEXTANI_ALTERNATE, 38 SDRTEXTANI_SLIDE}; 39 40 // - SDRTEXTANI_BLINK: 41 // Einfach nur Blinken. Direction und Amount ohne Wirkung. 42 // Frequenz siehe Delay, 0=0.5Hz (Delay=250). 43 // Count=Anzahl der blinker. 0=Endlos. 44 // StartInside: sal_False=beginnend mit Pause, sal_True=Beginnend mit Puls 45 // StopInside: sal_False=Nach Count blinkern nicht sichtbar, sal_True=sichtbar 46 // (nur wenn Count!=0) 47 // - SDRTEXTANI_SCROLL: 48 // Schrift laeuft rein, laeuft vollstaendig durch. Wenn ganz verschwunden 49 // geht's wieder von vorne los. 50 // Delay in ms, Sonderfall Delay=0 wird auf 50ms defaulted (20Hz) 51 // Count=Durchlaufanzahl (0=Endlos) 52 // Direction: ist eben die Richtung in die gescrollt wird. 53 // StartInside: sal_False=Schrift wird auch beim ersten Durchlauf reingescrollt 54 // sal_True=Der linke Teil der Schrift steht beim ersten Durchlauf 55 // bereits da (im sichtbaren "Scrollbereich") 56 // StopInside: sal_False=Schrift wird auch beim letzten Durchlauf vollstaendig 57 // rausgescrollt 58 // sal_True=Schrift wird beim letzten Durchlauf nicht rausgescrollt 59 // (nur wenn Count!=0) 60 // Amount: Schrittweite in logischen Einheiten. Negative Werte bedeuten 61 // Pixel statt log. Einheiten. Wenn Amount=0, dann wird auf 62 // 1 Pixel defaulted. 63 // - SDRTEXTANI_ALTERNATE: 64 // Wie SDRTEXTANI_SCROLL, nur wird nicht gescrollt bis Schrift ganz 65 // verschwunden, sondern bis der letzte Teil vollstaendig sichtbar ist. Dann 66 // wird die Richtung umgekehrt und zuruekgescrollt. 67 // Count=Anzahl der Durchlaeufe=Anzahl der Richtungswechsel-1 68 // Bei Count=1 ist SDRTEXTANI_ALTERNATE also identisch mit SDRTEXTANI_SCROLL 69 // Direction ist die Startrichtung 70 // Alle andern Parameter wie SDRTEXTANI_SCROLL 71 // - SDRTEXTANI_SLIDE: 72 // Schrift wird nur reingeschoben bis zur Originalposition. 73 // -> also wie SCROLL mit StartInside=sal_False, StopInside=TRUE 74 // und Count=1. Count=0 wird als Count=1 interpretiert. 75 // Fuer jeden Count>1 wird der Text jedoch ruekwaerts wieder vollstaendig 76 // rausgeschoben (aehnlich wie ALTERNATE) und dann wieder reingeschoben. 77 // StopInside wird nicht ausgewertet, weil immer Inside gestoppt wird. 78 // StartInside wird nicht ausgewertet, weil immer Outside gestartet wird. 79 // Alle andern Parameter wie SDRTEXTANI_SCROLL 80 // StartInside,StopInside: Bei sal_True ist die anfaengliche/entgueltige 81 // Textposition abhaengig von der Textverankerung am Zeichenobjekt. Sie 82 // entspricht der Textposition bei normalem Paint (ohne Laufschrift). 83 84 class SVX_DLLPUBLIC SdrTextAniKindItem: public SfxEnumItem { 85 public: 86 TYPEINFO(); SdrTextAniKindItem(SdrTextAniKind eKind=SDRTEXTANI_NONE)87 SdrTextAniKindItem(SdrTextAniKind eKind=SDRTEXTANI_NONE): SfxEnumItem(SDRATTR_TEXT_ANIKIND,(sal_uInt16)eKind) {} SdrTextAniKindItem(SvStream & rIn)88 SdrTextAniKindItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_ANIKIND,rIn) {} 89 virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; 90 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const; 91 virtual sal_uInt16 GetValueCount() const; // { return 5; } GetValue() const92 SdrTextAniKind GetValue() const { return (SdrTextAniKind)SfxEnumItem::GetValue(); } 93 94 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; 95 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); 96 97 virtual String GetValueTextByPos(sal_uInt16 nPos) const; 98 virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; 99 }; 100 101 #endif 102