# File gglib/examples/BasicExample.rb, line 43
  def onStart
    puts "MyStateObj activated."
    #Since Gosu only allows one window instance at a time, the current
    #window is automatically sotred in the global $window.
    $window.setBackground("img/bgblue.png")
    #Whats a GUI Library without widgets?
    #A textbox:
    $textbox = GGLib::TextBox.new("textbox1", 242, 100, 12, GGLib::Themes::BlueSteel)
    #Some buttons:
    GGLib::Button.new(:button1, "Click Me", 270, 50, Proc.new{ |widget| $textbox.text = "Thank you" }, GGLib::Themes::BlueSteel)
    GGLib::Button.new(:button2, "Exit", 270, 200, Proc.new{ |widget| $window.close; exit }, GGLib::Themes::BlueSteel)
    GGLib::CheckBox.new(:checkbox1, 300, 300, "Check this!", false, GGLib::Themes::BlueSteel)
    GGLib::RadioGroup.new(:radio1, 50, 325, { "One" => 1, "Two" => 2, "Three" => 3}, GGLib::RadioGroup::Layout::Vertical, GGLib::RadioGroup::Spacing::Automatic, GGLib::Themes::BlueSteel)
  end