is it possible to put up images/icons within a Gtk::DrawingArea?
I.e. if i have the image of a little cat, can this be displayed on it?
Generally, it’s easy to work with pixbufs.
require ‘gtk2’
class MainView < Gtk::DrawingArea
def initialize
super()
signal_connect('expose-event') { draw }
signal_connect('configure-event') { update_shown }
end
def update_shown
w, h = window.size
puts "my size: #{w}x#{h}"
#- normally you could create a pixbuf related to w,h (scaling
images, drawing…) @pixbuf = Gtk::Image.new(’/tmp/foo.png’).pixbuf
return true
end