OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_BASE_ANIMATION_MULTI_ANIMATION_H_ | 5 #ifndef UI_BASE_ANIMATION_MULTI_ANIMATION_H_ |
6 #define UI_BASE_ANIMATION_MULTI_ANIMATION_H_ | 6 #define UI_BASE_ANIMATION_MULTI_ANIMATION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ui/base/animation/animation.h" | 11 #include "ui/base/animation/animation.h" |
12 #include "ui/base/animation/tween.h" | 12 #include "ui/base/animation/tween.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 // MultiAnimation is an animation that consists of a number of sub animations. | 16 // MultiAnimation is an animation that consists of a number of sub animations. |
17 // To create a MultiAnimation pass in the parts, invoke Start() and the delegate | 17 // To create a MultiAnimation pass in the parts, invoke Start() and the delegate |
18 // is notified as the animation progresses. By default MultiAnimation runs until | 18 // is notified as the animation progresses. By default MultiAnimation runs until |
19 // Stop is invoked, see |set_continuous()| for details. | 19 // Stop is invoked, see |set_continuous()| for details. |
20 class MultiAnimation : public Animation { | 20 class UI_API MultiAnimation : public Animation { |
21 public: | 21 public: |
22 // Defines part of the animation. Each part consists of the following: | 22 // Defines part of the animation. Each part consists of the following: |
23 // | 23 // |
24 // time_ms: the time of the part. | 24 // time_ms: the time of the part. |
25 // start_time_ms: the amount of time to offset this part by when calculating | 25 // start_time_ms: the amount of time to offset this part by when calculating |
26 // the percented completed. | 26 // the percented completed. |
27 // end_time_ms: the end time used to calculate the percentange completed. | 27 // end_time_ms: the end time used to calculate the percentange completed. |
28 // | 28 // |
29 // In most cases |start_time_ms| = 0 and |end_time_ms| = |time_ms|. But you | 29 // In most cases |start_time_ms| = 0 and |end_time_ms| = |time_ms|. But you |
30 // can adjust the start/end for different effects. For example, to run a part | 30 // can adjust the start/end for different effects. For example, to run a part |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 // See description above setter. | 86 // See description above setter. |
87 bool continuous_; | 87 bool continuous_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(MultiAnimation); | 89 DISALLOW_COPY_AND_ASSIGN(MultiAnimation); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace ui | 92 } // namespace ui |
93 | 93 |
94 #endif // UI_BASE_ANIMATION_MULTI_ANIMATION_H_ | 94 #endif // UI_BASE_ANIMATION_MULTI_ANIMATION_H_ |
OLD | NEW |