weld AnimationWindow

Change-Id: I66bcd02a5fc98fff4d2fb0fcd24d702ff894d536
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87638
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2020-01-28 14:29:11 +00:00
parent b8f787a1a8
commit cad2485d92
4 changed files with 604 additions and 678 deletions

View File

@@ -487,6 +487,8 @@
#define STR_SD_NONE NC_("STR_SD_NONE", "- None -")
#define STR_ANIMATION_DIALOG_TITLE NC_("STR_ANIMATION_DIALOG_TITLE", "Animation")
#define RID_SVXSTR_EDIT_GRAPHIC NC_("RID_SVXSTR_EDIT_GRAPHIC", "Link")
#endif

View File

@@ -25,6 +25,7 @@
#include <svx/svdpagv.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/progress.hxx>
#include <vcl/help.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <vcl/virdev.hxx>
@@ -53,13 +54,9 @@ namespace sd {
/**
* SdDisplay - Control
*/
SdDisplay::SdDisplay(vcl::Window* pWin)
: Control(pWin, 0)
, aScale(1, 1)
SdDisplay::SdDisplay()
: aScale(1, 1)
{
SetMapMode(MapMode(MapUnit::MapPixel));
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
SetBackground( Wallpaper( rStyles.GetFieldColor() ) );
}
SdDisplay::~SdDisplay()
@@ -80,10 +77,18 @@ void SdDisplay::SetBitmapEx( BitmapEx const * pBmpEx )
}
}
void SdDisplay::Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& )
void SdDisplay::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&)
{
rRenderContext.Push(PushFlags::MAPMODE);
rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
rRenderContext.SetBackground( Wallpaper( rStyles.GetFieldColor() ) );
rRenderContext.Erase();
Point aPt;
Size aSize = GetOutputSize();
Size aSize = GetOutputSizePixel();
Size aBmpSize = aBitmapEx.GetBitmap().GetSizePixel();
aBmpSize.setWidth( static_cast<long>( static_cast<double>(aBmpSize.Width()) * static_cast<double>(aScale) ) );
aBmpSize.setHeight( static_cast<long>( static_cast<double>(aBmpSize.Height()) * static_cast<double>(aScale) ) );
@@ -93,7 +98,9 @@ void SdDisplay::Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Re
if( aBmpSize.Height() < aSize.Height() )
aPt.setY( ( aSize.Height() - aBmpSize.Height() ) / 2 );
aBitmapEx.Draw( this, aPt, aBmpSize );
aBitmapEx.Draw(&rRenderContext, aPt, aBmpSize);
rRenderContext.Pop();
}
void SdDisplay::SetScale( const Fraction& rFrac )
@@ -101,23 +108,12 @@ void SdDisplay::SetScale( const Fraction& rFrac )
aScale = rFrac;
}
Size SdDisplay::GetOptimalSize() const
void SdDisplay::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
return LogicToPixel(Size(147, 87), MapMode(MapUnit::MapAppFont));
}
void SdDisplay::DataChanged( const DataChangedEvent& rDCEvt )
{
Control::DataChanged( rDCEvt );
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
SetBackground( Wallpaper( rStyles.GetFieldColor() ) );
SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode()
? sd::OUTPUT_DRAWMODE_CONTRAST
: sd::OUTPUT_DRAWMODE_COLOR );
}
CustomWidgetController::SetDrawingArea(pDrawingArea);
Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(147, 87), MapMode(MapUnit::MapAppFont)));
pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
SetOutputSizePixel(aSize);
}
const size_t AnimationWindow::EMPTY_FRAMELIST = std::numeric_limits<size_t>::max();
@@ -127,37 +123,33 @@ const size_t AnimationWindow::EMPTY_FRAMELIST = std::numeric_limits<size_t>::max
*/
AnimationWindow::AnimationWindow(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* pParent)
: SfxDockingWindow(pInBindings, pCW, pParent,
"DockingAnimation", "modules/simpress/ui/dockinganimation.ui")
"DockingAnimation", "modules/simpress/ui/dockinganimation.ui", true)
, m_xCtlDisplay(new SdDisplay)
, m_xCtlDisplayWin(new weld::CustomWeld(*m_xBuilder, "preview", *m_xCtlDisplay))
, m_xBtnFirst(m_xBuilder->weld_button("first"))
, m_xBtnReverse(m_xBuilder->weld_button("prev"))
, m_xBtnStop(m_xBuilder->weld_button("stop"))
, m_xBtnPlay(m_xBuilder->weld_button("next"))
, m_xBtnLast(m_xBuilder->weld_button("last"))
, m_xNumFldBitmap(m_xBuilder->weld_spin_button("numbitmap"))
, m_xTimeField(m_xBuilder->weld_time_spin_button("duration", TimeFieldFormat::F_SEC_CS))
, m_xLbLoopCount(m_xBuilder->weld_combo_box("loopcount"))
, m_xBtnGetOneObject(m_xBuilder->weld_button("getone"))
, m_xBtnGetAllObjects(m_xBuilder->weld_button("getall"))
, m_xBtnRemoveBitmap(m_xBuilder->weld_button("delone"))
, m_xBtnRemoveAll(m_xBuilder->weld_button("delall"))
, m_xFiCount(m_xBuilder->weld_label("count"))
, m_xRbtGroup(m_xBuilder->weld_radio_button("group"))
, m_xRbtBitmap(m_xBuilder->weld_radio_button("bitmap"))
, m_xFtAdjustment(m_xBuilder->weld_label("alignmentft"))
, m_xLbAdjustment(m_xBuilder->weld_combo_box("alignment"))
, m_xBtnCreateGroup(m_xBuilder->weld_button("create"))
, m_xBtnHelp(m_xBuilder->weld_button("help"))
, m_nCurrentFrame(EMPTY_FRAMELIST)
, bMovie(false)
, bAllObjects(false)
{
get(m_pBtnFirst, "first");
get(m_pBtnReverse, "prev");
get(m_pBtnStop, "stop");
get(m_pBtnPlay, "next");
get(m_pBtnLast, "last");
get(m_pNumFldBitmap, "numbitmap");
get(m_pTimeField, "duration");
m_pTimeField->SetDuration(true);
m_pTimeField->EnforceValidValue(true);
m_pTimeField->SetMax(tools::Time(0, 0, 59, 99*tools::Time::nanoPerCenti));
get(m_pLbLoopCount, "loopcount");
get(m_pBtnGetOneObject, "getone");
get(m_pBtnGetAllObjects, "getall");
get(m_pBtnRemoveBitmap, "delone");
get(m_pBtnRemoveAll, "delall");
get(m_pFiCount, "count");
get(m_pRbtGroup, "group");
get(m_pRbtBitmap, "bitmap");
get(m_pFtAdjustment, "alignmentft");
get(m_pLbAdjustment, "alignment");
get(m_pBtnCreateGroup, "create");
m_pCtlDisplay = VclPtr<SdDisplay>::Create(get<Window>("box"));
m_pCtlDisplay->set_hexpand(true);
m_pCtlDisplay->set_vexpand(true);
m_pCtlDisplay->Show();
SetText(SdResId(STR_ANIMATION_DIALOG_TITLE));
// create new document with page
pMyDoc.reset( new SdDrawDocument(DocumentType::Impress, nullptr) );
@@ -166,35 +158,30 @@ AnimationWindow::AnimationWindow(SfxBindings* pInBindings, SfxChildWindow *pCW,
pControllerItem.reset( new AnimationControllerItem( SID_ANIMATOR_STATE, this, pInBindings ) );
// as long as not in the resource
m_pTimeField->SetFormat( TimeFieldFormat::F_SEC_CS );
m_xBtnFirst->connect_clicked( LINK( this, AnimationWindow, ClickFirstHdl ) );
m_xBtnReverse->connect_clicked( LINK( this, AnimationWindow, ClickPlayHdl ) );
m_xBtnStop->connect_clicked( LINK( this, AnimationWindow, ClickStopHdl ) );
m_xBtnPlay->connect_clicked( LINK( this, AnimationWindow, ClickPlayHdl ) );
m_xBtnLast->connect_clicked( LINK( this, AnimationWindow, ClickLastHdl ) );
m_pBtnFirst->SetClickHdl( LINK( this, AnimationWindow, ClickFirstHdl ) );
m_pBtnReverse->SetClickHdl( LINK( this, AnimationWindow, ClickPlayHdl ) );
m_pBtnStop->SetClickHdl( LINK( this, AnimationWindow, ClickStopHdl ) );
m_pBtnPlay->SetClickHdl( LINK( this, AnimationWindow, ClickPlayHdl ) );
m_pBtnLast->SetClickHdl( LINK( this, AnimationWindow, ClickLastHdl ) );
m_xBtnGetOneObject->connect_clicked( LINK( this, AnimationWindow, ClickGetObjectHdl ) );
m_xBtnGetAllObjects->connect_clicked( LINK( this, AnimationWindow, ClickGetObjectHdl ) );
m_xBtnRemoveBitmap->connect_clicked( LINK( this, AnimationWindow, ClickRemoveBitmapHdl ) );
m_xBtnRemoveAll->connect_clicked( LINK( this, AnimationWindow, ClickRemoveBitmapHdl ) );
m_pBtnGetOneObject->SetClickHdl( LINK( this, AnimationWindow, ClickGetObjectHdl ) );
m_pBtnGetAllObjects->SetClickHdl( LINK( this, AnimationWindow, ClickGetObjectHdl ) );
m_pBtnRemoveBitmap->SetClickHdl( LINK( this, AnimationWindow, ClickRemoveBitmapHdl ) );
m_pBtnRemoveAll->SetClickHdl( LINK( this, AnimationWindow, ClickRemoveBitmapHdl ) );
m_pRbtGroup->SetClickHdl( LINK( this, AnimationWindow, ClickRbtHdl ) );
m_pRbtBitmap->SetClickHdl( LINK( this, AnimationWindow, ClickRbtHdl ) );
m_pBtnCreateGroup->SetClickHdl( LINK( this, AnimationWindow, ClickCreateGroupHdl ) );
m_pNumFldBitmap->SetModifyHdl( LINK( this, AnimationWindow, ModifyBitmapHdl ) );
m_pTimeField->SetModifyHdl( LINK( this, AnimationWindow, ModifyTimeHdl ) );
// disable 3D border
m_pCtlDisplay->SetBorderStyle(WindowBorderStyle::MONO);
m_xRbtGroup->connect_clicked( LINK( this, AnimationWindow, ClickRbtHdl ) );
m_xRbtBitmap->connect_clicked( LINK( this, AnimationWindow, ClickRbtHdl ) );
m_xBtnCreateGroup->connect_clicked( LINK( this, AnimationWindow, ClickCreateGroupHdl ) );
m_xBtnHelp->connect_clicked( LINK( this, AnimationWindow, ClickHelpHdl ) );
m_xNumFldBitmap->connect_value_changed( LINK( this, AnimationWindow, ModifyBitmapHdl ) );
m_xTimeField->connect_value_changed( LINK( this, AnimationWindow, ModifyTimeHdl ) );
SetMinOutputSizePixel(GetOptimalSize());
ResetAttrs();
// the animator is empty; no animation group can be created
m_pBtnCreateGroup->Disable();
m_xBtnCreateGroup->set_sensitive(false);
}
AnimationWindow::~AnimationWindow()
@@ -212,57 +199,59 @@ void AnimationWindow::dispose()
// delete the clones
pMyDoc.reset();
m_pCtlDisplay.disposeAndClear();
m_pBtnFirst.clear();
m_pBtnReverse.clear();
m_pBtnStop.clear();
m_pBtnPlay.clear();
m_pBtnLast.clear();
m_pNumFldBitmap.clear();
m_pTimeField.clear();
m_pLbLoopCount.clear();
m_pBtnGetOneObject.clear();
m_pBtnGetAllObjects.clear();
m_pBtnRemoveBitmap.clear();
m_pBtnRemoveAll.clear();
m_pFiCount.clear();
m_pRbtGroup.clear();
m_pRbtBitmap.clear();
m_pFtAdjustment.clear();
m_pLbAdjustment.clear();
m_pBtnCreateGroup.clear();
m_xCtlDisplayWin.reset();
m_xCtlDisplay.reset();
m_xBtnFirst.reset();
m_xBtnReverse.reset();
m_xBtnStop.reset();
m_xBtnPlay.reset();
m_xBtnLast.reset();
m_xNumFldBitmap.reset();
m_xTimeField.reset();
m_xLbLoopCount.reset();
m_xBtnGetOneObject.reset();
m_xBtnGetAllObjects.reset();
m_xBtnRemoveBitmap.reset();
m_xBtnRemoveAll.reset();
m_xFiCount.reset();
m_xRbtGroup.reset();
m_xRbtBitmap.reset();
m_xFtAdjustment.reset();
m_xLbAdjustment.reset();
m_xBtnCreateGroup.reset();
m_xBtnHelp.reset();
SfxDockingWindow::dispose();
}
IMPL_LINK_NOARG(AnimationWindow, ClickFirstHdl, Button*, void)
IMPL_LINK_NOARG(AnimationWindow, ClickFirstHdl, weld::Button&, void)
{
m_nCurrentFrame = (m_FrameList.empty()) ? EMPTY_FRAMELIST : 0;
UpdateControl();
}
IMPL_LINK_NOARG(AnimationWindow, ClickStopHdl, Button*, void)
IMPL_LINK_NOARG(AnimationWindow, ClickStopHdl, weld::Button&, void)
{
bMovie = false;
}
IMPL_LINK( AnimationWindow, ClickPlayHdl, Button *, p, void )
IMPL_LINK( AnimationWindow, ClickPlayHdl, weld::Button&, rButton, void )
{
ScopeLockGuard aGuard( maPlayLock );
bMovie = true;
bool bDisableCtrls = false;
size_t const nCount = m_FrameList.size();
bool bReverse = p == m_pBtnReverse;
bool bReverse = &rButton == m_xBtnReverse.get();
// it is difficult to find it later on
bool bRbtGroupEnabled = m_pRbtGroup->IsEnabled();
bool bBtnGetAllObjectsEnabled = m_pBtnGetAllObjects->IsEnabled();
bool bBtnGetOneObjectEnabled = m_pBtnGetOneObject->IsEnabled();
bool bRbtGroupEnabled = m_xRbtGroup->get_sensitive();
bool bBtnGetAllObjectsEnabled = m_xBtnGetAllObjects->get_sensitive();
bool bBtnGetOneObjectEnabled = m_xBtnGetOneObject->get_sensitive();
// calculate overall time
tools::Time aTime( 0 );
long nFullTime;
if( m_pRbtBitmap->IsChecked() )
if( m_xRbtBitmap->get_active() )
{
for (size_t i = 0; i < nCount; ++i)
{
@@ -281,8 +270,7 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, Button *, p, void )
if( nFullTime >= 1000 )
{
bDisableCtrls = true;
m_pBtnStop->Enable();
m_pBtnStop->Update();
m_xBtnStop->set_sensitive(true);
OUString const aStr("Animator:"); // here we should think about something smart
pProgress.reset(new SfxProgress( nullptr, aStr, nFullTime ));
}
@@ -302,11 +290,11 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, Button *, p, void )
UpdateControl(bDisableCtrls);
if( m_pRbtBitmap->IsChecked() )
if( m_xRbtBitmap->get_active() )
{
tools::Time const & rTime = m_FrameList[i].second;
m_pTimeField->SetTime( rTime );
m_xTimeField->set_value( rTime );
sal_uLong nTime = rTime.GetMSFromTime();
WaitInEffect( nTime, nTmpTime, pProgress.get() );
@@ -353,45 +341,51 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, Button *, p, void )
if( pProgress )
{
pProgress.reset();
m_pBtnStop->Disable();
m_xBtnStop->set_sensitive(false);
}
m_pRbtGroup->Enable( bRbtGroupEnabled );
m_pBtnGetAllObjects->Enable( bBtnGetAllObjectsEnabled );
m_pBtnGetOneObject->Enable( bBtnGetOneObjectEnabled );
m_xRbtGroup->set_sensitive( bRbtGroupEnabled );
m_xBtnGetAllObjects->set_sensitive( bBtnGetAllObjectsEnabled );
m_xBtnGetOneObject->set_sensitive( bBtnGetOneObjectEnabled );
}
IMPL_LINK_NOARG(AnimationWindow, ClickLastHdl, Button*, void)
IMPL_LINK_NOARG(AnimationWindow, ClickLastHdl, weld::Button&, void)
{
m_nCurrentFrame =
(m_FrameList.empty()) ? EMPTY_FRAMELIST : m_FrameList.size() - 1 ;
UpdateControl();
}
IMPL_LINK( AnimationWindow, ClickRbtHdl, Button*, p, void )
IMPL_LINK_NOARG(AnimationWindow, ClickRbtHdl, weld::Button&, void)
{
if (m_FrameList.empty() || p == m_pRbtGroup || m_pRbtGroup->IsChecked())
if (m_FrameList.empty() || m_xRbtGroup->get_active())
{
m_pTimeField->SetText( OUString() );
m_pTimeField->Enable( false );
m_pLbLoopCount->Enable( false );
m_xTimeField->set_text( OUString() );
m_xTimeField->set_sensitive( false );
m_xLbLoopCount->set_sensitive( false );
}
else if( p == m_pRbtBitmap || m_pRbtBitmap->IsChecked() )
else if (m_xRbtBitmap->get_active())
{
sal_uLong n = static_cast<sal_uLong>(m_pNumFldBitmap->GetValue());
sal_uLong n = m_xNumFldBitmap->get_value();
if( n > 0 )
{
tools::Time const & rTime = m_FrameList[n - 1].second;
m_pTimeField->SetTime( rTime );
m_xTimeField->set_value( rTime );
}
m_pTimeField->Enable();
m_pLbLoopCount->Enable();
m_xTimeField->set_sensitive(true);
m_xLbLoopCount->set_sensitive(true);
}
}
IMPL_LINK( AnimationWindow, ClickGetObjectHdl, Button*, pBtn, void )
IMPL_LINK(AnimationWindow, ClickHelpHdl, weld::Button&, rButton, void)
{
bAllObjects = pBtn == m_pBtnGetAllObjects;
if (Help* pHelp = Application::GetHelp())
pHelp->Start(OStringToOUString(m_xContainer->get_help_id(), RTL_TEXTENCODING_UTF8), &rButton);
}
IMPL_LINK( AnimationWindow, ClickGetObjectHdl, weld::Button&, rBtn, void )
{
bAllObjects = &rBtn == m_xBtnGetAllObjects.get();
// Code now in AddObj()
SfxBoolItem aItem( SID_ANIMATOR_ADD, true );
@@ -400,13 +394,13 @@ IMPL_LINK( AnimationWindow, ClickGetObjectHdl, Button*, pBtn, void )
SID_ANIMATOR_ADD, SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem });
}
IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, Button*, pBtn, void )
IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, weld::Button&, rBtn, void )
{
SdPage* pPage = pMyDoc->GetSdPage(0, PageKind::Standard);
SdrObject* pObject;
// tdf#95298 check m_nCurrentFrame for EMPTY_FRAMELIST to avoid out-of-bound array access
if (pBtn == m_pBtnRemoveBitmap && EMPTY_FRAMELIST != m_nCurrentFrame)
if (&rBtn == m_xBtnRemoveBitmap.get() && EMPTY_FRAMELIST != m_nCurrentFrame)
{
m_FrameList.erase(m_FrameList.begin() + m_nCurrentFrame);
@@ -457,20 +451,20 @@ IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, Button*, pBtn, void )
// can we create an animation group
if (m_FrameList.empty())
{
m_pBtnCreateGroup->Disable();
m_xBtnCreateGroup->set_sensitive(false);
// if previous disabled by acquisition of AnimatedGIFs:
//m_pRbtBitmap->Enable();
m_pRbtGroup->Enable();
//m_xRbtBitmap->set_sensitive(true);
m_xRbtGroup->set_sensitive(true);
}
// calculate and set zoom for DisplayWin
Fraction aFrac(GetScale());
m_pCtlDisplay->SetScale(aFrac);
m_xCtlDisplay->SetScale(aFrac);
UpdateControl();
}
IMPL_LINK_NOARG(AnimationWindow, ClickCreateGroupHdl, Button*, void)
IMPL_LINK_NOARG(AnimationWindow, ClickCreateGroupHdl, weld::Button&, void)
{
// Code now in CreatePresObj()
SfxBoolItem aItem( SID_ANIMATOR_CREATE, true );
@@ -479,9 +473,9 @@ IMPL_LINK_NOARG(AnimationWindow, ClickCreateGroupHdl, Button*, void)
SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem });
}
IMPL_LINK_NOARG(AnimationWindow, ModifyBitmapHdl, Edit&, void)
IMPL_LINK_NOARG(AnimationWindow, ModifyBitmapHdl, weld::SpinButton&, void)
{
sal_uLong nBmp = static_cast<sal_uLong>(m_pNumFldBitmap->GetValue());
sal_uLong nBmp = m_xNumFldBitmap->get_value();
if (nBmp > m_FrameList.size())
{
@@ -493,13 +487,13 @@ IMPL_LINK_NOARG(AnimationWindow, ModifyBitmapHdl, Edit&, void)
UpdateControl();
}
IMPL_LINK_NOARG(AnimationWindow, ModifyTimeHdl, Edit&, void)
IMPL_LINK_NOARG(AnimationWindow, ModifyTimeHdl, weld::TimeSpinButton&, void)
{
sal_uLong nPos = static_cast<sal_uLong>(m_pNumFldBitmap->GetValue() - 1);
sal_uLong nPos = m_xNumFldBitmap->get_value() - 1;
tools::Time & rTime = m_FrameList[nPos].second;
rTime = m_pTimeField->GetTime();
rTime = m_xTimeField->get_value();
}
void AnimationWindow::UpdateControl(bool const bDisableCtrls)
@@ -532,81 +526,81 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls)
rBmp = pVD->GetBitmapEx( aObjRect.TopLeft(), aObjSize );
}
m_pCtlDisplay->SetBitmapEx(&rBmp);
m_xCtlDisplay->SetBitmapEx(&rBmp);
}
else
{
m_pCtlDisplay->SetBitmapEx(nullptr);
m_xCtlDisplay->SetBitmapEx(nullptr);
}
m_pCtlDisplay->Invalidate();
m_pCtlDisplay->Update();
m_pFiCount->SetText(OUString::number(
m_xCtlDisplay->Invalidate();
m_xFiCount->set_label(OUString::number(
m_FrameList.size()));
if (!m_FrameList.empty() && !bMovie)
{
size_t nIndex = m_nCurrentFrame + 1;
m_pNumFldBitmap->SetValue(nIndex);
m_xNumFldBitmap->set_value(nIndex);
// if there is at least 1 object in the list
m_pBtnFirst->Enable();
m_pBtnReverse->Enable();
m_pBtnPlay->Enable();
m_pBtnLast->Enable();
m_pNumFldBitmap->Enable();
m_pTimeField->Enable();
m_pLbLoopCount->Enable();
m_pBtnRemoveBitmap->Enable();
m_pBtnRemoveAll->Enable();
m_xBtnFirst->set_sensitive(true);
m_xBtnReverse->set_sensitive(true);
m_xBtnPlay->set_sensitive(true);
m_xBtnLast->set_sensitive(true);
m_xNumFldBitmap->set_sensitive(true);
m_xTimeField->set_sensitive(true);
m_xLbLoopCount->set_sensitive(true);
m_xBtnRemoveBitmap->set_sensitive(true);
m_xBtnRemoveAll->set_sensitive(true);
}
else
{
// if no object is in the list
m_pBtnFirst->Enable( false );
m_pBtnReverse->Enable( false );
m_pBtnPlay->Enable( false );
m_pBtnLast->Enable( false );
m_pNumFldBitmap->Enable( false );
m_pTimeField->Enable( false );
m_pLbLoopCount->Enable( false );
m_pBtnRemoveBitmap->Enable( false );
m_pBtnRemoveAll->Enable( false );
m_xBtnFirst->set_sensitive( false );
m_xBtnReverse->set_sensitive( false );
m_xBtnPlay->set_sensitive( false );
m_xBtnLast->set_sensitive( false );
m_xNumFldBitmap->set_sensitive( false );
m_xTimeField->set_sensitive( false );
m_xLbLoopCount->set_sensitive( false );
m_xBtnRemoveBitmap->set_sensitive( false );
m_xBtnRemoveAll->set_sensitive( false );
}
if( bMovie && bDisableCtrls )
{
m_pBtnGetOneObject->Enable( false );
m_pBtnGetAllObjects->Enable( false );
m_pRbtGroup->Enable( false );
m_pRbtBitmap->Enable( false );
m_pBtnCreateGroup->Enable( false );
m_pFtAdjustment->Enable( false );
m_pLbAdjustment->Enable( false );
m_xBtnGetOneObject->set_sensitive( false );
m_xBtnGetAllObjects->set_sensitive( false );
m_xRbtGroup->set_sensitive( false );
m_xRbtBitmap->set_sensitive( false );
m_xBtnCreateGroup->set_sensitive( false );
m_xFtAdjustment->set_sensitive( false );
m_xLbAdjustment->set_sensitive( false );
}
else
{
// enable 'group object' only if it is not an Animated GIF
if (m_FrameList.empty())
{
m_pRbtGroup->Enable();
m_xRbtGroup->set_sensitive(true);
}
m_pRbtBitmap->Enable();
m_pBtnCreateGroup->Enable(!m_FrameList.empty());
m_pFtAdjustment->Enable();
m_pLbAdjustment->Enable();
m_xRbtBitmap->set_sensitive(true);
m_xBtnCreateGroup->set_sensitive(!m_FrameList.empty());
m_xFtAdjustment->set_sensitive(true);
m_xLbAdjustment->set_sensitive(true);
}
ClickRbtHdl( nullptr );
ClickRbtHdl(*m_xRbtGroup);
}
void AnimationWindow::ResetAttrs()
{
m_pRbtGroup->Check();
m_pLbAdjustment->SelectEntryPos( BA_CENTER );
m_xRbtGroup->set_active(true);
m_xLbAdjustment->set_active( BA_CENTER );
// LoopCount
m_pLbLoopCount->SelectEntryPos( m_pLbLoopCount->GetEntryCount() - 1);
m_xLbLoopCount->set_active( m_xLbLoopCount->get_count() - 1);
UpdateControl();
}
@@ -648,7 +642,7 @@ Fraction AnimationWindow::GetScale()
aBmpSize.AdjustWidth(10 );
aBmpSize.AdjustHeight(10 );
Size aDisplaySize(m_pCtlDisplay->GetOutputSize());
Size aDisplaySize(m_xCtlDisplay->GetOutputSizePixel());
aFrac = Fraction( std::min( static_cast<double>(aDisplaySize.Width()) / static_cast<double>(aBmpSize.Width()),
static_cast<double>(aDisplaySize.Height()) / static_cast<double>(aBmpSize.Height()) ) );
@@ -660,7 +654,7 @@ void AnimationWindow::Resize()
{
SfxDockingWindow::Resize();
Fraction aFrac(GetScale());
m_pCtlDisplay->SetScale(aFrac);
m_xCtlDisplay->SetScale(aFrac);
}
bool AnimationWindow::Close()
@@ -733,9 +727,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
sal_uInt32 nLoopCount = aAnimation.GetLoopCount();
if( !nLoopCount ) // endless
m_pLbLoopCount->SelectEntryPos( m_pLbLoopCount->GetEntryCount() - 1);
m_xLbLoopCount->set_active( m_xLbLoopCount->get_count() - 1);
else
m_pLbLoopCount->SelectEntry(OUString::number( nLoopCount ) );
m_xLbLoopCount->set_active_text(OUString::number( nLoopCount ) );
}
long nTime = rAnimationBitmap.mnWait;
@@ -749,8 +743,8 @@ void AnimationWindow::AddObj (::sd::View& rView )
++m_nCurrentFrame;
}
// if an animated GIF is taken, only such one can be created
m_pRbtBitmap->Check();
m_pRbtGroup->Enable( false );
m_xRbtBitmap->set_active(true);
m_xRbtGroup->set_sensitive( false );
bAnimObj = true;
}
}
@@ -766,7 +760,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
size_t nIndex = m_nCurrentFrame + 1;
m_FrameList.insert(
m_FrameList.begin() + nIndex,
::std::make_pair(aBitmapEx, m_pTimeField->GetTime()));
::std::make_pair(aBitmapEx, m_xTimeField->get_value()));
// increment => next one inserted after this one
++m_nCurrentFrame;
@@ -784,7 +778,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
{
BitmapEx aBitmapEx(rView.GetAllMarkedGraphic().GetBitmapEx());
::tools::Time aTime( m_pTimeField->GetTime() );
::tools::Time aTime( m_xTimeField->get_value() );
size_t nIndex = m_nCurrentFrame + 1;
m_FrameList.insert(
@@ -815,7 +809,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
size_t nIndex = m_nCurrentFrame + 1;
m_FrameList.insert(
m_FrameList.begin() + nIndex,
::std::make_pair(aBitmapEx, m_pTimeField->GetTime()));
::std::make_pair(aBitmapEx, m_xTimeField->get_value()));
// increment => next one inserted after this one
++m_nCurrentFrame;
@@ -852,12 +846,12 @@ void AnimationWindow::AddObj (::sd::View& rView )
// there, we can create an animation group
if (nCloneCount == 0 && !m_FrameList.empty())
{
m_pBtnCreateGroup->Enable();
m_xBtnCreateGroup->set_sensitive(true);
}
// calculate and set zoom for DisplayWin
Fraction aFrac( GetScale() );
m_pCtlDisplay->SetScale(aFrac);
m_xCtlDisplay->SetScale(aFrac);
UpdateControl();
}
@@ -875,7 +869,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
const Point aWindowCenter( pOutWin->PixelToLogic( Point( aTemp.Width() >> 1, aTemp.Height() >> 1 ) ) );
const OutputDevice* pDefDev = Application::GetDefaultDevice();
const size_t nCount = m_FrameList.size();
BitmapAdjustment eBA = static_cast<BitmapAdjustment>(m_pLbAdjustment->GetSelectedEntryPos());
BitmapAdjustment eBA = static_cast<BitmapAdjustment>(m_xLbAdjustment->get_active());
// find biggest bitmap
for (size_t i = 0; i < nCount; ++i)
@@ -899,7 +893,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
SdrPageView* pPV = rView.GetSdrPageView();
if( m_pRbtBitmap->IsChecked() )
if( m_xRbtBitmap->get_active() )
{
// create bitmap group (Animated GIF)
Animation aAnimation;
@@ -962,10 +956,10 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
// find LoopCount (number of passes)
AnimationBitmap aAnimationBitmap;
sal_uInt32 nLoopCount = 0;
sal_Int32 nPos = m_pLbLoopCount->GetSelectedEntryPos();
sal_Int32 nPos = m_xLbLoopCount->get_active();
if( nPos != LISTBOX_ENTRY_NOTFOUND && nPos != m_pLbLoopCount->GetEntryCount() - 1 ) // endless
nLoopCount = m_pLbLoopCount->GetSelectedEntry().toUInt32();
if( nPos != -1 && nPos != m_xLbLoopCount->get_count() - 1 ) // endless
nLoopCount = m_xLbLoopCount->get_active_text().toUInt32();
aAnimationBitmap.maBitmapEx = rBitmapEx;
aAnimationBitmap.maPositionPixel = aPt;
@@ -1088,7 +1082,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
}
}
ClickFirstHdl( nullptr );
ClickFirstHdl(*m_xBtnFirst);
}
void AnimationWindow::DataChanged( const DataChangedEvent& rDCEvt )
@@ -1123,8 +1117,8 @@ void AnimationControllerItem::StateChanged( sal_uInt16 nSId,
if (pStateItem)
{
sal_uInt16 nState = pStateItem->GetValue();
pAnimationWin->m_pBtnGetOneObject->Enable( nState & 1 );
pAnimationWin->m_pBtnGetAllObjects->Enable( nState & 2 );
pAnimationWin->m_xBtnGetOneObject->set_sensitive( nState & 1 );
pAnimationWin->m_xBtnGetAllObjects->set_sensitive( nState & 2 );
}
}
}

