摘要: 如果全部使用C代码构建用户界面,当组件成百上千时,这将是一场灾难。因此Gtk使用xml进行配置用户界面。 示例如下: ```c #include #include static void print_hello (GtkWidget *widget, gpointer data) { g_print 阅读全文
posted @ 2023-09-04 23:18 NotReferenced 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 如果想要自定义绘制图案,可以使用`GtkDrawingArea`组件实现。 示例如下: ```c #include /* Surface to store current scribbles */ static cairo_surface_t *surface = NULL; static void 阅读全文
posted @ 2023-09-04 22:27 NotReferenced 阅读(87) 评论(0) 推荐(0) 编辑