Method: VMAgui#new_window

Defined in:
lib/vimamsa/gui.rb

#new_window(win_id) ⇒ Object



708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
# File 'lib/vimamsa/gui.rb', line 708

def new_window(win_id)
  n_sw = Gtk::ScrolledWindow.new
  n_sw.set_policy(:automatic, :automatic)
  n_overlay = Gtk::Overlay.new
  n_overlay.add_overlay(n_sw)
  # @pane = Gtk::Paned.new(:horizontal)

  win = { :sw => n_sw, :overlay => n_overlay, :id => win_id }
  # @windows[2] = { :sw => @sw2, :overlay => @overlay2, :id => 2 }

  # @vbox.remove(@overlay)

  # @pane.set_start_child(@overlay2)
  # @pane.set_end_child(@overlay)

  # numbers: left, top, width, height
  # @vbox.attach(@pane, 0, 2, 2, 1)

  n_sw.vexpand = true
  n_sw.hexpand = true

  n_overlay.vexpand = true
  n_overlay.hexpand = true

  # TODO: remove??
  n_sw.vadjustment.signal_connect("value-changed") { |x|
 # pp x.page_increment
         # pp x.page_size
         # pp x.step_increment
         # pp x.upper
         # pp x.value
         # pp x
         # @last_adj_time = Time.now
    }

  # @sw2.show
  return win
end