Kaydet (Commit) 3582b314 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert docking animation window to .ui

Change-Id: I2633173bb21da554f55b244d6d2947567c933c2a
üst 545ac4de
...@@ -40,7 +40,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\ ...@@ -40,7 +40,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\
sd/source/ui/app/sdstring.src \ sd/source/ui/app/sdstring.src \
sd/source/ui/app/strings.src \ sd/source/ui/app/strings.src \
sd/source/ui/app/toolbox.src \ sd/source/ui/app/toolbox.src \
sd/source/ui/dlg/animobjs.src \
sd/source/ui/dlg/navigatr.src \ sd/source/ui/dlg/navigatr.src \
sd/source/ui/dlg/PaneDockingWindow.src \ sd/source/ui/dlg/PaneDockingWindow.src \
sd/source/ui/slideshow/slideshow.src \ sd/source/ui/slideshow/slideshow.src \
......
...@@ -81,6 +81,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\ ...@@ -81,6 +81,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
sd/uiconfig/simpress/ui/customslideshows \ sd/uiconfig/simpress/ui/customslideshows \
sd/uiconfig/simpress/ui/definecustomslideshow \ sd/uiconfig/simpress/ui/definecustomslideshow \
sd/uiconfig/simpress/ui/dlgfield \ sd/uiconfig/simpress/ui/dlgfield \
sd/uiconfig/simpress/ui/dockinganimation \
sd/uiconfig/simpress/ui/headerfooterdialog \ sd/uiconfig/simpress/ui/headerfooterdialog \
sd/uiconfig/simpress/ui/headerfootertab \ sd/uiconfig/simpress/ui/headerfootertab \
sd/uiconfig/simpress/ui/insertslides \ sd/uiconfig/simpress/ui/insertslides \
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include "app.hrc" #include "app.hrc"
#include "animobjs.hxx" #include "animobjs.hxx"
#include "animobjs.hrc"
#include <sfx2/app.hxx> #include <sfx2/app.hxx>
#include <sfx2/childwin.hxx> #include <sfx2/childwin.hxx>
#include <sfx2/dockwin.hxx> #include <sfx2/dockwin.hxx>
...@@ -40,8 +39,7 @@ AnimationChildWindow::AnimationChildWindow( ...@@ -40,8 +39,7 @@ AnimationChildWindow::AnimationChildWindow(
SfxChildWinInfo* pInfo ) SfxChildWinInfo* pInfo )
: SfxChildWindow( _pParent, nId ) : SfxChildWindow( _pParent, nId )
{ {
AnimationWindow* pAnimWin = new AnimationWindow( AnimationWindow* pAnimWin = new AnimationWindow(pBindings, this, _pParent);
pBindings, this, _pParent, SdResId( FLT_WIN_ANIMATION ) );
pWindow = pAnimWin; pWindow = pAnimWin;
eChildAlignment = SFX_ALIGN_NOALIGNMENT; eChildAlignment = SFX_ALIGN_NOALIGNMENT;
......
This diff is collapsed.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "res_bmp.hrc"
#include "app.hrc"
#include "animobjs.hrc"
#include "helpids.h"
#define MIN_BUTTON_WIDTH 12
#define MIN_BUTTON_HEIGHT 12
#define MIN_BUTTON_SIZE MAP_APPFONT( MIN_BUTTON_WIDTH, MIN_BUTTON_HEIGHT );
DockingWindow FLT_WIN_ANIMATION
{
HelpID = CMD_SID_ANIMATION_OBJECTS ;
Border = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
Sizeable = TRUE ;
Moveable = TRUE ;
Closeable = TRUE ;
Zoomable = TRUE ;
Dockable = TRUE ;
EnableResizing = TRUE ;
Size = MAP_APPFONT ( 159 , 236 ) ;
Text [ en-US ] = "Animation" ;
Control CTL_DISPLAY
{
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 147 , 87 ) ;
TabStop = TRUE ;
};
ImageButton BTN_FIRST
{
HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_FIRST";
Pos = MAP_APPFONT ( 6 , 100 ) ;
Size = MIN_BUTTON_SIZE
Symbol = IMAGEBUTTON_WINDSTART ;
QuickHelpText [ en-US ] = "First Image" ;
};
ImageButton BTN_REVERSE
{
HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_REVERSE";
Pos = MAP_APPFONT ( 6 + MIN_BUTTON_WIDTH , 100 ) ;
Size = MIN_BUTTON_SIZE
Symbol = IMAGEBUTTON_REVERSEPLAY ;
QuickHelpText [ en-US ] = "Backwards" ;
};
ImageButton BTN_STOP
{
HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_STOP";
Pos = MAP_APPFONT ( 6 + MIN_BUTTON_WIDTH * 2 , 100 ) ;
Size = MIN_BUTTON_SIZE
Symbol = IMAGEBUTTON_STOP ;
Disable = TRUE ;
QuickHelpText [ en-US ] = "Stop" ;
};
ImageButton BTN_PLAY
{
HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_PLAY";
Pos = MAP_APPFONT ( 6 + MIN_BUTTON_WIDTH * 3 , 100 ) ;
Size = MIN_BUTTON_SIZE
Symbol = IMAGEBUTTON_PLAY ;
QuickHelpText [ en-US ] = "Play" ;
};
ImageButton BTN_LAST
{
HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_LAST";
Pos = MAP_APPFONT ( 6 + MIN_BUTTON_WIDTH * 4 , 100 ) ;
Size = MIN_BUTTON_SIZE
Symbol = IMAGEBUTTON_WINDEND ;
QuickHelpText [ en-US ] = "Last Image" ;
};
NumericField NUM_FLD_BITMAP
{
HelpID = "sd:NumericField:FLT_WIN_ANIMATION:NUM_FLD_BITMAP";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 + 3 + MIN_BUTTON_WIDTH * 5 , 100 ) ;
Size = MAP_APPFONT ( MIN_BUTTON_WIDTH * 2 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 1 ;
Maximum = 999 ;
StrictFormat = TRUE ;
First = 1 ;
Last = 999 ;
SpinSize = 1 ;
QuickHelpText [ en-US ] = "Image Number" ;
};
TimeField TIME_FIELD
{
HelpID = "sd:TimeField:FLT_WIN_ANIMATION:TIME_FIELD";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 + 6 + MIN_BUTTON_WIDTH * 7 , 100 ) ;
Size = MAP_APPFONT ( MIN_BUTTON_WIDTH * 2 + 3 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = Time
{
Second = 59 ;
Sec100 = 99 ;
};
Duration = TRUE ;
StrictFormat = TRUE ;
Last = Time
{
Second = 59 ;
Sec100 = 99 ;
};
QuickHelpText [ en-US ] = "Duration" ;
};
ListBox LB_LOOP_COUNT
{
HelpID = "sd:ListBox:FLT_WIN_ANIMATION:LB_LOOP_COUNT";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 + 12 + MIN_BUTTON_WIDTH * 9 , 100 ) ;
Size = MAP_APPFONT ( MIN_BUTTON_WIDTH * 2 + 3 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "1" ; > ;
< "2" ; > ;
< "3" ; > ;
< "4" ; > ;
< "5" ; > ;
< "6" ; > ;
< "7" ; > ;
< "8" ; > ;
< "9" ; > ;
< "10" ; > ;
< "12" ; > ;
< "15" ; > ;
< "20" ; > ;
< "25" ; > ;
< "50" ; > ;
< "100" ; > ;
< "500" ; > ;
< "1000" ; > ;
< "Max." ; > ;
};
QuickHelpText [ en-US ] = "Loop Count" ;
};
ImageButton BTN_GET_ONE_OBJECT
{
HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_GET_ONE_OBJECT";
Pos = MAP_APPFONT ( 12 , 132 ) ;
Size = MAP_APPFONT ( 16 , 14 ) ;
ButtonImage = Image
{
ImageBitmap = Bitmap
{
File = "get1obj.bmp" ;
};
MaskColor = IMAGE_MASK_STDCOLOR;
};
TabStop = TRUE ;
QuickHelpText [ en-US ] = "Apply Object" ;
};
ImageButton BTN_GET_ALL_OBJECTS
{
HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_GET_ALL_OBJECTS";
Pos = MAP_APPFONT ( 31 , 132 ) ;
Size = MAP_APPFONT ( 16 , 14 ) ;
ButtonImage = Image
{
ImageBitmap = Bitmap
{
File = "getallob.bmp" ;
};
MaskColor = IMAGE_MASK_STDCOLOR;
};
TabStop = TRUE ;
QuickHelpText [ en-US ] = "Apply Objects Individually" ;
};
ImageButton BTN_REMOVE_BITMAP
{
HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_REMOVE_BITMAP";
Pos = MAP_APPFONT ( 60 , 132 ) ;
Size = MAP_APPFONT ( 16 , 14 ) ;
ButtonImage = Image
{
ImageBitmap = Bitmap
{
File = "del1bmp.bmp" ;
};
MaskColor = IMAGE_MASK_STDCOLOR;
};
TabStop = TRUE ;
QuickHelpText [ en-US ] = "Delete Current Image" ;
};
ImageButton BTN_REMOVE_ALL
{
HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_REMOVE_ALL";
Pos = MAP_APPFONT ( 79 , 132 ) ;
Size = MAP_APPFONT ( 16 , 14 ) ;
ButtonImage = Image
{
ImageBitmap = Bitmap
{
File = "delall.bmp" ;
};
MaskColor = IMAGE_MASK_STDCOLOR;
};
TabStop = TRUE ;
QuickHelpText [ en-US ] = "Delete All Images" ;
};
FixedText FT_COUNT
{
Pos = MAP_APPFONT ( 106 , 135 ) ;
Size = MAP_APPFONT ( 26 , 10 ) ;
Text [ en-US ] = "Number" ;
};
FixedText FI_COUNT
{
Pos = MAP_APPFONT ( 133 , 135 ) ;
Size = MAP_APPFONT ( 15 , 10 ) ;
DeltaLang [ de ]= < Default ; Default ; Default ; Default ; > ;
DeltaLang [ en-US ] = < 2 ; Default ; Default ; Default ; > ;
Text = "67" ;
};
FixedLine GRP_BITMAP
{
Pos = MAP_APPFONT ( 6 , 120 ) ;
Size = MAP_APPFONT ( 147 , 8 ) ;
Text [ en-US ] = "Image" ;
};
RadioButton RBT_GROUP
{
HelpID = "sd:RadioButton:FLT_WIN_ANIMATION:RBT_GROUP";
Pos = MAP_APPFONT ( 12 , 167 ) ;
Size = MAP_APPFONT ( 140 , 12 ) ;
Text [ en-US ] = "Group object" ;
};
RadioButton RBT_BITMAP
{
HelpID = "sd:RadioButton:FLT_WIN_ANIMATION:RBT_BITMAP";
Pos = MAP_APPFONT ( 12 , 181 ) ;
Size = MAP_APPFONT ( 140 , 12 ) ;
Text [ en-US ] = "Bitmap object" ;
};
FixedText FT_ADJUSTMENT
{
Pos = MAP_APPFONT ( 12 , 198 ) ;
Size = MAP_APPFONT ( 62 , 10 ) ;
DeltaLang [ de ] = < Default ; Default ; Default ; Default ; > ;
DeltaLang [ en-US ] = < -1 ; Default ; -2 ; Default ; > ;
Text [ en-US ] = "Alignment" ;
};
ListBox LB_ADJUSTMENT
{
HelpID = "sd:ListBox:FLT_WIN_ANIMATION:LB_ADJUSTMENT";
Border = TRUE ;
Pos = MAP_APPFONT ( 75 , 196 ) ;
Size = MAP_APPFONT ( 72 , 100 ) ;
DeltaLang [ de ] = < Default ; Default ; Default ; Default ; > ;
DeltaLang [ en-US ] = < -1 ; Default ; Default ; Default ; > ;
TabStop = TRUE ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "Top Left" ; Default ; > ;
< "Left" ; Default ; > ;
< "Bottom Left" ; Default ; > ;
< "Top" ; Default ; > ;
< "Centered" ; Default ; > ;
< "Bottom" ; Default ; > ;
< "Top Right" ; Default ; > ;
< "Right" ; Default ; > ;
< "Bottom Right" ; Default ; > ;
};
};
PushButton BTN_CREATE_GROUP
{
HelpID = "sd:PushButton:FLT_WIN_ANIMATION:BTN_CREATE_GROUP";
Pos = MAP_APPFONT ( 107 , 216 ) ;
Size = MAP_APPFONT ( 41 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Create" ;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 60 , 216 ) ;
Size = MAP_APPFONT ( 41 , 14 ) ;
TabStop = TRUE ;
};
FixedLine GRP_ANIMATION_GROUP
{
Pos = MAP_APPFONT ( 6 , 155 ) ;
Size = MAP_APPFONT ( 147 , 8 ) ;
Text [ en-US ] = "Animation group" ;
};
String STR_DISPLAY
{
Text [ en-US ] = "Preview";
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#define FLT_WIN_ANIMATION 619
#define CTL_DISPLAY 1
#define BTN_FIRST 1
#define BTN_REVERSE 2
#define BTN_STOP 3
#define BTN_PLAY 4
#define BTN_LAST 5
#define BTN_GET_ONE_OBJECT 6
#define BTN_GET_ALL_OBJECTS 7
#define BTN_REMOVE_BITMAP 8
#define BTN_REMOVE_ALL 9
#define BTN_CREATE_GROUP 10
#define BTN_HELP 1
#define NUM_FLD_BITMAP 1
#define TIME_FIELD 1
#define FT_COUNT 1
#define FI_COUNT 2
#define GRP_BITMAP 1
#define RBT_GROUP 1
#define RBT_BITMAP 2
#define FT_ADJUSTMENT 4
#define LB_ADJUSTMENT 2
#define LB_LOOP_COUNT 3
#define GRP_ANIMATION_GROUP 2
#define STR_DISPLAY 1
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -65,7 +65,7 @@ private: ...@@ -65,7 +65,7 @@ private:
Fraction aScale; Fraction aScale;
public: public:
SdDisplay( vcl::Window* pWin, SdResId Id ); SdDisplay(vcl::Window* pWin);
virtual ~SdDisplay(); virtual ~SdDisplay();
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
...@@ -74,6 +74,7 @@ public: ...@@ -74,6 +74,7 @@ public:
void SetScale( const Fraction& rFrac ); void SetScale( const Fraction& rFrac );
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
virtual Size GetOptimalSize() const SAL_OVERRIDE;
}; };
class AnimationWindow : public SfxDockingWindow class AnimationWindow : public SfxDockingWindow
...@@ -82,8 +83,7 @@ class AnimationWindow : public SfxDockingWindow ...@@ -82,8 +83,7 @@ class AnimationWindow : public SfxDockingWindow
friend class AnimationControllerItem; friend class AnimationControllerItem;
public: public:
AnimationWindow( SfxBindings* pBindings, SfxChildWindow *pCW, AnimationWindow(SfxBindings* pBindings, SfxChildWindow *pCW, vcl::Window* pParent);
vcl::Window* pParent, const SdResId& rSdResId );
virtual ~AnimationWindow(); virtual ~AnimationWindow();
void AddObj( ::sd::View& rView ); void AddObj( ::sd::View& rView );
...@@ -97,31 +97,26 @@ protected: ...@@ -97,31 +97,26 @@ protected:
virtual void FillInfo( SfxChildWinInfo& ) const SAL_OVERRIDE; virtual void FillInfo( SfxChildWinInfo& ) const SAL_OVERRIDE;
private: private:
SdDisplay aCtlDisplay; SdDisplay* m_pCtlDisplay;
ImageButton aBtnFirst; PushButton* m_pBtnFirst;
ImageButton aBtnReverse; PushButton* m_pBtnReverse;
ImageButton aBtnStop; PushButton* m_pBtnStop;
ImageButton aBtnPlay; PushButton* m_pBtnPlay;
ImageButton aBtnLast; PushButton* m_pBtnLast;
NumericField aNumFldBitmap; NumericField* m_pNumFldBitmap;
TimeField aTimeField; TimeField* m_pTimeField;
ListBox aLbLoopCount; ListBox* m_pLbLoopCount;
FixedLine aGrpBitmap; PushButton* m_pBtnGetOneObject;
ImageButton aBtnGetOneObject; PushButton* m_pBtnGetAllObjects;
ImageButton aBtnGetAllObjects; PushButton* m_pBtnRemoveBitmap;
ImageButton aBtnRemoveBitmap; PushButton* m_pBtnRemoveAll;
ImageButton aBtnRemoveAll; FixedText* m_pFiCount;
FixedText aFtCount;
FixedInfo aFiCount; RadioButton* m_pRbtGroup;
FixedLine aGrpAnimation; RadioButton* m_pRbtBitmap;
FixedText* m_pFtAdjustment;
RadioButton aRbtGroup; ListBox* m_pLbAdjustment;
RadioButton aRbtBitmap; PushButton* m_pBtnCreateGroup;
FixedText aFtAdjustment;
ListBox aLbAdjustment;
PushButton aBtnCreateGroup;
HelpButton aBtnHelp;
vcl::Window* pWin; vcl::Window* pWin;
::std::vector< ::std::pair<BitmapEx*, ::tools::Time*> > m_FrameList; ::std::vector< ::std::pair<BitmapEx*, ::tools::Time*> > m_FrameList;
...@@ -129,10 +124,6 @@ private: ...@@ -129,10 +124,6 @@ private:
size_t m_nCurrentFrame; size_t m_nCurrentFrame;
SdDrawDocument* pMyDoc; SdDrawDocument* pMyDoc;
Size aSize;
Size aFltWinSize;
Size aDisplaySize;
Size aBmpSize;
bool bMovie; bool bMovie;
bool bAllObjects; bool bAllObjects;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment