I understand that in GTK+ you can create buttons, events, etc., but is there a way to make something you create in cairo (lets say you draw a circle) a button that is clickable? I guess I am confused on the relationship between GTk and cairo.
2 Answers
1
votes
Cairo is a 2D graphic library that provides drawing API, GTK+ uses Cairo to draw itself, for clicking items made with Cairo you might want to have a look at a Canvas such as GooCanvas [1], it supports introspection so you can use it from Python too (pygobject 3) [2]
Items [3] created with GooCanvas support events and are drawn with Cairo underneath, so you can draw a circle [4] and use the events as you prefer.