Some other lines of C# code

This time I was looking for a way to get the rectangle of the widget and I found an old article with this C code: [cc lang=”C”] static void widget_get_rect_in_screen (GtkWidget *widget, GdkRectangle *r) { gint x,y,w,h; GdkRectangle extents; GdkWindow *window; window = gtk_widget_get_parent_window(widget); /* getting parent window */ gdk_window_get_root_origin(window, &x,&y); /* parent’s left-top screen […]

gtksharp popup menu with title

I’m studying monodevelop code more and more, and when I need to write a custom widget I get inspiration from what the good monodevelop developer worte down. This time the problem I need to solve was to have a popup menu with a title. So I ended up with the following solution. [cc lang=”C#”] // […]