Skip to content

Instantly share code, notes, and snippets.

@ldfallas
Created April 23, 2009 13:00
Show Gist options
  • Save ldfallas/100488 to your computer and use it in GitHub Desktop.
Save ldfallas/100488 to your computer and use it in GitHub Desktop.
A small example of creating a Gtk# DrawingArea with Boo
namespace BooGtkTest
import System
import Gtk
import Cairo
class DrawingTestWidget(DrawingArea):
public def constructor():
self.ExposeEvent += ExposeHandler
def ExposeHandler(o as object, ea as ExposeEventArgs):
Console.WriteLine("Aqui")
area = o as DrawingArea
using context = Gdk.CairoHelper.Create (area.GdkWindow):
context.Color = Color (0,0255,0)
context.Rectangle (0, 0, 90, 90)
context.Fill()
(context.Target as IDisposable).Dispose()
ea.RetVal = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment