Re: learning GtkLayout, drawing a widget on it.

2012-08-20 Thread Stefan Salewski
On Mon, 2012-08-20 at 03:09 +0200, ben wrote:
 Hello list,
 
 It may be a basic and common question, but i dare to ask...
 
 I began to write a custom widget, subclassing GtkDrawingArea,

An alternative approach may be to just use a GTK drawing area with cairo
drawing operations as I did

http://www.ssalewski.de/PetEd-Demo.html.en
http://www.ssalewski.de/PetEd.html.en

There was a similar question on gtk-list recently:

https://mail.gnome.org/archives/gtk-list/2012-July/msg00025.html


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


learning GtkLayout, drawing a widget on it.

2012-08-19 Thread ben

Hello list,

It may be a basic and common question, but i dare to ask...

I began to write a custom widget, subclassing GtkDrawingArea, and
i am not familiar enough to gtk to draw this widget on a GtkLayout.

I would not like to use a canvas library, since i would like to learn 
pure gtk and make a simple test for the moment.


My widget responds to the 'draw' event  (GtkWidget) and actually draws
in a GtkWindow. But when i try tu use it in a GtkLayout with the 
gtk_layout_put(layout, custom_widget, x, y) nothing happens.


The (currently basic) widget does a gtk_widget_set_size_request(..)
at init time and draws using cairo according to its allocation area.

Unfortunately, the draw method is not called...

Can some of you point me to a simple link where i could learn more about 
GtkLayout ?


Thanks.
- Ben
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list