00001 #ifndef PERIAPSIS_SIMULATION_TAB_H 00002 #define PERIAPSIS_SIMULATION_TAB_H 00003 00004 // 00005 // $Id: simulation_tab.hpp 2 2008-03-01 20:58:50Z kulibali $ 00006 // 00007 // Copyright (c) 2008, The Periapsis Project. All rights reserved. 00008 // 00009 // Redistribution and use in source and binary forms, with or without 00010 // modification, are permitted provided that the following conditions are 00011 // met: 00012 // 00013 // * Redistributions of source code must retain the above copyright notice, 00014 // this list of conditions and the following disclaimer. 00015 // 00016 // * Redistributions in binary form must reproduce the above copyright 00017 // notice, this list of conditions and the following disclaimer in the 00018 // documentation and/or other materials provided with the distribution. 00019 // 00020 // * Neither the name of the The Periapsis Project nor the names of its 00021 // contributors may be used to endorse or promote products derived from 00022 // this software without specific prior written permission. 00023 // 00024 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 00025 // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 00026 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 00027 // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 00028 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00029 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00030 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00031 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00032 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00033 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00034 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00035 // 00036 00037 #include "framework/widget.hpp" 00038 00039 #include "datetime_box.hpp" 00040 #include "sim_view_box.hpp" 00041 00042 namespace gsgl 00043 { 00044 00045 namespace data 00046 { 00047 class config_record; 00048 } 00049 00050 namespace framework 00051 { 00052 class textbox; 00053 class button; 00054 } 00055 00056 namespace scenegraph 00057 { 00058 class node; 00059 } 00060 00061 } // namespace gsgl 00062 00063 00064 00065 namespace periapsis 00066 { 00067 00068 namespace space 00069 { 00070 class space_context; 00071 } 00072 00073 00074 class simulation_tab 00075 : public gsgl::framework::widget 00076 { 00077 gsgl::framework::textbox *title_box; 00078 datetime_box *time_box; 00079 sim_view_box *view_box; 00080 00081 gsgl::framework::button *load_button; 00082 gsgl::framework::button *save_button; 00083 gsgl::framework::button *go_button; 00084 00085 bool waiting_for_scenery; 00086 bool sim_is_ready; 00087 00088 gsgl::data::config_record *current_sim_record; 00089 00090 public: 00091 simulation_tab(); 00092 virtual ~simulation_tab(); 00093 00094 datetime_box *get_time_box() { return time_box; } 00095 sim_view_box *get_view_box() { return view_box; } 00096 bool & get_waiting_for_scenery() { return waiting_for_scenery; } 00097 bool & get_sim_is_ready() { return sim_is_ready; } 00098 00099 virtual void draw(); 00100 00101 private: 00102 friend void handle_run_simulation(gsgl::framework::button *); 00103 }; // class simulation_tab 00104 00105 } // namespace periapsis 00106 00107 #endif