View File

@@ -21,17 +21,12 @@
#define INCLUDED_SD_SOURCE_UI_INC_ANIMOBJS_HXX
#include <sfx2/dockwin.hxx>
#include <vcl/fixed.hxx>
#include <tools/fract.hxx>
#include <sfx2/ctrlitem.hxx>
#include <sfx2/progress.hxx>
#include <vcl/button.hxx>
#include <vcl/field.hxx>
#include <vcl/lstbox.hxx>
#include <misc/scopelock.hxx>
#include <vcl/customweld.hxx>
#include <vcl/weld.hxx>
class SdDrawDocument;
@@ -53,14 +48,14 @@ enum BitmapAdjustment
BA_RIGHT_DOWN
};
class SdDisplay : public Control
class SdDisplay : public weld::CustomWidgetController
{
private:
BitmapEx aBitmapEx;
Fraction aScale;
public:
SdDisplay(vcl::Window* pWin);
SdDisplay();
virtual ~SdDisplay() override;
virtual void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect ) override;
@@ -68,8 +63,7 @@ public:
void SetBitmapEx( BitmapEx const * pBmpEx );
void SetScale( const Fraction& rFrac );
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
virtual Size GetOptimalSize() const override;
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
};
class AnimationWindow : public SfxDockingWindow
@@ -92,26 +86,28 @@ protected:
virtual void Resize() override;
private:
VclPtr<SdDisplay> m_pCtlDisplay;
VclPtr<PushButton> m_pBtnFirst;
VclPtr<PushButton> m_pBtnReverse;
VclPtr<PushButton> m_pBtnStop;
VclPtr<PushButton> m_pBtnPlay;
VclPtr<PushButton> m_pBtnLast;
VclPtr<NumericField> m_pNumFldBitmap;
VclPtr<TimeField> m_pTimeField;
VclPtr<ListBox> m_pLbLoopCount;
VclPtr<PushButton> m_pBtnGetOneObject;
VclPtr<PushButton> m_pBtnGetAllObjects;
VclPtr<PushButton> m_pBtnRemoveBitmap;
VclPtr<PushButton> m_pBtnRemoveAll;
VclPtr<FixedText> m_pFiCount;
std::unique_ptr<SdDisplay> m_xCtlDisplay;
std::unique_ptr<weld::CustomWeld> m_xCtlDisplayWin;
std::unique_ptr<weld::Button> m_xBtnFirst;
std::unique_ptr<weld::Button> m_xBtnReverse;
std::unique_ptr<weld::Button> m_xBtnStop;
std::unique_ptr<weld::Button> m_xBtnPlay;
std::unique_ptr<weld::Button> m_xBtnLast;
std::unique_ptr<weld::SpinButton> m_xNumFldBitmap;
std::unique_ptr<weld::TimeSpinButton> m_xTimeField;
std::unique_ptr<weld::ComboBox> m_xLbLoopCount;
std::unique_ptr<weld::Button> m_xBtnGetOneObject;
std::unique_ptr<weld::Button> m_xBtnGetAllObjects;
std::unique_ptr<weld::Button> m_xBtnRemoveBitmap;
std::unique_ptr<weld::Button> m_xBtnRemoveAll;
std::unique_ptr<weld::Label> m_xFiCount;
VclPtr<RadioButton> m_pRbtGroup;
VclPtr<RadioButton> m_pRbtBitmap;
VclPtr<FixedText> m_pFtAdjustment;
VclPtr<ListBox> m_pLbAdjustment;
VclPtr<PushButton> m_pBtnCreateGroup;
std::unique_ptr<weld::RadioButton> m_xRbtGroup;
std::unique_ptr<weld::RadioButton> m_xRbtBitmap;
std::unique_ptr<weld::Label> m_xFtAdjustment;
std::unique_ptr<weld::ComboBox> m_xLbAdjustment;
std::unique_ptr<weld::Button> m_xBtnCreateGroup;
std::unique_ptr<weld::Button> m_xBtnHelp;
::std::vector< ::std::pair<BitmapEx, ::tools::Time> > m_FrameList;
static const size_t EMPTY_FRAMELIST;
@@ -125,16 +121,17 @@ private:
ScopeLock maPlayLock;
DECL_LINK( ClickFirstHdl, Button*, void );
DECL_LINK( ClickStopHdl, Button*, void );
DECL_LINK( ClickPlayHdl, Button*, void );
DECL_LINK( ClickLastHdl, Button*, void );
DECL_LINK( ClickGetObjectHdl, Button*, void );
DECL_LINK( ClickRemoveBitmapHdl, Button*, void );
DECL_LINK( ClickRbtHdl, Button*, void );
DECL_LINK( ClickCreateGroupHdl, Button*, void );
DECL_LINK( ModifyBitmapHdl, Edit&, void );
DECL_LINK( ModifyTimeHdl, Edit&, void );
DECL_LINK( ClickFirstHdl, weld::Button&, void );
DECL_LINK( ClickStopHdl, weld::Button&, void );
DECL_LINK( ClickPlayHdl, weld::Button&, void );
DECL_LINK( ClickLastHdl, weld::Button&, void );
DECL_LINK( ClickGetObjectHdl, weld::Button&, void );
DECL_LINK( ClickRemoveBitmapHdl, weld::Button&, void );
DECL_LINK( ClickRbtHdl, weld::Button&, void );
DECL_LINK( ClickHelpHdl, weld::Button&, void );
DECL_LINK( ClickCreateGroupHdl, weld::Button&, void );
DECL_LINK( ModifyBitmapHdl, weld::SpinButton&, void );
DECL_LINK( ModifyTimeHdl, weld::TimeSpinButton&, void );
void UpdateControl(bool bDisableCtrls = false);
void ResetAttrs();

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<!-- Generated with glade 3.22.1 -->
<interface domain="sd">
<requires lib="gtk+" version="3.18"/>
<object class="GtkAdjustment" id="adjustment1">
@@ -9,25 +9,30 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment2">
<property name="upper">600</property>
<property name="step_increment">10</property>
<property name="page_increment">60</property>
</object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">sd/res/get1obj.png</property>
<property name="icon_name">sd/res/get1obj.png</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">sd/res/getallob.png</property>
<property name="icon_name">sd/res/getallob.png</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">sd/res/del1bmp.png</property>
<property name="icon_name">sd/res/del1bmp.png</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">sd/res/delall.png</property>
<property name="icon_name">sd/res/delall.png</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
@@ -54,579 +59,507 @@
<property name="can_focus">False</property>
<property name="stock">gtk-goto-last</property>
</object>
<object class="GtkWindow" id="DockingAnimation">
<object class="GtkBox" id="DockingAnimation">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="dockinganimation|DockingAnimation">Animation</property>
<property name="type_hint">dock</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkBox" id="box1">
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<property name="row_spacing">24</property>
<child>
<object class="GtkGrid" id="grid1">
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">24</property>
<property name="row_spacing">12</property>
<child>
<object class="GtkGrid" id="grid2">
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">12</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkBox" id="box">
<object class="GtkComboBoxText" id="loopcount">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|box|tooltip_text">Preview</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|loopcount|tooltip_text">Loop Count</property>
<items>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>12</item>
<item>15</item>
<item>20</item>
<item>25</item>
<item>50</item>
<item>100</item>
<item>500</item>
<item>1000</item>
<item translatable="yes" context="dockinganimation|loopcount">Max.</item>
</items>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="duration">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|duration|tooltip_text">Duration</property>
<property name="adjustment">adjustment2</property>
<property name="digits">2</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="numbitmap">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|numbitmap|tooltip_text">Image Number</property>
<property name="text">1</property>
<property name="adjustment">adjustment1</property>
<property name="value">1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="column_spacing">6</property>
<child>
<placeholder/>
<object class="GtkButton" id="first">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|first|tooltip_text">First Image</property>
<property name="image">image5</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="prev">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|prev|tooltip_text">Backwards</property>
<property name="image">image6</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="stop">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|stop|tooltip_text">Stop</property>
<property name="image">image7</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="next">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|next|tooltip_text">Play</property>
<property name="image">image8</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="last">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|last|tooltip_text">Last Image</property>
<property name="image">image9</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkDrawingArea" id="preview">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid3">
<object class="GtkGrid" id="grid6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkComboBoxText" id="loopcount">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|loopcount|tooltip_text">Loop Count</property>
<items>
<item translatable="no">1</item>
<item translatable="no">2</item>
<item translatable="no">3</item>
<item translatable="no">4</item>
<item translatable="no">5</item>
<item translatable="no">6</item>
<item translatable="no">7</item>
<item translatable="no">8</item>
<item translatable="no">9</item>
<item translatable="no">10</item>
<item translatable="no">12</item>
<item translatable="no">15</item>
<item translatable="no">20</item>
<item translatable="no">25</item>
<item translatable="no">50</item>
<item translatable="no">100</item>
<item translatable="no">500</item>
<item translatable="no">1000</item>
<item translatable="yes" context="dockinganimation|loopcount">Max.</item>
</items>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="duration:hh:mm">
<object class="GtkRadioButton" id="group">
<property name="label" translatable="yes" context="dockinganimation|group">Group object</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|duration|tooltip_text">Duration</property>
<property name="digits">2</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="numbitmap">
<object class="GtkRadioButton" id="bitmap">
<property name="label" translatable="yes" context="dockinganimation|bitmap">Bitmap object</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|numbitmap|tooltip_text">Image Number</property>
<property name="text" translatable="no">1</property>
<property name="adjustment">adjustment1</property>
<property name="value">1</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<property name="group">group</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid9">
<object class="GtkGrid" id="grid10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="column_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkButton" id="first">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|first|tooltip_text">First Image</property>
<property name="image">image5</property>
<object class="GtkLabel" id="alignmentft">
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="dockinganimation|alignmentft">Alignment</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">alignment</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="prev">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|prev|tooltip_text">Backwards</property>
<property name="image">image6</property>
<object class="GtkComboBoxText" id="alignment">
<property name="can_focus">False</property>
<items>
<item translatable="yes" context="dockinganimation|alignment">Top Left</item>
<item translatable="yes" context="dockinganimation|alignment">Left</item>
<item translatable="yes" context="dockinganimation|alignment">Bottom Left</item>
<item translatable="yes" context="dockinganimation|alignment">Top</item>
<item translatable="yes" context="dockinganimation|alignment">Centered</item>
<item translatable="yes" context="dockinganimation|alignment">Bottom</item>
<item translatable="yes" context="dockinganimation|alignment">Top Right</item>
<item translatable="yes" context="dockinganimation|alignment">Right</item>
<item translatable="yes" context="dockinganimation|alignment">Bottom Right</item>
</items>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="dockinganimation|label1">Animation group</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="column_spacing">24</property>
<child>
<object class="GtkGrid" id="grid11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkButton" id="stop">
<object class="GtkButton" id="getone">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|stop|tooltip_text">Stop</property>
<property name="image">image7</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|getone|tooltip_text">Apply Object</property>
<property name="image">image1</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="next">
<object class="GtkButton" id="getall">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|next|tooltip_text">Play</property>
<property name="image">image8</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|getall|tooltip_text">Apply Objects Individually</property>
<property name="image">image2</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="last">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|last|tooltip_text">Last Image</property>
<property name="image">image9</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkRadioButton" id="group">
<property name="label" translatable="yes" context="dockinganimation|group">Group object</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">bitmap</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="bitmap">
<property name="label" translatable="yes" context="dockinganimation|bitmap">Bitmap object</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<property name="group">group</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="alignmentft">
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="dockinganimation|alignmentft">Alignment</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">alignment</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="alignment">
<property name="can_focus">False</property>
<items>
<item translatable="yes" context="dockinganimation|alignment">Top Left</item>
<item translatable="yes" context="dockinganimation|alignment">Left</item>
<item translatable="yes" context="dockinganimation|alignment">Bottom Left</item>
<item translatable="yes" context="dockinganimation|alignment">Top</item>
<item translatable="yes" context="dockinganimation|alignment">Centered</item>
<item translatable="yes" context="dockinganimation|alignment">Bottom</item>
<item translatable="yes" context="dockinganimation|alignment">Top Right</item>
<item translatable="yes" context="dockinganimation|alignment">Right</item>
<item translatable="yes" context="dockinganimation|alignment">Bottom Right</item>
</items>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="dockinganimation|label1">Animation group</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid7">
<object class="GtkGrid" id="grid12">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="hexpand">True</property>
<property name="column_spacing">24</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkGrid" id="grid11">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkButton" id="getone">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|getone|tooltip_text">Apply Object</property>
<property name="image">image1</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="getall">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|getall|tooltip_text">Apply Objects Individually</property>
<property name="image">image2</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<property name="label" translatable="yes" context="dockinganimation|label3">Number</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid12">
<object class="GtkLabel" id="count">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="hexpand">True</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="dockinganimation|label3">Number</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="count">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="no">67</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="hexpand">True</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkButton" id="delone">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|delone|tooltip_text">Delete Current Image</property>
<property name="image">image3</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="delall">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|delall|tooltip_text">Delete All Images</property>
<property name="image">image4</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<property name="label">67</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="hexpand">True</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkButton" id="delone">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|delone|tooltip_text">Delete Current Image</property>
<property name="image">image3</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="delall">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="dockinganimation|delall|tooltip_text">Delete All Images</property>
<property name="image">image4</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="dockinganimation|label2">Image</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="dockinganimation|label2">Image</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButtonBox" id="buttonbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButtonBox" id="buttonbox">
<object class="GtkButton" id="create">
<property name="label" translatable="yes" context="dockinganimation|create">Create</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="create">
<property name="label" translatable="yes" context="dockinganimation|create">Create</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
</interface>