首页 > 代码库 > request.c
request.c
#include <gtk/gtk.h>#include "answer.h" void answers( GtkWidget *widget,gpointer data ) { gtk_widget_hide(data); answer(); } int request( ) { GtkWidget *window; GtkWidget *button; GtkWidget *label1; GtkWidget *label2; GtkWidget *label3; GtkWidget *label4; GtkWidget *label5; GtkWidget *button1; GtkWidget *table; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), "叫号系统"); gtk_window_set_default_size(GTK_WINDOW(window), 500, 500); gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER_ALWAYS ); gtk_container_set_border_width (GTK_CONTAINER (window), 30); table = gtk_table_new (8, 3, TRUE); gtk_container_add (GTK_CONTAINER (window), table); label1 = gtk_label_new ("柜台1服务情况"); label2= gtk_label_new ("柜台2服务情况"); label3 = gtk_label_new ("柜台3服务情况"); label4 = gtk_label_new ("柜台4服务情况"); label5 = gtk_label_new ("目前排队人数"); //button = gtk_button_new_with_label ("welcome!"); button1 = gtk_button_new_with_label ("叫号"); g_signal_connect (G_OBJECT (button1), "clicked",G_CALLBACK (answers), (gpointer) window); //gtk_table_attach_defaults (GTK_TABLE (table), button, 0, 1, 0, 4); gtk_table_attach_defaults (GTK_TABLE (table), label1, 0, 1, 3, 4); gtk_table_attach_defaults (GTK_TABLE (table), label2, 0, 1, 4, 5); gtk_table_attach_defaults (GTK_TABLE (table), label3, 0, 1, 5, 6); gtk_table_attach_defaults (GTK_TABLE (table), label4, 0, 1, 6, 7); gtk_table_attach_defaults (GTK_TABLE (table), button1, 1, 3, 1, 6); gtk_table_attach_defaults (GTK_TABLE (table), label5, 1, 3, 6, 7); gtk_widget_show_all(window); gtk_main (); return 0;}
request.c
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。