// generated by Fast Light User Interface Designer (fluid) version 1.0300

#include "About_Dialog.H"
#include <FL/Fl.H>
#include <FL/Fl_Shared_Image.H>
#include <FL/filename.H>

void open_url( const char *url ) {
  fl_open_uri( url );
}

void About_Dialog::cb_window_i(Fl_Double_Window* o, void*) {
  o->hide();

if ( logo_box->image() )
{
	((Fl_Shared_Image*)logo_box->image())->release();
	logo_box->image( 0 );
};
}
void About_Dialog::cb_window(Fl_Double_Window* o, void* v) {
  ((About_Dialog*)(o->user_data()))->cb_window_i(o,v);
}

void About_Dialog::cb_Rock_i(Fl_Return_Button* o, void*) {
  o->window()->do_callback();
}
void About_Dialog::cb_Rock(Fl_Return_Button* o, void* v) {
  ((About_Dialog*)(o->parent()->user_data()))->cb_Rock_i(o,v);
}

void About_Dialog::cb_website_url_i(Fl_Button* o, void*) {
  open_url( o->label() );
}
void About_Dialog::cb_website_url(Fl_Button* o, void* v) {
  ((About_Dialog*)(o->parent()->user_data()))->cb_website_url_i(o,v);
}

About_Dialog::About_Dialog( const char *logo_filename ) {
  make_window( logo_filename );
}

void About_Dialog::run() {
  window->show();
  
  while ( window->shown() )
  	Fl::wait();
  
  delete window;
}

Fl_Double_Window* About_Dialog::make_window( const char *logo_filename ) {
  { window = new Fl_Double_Window(560, 695, "About");
    window->callback((Fl_Callback*)cb_window, (void*)(this));
    { Fl_Tabs* o = new Fl_Tabs(0, 352, 558, 296);
      { Fl_Group* o = new Fl_Group(2, 386, 553, 261, "Credits");
        { credits = new Fl_Box(5, 389, 545, 249);
          credits->box(FL_ROUNDED_BOX);
          credits->color((Fl_Color)46);
          credits->labelsize(18);
        } // Fl_Box* credits
        o->end();
      } // Fl_Group* o
      { Fl_Group* o = new Fl_Group(2, 378, 553, 268, "License");
        o->hide();
        { copyright = new Fl_Box(43, 380, 462, 32, "COPYRIGHT");
          copyright->labeltype(FL_SHADOW_LABEL);
          copyright->labelfont(1);
          copyright->labelsize(10);
        } // Fl_Box* copyright
        { Fl_Box* o = new Fl_Box(10, 414, 535, 225, "This program 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 ve\
rsion.\n\nThis program 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.\n\nYou should have received a copy of the GNU General Public License\
 along with this program; if not, write to the Free Software Foundation, Inc.,\
 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.");
          o->box(FL_ROUNDED_BOX);
          o->color((Fl_Color)46);
          o->labelfont(1);
          o->labelsize(12);
          o->labelcolor((Fl_Color)53);
          o->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
        } // Fl_Box* o
        o->end();
      } // Fl_Group* o
      o->end();
    } // Fl_Tabs* o
    { Fl_Box* o = logo_box = new Fl_Box(5, 5, 550, 305, "VERSION");
      logo_box->color((Fl_Color)48);
      logo_box->labelfont(1);
      logo_box->labelsize(18);
      logo_box->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
      o->image( Fl_Shared_Image::get( logo_filename ) );
      o->label( VERSION );
    } // Fl_Box* logo_box
    { Fl_Return_Button* o = new Fl_Return_Button(400, 660, 76, 30, "Rock");
      o->callback((Fl_Callback*)cb_Rock);
    } // Fl_Return_Button* o
    { website_url = new Fl_Button(90, 660, 300, 30, "https://github.com/Stazed/non-timeline-xt");
      website_url->color((Fl_Color)14);
      website_url->labeltype(FL_SHADOW_LABEL);
      website_url->labelcolor((Fl_Color)6);
      website_url->callback((Fl_Callback*)cb_website_url);
    } // Fl_Button* website_url
    { title = new Fl_Box(5, 317, 545, 29, "TITLE");
      title->labeltype(FL_SHADOW_LABEL);
      title->labelfont(3);
      title->labelsize(17);
    } // Fl_Box* title
    window->end();
  } // Fl_Double_Window* window
  return window;
}
