Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 APP_MULTI_ANIMATION_H_ | 5 #ifndef APP_MULTI_ANIMATION_H_ |
| 6 #define APP_MULTI_ANIMATION_H_ | 6 #define APP_MULTI_ANIMATION_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 40 int start_time_ms; | 40 int start_time_ms; |
| 41 int end_time_ms; | 41 int end_time_ms; |
| 42 Tween::Type type; | 42 Tween::Type type; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 typedef std::vector<Part> Parts; | 45 typedef std::vector<Part> Parts; |
| 46 | 46 |
| 47 explicit MultiAnimation(const Parts& parts); | 47 explicit MultiAnimation(const Parts& parts); |
| 48 virtual ~MultiAnimation(); | 48 virtual ~MultiAnimation(); |
| 49 | 49 |
| 50 // Stops and resets the animation to the beginning. | |
| 51 void Reset(); | |
|
sky
2010/12/06 17:38:12
If we want this, it should be in Animation.
Evan Stade
2010/12/06 22:15:48
removed
| |
| 52 | |
| 50 // Sets whether the animation continues after it reaches the end. If true, the | 53 // Sets whether the animation continues after it reaches the end. If true, the |
| 51 // animation runs until explicitly stopped. The default is true. | 54 // animation runs until explicitly stopped. The default is true. |
| 52 void set_continuous(bool continuous) { continuous_ = continuous; } | 55 void set_continuous(bool continuous) { continuous_ = continuous; } |
| 53 | 56 |
| 54 // Returns the current value. The current value for a MultiAnimation is | 57 // Returns the current value. The current value for a MultiAnimation is |
| 55 // determined from the tween type of the current part. | 58 // determined from the tween type of the current part. |
| 56 virtual double GetCurrentValue() const { return current_value_; } | 59 virtual double GetCurrentValue() const { return current_value_; } |
| 57 | 60 |
| 58 // Returns the index of the current part. | 61 // Returns the index of the current part. |
| 59 size_t current_part_index() const { return current_part_index_; } | 62 size_t current_part_index() const { return current_part_index_; } |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 80 // Index of the current part. | 83 // Index of the current part. |
| 81 size_t current_part_index_; | 84 size_t current_part_index_; |
| 82 | 85 |
| 83 // See description above setter. | 86 // See description above setter. |
| 84 bool continuous_; | 87 bool continuous_; |
| 85 | 88 |
| 86 DISALLOW_COPY_AND_ASSIGN(MultiAnimation); | 89 DISALLOW_COPY_AND_ASSIGN(MultiAnimation); |
| 87 }; | 90 }; |
| 88 | 91 |
| 89 #endif // APP_MULTI_ANIMATION_H_ | 92 #endif // APP_MULTI_ANIMATION_H_ |
| OLD | NEW |