i' working with Gtk developing some app. I must put some buttons over a map. I'm drawing the map on a GtkDrawingarea, but i'm not able to put buttons over it. Any suggestion? Thanks
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Suggestions:
- Put both the drawing area and the buttons inside a
GtkFixed
container. Probably not the best solution, becauseGtkFixed
has no way of controlling the z-ordering (other than the order in which you add the widgets to it?) - Instead of using
GtkDrawingArea
, use a canvas widget that can include other widgets, such asGooCanvas
.
回答2:
Why no other library? Any specific reason?
There is a library for exactly what you want
http://geocanvas.sourceforge.net/