<commit_before>require 'app/boot'

#require 'app/ui/tabs/home'


# methods for the main app
module HH::App
  # starts a lesson
  # returns only once the lesson gets closed
  def start_lessons name, blk
    Thread.new do
      @main_content.style(:width => -400)
      @lesson_stack.show
      HH::LessonSet.new(name, blk).execute_in @lesson_stack
      # after the lesson ends
      @lesson_stack.hide
      @main_content.style(:width => 1.0)
    end
  end

  def load_file name={}
    gettab(:Editor).load(name)
    opentab :Editor
  end
end

window :title => "Hackety Hack", :width => 790, :height => 550 do
  HH::APP = self
  extend HH::App, HH::Widgets, HH::Observable
  style(Shoes::LinkHover, :fill => nil, :stroke => "#C66")
  style(Shoes::Link, :stroke => "#377")

  @main_content = flow :width => 1.0, :height => 1.0 do
    background "#e9efe0"
    background "#e9efe0".."#c1c5d0", :height => 150, :bottom => 150
  end
  @lesson_stack = stack :hidden => true, :width => 400

  extend HH::HasSideTabs
  init_tabs @main_content
  
  addtab :Home, :icon => "tab-home.png"
  addtab :Editor, :icon => "tab-new.png"
  addtab :Console, :hover => "Try Ruby", :icon => "tab-try.png"
  addtab :Lessons, :icon => "tab-tour.png"
  addtab :Help, :icon => "tab-help.png" do
    Shoes.show_manual
  end<commit_msg>workaround for resize window bug<commit_after>require 'app/boot'

#require 'app/ui/tabs/home'


# methods for the main app
module HH::App
  # starts a lesson
  # returns only once the lesson gets closed
  def start_lessons name, blk
    Thread.new do
      @main_content.style(:width => -400)
      @lesson_stack.show
      HH::LessonSet.new(name, blk).execute_in @lesson_stack
      # after the lesson ends
      @lesson_stack.hide
      @main_content.style(:width => 1.0)
    end
  end

  def load_file name={}
    gettab(:Editor).load(name)
    opentab :Editor
  end
end

window :title => "Hackety Hack", :width => 790, :height => 550 do
  HH::APP = self
  extend HH::App, HH::Widgets, HH::Observable
  style(Shoes::LinkHover, :fill => nil, :stroke => "#C66")
  style(Shoes::Link, :stroke => "#377")

  @main_content = flow :width => 1.0, :height => -1 do
    background "#e9efe0"
    background "#e9efe0".."#c1c5d0", :height => 150, :bottom => 150
  end
  @lesson_stack = stack :hidden => true, :width => 400

  extend HH::HasSideTabs
  init_tabs @main_content
  
  addtab :Home, :icon => "tab-home.png"
  addtab :Editor, :icon => "tab-new.png"
  addtab :Console, :hover => "Try Ruby", :icon => "tab-try.png"
  addtab :Lessons, :icon => "tab-tour.png"
  addtab :Help, :icon => "tab-help.png" do
    Shoes.show_manual
  end
{'fraction_non_alphanumeric': 0.1533788914198937, 'fraction_numerical': 0.026955201214882308, 'mean_word_length': 3.4137353433835846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2716196', 'n_tokens_mistral': 1031, 'n_tokens_neox': 960, 'n_words': 253}