1*c45d927aSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*c45d927aSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c45d927aSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c45d927aSAndrew Rist * distributed with this work for additional information 6*c45d927aSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c45d927aSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c45d927aSAndrew Rist * "License"); you may not use this file except in compliance 9*c45d927aSAndrew Rist * with the License. You may obtain a copy of the License at 10*c45d927aSAndrew Rist * 11*c45d927aSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*c45d927aSAndrew Rist * 13*c45d927aSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c45d927aSAndrew Rist * software distributed under the License is distributed on an 15*c45d927aSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c45d927aSAndrew Rist * KIND, either express or implied. See the License for the 17*c45d927aSAndrew Rist * specific language governing permissions and limitations 18*c45d927aSAndrew Rist * under the License. 19*c45d927aSAndrew Rist * 20*c45d927aSAndrew Rist *************************************************************/ 21*c45d927aSAndrew Rist 22*c45d927aSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SD_ANIMOBJS_HXX 25cdf0e10cSrcweir #define SD_ANIMOBJS_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <sfx2/dockwin.hxx> 28cdf0e10cSrcweir #include <vcl/fixed.hxx> 29cdf0e10cSrcweir #include <svtools/stdctrl.hxx> 30cdf0e10cSrcweir #include <vcl/group.hxx> 31cdf0e10cSrcweir #include <sfx2/ctrlitem.hxx> 32cdf0e10cSrcweir 33cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX //autogen 34cdf0e10cSrcweir #include <vcl/button.hxx> 35cdf0e10cSrcweir #endif 36cdf0e10cSrcweir #include <vcl/field.hxx> 37cdf0e10cSrcweir #include <svx/dlgctrl.hxx> 38cdf0e10cSrcweir #include <sfx2/progress.hxx> 39cdf0e10cSrcweir 40cdf0e10cSrcweir 41cdf0e10cSrcweir #include <vcl/lstbox.hxx> 42cdf0e10cSrcweir 43cdf0e10cSrcweir #ifndef _SD_SDRESID_HXX 44cdf0e10cSrcweir #include "sdresid.hxx" 45cdf0e10cSrcweir #endif 46cdf0e10cSrcweir #include "misc/scopelock.hxx" 47cdf0e10cSrcweir 48cdf0e10cSrcweir class SdDrawDocument; 49cdf0e10cSrcweir class BitmapEx; 50cdf0e10cSrcweir 51cdf0e10cSrcweir namespace sd { 52cdf0e10cSrcweir 53cdf0e10cSrcweir class AnimationControllerItem; 54cdf0e10cSrcweir class View; 55cdf0e10cSrcweir 56cdf0e10cSrcweir //------------------------------------------------------------------------ 57cdf0e10cSrcweir 58cdf0e10cSrcweir enum BitmapAdjustment 59cdf0e10cSrcweir { 60cdf0e10cSrcweir BA_LEFT_UP, 61cdf0e10cSrcweir BA_LEFT, 62cdf0e10cSrcweir BA_LEFT_DOWN, 63cdf0e10cSrcweir BA_UP, 64cdf0e10cSrcweir BA_CENTER, 65cdf0e10cSrcweir BA_DOWN, 66cdf0e10cSrcweir BA_RIGHT_UP, 67cdf0e10cSrcweir BA_RIGHT, 68cdf0e10cSrcweir BA_RIGHT_DOWN 69cdf0e10cSrcweir }; 70cdf0e10cSrcweir 71cdf0e10cSrcweir //------------------------------------------------------------------------ 72cdf0e10cSrcweir 73cdf0e10cSrcweir class SdDisplay : public Control 74cdf0e10cSrcweir { 75cdf0e10cSrcweir private: 76cdf0e10cSrcweir BitmapEx aBitmapEx; 77cdf0e10cSrcweir Fraction aScale; 78cdf0e10cSrcweir 79cdf0e10cSrcweir public: 80cdf0e10cSrcweir SdDisplay( ::Window* pWin, SdResId Id ); 81cdf0e10cSrcweir ~SdDisplay(); 82cdf0e10cSrcweir 83cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 84cdf0e10cSrcweir 85cdf0e10cSrcweir void SetBitmapEx( BitmapEx* pBmpEx ); 86cdf0e10cSrcweir void SetScale( const Fraction& rFrac ); 87cdf0e10cSrcweir 88cdf0e10cSrcweir virtual void DataChanged( const DataChangedEvent& rDCEvt ); 89cdf0e10cSrcweir }; 90cdf0e10cSrcweir 91cdf0e10cSrcweir //------------------------------------------------------------------------ 92cdf0e10cSrcweir 93cdf0e10cSrcweir class AnimationWindow : public SfxDockingWindow 94cdf0e10cSrcweir { 95cdf0e10cSrcweir friend class AnimationChildWindow; 96cdf0e10cSrcweir friend class AnimationControllerItem; 97cdf0e10cSrcweir 98cdf0e10cSrcweir public: 99cdf0e10cSrcweir AnimationWindow( SfxBindings* pBindings, SfxChildWindow *pCW, 100cdf0e10cSrcweir ::Window* pParent, const SdResId& rSdResId ); 101cdf0e10cSrcweir virtual ~AnimationWindow(); 102cdf0e10cSrcweir 103cdf0e10cSrcweir void AddObj( ::sd::View& rView ); 104cdf0e10cSrcweir void CreateAnimObj( ::sd::View& rView ); 105cdf0e10cSrcweir 106cdf0e10cSrcweir virtual void DataChanged( const DataChangedEvent& rDCEvt ); 107cdf0e10cSrcweir 108cdf0e10cSrcweir protected: 109cdf0e10cSrcweir virtual sal_Bool Close(); 110cdf0e10cSrcweir virtual void Resize(); 111cdf0e10cSrcweir virtual void FillInfo( SfxChildWinInfo& ) const; 112cdf0e10cSrcweir 113cdf0e10cSrcweir private: 114cdf0e10cSrcweir SdDisplay aCtlDisplay; 115cdf0e10cSrcweir ImageButton aBtnFirst; 116cdf0e10cSrcweir ImageButton aBtnReverse; 117cdf0e10cSrcweir ImageButton aBtnStop; 118cdf0e10cSrcweir ImageButton aBtnPlay; 119cdf0e10cSrcweir ImageButton aBtnLast; 120cdf0e10cSrcweir NumericField aNumFldBitmap; 121cdf0e10cSrcweir TimeField aTimeField; 122cdf0e10cSrcweir ListBox aLbLoopCount; 123cdf0e10cSrcweir FixedLine aGrpBitmap; 124cdf0e10cSrcweir ImageButton aBtnGetOneObject; 125cdf0e10cSrcweir ImageButton aBtnGetAllObjects; 126cdf0e10cSrcweir ImageButton aBtnRemoveBitmap; 127cdf0e10cSrcweir ImageButton aBtnRemoveAll; 128cdf0e10cSrcweir FixedText aFtCount; 129cdf0e10cSrcweir FixedInfo aFiCount; 130cdf0e10cSrcweir FixedLine aGrpAnimation; 131cdf0e10cSrcweir 132cdf0e10cSrcweir RadioButton aRbtGroup; 133cdf0e10cSrcweir RadioButton aRbtBitmap; 134cdf0e10cSrcweir FixedText aFtAdjustment; 135cdf0e10cSrcweir ListBox aLbAdjustment; 136cdf0e10cSrcweir PushButton aBtnCreateGroup; 137cdf0e10cSrcweir 138cdf0e10cSrcweir ::Window* pWin; 139cdf0e10cSrcweir List aBmpExList; 140cdf0e10cSrcweir List aTimeList; 141cdf0e10cSrcweir SdDrawDocument* pMyDoc; 142cdf0e10cSrcweir BitmapEx* pBitmapEx; 143cdf0e10cSrcweir 144cdf0e10cSrcweir Size aSize; 145cdf0e10cSrcweir Size aFltWinSize; 146cdf0e10cSrcweir Size aDisplaySize; 147cdf0e10cSrcweir Size aBmpSize; 148cdf0e10cSrcweir sal_Bool bMovie; 149cdf0e10cSrcweir sal_Bool bAllObjects; 150cdf0e10cSrcweir 151cdf0e10cSrcweir SfxBindings* pBindings; 152cdf0e10cSrcweir AnimationControllerItem* pControllerItem; 153cdf0e10cSrcweir 154cdf0e10cSrcweir ScopeLock maPlayLock; 155cdf0e10cSrcweir //------------------------------------ 156cdf0e10cSrcweir 157cdf0e10cSrcweir DECL_LINK( ClickFirstHdl, void * ); 158cdf0e10cSrcweir DECL_LINK( ClickStopHdl, void * ); 159cdf0e10cSrcweir DECL_LINK( ClickPlayHdl, void * ); 160cdf0e10cSrcweir DECL_LINK( ClickLastHdl, void * ); 161cdf0e10cSrcweir DECL_LINK( ClickGetObjectHdl, void * ); 162cdf0e10cSrcweir DECL_LINK( ClickRemoveBitmapHdl, void * ); 163cdf0e10cSrcweir DECL_LINK( ClickRbtHdl, void * ); 164cdf0e10cSrcweir DECL_LINK( ClickCreateGroupHdl, void * ); 165cdf0e10cSrcweir DECL_LINK( ModifyBitmapHdl, void * ); 166cdf0e10cSrcweir DECL_LINK( ModifyTimeHdl, void * ); 167cdf0e10cSrcweir 168cdf0e10cSrcweir void UpdateControl( sal_uLong nPos, sal_Bool bDisableCtrls = sal_False ); 169cdf0e10cSrcweir void ResetAttrs(); 170cdf0e10cSrcweir void WaitInEffect( sal_uLong nMilliSeconds, sal_uLong nTime, 171cdf0e10cSrcweir SfxProgress* pStbMgr ) const; 172cdf0e10cSrcweir Fraction GetScale(); 173cdf0e10cSrcweir }; 174cdf0e10cSrcweir 175cdf0e10cSrcweir /************************************************************************* 176cdf0e10cSrcweir |* 177cdf0e10cSrcweir |* ControllerItem fuer Animator 178cdf0e10cSrcweir |* 179cdf0e10cSrcweir \************************************************************************/ 180cdf0e10cSrcweir 181cdf0e10cSrcweir class AnimationControllerItem : public SfxControllerItem 182cdf0e10cSrcweir { 183cdf0e10cSrcweir 184cdf0e10cSrcweir public: 185cdf0e10cSrcweir AnimationControllerItem( sal_uInt16, AnimationWindow*, SfxBindings* ); 186cdf0e10cSrcweir 187cdf0e10cSrcweir protected: 188cdf0e10cSrcweir virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState, 189cdf0e10cSrcweir const SfxPoolItem* pState ); 190cdf0e10cSrcweir private: 191cdf0e10cSrcweir AnimationWindow* pAnimationWin; 192cdf0e10cSrcweir }; 193cdf0e10cSrcweir 194cdf0e10cSrcweir } // end of namespace sd 195cdf0e10cSrcweir 196cdf0e10cSrcweir #endif 197cdf0e10cSrcweir 198