00001 /* 00002 * The information in this file is 00003 * Copyright(c) 2007 Ball Aerospace & Technologies Corporation 00004 * and is subject to the terms and conditions of the 00005 * GNU Lesser General Public License Version 2.1 00006 * The license text is available from 00007 * http://www.gnu.org/licenses/lgpl.html 00008 */ 00009 #ifndef ANIMATIONTOOLBAR_H 00010 #define ANIMATIONTOOLBAR_H 00011 00012 #include "ConfigurationSettings.h" 00013 #include "ToolBar.h" 00014 #include "TypesFile.h" 00015 00016 #include <string> 00017 #include <vector> 00018 00019 class AnimationController; 00020 class SpatialDataView; 00021 00022 /** 00023 * Manages animation controllers and provides a user interface to play their animations. 00024 * 00025 * The animation tool bar is a tool bar that displays all available animation controllers and 00026 * widgets to play animations of a currently selected animation controller. This class provides 00027 * the capability to create, activate, and destroy animation controllers. A pointer to the 00028 * animation toolbar can be obtained by calling DesktopServices::getWindow() using "Animation" 00029 * as the window name and TOOLBAR as the window type. 00030 * 00031 * This subclass of Subject will notify upon the following conditions: 00032 * - The tool bar is deleted. This will only occur on application shut down. 00033 * - The setAnimationController() method is called. 00034 * - Other notifications documented in the ToolBar class. 00035 * 00036 * @see AnimationController, ToolBar 00037 */ 00038 class AnimationToolBar : public ToolBar 00039 { 00040 public: 00041 SETTING(FrameSpeeds, AnimationToolBar, std::vector<double>, std::vector<double>()) 00042 /** 00043 * Emitted with any<AnimationController*> when the current animation 00044 * controller is changed. 00045 */ 00046 SIGNAL_METHOD(AnimationToolBar, ControllerChanged) 00047 00048 /** 00049 * Set the current animation controller in the toolbar. 00050 * 00051 * This method activates the given animation controller in the toolbar's 00052 * user interface. The controller execution widgets are updated and 00053 * enabled accordingly. 00054 * 00055 * @param pController 00056 * The animation controller to activate in the toolbar. If 00057 * \b NULL is passed in, no controller will be active and all 00058 * controller execution widgets will be disabled. 00059 * 00060 * @notify This method will notify signalControllerChanged() with 00061 * any<AnimationController*> if the given controller is 00062 * different than the current controller. 00063 */ 00064 virtual void setAnimationController(AnimationController* pController) = 0; 00065 00066 /** 00067 * Returns the current animation controller. 00068 * 00069 * @return A pointer to the current animation controller. 00070 */ 00071 virtual AnimationController* getAnimationController() const = 0; 00072 00073 /** 00074 * Hide or show the timestamp on the toolbar. 00075 * 00076 * A plugin may want to hide the timestamp if you are providing the same 00077 * information in its own window. 00078 * 00079 * @param hideTimestamp 00080 * true if the timestamp should be hidden, false otherwise. 00081 * 00082 * @see getHideTimestamp 00083 */ 00084 virtual void setHideTimestamp(bool hideTimestamp) = 0; 00085 00086 /** 00087 * Gets whether the toolbar's timestamp is hidden. 00088 * 00089 * A plugin may want to hide the timestamp if you are providing the same 00090 * information in its own window. 00091 * 00092 * @return true if the timestamp is be hidden, false otherwise. 00093 * 00094 * @see setHideTimestamp 00095 */ 00096 virtual bool getHideTimestamp() const = 0; 00097 00098 protected: 00099 /** 00100 * This will be cleaned up during application close. Plug-ins do not 00101 * need to destroy it. 00102 */ 00103 virtual ~AnimationToolBar() {} 00104 }; 00105 00106 #endif