LibreOffice Module toolkit (master) 1
animatedimagespeer.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
23#include <com/sun/star/container/XContainerListener.hpp>
24
25#include <com/sun/star/awt/XAnimatedImages.hpp>
26#include <com/sun/star/awt/XAnimation.hpp>
27#include <com/sun/star/graphic/XGraphic.hpp>
28#include <com/sun/star/util/XModifyListener.hpp>
29
31
32namespace toolkit
33{
34
35
36 //= AnimatedImagesPeer
37
38 struct AnimatedImagesPeer_Data;
39 typedef cppu::ImplInheritanceHelper< VCLXWindow,
40 css::awt::XAnimation,
41 css::container::XContainerListener,
42 css::util::XModifyListener
44
46 {
47 public:
49
50 private:
51 virtual ~AnimatedImagesPeer() override;
52
53 public:
54 // XAnimation
55 virtual void SAL_CALL startAnimation( ) override;
56 virtual void SAL_CALL stopAnimation( ) override;
57 virtual sal_Bool SAL_CALL isAnimationRunning( ) override;
58
59 // VclWindowPeer
60 virtual void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
61 virtual css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
62
63 // XContainerListener
64 virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) override;
65 virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) override;
66 virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) override;
67
68 // XEventListener
69 virtual void SAL_CALL disposing( const css::lang::EventObject& i_event ) override;
70
71 // XModifyListener
72 virtual void SAL_CALL modified( const css::lang::EventObject& i_event ) override;
73
74 // XComponent
75 void SAL_CALL dispose( ) override;
76
78 {
79 OUString sImageURL;
80 mutable css::uno::Reference< css::graphic::XGraphic > xGraphic;
81 };
82
83 private:
84 void ProcessWindowEvent( const VclWindowEvent& i_windowEvent ) override;
85
88 void impl_updateImages_nolck( const css::uno::Reference< css::uno::XInterface >& i_animatedImages );
89
92
94 void updateImageList_nothrow( const css::uno::Reference< css::awt::XAnimatedImages >& i_images );
95
96 std::vector< std::vector< CachedImage > > maCachedImageSets;
97 };
98
99
100} // namespace toolkit
101
102
103/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Any SAL_CALL getProperty(const OUString &PropertyName) override
std::vector< std::vector< CachedImage > > maCachedImageSets
void impl_updateImages_nolck(const css::uno::Reference< css::uno::XInterface > &i_animatedImages)
updates our images with the ones from the given XAnimatedImages component
virtual void SAL_CALL startAnimation() override
virtual void SAL_CALL modified(const css::lang::EventObject &i_event) override
virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent &Event) override
virtual sal_Bool SAL_CALL isAnimationRunning() override
AnimatedImagesPeer(const AnimatedImagesPeer &)=delete
virtual void SAL_CALL setProperty(const OUString &PropertyName, const css::uno::Any &Value) override
virtual void SAL_CALL stopAnimation() override
virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent &Event) override
void SAL_CALL dispose() override
virtual ~AnimatedImagesPeer() override
void updateImageList_nothrow(const css::uno::Reference< css::awt::XAnimatedImages > &i_images)
virtual void SAL_CALL elementInserted(const css::container::ContainerEvent &Event) override
virtual void SAL_CALL disposing(const css::lang::EventObject &i_event) override
AnimatedImagesPeer & operator=(const AnimatedImagesPeer &)=delete
void ProcessWindowEvent(const VclWindowEvent &i_windowEvent) override
Value
cppu::ImplInheritanceHelper< VCLXWindow, css::awt::XAnimation, css::container::XContainerListener, css::util::XModifyListener > AnimatedImagesPeer_Base
css::uno::Reference< css::graphic::XGraphic > xGraphic
unsigned char sal_Bool