#!/usr/bin/ruby
# encoding: utf-8

require 'gtk2'
# require 'vte'
require "rexml/document"
require 'optparse'
require 'LicenseScreen' 
require 'MfsTranslator'
require "fileutils"

# Constants for positions:

OK_X = 654
OK_Y = 496
CANCEL_X = 518
CANCEL_Y = 496
SETTINGS_X = 382
SETTINGS_Y = 496

lang = ENV['LANGUAGE'][0..1]
lang = ENV['LANG'][0..1] if lang.nil?
lang = "en" if lang.nil?
# @tl = MfsTranslator.new(lang, "forensicgui.xml") 

window = Gtk::Window.new
window.set_size_request(800, 550)
window.border_width = 0
window.window_position = Gtk::Window::POS_CENTER_ALWAYS

window.deletable = false
window.decorated = false
window.allow_grow = false
window.allow_shrink = false
window.title = "CyberShield"

fixed = Gtk::Fixed.new

# Layers are stored in a Hash:

layers = Hash.new

# First layer for starting page

bgimg = Gtk::Image.new("bglicense.png")
startfixed = Gtk::Fixed.new
layers["start"] = startfixed 
startfixed.put(bgimg, 0, 0)

# Fifth layer: LicenseScreen
licensescreen = LicenseScreen.new(layers, fixed, [])

window.add fixed
window.signal_connect('destroy') { Gtk.main_quit }
window.show_all 

# layers.each { |k,v| v.hide_all }
# layers["license"].show_all 
layers["start"].show_all 

Gtk.main
