update dev300-m58
[ooovba.git] / svx / source / cui / textanim.cxx
blob89157236b4e6598090c05f0a3997235b1ad54a2f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: textanim.cxx,v $
10 * $Revision: 1.17 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
34 #ifdef SVX_DLLIMPLEMENTATION
35 #undef SVX_DLLIMPLEMENTATION
36 #endif
38 // include ---------------------------------------------------------------
39 #include <sfx2/app.hxx>
40 #include <sfx2/module.hxx>
41 #include <tools/shl.hxx>
43 #include <svx/dialogs.hrc>
45 #ifndef _SVX_TEXTANIM_CXX
46 #define _SVX_TEXTANIM_CXX
47 #endif
48 #include "textanim.hxx"
49 #include "textanim.hrc"
50 #include "textattr.hxx"
51 #include <svx/dialmgr.hxx>
52 #include "dlgutil.hxx"
54 static USHORT pRanges[] =
56 SDRATTR_TEXT_ANIKIND,
57 SDRATTR_TEXT_ANIAMOUNT,
61 /*************************************************************************
63 |* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
65 \************************************************************************/
67 __EXPORT SvxTextTabDialog::SvxTextTabDialog( Window* pParent,
68 const SfxItemSet* pAttr,
69 const SdrView* pSdrView ) :
70 SfxTabDialog ( pParent, SVX_RES( RID_SVXDLG_TEXT ), pAttr ),
71 rOutAttrs ( *pAttr ),
72 pView ( pSdrView )
74 FreeResource();
76 AddTabPage( RID_SVXPAGE_TEXTATTR, SvxTextAttrPage::Create, 0);
77 AddTabPage( RID_SVXPAGE_TEXTANIMATION, SvxTextAnimationPage::Create, 0);
80 /*************************************************************************
82 |* PageCreated()
84 \************************************************************************/
86 void __EXPORT SvxTextTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
88 switch( nId )
90 case RID_SVXPAGE_TEXTATTR:
92 ( (SvxTextAttrPage&) rPage ).SetView( pView );
93 ( (SvxTextAttrPage&) rPage ).Construct();
95 break;
97 case RID_SVXPAGE_TEXTANIMATION:
98 break;
100 default:
101 break;
106 /*************************************************************************
108 |* Page
110 \************************************************************************/
112 SvxTextAnimationPage::SvxTextAnimationPage( Window* pWindow, const SfxItemSet& rInAttrs ) :
113 SfxTabPage ( pWindow, SVX_RES( RID_SVXPAGE_TEXTANIMATION ),
114 rInAttrs ),
115 aFlEffect ( this, SVX_RES(FL_EFFECT)),
116 aFtEffects ( this, SVX_RES(FT_EFFECTS)),
117 aLbEffect ( this, SVX_RES( LB_EFFECT ) ),
118 //aCtlEffect ( this, SVX_RES( CTL_EFFECT ) ),
119 aFtDirection ( this, SVX_RES(FT_DIRECTION) ),
120 aBtnUp ( this, SVX_RES( BTN_UP ) ),
121 aBtnLeft ( this, SVX_RES( BTN_LEFT ) ),
122 aBtnRight ( this, SVX_RES( BTN_RIGHT ) ),
123 aBtnDown ( this, SVX_RES( BTN_DOWN ) ),
125 aFlProperties ( this, SVX_RES(FL_PROPERTIES)),
126 aTsbStartInside ( this, SVX_RES( TSB_START_INSIDE ) ),
127 aTsbStopInside ( this, SVX_RES( TSB_STOP_INSIDE ) ),
129 aFtCount ( this, SVX_RES(FT_COUNT)),
130 aTsbEndless ( this, SVX_RES( TSB_ENDLESS ) ),
131 aNumFldCount ( this, SVX_RES( NUM_FLD_COUNT ) ),
133 aFtAmount ( this, SVX_RES(FT_AMOUNT)),
134 aTsbPixel ( this, SVX_RES( TSB_PIXEL ) ),
135 aMtrFldAmount ( this, SVX_RES( MTR_FLD_AMOUNT ) ),
137 aFtDelay ( this, SVX_RES(FT_DELAY)),
138 aTsbAuto ( this, SVX_RES( TSB_AUTO ) ),
139 aMtrFldDelay ( this, SVX_RES( MTR_FLD_DELAY ) ),
141 rOutAttrs ( rInAttrs ),
142 eAniKind ( SDRTEXTANI_NONE )
144 FreeResource();
146 eFUnit = GetModuleFieldUnit( &rInAttrs );
147 SfxItemPool* pPool = rOutAttrs.GetPool();
148 DBG_ASSERT( pPool, "Wo ist der Pool" );
149 eUnit = pPool->GetMetric( SDRATTR_TEXT_LEFTDIST );
151 Construct();
153 aLbEffect.SetSelectHdl(
154 LINK( this, SvxTextAnimationPage, SelectEffectHdl_Impl ) );
155 aTsbEndless.SetClickHdl(
156 LINK( this, SvxTextAnimationPage, ClickEndlessHdl_Impl ) );
157 aTsbAuto.SetClickHdl(
158 LINK( this, SvxTextAnimationPage, ClickAutoHdl_Impl ) );
159 aTsbPixel.SetClickHdl(
160 LINK( this, SvxTextAnimationPage, ClickPixelHdl_Impl ) );
162 Link aLink( LINK( this, SvxTextAnimationPage, ClickDirectionHdl_Impl ) );
163 aBtnUp.SetClickHdl( aLink );
164 aBtnLeft.SetClickHdl( aLink );
165 aBtnRight.SetClickHdl( aLink );
166 aBtnDown.SetClickHdl( aLink );
169 /*************************************************************************
171 |* Dtor
173 \************************************************************************/
175 SvxTextAnimationPage::~SvxTextAnimationPage()
179 /*************************************************************************
181 |* Liest uebergebenen Item-Set
183 \************************************************************************/
185 void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs )
187 const SfxItemPool* pPool = rAttrs.GetPool();
189 // Animationstyp
190 const SfxPoolItem* pItem = GetItem( rAttrs, SDRATTR_TEXT_ANIKIND );
192 if( !pItem )
193 pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIKIND );
194 if( pItem )
196 eAniKind = ( ( const SdrTextAniKindItem* )pItem )->GetValue();
197 aLbEffect.SelectEntryPos( sal::static_int_cast< USHORT >(eAniKind) );
199 else
200 aLbEffect.SetNoSelection();
201 aLbEffect.SaveValue();
203 // Animationsrichtung
204 pItem = GetItem( rAttrs, SDRATTR_TEXT_ANIDIRECTION );
205 if( !pItem )
206 pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDIRECTION );
207 if( pItem )
209 SdrTextAniDirection eValue = ( ( const SdrTextAniDirectionItem* )pItem )->GetValue();
210 SelectDirection( eValue );
212 else
214 aBtnUp.Check( FALSE );
215 aBtnLeft.Check( FALSE );
216 aBtnRight.Check( FALSE );
217 aBtnDown.Check( FALSE );
219 aBtnUp.SaveValue();
220 aBtnLeft.SaveValue();
221 aBtnRight.SaveValue();
222 aBtnDown.SaveValue();
224 // Start inside
225 pItem = GetItem( rAttrs, SDRATTR_TEXT_ANISTARTINSIDE );
226 if( !pItem )
227 pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTARTINSIDE );
228 if( pItem )
230 aTsbStartInside.EnableTriState( FALSE );
231 BOOL bValue = ( ( const SdrTextAniStartInsideItem* )pItem )->GetValue();
232 if( bValue )
233 aTsbStartInside.SetState( STATE_CHECK );
234 else
235 aTsbStartInside.SetState( STATE_NOCHECK );
237 else
238 aTsbStartInside.SetState( STATE_DONTKNOW );
239 aTsbStartInside.SaveValue();
241 // Stop inside
242 pItem = GetItem( rAttrs, SDRATTR_TEXT_ANISTOPINSIDE );
243 if( !pItem )
244 pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTOPINSIDE );
245 if( pItem )
247 aTsbStopInside.EnableTriState( FALSE );
248 BOOL bValue = ( ( const SdrTextAniStopInsideItem* )pItem )->GetValue();
249 if( bValue )
250 aTsbStopInside.SetState( STATE_CHECK );
251 else
252 aTsbStopInside.SetState( STATE_NOCHECK );
254 else
255 aTsbStopInside.SetState( STATE_DONTKNOW );
256 aTsbStopInside.SaveValue();
258 // Anzahl
259 pItem = GetItem( rAttrs, SDRATTR_TEXT_ANICOUNT );
260 if( !pItem )
261 pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANICOUNT );
262 if( pItem )
264 aTsbEndless.EnableTriState( FALSE );
265 long nValue = (long) ( ( const SdrTextAniCountItem* )pItem )->GetValue();
266 aNumFldCount.SetValue( nValue );
267 if( nValue == 0 )
269 if( eAniKind == SDRTEXTANI_SLIDE )
271 aTsbEndless.SetState( STATE_NOCHECK );
272 aTsbEndless.Enable( FALSE );
274 else
276 aTsbEndless.SetState( STATE_CHECK );
277 aNumFldCount.SetEmptyFieldValue();
280 else
281 aTsbEndless.SetState( STATE_NOCHECK );
283 else
285 aNumFldCount.SetEmptyFieldValue();
286 aTsbEndless.SetState( STATE_DONTKNOW );
288 aTsbEndless.SaveValue();
289 aNumFldCount.SaveValue();
291 // Verzoegerung
292 pItem = GetItem( rAttrs, SDRATTR_TEXT_ANIDELAY );
293 if( !pItem )
294 pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDELAY );
295 if( pItem )
297 aTsbAuto.EnableTriState( FALSE );
298 long nValue = (long) ( ( const SdrTextAniDelayItem* )pItem )->GetValue();
299 aMtrFldDelay.SetValue( nValue );
300 if( nValue == 0 )
302 aTsbAuto.SetState( STATE_CHECK );
303 aMtrFldDelay.SetEmptyFieldValue();
305 else
306 aTsbAuto.SetState( STATE_NOCHECK );
308 else
310 aMtrFldDelay.SetEmptyFieldValue();
311 aTsbAuto.SetState( STATE_DONTKNOW );
313 aTsbAuto.SaveValue();
314 aMtrFldDelay.SaveValue();
316 // Schrittweite
317 pItem = GetItem( rAttrs, SDRATTR_TEXT_ANIAMOUNT );
318 if( !pItem )
319 pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIAMOUNT );
320 if( pItem )
322 aTsbPixel.EnableTriState( FALSE );
323 long nValue = (long) ( ( const SdrTextAniAmountItem* )pItem )->GetValue();
324 if( nValue <= 0 )
326 aTsbPixel.SetState( STATE_CHECK );
327 nValue = -nValue;
328 if( nValue == 0 )
329 nValue++;
330 aMtrFldAmount.SetUnit( FUNIT_CUSTOM );
331 aMtrFldAmount.SetDecimalDigits( 0 );
333 aMtrFldAmount.SetSpinSize( 1 );
334 aMtrFldAmount.SetMin( 1 );
335 aMtrFldAmount.SetFirst( 1 );
336 aMtrFldAmount.SetMax( 100 );
337 aMtrFldAmount.SetLast( 100 );
339 aMtrFldAmount.SetValue( nValue );
341 else
343 aTsbPixel.SetState( STATE_NOCHECK );
344 aMtrFldAmount.SetUnit( eFUnit );
345 aMtrFldAmount.SetDecimalDigits( 2 );
347 aMtrFldAmount.SetSpinSize( 10 );
348 aMtrFldAmount.SetMin( 1 );
349 aMtrFldAmount.SetFirst( 1 );
350 aMtrFldAmount.SetMax( 10000 );
351 aMtrFldAmount.SetLast( 10000 );
353 SetMetricValue( aMtrFldAmount, nValue, eUnit );
356 else
358 aMtrFldAmount.Disable();
359 aMtrFldAmount.SetEmptyFieldValue();
360 aTsbPixel.SetState( STATE_DONTKNOW );
362 aTsbPixel.SaveValue();
363 aMtrFldAmount.SaveValue();
366 SelectEffectHdl_Impl( NULL );
367 ClickEndlessHdl_Impl( NULL );
368 ClickAutoHdl_Impl( NULL );
369 //ClickPixelHdl_Impl( NULL );
372 /*************************************************************************
374 |* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen
376 \************************************************************************/
378 BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs)
380 BOOL bModified = FALSE;
381 USHORT nPos;
382 TriState eState;
384 // Animationstyp
385 nPos = aLbEffect.GetSelectEntryPos();
386 if( nPos != LISTBOX_ENTRY_NOTFOUND &&
387 nPos != aLbEffect.GetSavedValue() )
389 rAttrs.Put( SdrTextAniKindItem( (SdrTextAniKind) nPos ) );
390 bModified = TRUE;
393 // Animationsrichtung
394 if( aBtnUp.GetSavedValue() != aBtnUp.IsChecked() ||
395 aBtnLeft.GetSavedValue() != aBtnLeft.IsChecked() ||
396 aBtnRight.GetSavedValue() != aBtnRight.IsChecked() ||
397 aBtnDown.GetSavedValue() != aBtnDown.IsChecked() )
399 SdrTextAniDirection eValue = (SdrTextAniDirection) GetSelectedDirection();
400 rAttrs.Put( SdrTextAniDirectionItem( eValue ) );
401 bModified = TRUE;
404 // Start inside
405 eState = aTsbStartInside.GetState();
406 if( eState != aTsbStartInside.GetSavedValue() )
408 rAttrs.Put( SdrTextAniStartInsideItem( (BOOL) STATE_CHECK == eState ) );
409 bModified = TRUE;
412 // Stop inside
413 eState = aTsbStopInside.GetState();
414 if( eState != aTsbStopInside.GetSavedValue() )
416 rAttrs.Put( SdrTextAniStopInsideItem( (BOOL) STATE_CHECK == eState ) );
417 bModified = TRUE;
420 // Anzahl
421 eState = aTsbEndless.GetState();
422 String aStr = aNumFldCount.GetText();
423 if( eState != aTsbEndless.GetSavedValue() ||
424 aStr != aNumFldCount.GetSavedValue() )
426 sal_Int64 nValue = 0;
427 if( eState == STATE_CHECK /*#89844#*/ && aTsbEndless.IsEnabled())
428 bModified = TRUE;
429 else
431 if( aStr != aNumFldCount.GetSavedValue() )
433 nValue = aNumFldCount.GetValue();
434 bModified = TRUE;
437 if( bModified )
438 rAttrs.Put( SdrTextAniCountItem( (UINT16) nValue ) );
441 // Verzoegerung
442 eState = aTsbAuto.GetState();
443 aStr = aMtrFldDelay.GetText();
444 if( eState != aTsbAuto.GetSavedValue() ||
445 aStr != aMtrFldDelay.GetSavedValue() )
447 sal_Int64 nValue = 0;
448 if( eState == STATE_CHECK )
449 bModified = TRUE;
450 else
452 if( aStr != aMtrFldDelay.GetSavedValue() )
454 nValue = aMtrFldDelay.GetValue();
455 bModified = TRUE;
458 if( bModified )
459 rAttrs.Put( SdrTextAniDelayItem( (UINT16) nValue ) );
462 // Schrittweite
463 eState = aTsbPixel.GetState();
464 aStr = aMtrFldAmount.GetText();
465 if( eState != aTsbPixel.GetSavedValue() ||
466 aStr != aMtrFldAmount.GetSavedValue() )
468 sal_Int64 nValue = 0;
469 if( eState == STATE_CHECK )
471 nValue = aMtrFldAmount.GetValue();
472 nValue = -nValue;
474 else
476 nValue = GetCoreValue( aMtrFldAmount, eUnit );
478 rAttrs.Put( SdrTextAniAmountItem( (INT16) nValue ) );
480 bModified = TRUE;
483 return( bModified );
486 /*************************************************************************
490 \************************************************************************/
492 void SvxTextAnimationPage::Construct()
496 /*************************************************************************
500 \************************************************************************/
502 USHORT* SvxTextAnimationPage::GetRanges()
504 return( pRanges );
507 /*************************************************************************
509 |* Erzeugt die Seite
511 \************************************************************************/
513 SfxTabPage* SvxTextAnimationPage::Create( Window* pWindow,
514 const SfxItemSet& rAttrs )
516 return( new SvxTextAnimationPage( pWindow, rAttrs ) );
519 /*************************************************************************
523 \************************************************************************/
525 IMPL_LINK( SvxTextAnimationPage, SelectEffectHdl_Impl, void *, EMPTYARG )
527 USHORT nPos = aLbEffect.GetSelectEntryPos();
528 if( nPos != LISTBOX_ENTRY_NOTFOUND )
530 eAniKind = (SdrTextAniKind) nPos;
531 switch( eAniKind )
533 case SDRTEXTANI_NONE:
535 aFtDirection.Disable();
536 aBtnUp.Disable();
537 aBtnLeft.Disable();
538 aBtnRight.Disable();
539 aBtnDown.Disable();
540 aTsbStartInside.Disable();
541 aTsbStopInside.Disable();
543 aTsbEndless.Disable();
544 aNumFldCount.Disable();
545 aFtCount.Disable();
547 aTsbAuto.Disable();
548 aMtrFldDelay.Disable();
549 aFtDelay.Disable();
551 aTsbPixel.Disable();
552 aMtrFldAmount.Disable();
553 aFtAmount.Disable();
555 break;
557 case SDRTEXTANI_BLINK:
558 case SDRTEXTANI_SCROLL:
559 case SDRTEXTANI_ALTERNATE:
560 case SDRTEXTANI_SLIDE:
562 if( eAniKind == SDRTEXTANI_SLIDE )
564 aTsbStartInside.Disable();
565 aTsbStopInside.Disable();
567 aTsbEndless.Disable();
568 aNumFldCount.Enable();
569 aNumFldCount.SetValue( aNumFldCount.GetValue() );
571 else
573 aTsbStartInside.Enable();
574 aTsbStopInside.Enable();
576 aTsbEndless.Enable();
577 ClickEndlessHdl_Impl( NULL );
579 aFtCount.Enable();
581 aTsbAuto.Enable();
582 aFtDelay.Enable();
583 ClickAutoHdl_Impl( NULL );
585 if( eAniKind == SDRTEXTANI_BLINK )
587 aFtDirection.Disable();
588 aBtnUp.Disable();
589 aBtnLeft.Disable();
590 aBtnRight.Disable();
591 aBtnDown.Disable();
593 aTsbPixel.Disable();
594 aMtrFldAmount.Disable();
595 aFtAmount.Disable();
597 else
599 aFtDirection.Enable();
600 aBtnUp.Enable();
601 aBtnLeft.Enable();
602 aBtnRight.Enable();
603 aBtnDown.Enable();
605 aTsbPixel.Enable();
606 aMtrFldAmount.Enable();
607 aFtAmount.Enable();
610 break;
614 return( 0L );
617 /*************************************************************************
621 \************************************************************************/
623 IMPL_LINK( SvxTextAnimationPage, ClickEndlessHdl_Impl, void *, EMPTYARG )
626 if( eAniKind != SDRTEXTANI_SLIDE )
628 TriState eState = aTsbEndless.GetState();
629 if( eState != STATE_NOCHECK )
631 aNumFldCount.Disable();
632 aNumFldCount.SetEmptyFieldValue();
634 else
636 aNumFldCount.Enable();
637 aNumFldCount.SetValue( aNumFldCount.GetValue() );
640 return( 0L );
643 /*************************************************************************
647 \************************************************************************/
649 IMPL_LINK( SvxTextAnimationPage, ClickAutoHdl_Impl, void *, EMPTYARG )
651 TriState eState = aTsbAuto.GetState();
652 if( eState != STATE_NOCHECK )
654 aMtrFldDelay.Disable();
655 aMtrFldDelay.SetEmptyFieldValue();
657 else
659 aMtrFldDelay.Enable();
660 aMtrFldDelay.SetValue( aMtrFldDelay.GetValue() );
663 return( 0L );
666 /*************************************************************************
670 \************************************************************************/
672 IMPL_LINK( SvxTextAnimationPage, ClickPixelHdl_Impl, void *, EMPTYARG )
674 TriState eState = aTsbPixel.GetState();
675 if( eState == STATE_CHECK )
677 sal_Int64 nValue = aMtrFldAmount.GetValue() / 10;
678 aMtrFldAmount.Enable();
679 aMtrFldAmount.SetUnit( FUNIT_CUSTOM );
680 //SetFieldUnit( aMtrFldAmount, FUNIT_CUSTOM );
681 aMtrFldAmount.SetDecimalDigits( 0 );
683 aMtrFldAmount.SetSpinSize( 1 );
684 aMtrFldAmount.SetMin( 1 );
685 aMtrFldAmount.SetFirst( 1 );
686 aMtrFldAmount.SetMax( 100 );
687 aMtrFldAmount.SetLast( 100 );
689 aMtrFldAmount.SetValue( nValue );
691 else if( eState == STATE_NOCHECK )
693 sal_Int64 nValue = aMtrFldAmount.GetValue() * 10;
694 aMtrFldAmount.Enable();
695 aMtrFldAmount.SetUnit( eFUnit );
696 //SetFieldUnit( aMtrFldAmount, eFUnit );
697 aMtrFldAmount.SetDecimalDigits( 2 );
699 aMtrFldAmount.SetSpinSize( 10 );
700 aMtrFldAmount.SetMin( 1 );
701 aMtrFldAmount.SetFirst( 1 );
702 aMtrFldAmount.SetMax( 10000 );
703 aMtrFldAmount.SetLast( 10000 );
705 aMtrFldAmount.SetValue( nValue );
708 return( 0L );
711 /*************************************************************************
715 \************************************************************************/
717 IMPL_LINK( SvxTextAnimationPage, ClickDirectionHdl_Impl, ImageButton *, pBtn )
719 aBtnUp.Check( pBtn == &aBtnUp );
720 aBtnLeft.Check( pBtn == &aBtnLeft );
721 aBtnRight.Check( pBtn == &aBtnRight );
722 aBtnDown.Check( pBtn == &aBtnDown );
724 return( 0L );
727 /*************************************************************************
731 \************************************************************************/
733 void SvxTextAnimationPage::SelectDirection( SdrTextAniDirection nValue )
735 aBtnUp.Check( nValue == SDRTEXTANI_UP );
736 aBtnLeft.Check( nValue == SDRTEXTANI_LEFT );
737 aBtnRight.Check( nValue == SDRTEXTANI_RIGHT );
738 aBtnDown.Check( nValue == SDRTEXTANI_DOWN );
741 /*************************************************************************
745 \************************************************************************/
747 USHORT SvxTextAnimationPage::GetSelectedDirection()
749 USHORT nValue = 0;
751 if( aBtnUp.IsChecked() )
752 nValue = SDRTEXTANI_UP;
753 else if( aBtnLeft.IsChecked() )
754 nValue = SDRTEXTANI_LEFT;
755 else if( aBtnRight.IsChecked() )
756 nValue = SDRTEXTANI_RIGHT;
757 else if( aBtnDown.IsChecked() )
758 nValue = SDRTEXTANI_DOWN;
760 return( nValue );