1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: animobjs.hxx,v $
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 #ifndef SD_ANIMOBJS_HXX
32 #define SD_ANIMOBJS_HXX
34 #include <sfx2/dockwin.hxx>
35 #include <vcl/fixed.hxx>
36 #include <svtools/stdctrl.hxx>
37 #include <vcl/group.hxx>
38 #include <sfx2/ctrlitem.hxx>
40 #ifndef _SV_BUTTON_HXX //autogen
41 #include <vcl/button.hxx>
43 #include <vcl/field.hxx>
44 #include <svx/dlgctrl.hxx>
45 #include <sfx2/progress.hxx>
48 #include <vcl/lstbox.hxx>
50 #ifndef _SD_SDRESID_HXX
51 #include "sdresid.hxx"
53 #include "misc/scopelock.hxx"
60 class AnimationControllerItem
;
63 //------------------------------------------------------------------------
78 //------------------------------------------------------------------------
80 class SdDisplay
: public Control
87 SdDisplay( ::Window
* pWin
, SdResId Id
);
90 virtual void Paint( const Rectangle
& rRect
);
92 void SetBitmapEx( BitmapEx
* pBmpEx
);
93 void SetScale( const Fraction
& rFrac
);
95 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
98 //------------------------------------------------------------------------
100 class AnimationWindow
: public SfxDockingWindow
102 friend class AnimationChildWindow
;
103 friend class AnimationControllerItem
;
106 AnimationWindow( SfxBindings
* pBindings
, SfxChildWindow
*pCW
,
107 ::Window
* pParent
, const SdResId
& rSdResId
);
108 virtual ~AnimationWindow();
110 void AddObj( ::sd::View
& rView
);
111 void CreateAnimObj( ::sd::View
& rView
);
113 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
116 virtual BOOL
Close();
117 virtual void Resize();
118 virtual void FillInfo( SfxChildWinInfo
& ) const;
121 SdDisplay aCtlDisplay
;
122 ImageButton aBtnFirst
;
123 ImageButton aBtnReverse
;
124 ImageButton aBtnStop
;
125 ImageButton aBtnPlay
;
126 ImageButton aBtnLast
;
127 NumericField aNumFldBitmap
;
128 TimeField aTimeField
;
129 ListBox aLbLoopCount
;
131 ImageButton aBtnGetOneObject
;
132 ImageButton aBtnGetAllObjects
;
133 ImageButton aBtnRemoveBitmap
;
134 ImageButton aBtnRemoveAll
;
137 FixedLine aGrpBitmap
;
139 RadioButton aRbtGroup
;
140 RadioButton aRbtBitmap
;
141 FixedText aFtAdjustment
;
142 ListBox aLbAdjustment
;
143 PushButton aBtnCreateGroup
;
144 FixedLine aGrpAnimation
;
149 SdDrawDocument
* pMyDoc
;
159 SfxBindings
* pBindings
;
160 AnimationControllerItem
* pControllerItem
;
162 ScopeLock maPlayLock
;
163 //------------------------------------
165 DECL_LINK( ClickFirstHdl
, void * );
166 DECL_LINK( ClickStopHdl
, void * );
167 DECL_LINK( ClickPlayHdl
, void * );
168 DECL_LINK( ClickLastHdl
, void * );
169 DECL_LINK( ClickGetObjectHdl
, void * );
170 DECL_LINK( ClickRemoveBitmapHdl
, void * );
171 DECL_LINK( ClickRbtHdl
, void * );
172 DECL_LINK( ClickCreateGroupHdl
, void * );
173 DECL_LINK( ModifyBitmapHdl
, void * );
174 DECL_LINK( ModifyTimeHdl
, void * );
176 void UpdateControl( ULONG nPos
, BOOL bDisableCtrls
= FALSE
);
178 void WaitInEffect( ULONG nMilliSeconds
) const;
179 void WaitInEffect( ULONG nMilliSeconds
, ULONG nTime
,
180 SfxProgress
* pStbMgr
) const;
184 /*************************************************************************
186 |* ControllerItem fuer Animator
188 \************************************************************************/
190 class AnimationControllerItem
: public SfxControllerItem
194 AnimationControllerItem( USHORT
, AnimationWindow
*, SfxBindings
* );
197 virtual void StateChanged( USHORT nSId
, SfxItemState eState
,
198 const SfxPoolItem
* pState
);
200 AnimationWindow
* pAnimationWin
;
203 } // end of namespace sd