本文整理汇总了C++中GTK_WIDGET_SET_FLAGS函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_WIDGET_SET_FLAGS函数的具体用法?C++ GTK_WIDGET_SET_FLAGS怎么用?C++ GTK_WIDGET_SET_FLAGS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GTK_WIDGET_SET_FLAGS函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: create_ChromaShift
GtkWidget*
create_ChromaShift (void)
{
GtkWidget *ChromaShift;
GtkWidget *dialog_vbox1;
GtkWidget *vbox1;
GtkWidget *table1;
GtkWidget *label1;
GtkWidget *label2;
GtkObject *spinbutton_U_adj;
GtkWidget *spinbutton_U;
GtkObject *spinbutton_V_adj;
GtkWidget *spinbutton_V;
GtkWidget *hscale;
GtkWidget *frame1;
GtkWidget *alignment1;
GtkWidget *drawingarea1;
GtkWidget *label3;
GtkWidget *dialog_action_area1;
GtkWidget *cancelbutton1;
GtkWidget *applybutton1;
GtkWidget *okbutton1;
ChromaShift = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (ChromaShift), QT_TR_NOOP("ChromaShift"));
gtk_window_set_type_hint (GTK_WINDOW (ChromaShift), GDK_WINDOW_TYPE_HINT_DIALOG);
dialog_vbox1 = GTK_DIALOG (ChromaShift)->vbox;
gtk_widget_show (dialog_vbox1);
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox1);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0);
table1 = gtk_table_new (2, 2, FALSE);
gtk_widget_show (table1);
gtk_box_pack_start (GTK_BOX (vbox1), table1, FALSE, FALSE, 0);
label1 = gtk_label_new (QT_TR_NOOP("U Shift :"));
gtk_widget_show (label1);
gtk_table_attach (GTK_TABLE (table1), label1, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5);
label2 = gtk_label_new (QT_TR_NOOP("V Shift :"));
gtk_widget_show (label2);
gtk_table_attach (GTK_TABLE (table1), label2, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);
spinbutton_U_adj = gtk_adjustment_new (0, -32, 32, 1, 10, 10);
spinbutton_U = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_U_adj), 1, 0);
gtk_widget_show (spinbutton_U);
gtk_table_attach (GTK_TABLE (table1), spinbutton_U, 1, 2, 0, 1,
(GtkAttachOptions) (0),
(GtkAttachOptions) (0), 0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton_U), TRUE);
spinbutton_V_adj = gtk_adjustment_new (0, -32, 32, 1, 10, 10);
spinbutton_V = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_V_adj), 1, 0);
gtk_widget_show (spinbutton_V);
gtk_table_attach (GTK_TABLE (table1), spinbutton_V, 1, 2, 1, 2,
(GtkAttachOptions) (0),
(GtkAttachOptions) (0), 0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton_V), TRUE);
hscale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 1, 1, 1)));
gtk_widget_show (hscale);
gtk_box_pack_start (GTK_BOX (vbox1), hscale, FALSE, FALSE, 0);
gtk_scale_set_digits (GTK_SCALE (hscale), 0);
frame1 = gtk_frame_new (NULL);
gtk_widget_show (frame1);
gtk_box_pack_start (GTK_BOX (vbox1), frame1, TRUE, TRUE, 0);
gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_NONE);
alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
gtk_widget_show (alignment1);
gtk_container_add (GTK_CONTAINER (frame1), alignment1);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 12, 0);
drawingarea1 = gtk_drawing_area_new ();
gtk_widget_show (drawingarea1);
gtk_container_add (GTK_CONTAINER (alignment1), drawingarea1);
label3 = gtk_label_new (QT_TR_NOOP("<b>Preview</b>"));
gtk_widget_show (label3);
gtk_frame_set_label_widget (GTK_FRAME (frame1), label3);
gtk_label_set_use_markup (GTK_LABEL (label3), TRUE);
dialog_action_area1 = GTK_DIALOG (ChromaShift)->action_area;
gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
gtk_widget_show (cancelbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (ChromaShift), cancelbutton1, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:101,代码来源:DIA_chromaShift.cpp
示例2: xfburn_preferences_dialog_init
//.........这里部分代码省略.........
gtk_container_add (GTK_CONTAINER (scrolled_window), priv->treeview_devices);
g_object_unref (store);
/* add columns */
column_name = gtk_tree_view_column_new ();
gtk_tree_view_column_set_title (column_name, _("Name"));
gtk_tree_view_column_set_expand (column_name, TRUE);
cell_icon = gtk_cell_renderer_pixbuf_new ();
gtk_tree_view_column_pack_start (column_name, cell_icon, FALSE);
gtk_tree_view_column_set_attributes (column_name, cell_icon, "pixbuf", DEVICE_LIST_COLUMN_ICON, NULL);
g_object_set (cell_icon, "xalign", 0.0, "ypad", 0, NULL);
cell_name = gtk_cell_renderer_text_new ();
gtk_tree_view_column_pack_start (column_name, cell_name, TRUE);
gtk_tree_view_column_set_attributes (column_name, cell_name, "text", DEVICE_LIST_COLUMN_NAME, NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (priv->treeview_devices), column_name);
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->treeview_devices), -1, _("Node"),
gtk_cell_renderer_text_new (), "text", DEVICE_LIST_COLUMN_NODE, NULL);
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->treeview_devices), -1, _("Write CD-R"),
gtk_cell_renderer_toggle_new (), "active", DEVICE_LIST_COLUMN_CDR, NULL);
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->treeview_devices), -1, _("Write CD-RW"),
gtk_cell_renderer_toggle_new (), "active", DEVICE_LIST_COLUMN_CDRW,
NULL);
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->treeview_devices), -1, _("Write DVD-R"),
gtk_cell_renderer_toggle_new (), "active", DEVICE_LIST_COLUMN_DVDR,
NULL);
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->treeview_devices), -1, _("Write DVD-RAM"),
gtk_cell_renderer_toggle_new (), "active", DEVICE_LIST_COLUMN_DVDRAM,
NULL);
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->treeview_devices), -1, _("Write Blu-ray"),
gtk_cell_renderer_toggle_new (), "active", DEVICE_LIST_COLUMN_BD,
NULL);
hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, BORDER);
gtk_widget_show (hbox);
priv->button_scan = xfce_gtk_button_new_mixed (GTK_STOCK_CDROM, _("Sc_an for devices"));
gtk_box_pack_end (GTK_BOX (hbox), priv->button_scan, FALSE, FALSE, BORDER);
g_signal_connect (G_OBJECT (priv->button_scan), "clicked", G_CALLBACK (scan_button_clicked_cb), obj);
gtk_widget_show (priv->button_scan);
gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &x, &y);
icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-optical", x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
if (!icon)
icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-cdrom", x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
if (!icon)
icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), GTK_STOCK_CDROM, x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
gtk_list_store_append (icon_store, &iter);
gtk_list_store_set (icon_store, &iter,
SETTINGS_LIST_PIXBUF_COLUMN, icon,
SETTINGS_LIST_TEXT_COLUMN, _("Devices"),
SETTINGS_LIST_INDEX_COLUMN, idx,
-1);
if (icon)
g_object_unref (G_OBJECT (icon));
exo_mutual_binding_new (G_OBJECT (priv->notebook), "page", G_OBJECT (priv->icon_bar), "active");
/* below the device list */
#if 0
priv->check_empty_speed_list = gtk_check_button_new_with_mnemonic (_("Show warning on _empty speed list"));
gtk_box_pack_start (GTK_BOX (vbox2), priv->check_empty_speed_list, FALSE, FALSE, BORDER);
gtk_widget_show (priv->check_empty_speed_list);
#endif
/* fifo */
vbox3 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox3);
frame = xfce_gtk_frame_box_new_with_content (_("FIFO buffer size (in kb)"), vbox3);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, BORDER);
gtk_widget_show (frame);
priv->scale_fifo = gtk_hscale_new_with_range (0.0, FIFO_MAX_SIZE, 32.0);
gtk_scale_set_value_pos (GTK_SCALE (priv->scale_fifo), GTK_POS_LEFT);
gtk_range_set_value (GTK_RANGE (priv->scale_fifo), 0);
gtk_box_pack_start (GTK_BOX (vbox3), priv->scale_fifo, FALSE, FALSE, BORDER/2);
gtk_widget_show (priv->scale_fifo);
/* action buttons */
button_close = gtk_button_new_from_stock ("gtk-close");
gtk_widget_show (button_close);
gtk_dialog_add_action_widget (GTK_DIALOG (obj), button_close, GTK_RESPONSE_CLOSE);
GTK_WIDGET_SET_FLAGS (button_close, GTK_CAN_DEFAULT);
gtk_widget_grab_focus (button_close);
gtk_widget_grab_default (button_close);
g_signal_connect (G_OBJECT (obj), "response", G_CALLBACK (xfburn_preferences_dialog_response_cb), priv);
refresh_devices_list (obj);
g_object_unref (icon_store);
}
开发者ID:Pjotr123,项目名称:xfburn,代码行数:101,代码来源:xfburn-preferences-dialog.c
示例3: create_win_save_phrase
void create_win_save_phrase(WSP_S *wsp, int wspN)
{
#if WIN32
if (test_mode)
return;
#endif
if (!wspN)
return;
SAVE_SESS *sess = tzmalloc(SAVE_SESS, 1);
GtkWidget *main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_has_resize_grip(GTK_WINDOW(main_window), FALSE);
sess->win = main_window;
gtk_window_set_default_size(GTK_WINDOW (main_window), 20, 10);
gtk_window_set_title(GTK_WINDOW(main_window), _(_L("加片語到詞庫")));
#if 0
g_signal_connect (G_OBJECT (main_window), "delete_event",
G_CALLBACK (delete_event), sess);
#endif
GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
gtk_orientable_set_orientation(GTK_ORIENTABLE(vbox), GTK_ORIENTATION_VERTICAL);
gtk_container_add (GTK_CONTAINER (main_window), vbox);
char tt[512];
tt[0] = 0;
wsp_str(wsp, wspN, tt);
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new(tt), FALSE, FALSE, 0);
int i;
for(i=0; i<wspN; i++) {
if (ph_key_sz==2)
strcat(tt, phokey_to_str(wsp[i].key));
strcat(tt, " ");
}
if (tt[0])
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new(tt), FALSE, FALSE, 0);
sess->mywsp = tmemdup(wsp, WSP_S, wspN);
sess->mywspN = wspN;
GtkWidget *hbox_cancel_ok = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox_cancel_ok , FALSE, FALSE, 5);
GtkWidget *button_ok = gtk_button_new_from_stock (GTK_STOCK_OK);
gtk_box_pack_start (GTK_BOX (hbox_cancel_ok), button_ok, TRUE, TRUE, 5);
GtkWidget *button_cancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
gtk_box_pack_start (GTK_BOX (hbox_cancel_ok), button_cancel, TRUE, TRUE, 0);
sess->label_countdown = gtk_label_new(NULL);
gtk_box_pack_start (GTK_BOX (vbox), sess->label_countdown, FALSE, FALSE, 5);
#if 1
#if WIN32
set_no_focus(main_window);
#endif
gtk_widget_realize(main_window);
#if UNIX
set_no_focus(main_window);
#else
win32_init_win(main_window);
#endif
#endif
// dbg("mmmmmmmmmmmmm\n");
GTK_WIDGET_SET_FLAGS (button_ok, GTK_CAN_DEFAULT);
gtk_widget_grab_default (button_ok);
#if 1
// dbg("main_window %x\n", main_window);
g_signal_connect (G_OBJECT (button_cancel), "clicked",
G_CALLBACK (close_win_save_phrase),
sess);
g_signal_connect (G_OBJECT (button_ok), "clicked",
G_CALLBACK (cb_ok),
sess);
#endif
gtk_window_present(GTK_WINDOW(main_window));
gtk_window_set_keep_above(GTK_WINDOW(main_window), TRUE);
// gtk_window_set_modal(GTK_WINDOW(main_window), TRUE);
sess->countdown = 3;
disp_countdown(sess);
sess->countdown_handle = g_timeout_add(1000, timeout_countdown, sess);
gtk_widget_show_all(main_window);
}
开发者ID:CarterTsai,项目名称:hime,代码行数:98,代码来源:win-save-phrase.cpp
示例4: create_vmmstatus
GtkWidget*
create_vmmstatus (void)
{
GtkWidget *vmmstatus;
GtkWidget *dialog_vbox1;
GtkWidget *vbox1;
GtkWidget *hbox1;
GtkWidget *label1;
GtkWidget *label5;
GtkWidget *label2;
GtkWidget *label3;
GtkWidget *dialog_action_area1;
GtkWidget *closebutton1;
vmmstatus = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (vmmstatus), _("VMM Status"));
gtk_window_set_default_size (GTK_WINDOW (vmmstatus), 384, 384);
gtk_window_set_destroy_with_parent (GTK_WINDOW (vmmstatus), TRUE);
gtk_window_set_type_hint (GTK_WINDOW (vmmstatus), GDK_WINDOW_TYPE_HINT_DIALOG);
dialog_vbox1 = GTK_DIALOG (vmmstatus)->vbox;
gtk_widget_show (dialog_vbox1);
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox1);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0);
hbox1 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox1);
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, TRUE, 0);
label1 = gtk_label_new (_("Status:"));
gtk_widget_show (label1);
gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, FALSE, 0);
gtk_misc_set_padding (GTK_MISC (label1), 12, 12);
label5 = gtk_label_new ("");
gtk_widget_show (label5);
gtk_box_pack_start (GTK_BOX (hbox1), label5, TRUE, FALSE, 0);
label2 = gtk_label_new ("");
gtk_widget_show (label2);
gtk_box_pack_start (GTK_BOX (hbox1), label2, FALSE, FALSE, 0);
gtk_misc_set_padding (GTK_MISC (label2), 12, 12);
label3 = gtk_label_new ("");
gtk_widget_show (label3);
gtk_box_pack_start (GTK_BOX (vbox1), label3, TRUE, TRUE, 0);
gtk_misc_set_alignment (GTK_MISC (label3), 0, 0);
gtk_misc_set_padding (GTK_MISC (label3), 12, 12);
dialog_action_area1 = GTK_DIALOG (vmmstatus)->action_area;
gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
closebutton1 = gtk_button_new_from_stock ("gtk-close");
gtk_widget_show (closebutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (vmmstatus), closebutton1, GTK_RESPONSE_CLOSE);
GTK_WIDGET_SET_FLAGS (closebutton1, GTK_CAN_DEFAULT);
g_signal_connect ((gpointer) vmmstatus, "destroy",
G_CALLBACK (on_dialog1_destroy),
NULL);
g_signal_connect ((gpointer) closebutton1, "clicked",
G_CALLBACK (on_closebutton1_clicked),
NULL);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (vmmstatus, vmmstatus, "vmmstatus");
GLADE_HOOKUP_OBJECT_NO_REF (vmmstatus, dialog_vbox1, "dialog_vbox1");
GLADE_HOOKUP_OBJECT (vmmstatus, vbox1, "vbox1");
GLADE_HOOKUP_OBJECT (vmmstatus, hbox1, "hbox1");
GLADE_HOOKUP_OBJECT (vmmstatus, label1, "label1");
GLADE_HOOKUP_OBJECT (vmmstatus, label5, "label5");
GLADE_HOOKUP_OBJECT (vmmstatus, label2, "label2");
GLADE_HOOKUP_OBJECT (vmmstatus, label3, "label3");
GLADE_HOOKUP_OBJECT_NO_REF (vmmstatus, dialog_action_area1, "dialog_action_area1");
GLADE_HOOKUP_OBJECT (vmmstatus, closebutton1, "closebutton1");
return vmmstatus;
}
开发者ID:anbangr,项目名称:bitvisor-dev,代码行数:81,代码来源:interface.c
示例5: gtk_dialog_new
//.........这里部分代码省略.........
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinImax), TRUE);
spinPmin_adj = gtk_adjustment_new (2, 2, 31, 1, 10, 0);
spinPmin = gtk_spin_button_new (GTK_ADJUSTMENT (spinPmin_adj), 1, 0);
gtk_widget_show (spinPmin);
gtk_table_attach (GTK_TABLE (table3), spinPmin, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinPmin), TRUE);
spinPmax_adj = gtk_adjustment_new (2, 2, 31, 1, 10, 0);
spinPmax = gtk_spin_button_new (GTK_ADJUSTMENT (spinPmax_adj), 1, 0);
gtk_widget_show (spinPmax);
gtk_table_attach (GTK_TABLE (table3), spinPmax, 1, 2, 3, 4,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinPmax), TRUE);
label3 = gtk_label_new (QT_TR_NOOP("Quantizer"));
gtk_widget_show (label3);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label3);
gtk_label_set_justify (GTK_LABEL (label3), GTK_JUSTIFY_LEFT);
label13 = gtk_label_new (QT_TR_NOOP("Not Yet!"));
gtk_widget_show (label13);
gtk_container_add (GTK_CONTAINER (notebook1), label13);
gtk_label_set_justify (GTK_LABEL (label13), GTK_JUSTIFY_LEFT);
label4 = gtk_label_new (QT_TR_NOOP("B Frames"));
gtk_widget_show (label4);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 3), label4);
gtk_label_set_justify (GTK_LABEL (label4), GTK_JUSTIFY_LEFT);
dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
gtk_widget_show (cancelbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), cancelbutton1, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);
okbutton1 = gtk_button_new_from_stock ("gtk-ok");
gtk_widget_show (okbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), okbutton1, GTK_RESPONSE_OK);
GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog1, "dialog1");
GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_vbox1, "dialog_vbox1");
GLADE_HOOKUP_OBJECT (dialog1, notebook1, "notebook1");
GLADE_HOOKUP_OBJECT (dialog1, table1, "table1");
GLADE_HOOKUP_OBJECT (dialog1, radioCQ, "radioCQ");
GLADE_HOOKUP_OBJECT (dialog1, radioCBR, "radioCBR");
GLADE_HOOKUP_OBJECT (dialog1, radio2Pass, "radio2Pass");
GLADE_HOOKUP_OBJECT (dialog1, entryCQ, "entryCQ");
GLADE_HOOKUP_OBJECT (dialog1, entryCBR, "entryCBR");
GLADE_HOOKUP_OBJECT (dialog1, entry2Pass, "entry2Pass");
GLADE_HOOKUP_OBJECT (dialog1, label1, "label1");
GLADE_HOOKUP_OBJECT (dialog1, table2, "table2");
GLADE_HOOKUP_OBJECT (dialog1, label5, "label5");
GLADE_HOOKUP_OBJECT (dialog1, label6, "label6");
GLADE_HOOKUP_OBJECT (dialog1, label7, "label7");
GLADE_HOOKUP_OBJECT (dialog1, spinbuttonMaxIFrame, "spinbuttonMaxIFrame");
GLADE_HOOKUP_OBJECT (dialog1, label8, "label8");
GLADE_HOOKUP_OBJECT (dialog1, spinbuttonMinIFrame, "spinbuttonMinIFrame");
GLADE_HOOKUP_OBJECT (dialog1, optionME, "optionME");
GLADE_HOOKUP_OBJECT (dialog1, menu4, "menu4");
GLADE_HOOKUP_OBJECT (dialog1, _0___none1, "_0___none1");
GLADE_HOOKUP_OBJECT (dialog1, _1__very_low1, "_1__very_low1");
GLADE_HOOKUP_OBJECT (dialog1, _2__low1, "_2__low1");
GLADE_HOOKUP_OBJECT (dialog1, _3__medium1, "_3__medium1");
GLADE_HOOKUP_OBJECT (dialog1, _4__high1, "_4__high1");
GLADE_HOOKUP_OBJECT (dialog1, _5__very_high1, "_5__very_high1");
GLADE_HOOKUP_OBJECT (dialog1, _6__ultra_high1, "_6__ultra_high1");
GLADE_HOOKUP_OBJECT (dialog1, optionQzer, "optionQzer");
GLADE_HOOKUP_OBJECT (dialog1, menu5, "menu5");
GLADE_HOOKUP_OBJECT (dialog1, h263_quantizer1, "h263_quantizer1");
GLADE_HOOKUP_OBJECT (dialog1, mpeg_quantizer1, "mpeg_quantizer1");
GLADE_HOOKUP_OBJECT (dialog1, label2, "label2");
GLADE_HOOKUP_OBJECT (dialog1, table3, "table3");
GLADE_HOOKUP_OBJECT (dialog1, label9, "label9");
GLADE_HOOKUP_OBJECT (dialog1, label10, "label10");
GLADE_HOOKUP_OBJECT (dialog1, label11, "label11");
GLADE_HOOKUP_OBJECT (dialog1, label12, "label12");
GLADE_HOOKUP_OBJECT (dialog1, spinImin, "spinImin");
GLADE_HOOKUP_OBJECT (dialog1, spinImax, "spinImax");
GLADE_HOOKUP_OBJECT (dialog1, spinPmin, "spinPmin");
GLADE_HOOKUP_OBJECT (dialog1, spinPmax, "spinPmax");
GLADE_HOOKUP_OBJECT (dialog1, label3, "label3");
GLADE_HOOKUP_OBJECT (dialog1, label13, "label13");
GLADE_HOOKUP_OBJECT (dialog1, label4, "label4");
GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_action_area1, "dialog_action_area1");
GLADE_HOOKUP_OBJECT (dialog1, cancelbutton1, "cancelbutton1");
GLADE_HOOKUP_OBJECT (dialog1, okbutton1, "okbutton1");
return dialog1;
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:101,代码来源:DIA_xvid.cpp
示例6: create_dialog1
//.........这里部分代码省略.........
gtk_misc_set_alignment (GTK_MISC (label10), 0, 0.5);
label7 = gtk_label_new_with_mnemonic (QT_TR_NOOP("_Weight:"));
gtk_widget_show (label7);
gtk_table_attach (GTK_TABLE (table3), label7, 0, 1, 4, 5,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (label7), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);
hscaleGammaB = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (1, 0.1, 3, 0.05, 1, 0)));
gtk_widget_show (hscaleGammaB);
gtk_table_attach (GTK_TABLE (table3), hscaleGammaB, 1, 2, 3, 4,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
gtk_widget_set_size_request (hscaleGammaB, 144, 0);
gtk_scale_set_value_pos (GTK_SCALE (hscaleGammaB), GTK_POS_RIGHT);
gtk_scale_set_digits (GTK_SCALE (hscaleGammaB), 2);
hscaleGammaWeight = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (1, 0, 1, 0.05, 1, 0)));
gtk_widget_show (hscaleGammaWeight);
gtk_table_attach (GTK_TABLE (table3), hscaleGammaWeight, 1, 2, 4, 5,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
gtk_widget_set_size_request (hscaleGammaWeight, 144, 0);
gtk_scale_set_value_pos (GTK_SCALE (hscaleGammaWeight), GTK_POS_RIGHT);
gtk_scale_set_digits (GTK_SCALE (hscaleGammaWeight), 2);
label2 = gtk_label_new (QT_TR_NOOP("<b>Gamma</b>"));
gtk_widget_show (label2);
gtk_frame_set_label_widget (GTK_FRAME (frame2), label2);
gtk_label_set_use_markup (GTK_LABEL (label2), TRUE);
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT);
hscale1 = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 1, 1, 0)));
gtk_widget_show (hscale1);
gtk_box_pack_start (GTK_BOX (vbox1), hscale1, FALSE, FALSE, 0);
drawingarea1 = gtk_drawing_area_new ();
gtk_widget_show (drawingarea1);
gtk_box_pack_start (GTK_BOX (vbox1), drawingarea1, TRUE, TRUE, 0);
dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
gtk_widget_show (cancelbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), cancelbutton1, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);
okbutton1 = gtk_button_new_from_stock ("gtk-ok");
gtk_widget_show (okbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), okbutton1, GTK_RESPONSE_OK);
GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
gtk_label_set_mnemonic_widget (GTK_LABEL (label4), hscaleBrightness);
gtk_label_set_mnemonic_widget (GTK_LABEL (label5), hscaleSaturation);
gtk_label_set_mnemonic_widget (GTK_LABEL (label3), hscaleContrast);
gtk_label_set_mnemonic_widget (GTK_LABEL (label6), hscaleGamma);
gtk_label_set_mnemonic_widget (GTK_LABEL (label8), hscaleGammaR);
gtk_label_set_mnemonic_widget (GTK_LABEL (label9), hscaleGammaG);
gtk_label_set_mnemonic_widget (GTK_LABEL (label10), hscaleGammaB);
gtk_label_set_mnemonic_widget (GTK_LABEL (label7), hscaleGammaWeight);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog1, "dialog1");
GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_vbox1, "dialog_vbox1");
GLADE_HOOKUP_OBJECT (dialog1, vbox1, "vbox1");
GLADE_HOOKUP_OBJECT (dialog1, hbox1, "hbox1");
GLADE_HOOKUP_OBJECT (dialog1, frame1, "frame1");
GLADE_HOOKUP_OBJECT (dialog1, table2, "table2");
GLADE_HOOKUP_OBJECT (dialog1, label4, "label4");
GLADE_HOOKUP_OBJECT (dialog1, label5, "label5");
GLADE_HOOKUP_OBJECT (dialog1, hscaleBrightness, "hscaleBrightness");
GLADE_HOOKUP_OBJECT (dialog1, hscaleSaturation, "hscaleSaturation");
GLADE_HOOKUP_OBJECT (dialog1, hscaleContrast, "hscaleContrast");
GLADE_HOOKUP_OBJECT (dialog1, label3, "label3");
GLADE_HOOKUP_OBJECT (dialog1, label1, "label1");
GLADE_HOOKUP_OBJECT (dialog1, frame2, "frame2");
GLADE_HOOKUP_OBJECT (dialog1, table3, "table3");
GLADE_HOOKUP_OBJECT (dialog1, label6, "label6");
GLADE_HOOKUP_OBJECT (dialog1, hscaleGamma, "hscaleGamma");
GLADE_HOOKUP_OBJECT (dialog1, hscaleGammaR, "hscaleGammaR");
GLADE_HOOKUP_OBJECT (dialog1, label8, "label8");
GLADE_HOOKUP_OBJECT (dialog1, hscaleGammaG, "hscaleGammaG");
GLADE_HOOKUP_OBJECT (dialog1, label9, "label9");
GLADE_HOOKUP_OBJECT (dialog1, label10, "label10");
GLADE_HOOKUP_OBJECT (dialog1, label7, "label7");
GLADE_HOOKUP_OBJECT (dialog1, hscaleGammaB, "hscaleGammaB");
GLADE_HOOKUP_OBJECT (dialog1, hscaleGammaWeight, "hscaleGammaWeight");
GLADE_HOOKUP_OBJECT (dialog1, label2, "label2");
GLADE_HOOKUP_OBJECT (dialog1, hscale1, "hscale1");
GLADE_HOOKUP_OBJECT (dialog1, drawingarea1, "drawingarea1");
GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_action_area1, "dialog_action_area1");
GLADE_HOOKUP_OBJECT (dialog1, cancelbutton1, "cancelbutton1");
GLADE_HOOKUP_OBJECT (dialog1, okbutton1, "okbutton1");
return dialog1;
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:101,代码来源:DIA_eq2.cpp
示例7: create_TextProfileDialog
void create_TextProfileDialog (CTextProfile *tp)
{
GtkWidget *TextEncoderDialog;
GtkWidget *dialog_vbox11;
GtkWidget *table8;
GtkWidget *TextEncodingOptionMenu;
GtkWidget *label211;
GtkWidget *label212;
GtkObject *TextRepeatTimeSpinner_adj;
GtkWidget *TextRepeatTimeSpinner;
GtkWidget *label213;
GtkWidget *TextProfileEntry;
GtkWidget *dialog_action_area10;
GtkWidget *cancelbutton8;
GtkWidget *okbutton10;
TextEncoderDialog = gtk_dialog_new();
gtk_window_set_title(GTK_WINDOW(TextEncoderDialog), _("Text Encoder"));
gtk_window_set_modal(GTK_WINDOW(TextEncoderDialog), TRUE);
gtk_window_set_resizable(GTK_WINDOW(TextEncoderDialog), FALSE);
dialog_vbox11 = GTK_DIALOG(TextEncoderDialog)->vbox;
gtk_widget_show(dialog_vbox11);
table8 = gtk_table_new(3, 2, TRUE);
gtk_widget_show(table8);
gtk_box_pack_start(GTK_BOX(dialog_vbox11), table8, TRUE, TRUE, 0);
gtk_table_set_row_spacings(GTK_TABLE(table8), 11);
gtk_table_set_col_spacings(GTK_TABLE(table8), 7);
TextEncodingOptionMenu = gtk_option_menu_new();
gtk_widget_show(TextEncodingOptionMenu);
gtk_table_attach(GTK_TABLE(table8), TextEncodingOptionMenu, 1, 2, 1, 2,
(GtkAttachOptions)(GTK_FILL),
(GtkAttachOptions)(0), 0, 0);
label211 = gtk_label_new(_("Text Encoder:"));
gtk_widget_show(label211);
gtk_table_attach(GTK_TABLE(table8), label211, 0, 1, 1, 2,
(GtkAttachOptions)(GTK_FILL),
(GtkAttachOptions)(0), 0, 0);
gtk_misc_set_alignment(GTK_MISC(label211), 0, 0.5);
label212 = gtk_label_new(_("Repeat Time:"));
gtk_widget_show(label212);
gtk_table_attach(GTK_TABLE(table8), label212, 0, 1, 2, 3,
(GtkAttachOptions)(GTK_FILL),
(GtkAttachOptions)(0), 0, 0);
gtk_misc_set_alignment(GTK_MISC(label212), 0, 0.5);
TextRepeatTimeSpinner_adj = gtk_adjustment_new(tp != NULL ? tp->GetFloatValue(CFG_TEXT_REPEAT_TIME_SECS) : 1, 0, 100, 1, 10, 10);
TextRepeatTimeSpinner = gtk_spin_button_new(GTK_ADJUSTMENT(TextRepeatTimeSpinner_adj), 1, 1);
gtk_widget_show(TextRepeatTimeSpinner);
gtk_table_attach(GTK_TABLE(table8), TextRepeatTimeSpinner, 1, 2, 2, 3,
(GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
(GtkAttachOptions)(0), 0, 0);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(TextRepeatTimeSpinner), TRUE);
label213 = gtk_label_new(_("Text Profile:"));
gtk_widget_show(label213);
gtk_table_attach(GTK_TABLE(table8), label213, 0, 1, 0, 1,
(GtkAttachOptions)(GTK_FILL),
(GtkAttachOptions)(0), 0, 0);
gtk_misc_set_alignment(GTK_MISC(label213), 0, 0.5);
TextProfileEntry = gtk_entry_new();
gtk_widget_show (TextProfileEntry);
gtk_table_attach (GTK_TABLE(table8), TextProfileEntry, 1, 2, 0, 1,
(GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
(GtkAttachOptions)(0), 0, 0);
dialog_action_area10 = GTK_DIALOG(TextEncoderDialog)->action_area;
gtk_widget_show(dialog_action_area10);
gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_area10), GTK_BUTTONBOX_END);
cancelbutton8 = gtk_button_new_from_stock("gtk-cancel");
gtk_widget_show(cancelbutton8);
gtk_dialog_add_action_widget(GTK_DIALOG(TextEncoderDialog), cancelbutton8, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS(cancelbutton8, GTK_CAN_DEFAULT);
okbutton10 = gtk_button_new_from_stock("gtk-ok");
gtk_widget_show(okbutton10);
gtk_dialog_add_action_widget(GTK_DIALOG(TextEncoderDialog), okbutton10, GTK_RESPONSE_OK);
GTK_WIDGET_SET_FLAGS(okbutton10, GTK_CAN_DEFAULT);
g_signal_connect((gpointer) TextEncoderDialog, "response",
G_CALLBACK(on_TextEncoderDialog_response),
tp);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF(TextEncoderDialog, TextEncoderDialog, "TextEncoderDialog");
GLADE_HOOKUP_OBJECT_NO_REF(TextEncoderDialog, dialog_vbox11, "dialog_vbox11");
GLADE_HOOKUP_OBJECT(TextEncoderDialog, table8, "table8");
GLADE_HOOKUP_OBJECT(TextEncoderDialog, TextEncodingOptionMenu, "TextEncodingOptionMenu");
GLADE_HOOKUP_OBJECT(TextEncoderDialog, label211, "label211");
GLADE_HOOKUP_OBJECT(TextEncoderDialog, label212, "label212");
GLADE_HOOKUP_OBJECT(TextEncoderDialog, TextRepeatTimeSpinner, "TextRepeatTimeSpinner");
GLADE_HOOKUP_OBJECT (TextEncoderDialog, label213, "label213");
GLADE_HOOKUP_OBJECT (TextEncoderDialog, TextProfileEntry, "TextProfileEntry");
GLADE_HOOKUP_OBJECT_NO_REF(TextEncoderDialog, dialog_action_area10, "dialog_action_area10");
//.........这里部分代码省略.........
开发者ID:qmwd2006,项目名称:mpeg4ip,代码行数:101,代码来源:text_dialog.cpp
示例8: create_dialog1
//.........这里部分代码省略.........
label4 = gtk_label_new (QT_TR_NOOP("Select Language :"));
gtk_widget_show (label4);
gtk_table_attach (GTK_TABLE (table1), label4, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (label4), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);
optionmenu1 = gtk_option_menu_new ();
gtk_widget_show (optionmenu1);
gtk_table_attach (GTK_TABLE (table1), optionmenu1, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
label2 = gtk_label_new (QT_TR_NOOP("Select Sub"));
gtk_widget_show (label2);
gtk_frame_set_label_widget (GTK_FRAME (frame1), label2);
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT);
frame2 = gtk_frame_new (NULL);
gtk_widget_show (frame2);
gtk_box_pack_start (GTK_BOX (vbox1), frame2, TRUE, TRUE, 0);
table2 = gtk_table_new (2, 2, FALSE);
gtk_widget_show (table2);
gtk_container_add (GTK_CONTAINER (frame2), table2);
label6 = gtk_label_new (QT_TR_NOOP("Extra Shrink Factor :"));
gtk_widget_show (label6);
gtk_table_attach (GTK_TABLE (table2), label6, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (label6), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);
spinbutton1_adj = gtk_adjustment_new (1, 1, 2, 0.1, 0.2, 0.2);
spinbutton1 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton1_adj), 1, 0);
gtk_widget_show (spinbutton1);
gtk_table_attach (GTK_TABLE (table2), spinbutton1, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
label7 = gtk_label_new (QT_TR_NOOP("Shift (ms) :"));
gtk_widget_show (label7);
gtk_table_attach (GTK_TABLE (table2), label7, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (label7), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);
entryShift = gtk_entry_new ();
gtk_widget_show (entryShift);
gtk_table_attach (GTK_TABLE (table2), entryShift, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
label5 = gtk_label_new (QT_TR_NOOP("Extra Settings"));
gtk_widget_show (label5);
gtk_frame_set_label_widget (GTK_FRAME (frame2), label5);
gtk_label_set_justify (GTK_LABEL (label5), GTK_JUSTIFY_LEFT);
dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
gtk_widget_show (cancelbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), cancelbutton1, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);
okbutton1 = gtk_button_new_from_stock ("gtk-ok");
gtk_widget_show (okbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), okbutton1, GTK_RESPONSE_OK);
GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog1, "dialog1");
GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_vbox1, "dialog_vbox1");
GLADE_HOOKUP_OBJECT (dialog1, vbox1, "vbox1");
GLADE_HOOKUP_OBJECT (dialog1, frame1, "frame1");
GLADE_HOOKUP_OBJECT (dialog1, table1, "table1");
GLADE_HOOKUP_OBJECT (dialog1, buttonSelect, "buttonSelect");
GLADE_HOOKUP_OBJECT (dialog1, labelVobsub, "labelVobsub");
GLADE_HOOKUP_OBJECT (dialog1, label4, "label4");
GLADE_HOOKUP_OBJECT (dialog1, optionmenu1, "optionmenu1");
GLADE_HOOKUP_OBJECT (dialog1, label2, "label2");
GLADE_HOOKUP_OBJECT (dialog1, frame2, "frame2");
GLADE_HOOKUP_OBJECT (dialog1, table2, "table2");
GLADE_HOOKUP_OBJECT (dialog1, label6, "label6");
GLADE_HOOKUP_OBJECT (dialog1, spinbutton1, "spinbutton1");
GLADE_HOOKUP_OBJECT (dialog1, label7, "label7");
GLADE_HOOKUP_OBJECT (dialog1, entryShift, "entryShift");
GLADE_HOOKUP_OBJECT (dialog1, label5, "label5");
GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_action_area1, "dialog_action_area1");
GLADE_HOOKUP_OBJECT (dialog1, cancelbutton1, "cancelbutton1");
GLADE_HOOKUP_OBJECT (dialog1, okbutton1, "okbutton1");
return dialog1;
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:101,代码来源:DIA_vobsub.cpp
示例9: DoMessageBox
int DoMessageBox (const char* lpText, const char* lpCaption, guint32 uType)
{
GtkWidget *window, *w, *vbox, *hbox;
int mode = (uType & MB_TYPEMASK), ret, loop = 1;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
gtk_window_set_title (GTK_WINDOW (window), lpCaption);
gtk_container_border_width (GTK_CONTAINER (window), 10);
g_object_set_data (G_OBJECT (window), "loop", &loop);
g_object_set_data (G_OBJECT (window), "ret", &ret);
gtk_widget_realize (window);
vbox = gtk_vbox_new (FALSE, 10);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show (vbox);
w = gtk_label_new (lpText);
gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 2);
gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_LEFT);
gtk_widget_show (w);
w = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 2);
gtk_widget_show (w);
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
gtk_widget_show (hbox);
if (mode == MB_OK)
{
w = gtk_button_new_with_label ("Ok");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked",
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDOK));
GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
gtk_widget_grab_default (w);
gtk_widget_show (w);
ret = IDOK;
}
else if (mode == MB_OKCANCEL)
{
w = gtk_button_new_with_label ("Ok");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked",
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDOK));
GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
gtk_widget_grab_default (w);
gtk_widget_show (w);
w = gtk_button_new_with_label ("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked",
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDCANCEL));
gtk_widget_show (w);
ret = IDCANCEL;
}
else if (mode == MB_YESNOCANCEL)
{
w = gtk_button_new_with_label ("Yes");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked",
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDYES));
GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
gtk_widget_grab_default (w);
gtk_widget_show (w);
w = gtk_button_new_with_label ("No");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked",
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDNO));
gtk_widget_show (w);
w = gtk_button_new_with_label ("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked",
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDCANCEL));
gtk_widget_show (w);
ret = IDCANCEL;
}
else /* if (mode == MB_YESNO) */
{
w = gtk_button_new_with_label ("Yes");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked",
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDYES));
GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
gtk_widget_grab_default (w);
gtk_widget_show (w);
w = gtk_button_new_with_label ("No");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked",
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDNO));
gtk_widget_show (w);
ret = IDNO;
//.........这里部分代码省略.........
开发者ID:AEonZR,项目名称:GtkRadiant,代码行数:101,代码来源:TexTool.cpp
示例10: gtk_accel_group_new
//.........这里部分代码省略.........
GTK_ACCEL_VISIBLE);
// Configuration tab
stwidgets.configtab = gtk_label_new("Configuration");
gtk_notebook_set_tab_label(GTK_NOTEBOOK(stwidgets.tabs), gtk_notebook_get_nth_page(GTK_NOTEBOOK(stwidgets.tabs), 0), stwidgets.configtab);
// Messages scrollable area
stwidgets.messagesscroll = gtk_scrolled_window_new(NULL, NULL);
gtk_container_add(GTK_CONTAINER(stwidgets.tabs), stwidgets.messagesscroll);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(stwidgets.messagesscroll), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
// Messages text area
stwidgets.messagestext = gtk_text_view_new();
gtk_container_add(GTK_CONTAINER(stwidgets.messagesscroll), stwidgets.messagestext);
gtk_text_view_set_editable(GTK_TEXT_VIEW(stwidgets.messagestext), FALSE);
gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(stwidgets.messagestext), GTK_WRAP_WORD);
gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(stwidgets.messagestext), FALSE);
gtk_text_view_set_left_margin(GTK_TEXT_VIEW(stwidgets.messagestext), 2);
gtk_text_view_set_right_margin(GTK_TEXT_VIEW(stwidgets.messagestext), 2);
// Messages tab
stwidgets.messagestab = gtk_label_new("Messages");
gtk_notebook_set_tab_label(GTK_NOTEBOOK(stwidgets.tabs), gtk_notebook_get_nth_page(GTK_NOTEBOOK(stwidgets.tabs), 1), stwidgets.messagestab);
// Dialogue box buttons layout
stwidgets.buttons = gtk_hbutton_box_new();
gtk_box_pack_start(GTK_BOX(stwidgets.vlayout), stwidgets.buttons, FALSE, TRUE, 0);
gtk_container_set_border_width(GTK_CONTAINER(stwidgets.buttons), 3);
gtk_button_box_set_layout(GTK_BUTTON_BOX(stwidgets.buttons), GTK_BUTTONBOX_END);
// Cancel button
stwidgets.cancelbutton = gtk_button_new();
gtk_container_add(GTK_CONTAINER(stwidgets.buttons), stwidgets.cancelbutton);
GTK_WIDGET_SET_FLAGS(stwidgets.cancelbutton, GTK_CAN_DEFAULT);
gtk_widget_add_accelerator(stwidgets.cancelbutton, "grab_focus", stwidgets.accel_group,
GDK_C, GDK_MOD1_MASK,
GTK_ACCEL_VISIBLE);
gtk_widget_add_accelerator(stwidgets.cancelbutton, "clicked", stwidgets.accel_group,
GDK_Escape, 0,
GTK_ACCEL_VISIBLE);
stwidgets.cancelbuttonalign = gtk_alignment_new(0.5, 0.5, 0, 0);
gtk_container_add(GTK_CONTAINER(stwidgets.cancelbutton), stwidgets.cancelbuttonalign);
stwidgets.cancelbuttonlayout = gtk_hbox_new(FALSE, 2);
gtk_container_add(GTK_CONTAINER(stwidgets.cancelbuttonalign), stwidgets.cancelbuttonlayout);
stwidgets.cancelbuttonicon = gtk_image_new_from_stock("gtk-cancel", GTK_ICON_SIZE_BUTTON);
gtk_box_pack_start(GTK_BOX(stwidgets.cancelbuttonlayout), stwidgets.cancelbuttonicon, FALSE, FALSE, 0);
stwidgets.cancelbuttonlabel = gtk_label_new_with_mnemonic("_Cancel");
gtk_box_pack_start(GTK_BOX(stwidgets.cancelbuttonlayout), stwidgets.cancelbuttonlabel, FALSE, FALSE, 0);
// Start button
stwidgets.startbutton = gtk_button_new();
gtk_container_add(GTK_CONTAINER(stwidgets.buttons), stwidgets.startbutton);
GTK_WIDGET_SET_FLAGS(stwidgets.startbutton, GTK_CAN_DEFAULT);
gtk_widget_add_accelerator(stwidgets.startbutton, "grab_focus", stwidgets.accel_group,
GDK_S, GDK_MOD1_MASK,
GTK_ACCEL_VISIBLE);
gtk_widget_add_accelerator(stwidgets.startbutton, "clicked", stwidgets.accel_group,
GDK_Return, 0,
GTK_ACCEL_VISIBLE);
stwidgets.startbuttonalign = gtk_alignment_new(0.5, 0.5, 0, 0);
gtk_container_add(GTK_CONTAINER(stwidgets.startbutton), stwidgets.startbuttonalign);
开发者ID:Daedolon,项目名称:erampage,代码行数:67,代码来源:startgtk.editor.c
示例11: gimp_dialog_create_action_areav
/**
* gimp_dialog_create_action_areav:
* @dialog: The #GtkDialog you want to create the action_area for.
* @args: A @va_list as obtained with va_start() describing the action_area
* buttons.
*
*/
void
gimp_dialog_create_action_areav (GtkDialog *dialog,
va_list args)
{
GtkWidget *hbbox = NULL;
GtkWidget *button;
/* action area variables */
const gchar *label;
GtkSignalFunc callback;
gpointer data;
GtkObject *slot_object;
GtkWidget **widget_ptr;
gboolean default_action;
gboolean connect_delete;
gboolean delete_connected = FALSE;
g_return_if_fail (dialog != NULL);
g_return_if_fail (GTK_IS_DIALOG (dialog));
/* prepare the action_area */
label = va_arg (args, const gchar *);
if (label)
{
gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (dialog->action_area), FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_box_pack_end (GTK_BOX (dialog->action_area), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox);
}
/* the action_area buttons */
while (label)
{
callback = va_arg (args, GtkSignalFunc);
data = va_arg (args, gpointer);
slot_object = va_arg (args, GtkObject *);
widget_ptr = va_arg (args, GtkWidget **);
default_action = va_arg (args, gboolean);
connect_delete = va_arg (args, gboolean);
button = gtk_button_new_with_label (label);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
if (slot_object == (GtkObject *) 1)
slot_object = GTK_OBJECT (dialog);
if (data == NULL)
data = dialog;
if (callback)
{
if (slot_object)
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (callback),
slot_object);
else
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (callback),
data);
}
if (widget_ptr)
*widget_ptr = button;
if (connect_delete && callback && !delete_connected)
{
gtk_object_set_data (GTK_OBJECT (dialog),
"gimp_dialog_cancel_callback",
callback);
gtk_object_set_data (GTK_OBJECT (dialog),
"gimp_dialog_cancel_widget",
slot_object ? slot_object : GTK_OBJECT (button));
/* catch the WM delete event */
gtk_signal_connect (GTK_OBJECT (dialog), "delete_event",
GTK_SIGNAL_FUNC (gimp_dialog_delete_callback),
data);
delete_connected = TRUE;
}
if (default_action)
gtk_widget_grab_default (button);
gtk_widget_show (button);
label = va_arg (args, gchar *);
}
//.........这里部分代码省略.........
开发者ID:milankni,项目名称:cinepaint-oyranos,代码行数:101,代码来源:dialog.c
示例12: create_bsv_viewer_pref_dlg
-
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:19188|2023-10-27
-
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:9988|2022-11-06
-
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8326|2022-11-06
-
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8695|2022-11-06
-
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8639|2022-11-06
-
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9657|2022-11-06
-
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8624|2022-11-06
-
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:7998|2022-11-06
-
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8656|2022-11-06
-
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7535|2022-11-06
|
请发表评论