/* Create actual buttons */ GtkWidget * create_discard_buttons (void) { GtkWidget *table; GtkWidget *table2; GtkWidget *frame; GtkWidget *main_vbox; GtkWidget *b1; GtkWidget *b2; GtkWidget *pixmapwid1, *pixmapwid2; GtkTooltips *tooltips; tooltips=gtk_tooltips_new_2(); gtk_tooltips_set_delay_2(tooltips,1500); pixmapwid1=gtk_pixmap_new(larrow_pixmap, larrow_mask); gtk_widget_show(pixmapwid1); pixmapwid2=gtk_pixmap_new(rarrow_pixmap, rarrow_mask); gtk_widget_show(pixmapwid2); /* Create a table to hold the text widget and scrollbars */ table = gtk_table_new (1, 1, FALSE); main_vbox = gtk_vbox_new (FALSE, 1); gtk_container_border_width (GTK_CONTAINER (main_vbox), 1); gtk_container_add (GTK_CONTAINER (table), main_vbox); frame = gtk_frame_new ("Disc "); gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0); gtk_widget_show (frame); gtk_widget_show (main_vbox); table2 = gtk_table_new (2, 1, FALSE); b1 = gtk_button_new(); gtk_container_add(GTK_CONTAINER(b1), pixmapwid1); gtk_table_attach (GTK_TABLE (table2), b1, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); gtk_signal_connect_object (GTK_OBJECT (b1), "clicked", GTK_SIGNAL_FUNC(discard_left), GTK_OBJECT (table2)); gtk_tooltips_set_tip_2(tooltips, b1, "Increase 'From' Time", NULL); gtk_widget_show(b1); b2 = gtk_button_new(); gtk_container_add(GTK_CONTAINER(b2), pixmapwid2); gtk_table_attach (GTK_TABLE (table2), b2, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); gtk_signal_connect_object (GTK_OBJECT (b2), "clicked", GTK_SIGNAL_FUNC(discard_right), GTK_OBJECT (table2)); gtk_tooltips_set_tip_2(tooltips, b2, "Decrease 'To' Time", NULL); gtk_widget_show(b2); gtk_container_add (GTK_CONTAINER (frame), table2); gtk_widget_show(table2); return(table); }
/* Create shift buttons */ GtkWidget * create_edge_buttons (void) { GtkWidget *table; GtkWidget *table2; GtkWidget *frame; GtkWidget *main_vbox; GtkWidget *b1; GtkWidget *b2; GtkWidget *pixmapwid1, *pixmapwid2; GtkTooltips *tooltips; tooltips=gtk_tooltips_new_2(); gtk_tooltips_set_delay_2(tooltips,1500); pixmapwid1=gtk_pixmap_new(GLOBALS->larrow_pixmap, GLOBALS->larrow_mask); gtk_widget_show(pixmapwid1); pixmapwid2=gtk_pixmap_new(GLOBALS->rarrow_pixmap, GLOBALS->rarrow_mask); gtk_widget_show(pixmapwid2); /* Create a table to hold the text widget and scrollbars */ table = gtk_table_new (1, 1, FALSE); main_vbox = gtk_vbox_new (FALSE, 1); gtk_container_border_width (GTK_CONTAINER (main_vbox), 1); gtk_container_add (GTK_CONTAINER (table), main_vbox); frame = gtk_frame_new ("Edge "); gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0); gtk_widget_show (frame); gtk_widget_show (main_vbox); table2 = gtk_table_new (2, 1, FALSE); b1 = gtk_button_new(); gtk_container_add(GTK_CONTAINER(b1), pixmapwid1); gtk_table_attach (GTK_TABLE (table2), b1, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); gtk_signal_connect_object (GTK_OBJECT (b1), "clicked", GTK_SIGNAL_FUNC(service_left_edge), GTK_OBJECT (table2)); gtk_tooltips_set_tip_2(tooltips, b1, "Find next transition of highlighted trace scanning left", NULL); gtk_widget_show(b1); b2 = gtk_button_new(); gtk_container_add(GTK_CONTAINER(b2), pixmapwid2); gtk_table_attach (GTK_TABLE (table2), b2, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); gtk_signal_connect_object (GTK_OBJECT (b2), "clicked", GTK_SIGNAL_FUNC(service_right_edge), GTK_OBJECT (table2)); gtk_tooltips_set_tip_2(tooltips, b2, "Find next transition of highlighted trace scanning right", NULL); gtk_widget_show(b2); gtk_container_add (GTK_CONTAINER (frame), table2); gtk_widget_show(table2); return(table); }
/* * mainline.. */ void treebox(char *title, GtkSignalFunc func) { GtkWidget *scrolled_win; GtkWidget *hbox; GtkWidget *button1, *button2, *button3, *button3a, *button4, *button5; GtkWidget *frame2, *frameh; GtkWidget *table; GtkTooltips *tooltips; GtkCList *clist; if(is_active) { gdk_window_raise(window->window); return; } is_active=1; cleanup=func; /* create a new modal window */ window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW (window), title); gtk_signal_connect(GTK_OBJECT (window), "delete_event", (GtkSignalFunc) destroy_callback, NULL); tooltips=gtk_tooltips_new_2(); table = gtk_table_new (256, 1, FALSE); gtk_widget_show (table); frame2 = gtk_frame_new (NULL); gtk_container_border_width (GTK_CONTAINER (frame2), 3); gtk_widget_show(frame2); gtk_table_attach (GTK_TABLE (table), frame2, 0, 1, 0, 255, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); tree=gtk_ctree_new(1,0); ctree_main=GTK_CTREE(tree); gtk_clist_set_column_auto_resize (GTK_CLIST (tree), 0, TRUE); gtk_widget_show(tree); clist=GTK_CLIST(tree); gtk_signal_connect_object (GTK_OBJECT (clist), "select_row", GTK_SIGNAL_FUNC(select_row_callback), NULL); gtk_signal_connect_object (GTK_OBJECT (clist), "unselect_row", GTK_SIGNAL_FUNC(unselect_row_callback), NULL); gtk_clist_freeze(clist); gtk_clist_clear(clist); maketree(NULL, treeroot); gtk_clist_thaw(clist); selectedtree=NULL; scrolled_win = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_usize( GTK_WIDGET (scrolled_win), -1, 300); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_widget_show(scrolled_win); gtk_container_add (GTK_CONTAINER (scrolled_win), GTK_WIDGET (tree)); gtk_container_add (GTK_CONTAINER (frame2), scrolled_win); frameh = gtk_frame_new (NULL); gtk_container_border_width (GTK_CONTAINER (frameh), 3); gtk_widget_show(frameh); gtk_table_attach (GTK_TABLE (table), frameh, 0, 1, 255, 256, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); hbox = gtk_hbox_new (FALSE, 1); gtk_widget_show (hbox); button1 = gtk_button_new_with_label ("Append"); gtk_container_border_width (GTK_CONTAINER (button1), 3); gtk_signal_connect_object (GTK_OBJECT (button1), "clicked", GTK_SIGNAL_FUNC(ok_callback), GTK_OBJECT (window)); gtk_widget_show (button1); gtk_tooltips_set_tip_2(tooltips, button1, "Add selected signal hierarchy to end of the display on the main window.",NULL); gtk_box_pack_start (GTK_BOX (hbox), button1, TRUE, FALSE, 0); button2 = gtk_button_new_with_label (" Insert "); gtk_container_border_width (GTK_CONTAINER (button2), 3); gtk_signal_connect_object (GTK_OBJECT (button2), "clicked", GTK_SIGNAL_FUNC(insert_callback), GTK_OBJECT (window)); gtk_widget_show (button2); gtk_tooltips_set_tip_2(tooltips, button2, "Add selected signal hierarchy after last highlighted signal on the main window.",NULL); gtk_box_pack_start (GTK_BOX (hbox), button2, TRUE, FALSE, 0); if(vcd_explicit_zero_subscripts>=0) { button3 = gtk_button_new_with_label (" Bundle Up "); gtk_container_border_width (GTK_CONTAINER (button3), 3); gtk_signal_connect_object (GTK_OBJECT (button3), "clicked", GTK_SIGNAL_FUNC(bundle_callback_up), GTK_OBJECT (window)); gtk_widget_show (button3); gtk_tooltips_set_tip_2(tooltips, button3, "Bundle selected signal hierarchy into a single bit " "vector with the topmost signal as the LSB and the " "lowest as the MSB. Entering a zero length bundle " "name will reconstruct the individual vectors " "in the hierarchy. Otherwise, all the bits in " "the hierarchy will be coalesced with the supplied " "name into a single vector.",NULL); gtk_box_pack_start (GTK_BOX (hbox), button3, TRUE, FALSE, 0); button3a = gtk_button_new_with_label (" Bundle Down "); gtk_container_border_width (GTK_CONTAINER (button3a), 3); gtk_signal_connect_object (GTK_OBJECT (button3a), "clicked", GTK_SIGNAL_FUNC(bundle_callback_down), GTK_OBJECT (window)); gtk_widget_show (button3a); gtk_tooltips_set_tip_2(tooltips, button3a, "Bundle selected signal hierarchy into a single bit " "vector with the topmost signal as the MSB and the " "lowest as the LSB. Entering a zero length bundle " "name will reconstruct the individual vectors " "in the hierarchy. Otherwise, all the bits in " "the hierarchy will be coalesced with the supplied " "name into a single vector.",NULL); gtk_box_pack_start (GTK_BOX (hbox), button3a, TRUE, FALSE, 0); } button4 = gtk_button_new_with_label (" Replace "); gtk_container_border_width (GTK_CONTAINER (button4), 3); gtk_signal_connect_object (GTK_OBJECT (button4), "clicked", GTK_SIGNAL_FUNC(replace_callback), GTK_OBJECT (window)); gtk_widget_show (button4); gtk_tooltips_set_tip_2(tooltips, button4, "Replace highlighted signals on the main window with signals selected above.",NULL); gtk_box_pack_start (GTK_BOX (hbox), button4, TRUE, FALSE, 0); button5 = gtk_button_new_with_label (" Exit "); gtk_container_border_width (GTK_CONTAINER (button5), 3); gtk_signal_connect_object (GTK_OBJECT (button5), "clicked", GTK_SIGNAL_FUNC(destroy_callback), GTK_OBJECT (window)); gtk_tooltips_set_tip_2(tooltips, button5, "Do nothing and return to the main window.",NULL); gtk_widget_show (button5); gtk_box_pack_start (GTK_BOX (hbox), button5, TRUE, FALSE, 0); gtk_container_add (GTK_CONTAINER (frameh), hbox); gtk_container_add (GTK_CONTAINER (window), table); gtk_widget_show(window); }
/* * mainline.. */ void ptrans_searchbox(char *title) { int i; GtkWidget *scrolled_win; GtkWidget *vbox1, *hbox, *hbox0; GtkWidget *button1, *button5, *button6; gchar *titles[]={"Process Filter Select"}; GtkWidget *frame2, *frameh, *frameh0; GtkWidget *table; GtkTooltips *tooltips; if(GLOBALS->is_active_ptranslate_c_2) { gdk_window_raise(GLOBALS->window_ptranslate_c_5->window); return; } GLOBALS->is_active_ptranslate_c_2=1; GLOBALS->current_filter_ptranslate_c_1 = 0; /* create a new modal window */ GLOBALS->window_ptranslate_c_5 = gtk_window_new(GLOBALS->disable_window_manager ? GTK_WINDOW_POPUP : GTK_WINDOW_TOPLEVEL); install_focus_cb(GLOBALS->window_ptranslate_c_5, ((char *)&GLOBALS->window_ptranslate_c_5) - ((char *)GLOBALS)); gtk_window_set_title(GTK_WINDOW (GLOBALS->window_ptranslate_c_5), title); gtkwave_signal_connect(GTK_OBJECT (GLOBALS->window_ptranslate_c_5), "delete_event",(GtkSignalFunc) destroy_callback, NULL); tooltips=gtk_tooltips_new_2(); table = gtk_table_new (256, 1, FALSE); gtk_widget_show (table); vbox1 = gtk_vbox_new (FALSE, 0); gtk_container_border_width (GTK_CONTAINER (vbox1), 3); gtk_widget_show (vbox1); frame2 = gtk_frame_new (NULL); gtk_container_border_width (GTK_CONTAINER (frame2), 3); gtk_widget_show(frame2); gtk_table_attach (GTK_TABLE (table), frame2, 0, 1, 0, 254, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); GLOBALS->clist_ptranslate_c_2=gtk_clist_new_with_titles(1,titles); gtk_clist_column_titles_passive(GTK_CLIST(GLOBALS->clist_ptranslate_c_2)); gtk_clist_set_selection_mode(GTK_CLIST(GLOBALS->clist_ptranslate_c_2), GTK_SELECTION_EXTENDED); gtkwave_signal_connect_object (GTK_OBJECT (GLOBALS->clist_ptranslate_c_2), "select_row",GTK_SIGNAL_FUNC(select_row_callback),NULL); gtkwave_signal_connect_object (GTK_OBJECT (GLOBALS->clist_ptranslate_c_2), "unselect_row",GTK_SIGNAL_FUNC(unselect_row_callback),NULL); for(i=0;i<GLOBALS->num_proc_filters;i++) { gtk_clist_append(GTK_CLIST(GLOBALS->clist_ptranslate_c_2),(gchar **)&(GLOBALS->procsel_filter[i+1])); } gtk_clist_set_column_width(GTK_CLIST(GLOBALS->clist_ptranslate_c_2),0,gtk_clist_optimal_column_width(GTK_CLIST(GLOBALS->clist_ptranslate_c_2),0)); gtk_widget_show (GLOBALS->clist_ptranslate_c_2); scrolled_win = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_widget_set_usize( GTK_WIDGET (scrolled_win), -1, 300); gtk_widget_show(scrolled_win); /* gtk_scrolled_window_add_with_viewport doesn't seen to work right here.. */ gtk_container_add (GTK_CONTAINER (scrolled_win), GLOBALS->clist_ptranslate_c_2); gtk_container_add (GTK_CONTAINER (frame2), scrolled_win); frameh0 = gtk_frame_new (NULL); gtk_container_border_width (GTK_CONTAINER (frameh0), 3); gtk_widget_show(frameh0); gtk_table_attach (GTK_TABLE (table), frameh0, 0, 1, 254, 255, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); hbox0 = gtk_hbox_new (FALSE, 1); gtk_widget_show (hbox0); button6 = gtk_button_new_with_label (" Add Proc Filter to List "); gtk_container_border_width (GTK_CONTAINER (button6), 3); gtkwave_signal_connect_object (GTK_OBJECT (button6), "clicked",GTK_SIGNAL_FUNC(add_filter_callback),GTK_OBJECT (GLOBALS->window_ptranslate_c_5)); gtk_widget_show (button6); gtk_tooltips_set_tip_2(tooltips, button6, "Bring up a file requester to add a process filter to the filter select window.",NULL); gtk_box_pack_start (GTK_BOX (hbox0), button6, TRUE, FALSE, 0); gtk_container_add (GTK_CONTAINER (frameh0), hbox0); frameh = gtk_frame_new (NULL); gtk_container_border_width (GTK_CONTAINER (frameh), 3); gtk_widget_show(frameh); gtk_table_attach (GTK_TABLE (table), frameh, 0, 1, 255, 256, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); hbox = gtk_hbox_new (FALSE, 1); gtk_widget_show (hbox); button1 = gtk_button_new_with_label (" OK "); gtk_container_border_width (GTK_CONTAINER (button1), 3); gtkwave_signal_connect_object (GTK_OBJECT (button1), "clicked",GTK_SIGNAL_FUNC(ok_callback),GTK_OBJECT (GLOBALS->window_ptranslate_c_5)); gtk_widget_show (button1); gtk_tooltips_set_tip_2(tooltips, button1, "Add selected signals to end of the display on the main window.",NULL); gtk_box_pack_start (GTK_BOX (hbox), button1, TRUE, FALSE, 0); button5 = gtk_button_new_with_label (" Cancel "); gtk_container_border_width (GTK_CONTAINER (button5), 3); gtkwave_signal_connect_object (GTK_OBJECT (button5), "clicked",GTK_SIGNAL_FUNC(destroy_callback),GTK_OBJECT (GLOBALS->window_ptranslate_c_5)); gtk_tooltips_set_tip_2(tooltips, button5, "Do nothing and return to the main window.",NULL); gtk_widget_show (button5); gtk_box_pack_start (GTK_BOX (hbox), button5, TRUE, FALSE, 0); gtk_container_add (GTK_CONTAINER (frameh), hbox); gtk_container_add (GTK_CONTAINER (GLOBALS->window_ptranslate_c_5), table); gtk_widget_set_usize(GTK_WIDGET(GLOBALS->window_ptranslate_c_5), 400, 400); gtk_widget_show(GLOBALS->window_ptranslate_c_5); }
/* * mainline.. */ void searchbox(char *title, GtkSignalFunc func) { int i; GtkWidget *menu, *menuitem, *optionmenu; GSList *group; GtkWidget *small_hbox; GtkWidget *scrolled_win; GtkWidget *vbox1, *hbox, *hbox0; GtkWidget *button1, *button2, *button3, *button3a, *button4, *button5, *button6, *button7; GtkWidget *label; gchar *titles[]={"Matches"}; GtkWidget *frame1, *frame2, *frameh, *frameh0; GtkWidget *table; GtkTooltips *tooltips; GtkAdjustment *adj; GtkWidget *align; if(is_active) { gdk_window_raise(window->window); return; } is_active=1; cleanup=func; num_rows=selected_rows=0; /* create a new modal window */ window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW (window), title); gtk_signal_connect(GTK_OBJECT (window), "delete_event", (GtkSignalFunc) destroy_callback, NULL); tooltips=gtk_tooltips_new_2(); table = gtk_table_new (256, 1, FALSE); gtk_widget_show (table); vbox1 = gtk_vbox_new (FALSE, 0); gtk_container_border_width (GTK_CONTAINER (vbox1), 3); gtk_widget_show (vbox1); frame1 = gtk_frame_new (NULL); gtk_container_border_width (GTK_CONTAINER (frame1), 3); gtk_widget_show(frame1); gtk_table_attach (GTK_TABLE (table), frame1, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); label=gtk_label_new("Signal Search Expression"); gtk_widget_show(label); gtk_box_pack_start (GTK_BOX (vbox1), label, TRUE, TRUE, 0); entry = gtk_entry_new_with_max_length (256); gtk_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(enter_callback), entry); gtk_entry_set_text (GTK_ENTRY (entry), searchbox_text); gtk_entry_select_region (GTK_ENTRY (entry), 0, GTK_ENTRY(entry)->text_length); gtk_widget_show (entry); gtk_tooltips_set_tip_2(tooltips, entry, "Enter search expression here. POSIX Wildcards are allowed. Note that you may also " "modify the search criteria by selecting ``[W]Range'', ``[W]Strand'', or ``None'' for suffix " "matching.",NULL); gtk_box_pack_start (GTK_BOX (vbox1), entry, TRUE, TRUE, 0); /* Allocate memory for the data that is used later */ pdata = calloc_2(1, sizeof(SearchProgressData) ); pdata->value = pdata->oldvalue = 0.0; /* Create a centering alignment object */ align = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show(align); /* Create a Adjustment object to hold the range of the * progress bar */ adj = (GtkAdjustment *) gtk_adjustment_new (0.0, 0.0, (gfloat)((numfacs>1)?numfacs-1:1), 0, 0, 0); pdata->adj = adj; /* Create the GtkProgressBar using the adjustment */ pdata->pbar = gtk_progress_bar_new_with_adjustment (adj); /* Set the format of the string that can be displayed in the * trough of the progress bar: * %p - percentage * %v - value * %l - lower range value * %u - upper range value */ gtk_progress_set_format_string (GTK_PROGRESS (pdata->pbar), "(%p%%)"); gtk_progress_set_show_text (GTK_PROGRESS (pdata->pbar), TRUE); gtk_widget_show(pdata->pbar); gtk_box_pack_start (GTK_BOX (vbox1), pdata->pbar, TRUE, TRUE, 0); gtk_container_add (GTK_CONTAINER (frame1), vbox1); frame2 = gtk_frame_new (NULL); gtk_container_border_width (GTK_CONTAINER (frame2), 3); gtk_widget_show(frame2); gtk_table_attach (GTK_TABLE (table), frame2, 0, 1, 1, 254, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); clist=gtk_clist_new_with_titles(1,titles); gtk_clist_column_titles_passive(GTK_CLIST(clist)); gtk_clist_set_selection_mode(GTK_CLIST(clist), GTK_SELECTION_EXTENDED); gtk_signal_connect_object (GTK_OBJECT (clist), "select_row", GTK_SIGNAL_FUNC(select_row_callback), NULL); gtk_signal_connect_object (GTK_OBJECT (clist), "unselect_row", GTK_SIGNAL_FUNC(unselect_row_callback), NULL); gtk_widget_show (clist); scrolled_win = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_widget_set_usize( GTK_WIDGET (scrolled_win), -1, 300); gtk_widget_show(scrolled_win); /* gtk_scrolled_window_add_with_viewport doesn't seen to work right here.. */ gtk_container_add (GTK_CONTAINER (scrolled_win), clist); gtk_container_add (GTK_CONTAINER (frame2), scrolled_win); frameh0 = gtk_frame_new (NULL); gtk_container_border_width (GTK_CONTAINER (frameh0), 3); gtk_widget_show(frameh0); gtk_table_attach (GTK_TABLE (table), frameh0, 0, 1, 254, 255, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); hbox0 = gtk_hbox_new (FALSE, 1); gtk_widget_show (hbox0); button6 = gtk_button_new_with_label (" Select All "); gtk_container_border_width (GTK_CONTAINER (button6), 3); gtk_signal_connect_object (GTK_OBJECT (button6), "clicked", GTK_SIGNAL_FUNC(select_all_callback), GTK_OBJECT (window)); gtk_widget_show (button6); gtk_tooltips_set_tip_2(tooltips, button6, "Highlight all signals listed in the match window.",NULL); gtk_box_pack_start (GTK_BOX (hbox0), button6, TRUE, FALSE, 0); menu = gtk_menu_new (); group=NULL; small_hbox = gtk_hbox_new (TRUE, 0); gtk_widget_show (small_hbox); for(i=0;i<5;i++) { menuitem = gtk_radio_menu_item_new_with_label (group, regex_name[i]); group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem)); gtk_menu_append (GTK_MENU (menu), menuitem); gtk_widget_show (menuitem); gtk_signal_connect(GTK_OBJECT (menuitem), "activate", GTK_SIGNAL_FUNC(regex_clicked), ®ex_mutex[i]); regex_mutex[i]=0; } regex_mutex[0]=1; /* "range" */ optionmenu = gtk_option_menu_new (); gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu); gtk_box_pack_start (GTK_BOX (small_hbox), optionmenu, TRUE, FALSE, 0); gtk_widget_show (optionmenu); gtk_tooltips_set_tip_2(tooltips, optionmenu, "You may " "modify the search criteria by selecting ``Range'', ``Strand'', or ``None'' for suffix " "matching. This optionally matches the string you enter in the search string above with a Verilog " "format range (signal[7:0]), a strand (signal.1, signal.0), or with no suffix. " "The ``W'' modifier for ``Range'' and ``Strand'' explicitly matches on word boundaries. " "(addr matches unit.freezeaddr[63:0] for ``Range'' but only unit.addr[63:0] for ``WRange'' since addr has to be on a word boundary. " "Note that when ``None'' " "is selected, the search string may be located anywhere in the signal name.",NULL); gtk_box_pack_start (GTK_BOX (hbox0), small_hbox, FALSE, FALSE, 0); button7 = gtk_button_new_with_label (" Unselect All "); gtk_container_border_width (GTK_CONTAINER (button7), 3); gtk_signal_connect_object (GTK_OBJECT (button7), "clicked", GTK_SIGNAL_FUNC(unselect_all_callback), GTK_OBJECT (window)); gtk_widget_show (button7); gtk_tooltips_set_tip_2(tooltips, button7, "Unhighlight all signals listed in the match window.",NULL); gtk_box_pack_start (GTK_BOX (hbox0), button7, TRUE, FALSE, 0); gtk_container_add (GTK_CONTAINER (frameh0), hbox0); frameh = gtk_frame_new (NULL); gtk_container_border_width (GTK_CONTAINER (frameh), 3); gtk_widget_show(frameh); gtk_table_attach (GTK_TABLE (table), frameh, 0, 1, 255, 256, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); hbox = gtk_hbox_new (FALSE, 1); gtk_widget_show (hbox); button1 = gtk_button_new_with_label ("Append"); gtk_container_border_width (GTK_CONTAINER (button1), 3); gtk_signal_connect_object (GTK_OBJECT (button1), "clicked", GTK_SIGNAL_FUNC(ok_callback), GTK_OBJECT (window)); gtk_widget_show (button1); gtk_tooltips_set_tip_2(tooltips, button1, "Add selected signals to end of the display on the main window.",NULL); gtk_box_pack_start (GTK_BOX (hbox), button1, TRUE, FALSE, 0); button2 = gtk_button_new_with_label (" Insert "); gtk_container_border_width (GTK_CONTAINER (button2), 3); gtk_signal_connect_object (GTK_OBJECT (button2), "clicked", GTK_SIGNAL_FUNC(insert_callback), GTK_OBJECT (window)); gtk_widget_show (button2); gtk_tooltips_set_tip_2(tooltips, button2, "Add selected signals after last highlighted signal on the main window.",NULL); gtk_box_pack_start (GTK_BOX (hbox), button2, TRUE, FALSE, 0); if(vcd_explicit_zero_subscripts>=0) { button3 = gtk_button_new_with_label (" Bundle Up "); gtk_container_border_width (GTK_CONTAINER (button3), 3); gtk_signal_connect_object (GTK_OBJECT (button3), "clicked", GTK_SIGNAL_FUNC(bundle_callback_up), GTK_OBJECT (window)); gtk_widget_show (button3); gtk_tooltips_set_tip_2(tooltips, button3, "Bundle selected signals into a single bit vector with the topmost selected signal as the LSB and the lowest as the MSB.",NULL); gtk_box_pack_start (GTK_BOX (hbox), button3, TRUE, FALSE, 0); button3a = gtk_button_new_with_label (" Bundle Down "); gtk_container_border_width (GTK_CONTAINER (button3a), 3); gtk_signal_connect_object (GTK_OBJECT (button3a), "clicked", GTK_SIGNAL_FUNC(bundle_callback_down), GTK_OBJECT (window)); gtk_widget_show (button3a); gtk_tooltips_set_tip_2(tooltips, button3a, "Bundle selected signals into a single bit vector with the topmost selected signal as the MSB and the lowest as the LSB.",NULL); gtk_box_pack_start (GTK_BOX (hbox), button3a, TRUE, FALSE, 0); } button4 = gtk_button_new_with_label (" Replace "); gtk_container_border_width (GTK_CONTAINER (button4), 3); gtk_signal_connect_object (GTK_OBJECT (button4), "clicked", GTK_SIGNAL_FUNC(replace_callback), GTK_OBJECT (window)); gtk_widget_show (button4); gtk_tooltips_set_tip_2(tooltips, button4, "Replace highlighted signals on the main window with signals selected above.",NULL); gtk_box_pack_start (GTK_BOX (hbox), button4, TRUE, FALSE, 0); button5 = gtk_button_new_with_label (" Exit "); gtk_container_border_width (GTK_CONTAINER (button5), 3); gtk_signal_connect_object (GTK_OBJECT (button5), "clicked", GTK_SIGNAL_FUNC(destroy_callback), GTK_OBJECT (window)); gtk_tooltips_set_tip_2(tooltips, button5, "Do nothing and return to the main window.",NULL); gtk_widget_show (button5); gtk_box_pack_start (GTK_BOX (hbox), button5, TRUE, FALSE, 0); gtk_container_add (GTK_CONTAINER (frameh), hbox); gtk_container_add (GTK_CONTAINER (window), table); gtk_widget_show(window); if(strlen(searchbox_text)) enter_callback(entry,NULL); }
/* Create actual buttons */ GtkWidget * create_zoom_buttons (void) { GtkWidget *table; GtkWidget *table2; GtkWidget *frame; GtkWidget *main_vbox; GtkWidget *b1; GtkWidget *b2; GtkWidget *b3; GtkWidget *b4; GtkWidget *b5; GtkWidget *b6; GtkWidget *pixmapzout, *pixmapzin, *pixmapzfit, *pixmapzundo; GtkWidget *pixmapzleft, *pixmapzright; GtkTooltips *tooltips; tooltips=gtk_tooltips_new_2(); gtk_tooltips_set_delay_2(tooltips,1500); pixmapzin=gtk_pixmap_new(GLOBALS->zoomin_pixmap, GLOBALS->zoomin_mask); gtk_widget_show(pixmapzin); pixmapzout=gtk_pixmap_new(GLOBALS->zoomout_pixmap, GLOBALS->zoomout_mask); gtk_widget_show(pixmapzout); pixmapzfit=gtk_pixmap_new(GLOBALS->zoomfit_pixmap, GLOBALS->zoomfit_mask); gtk_widget_show(pixmapzfit); pixmapzundo=gtk_pixmap_new(GLOBALS->zoomundo_pixmap, GLOBALS->zoomundo_mask); gtk_widget_show(pixmapzundo); pixmapzleft=gtk_pixmap_new(GLOBALS->zoom_larrow_pixmap, GLOBALS->zoom_larrow_mask); gtk_widget_show(pixmapzleft); pixmapzright=gtk_pixmap_new(GLOBALS->zoom_rarrow_pixmap, GLOBALS->zoom_rarrow_mask); gtk_widget_show(pixmapzright); /* Create a table to hold the text widget and scrollbars */ table = gtk_table_new (1, 1, FALSE); main_vbox = gtk_vbox_new (FALSE, 1); gtk_container_border_width (GTK_CONTAINER (main_vbox), 1); gtk_container_add (GTK_CONTAINER (table), main_vbox); frame = gtk_frame_new ("Zoom "); gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0); gtk_widget_show (frame); gtk_widget_show (main_vbox); table2 = gtk_table_new (2, 3, FALSE); b1 = gtk_button_new(); gtk_container_add(GTK_CONTAINER(b1), pixmapzin); gtk_table_attach (GTK_TABLE (table2), b1, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); gtk_signal_connect_object (GTK_OBJECT (b1), "clicked", GTK_SIGNAL_FUNC(service_zoom_out), GTK_OBJECT (table2)); gtk_tooltips_set_tip_2(tooltips, b1, "Zoom Out", NULL); gtk_widget_show(b1); b2 = gtk_button_new(); gtk_container_add(GTK_CONTAINER(b2), pixmapzout); gtk_table_attach (GTK_TABLE (table2), b2, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); gtk_signal_connect_object (GTK_OBJECT (b2), "clicked", GTK_SIGNAL_FUNC(service_zoom_in), GTK_OBJECT (table2)); gtk_tooltips_set_tip_2(tooltips, b2, "Zoom In", NULL); gtk_widget_show(b2); b3 = gtk_button_new(); gtk_container_add(GTK_CONTAINER(b3), pixmapzfit); gtk_table_attach (GTK_TABLE (table2), b3, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); gtk_signal_connect_object (GTK_OBJECT (b3), "clicked", GTK_SIGNAL_FUNC(service_zoom_fit), GTK_OBJECT (table2)); gtk_tooltips_set_tip_2(tooltips, b3, "Zoom Best Fit", NULL); gtk_widget_show(b3); b4 = gtk_button_new(); gtk_container_add(GTK_CONTAINER(b4), pixmapzundo); gtk_table_attach (GTK_TABLE (table2), b4, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); gtk_signal_connect_object (GTK_OBJECT (b4), "clicked", GTK_SIGNAL_FUNC(service_zoom_undo), GTK_OBJECT (table2)); gtk_tooltips_set_tip_2(tooltips, b4, "Undo Last Zoom", NULL); gtk_widget_show(b4); b5 = gtk_button_new(); gtk_container_add(GTK_CONTAINER(b5), pixmapzleft); gtk_table_attach (GTK_TABLE (table2), b5, 2, 3, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); gtk_signal_connect_object (GTK_OBJECT (b5), "clicked", GTK_SIGNAL_FUNC(service_zoom_left), GTK_OBJECT (table2)); gtk_tooltips_set_tip_2(tooltips, b5, "Zoom To Start", NULL); gtk_widget_show(b5); b6 = gtk_button_new(); gtk_container_add(GTK_CONTAINER(b6), pixmapzright); gtk_table_attach (GTK_TABLE (table2), b6, 2, 3, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1); gtk_signal_connect_object (GTK_OBJECT (b6), "clicked", GTK_SIGNAL_FUNC(service_zoom_right), GTK_OBJECT (table2)); gtk_tooltips_set_tip_2(tooltips, b6, "Zoom To End", NULL); gtk_widget_show(b6); gtk_container_add (GTK_CONTAINER (frame), table2); gtk_widget_show(table2); return table; }