#include <iostream>
#include <unistd.h>

#include <gtkmm/window.h>
#include <gtkmm/label.h>
#include <gtkmm/box.h>
#include <gtkmm/button.h>
#include <gtkmm/main.h>


class SplashWindow : public Gtk::Window
{
 public:
  explicit
    SplashWindow();

  virtual ~SplashWindow();

 protected:
  Gtk::VBox vbox;
  Gtk::Label label;
  Gtk::Button button;
};


SplashWindow::SplashWindow():
  Gtk::Window(),vbox(), label("Splash window"), button("Missatge boto")
{
  add(vbox);
  vbox.add(label);
  vbox.add(button);

  set_decorated(false);
  show_all_children();
}


SplashWindow::~SplashWindow()
{
}


int main(int argc, char *argv[])
{
   Gtk::Main kit(argc, argv);

  Gtk::Window::set_auto_startup_notification(false);
  Gtk::Window* pSplash = new SplashWindow();
  pSplash->show_now();
  Gtk::Window::set_auto_startup_notification(true);


  std::cout << "Start Sleeping" << std::endl;
  sleep(10);
  std::cout << "End Sleeping" << std::endl;

  SplashWindow window;

  pSplash->hide();
  delete(pSplash);

  Gtk::Main::run(window);

  return 0;
}
