📄 page_rc.c
字号:
#include<gtk/gtk.h>#include"createtb.c"#define PAGE_TOTAL 2typedef struct _PagePropertity{ /* the propertities of this page */ char *tabname; /* the text of label(.i.e,tab) crspding to page */ int pos; /* the pos. of this page */ GtkWidget *vbox; /* the content of this page */}PagePropertity;typedef struct _PageForNoteBk{ PagePropertity pagepty; void (* make_page)(PagePropertity *);}PageForNoteBk;void make_page1(PagePropertity *pgpty){}void make_page2(PagePropertity *pgpty){ GtkWidget *frame; GtkWidget *table; pgpty->vbox=gtk_vbox_new(FALSE,0); frame=gtk_frame_new("CPU Information"); gtk_container_set_border_width(GTK_CONTAINER(frame),10); gtk_box_pack_start(GTK_BOX(pgpty->vbox),frame,TRUE,TRUE,0); gtk_widget_show(frame); /* create a table, which contains the cpuinfo. Then pack it into the frame */ table=create_and_fill_table(); gtk_container_add(GTK_CONTAINER(frame),table); gtk_widget_show(table); gtk_widget_show(pgpty->vbox);}static PageForNoteBk page[PAGE_TOTAL]={ {{"process",0,NULL},make_page1}, {{"resource",1,NULL},make_page2}};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -