// src/jump_to_dialog.hh - Copyright 2005, 2006, University
//               of Padova, dept. of Pure and Applied
//               Mathematics
//
// This file is part of SGPEMv2.
//
// This is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// SGPEMv2 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

#ifndef JUMP_TO_DIALOG_HH
#define JUMP_TO_DIALOG_HH 1

#include "config.h"

#include <sgpemv2/simulation_observer.hh>

#include <gtkmm/dialog.h>
#include <gtkmm/spinbutton.h>
#include <gtkmm/progressbar.h>
#include <libglademm/xml.h>

namespace sgpem
{
  class JumpToDialog : public Gtk::Dialog, public SimulationObserver
  {
  public:
    JumpToDialog(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade);

  private:
    void _on_jump();
    void _on_stop();
    
    void update(const Simulation& changed_simulation);
    
    Glib::RefPtr<Gnome::Glade::Xml> _glade;

    Gtk::Button* _jump_button;
    Gtk::Button* _stop_button;
    Gtk::Button* _ok_button;
    Gtk::SpinButton* _instant_spin;

    Gtk::ProgressBar* _progress;

    unsigned int _target_instant;
  };

} //~ namespace sgpem


#endif //~ JUMP_TO_DIALOG_HH
