class GtkApp::Drawer
Attributes
parent[R]
Public Class Methods
new(parent, view)
click to toggle source
Calls superclass method
# File lib/gtk_app/drawer.rb, line 5 def initialize(parent, view)#, builder_file) @parent = parent # super(controller, builder_file) super(Gtk::Window::POPUP) p view.objects add_child(view, view.vboxMain) # TODO: normalize the following setup decorated = false # app_paintable = true resizable = true visible = true setup_signals show_all # TODO: replace with slide out/in methods end
Private Instance Methods
align_to(x, y, w, h)
click to toggle source
# File lib/gtk_app/drawer.rb, line 30 def align_to(x, y, w, h) resize(size[0], h) move(x+w, y) end
setup_signals()
click to toggle source
# File lib/gtk_app/drawer.rb, line 24 def setup_signals @parent.signal_connect('configure-event') do |_window, event| align_to(event.x, event.y, event.width, event.height) end end