6 GetOptions(\%args, "h=s") || exit 1;
12 my($widget, $sl, $p, $sig, $cb, $data, $pf, $cpf, $mod, $key, @delayedlines);
14 $p = " " . (" " x $sl);
17 foreach $widget (@{$_[0]})
19 if($widget->{"type"} eq "wnd")
21 print "${p}stack[$sl] = gtk_window_new(GTK_WINDOW_TOPLEVEL);\n";
22 if($options{"hasaccels"}) {
23 print "${p}gtk_window_add_accel_group(GTK_WINDOW(stack[$sl]), accel_group);\n";
25 if($widget->{"title"}) {
26 print "${p}gtk_window_set_title(GTK_WINDOW(stack[$sl]), \"" . $widget->{"title"} . "\");\n";
30 my($widget, $p, $sl) = @_;
31 print "${p}gtk_container_add(GTK_CONTAINER(stack[" . ($sl - 1) . "]), stack[$sl]);\n";
33 } elsif($widget->{"type"} eq "assistant") {
34 print "${p}stack[$sl] = gtk_assistant_new();\n";
35 if(defined($widget->{"title"})) {
36 print "${p}gtk_window_set_title(GTK_WINDOW(stack[$sl]), \"" . $widget->{"title"} . "\");\n";
40 my($widget, $p, $sl) = @_;
41 print "${p}gtk_assistant_append_page(GTK_ASSISTANT(stack[" . ($sl - 1) . "]), stack[$sl]);\n";
42 if(defined($widget->{"title"})) {
43 print "${p}gtk_assistant_set_page_title(GTK_ASSISTANT(stack[" . ($sl - 1) . "]), stack[" . $sl . "], _(\"" . $widget->{"title"} . "\"));\n";
45 if(defined($widget->{"ptype"})) {
46 print "${p}gtk_assistant_set_page_type(GTK_ASSISTANT(stack[" . ($sl - 1) . "]), stack[" . $sl . "], GTK_ASSISTANT_PAGE_" . $widget->{"ptype"} . ");\n";
48 if(defined($widget->{"cmpl"})) {
49 print "${p}gtk_assistant_set_page_complete(GTK_ASSISTANT(stack[" . ($sl - 1) . "]), stack[" . $sl . "], " . $widget->{"cmpl"} . ");\n";
52 } elsif($widget->{"type"} =~ /[hv]box/) {
53 print "${p}stack[$sl] = gtk_" . $widget->{"type"} . "_new(";
54 print $widget->{"homo"}?"TRUE, ":"FALSE, ";
55 print $widget->{"spacing"} || "0";
59 my($widget, $p, $sl) = @_;
60 print "${p}gtk_box_pack_start(GTK_BOX(stack[" . ($sl - 1) . "]), stack[$sl], ";
61 print (($widget->{"expand"} || $widget->{"parent"}->{"dexpand"})?"TRUE, ":"FALSE, ");
62 print (($widget->{"fill"} || $widget->{"parent"}->{"dfill"})?"TRUE, ":"FALSE, ");
63 print $widget->{"pad"} || "0";
66 } elsif($widget->{"type"} =~ /([hv])btnbox/) {
67 print "${p}stack[$sl] = gtk_" . $1 . "button_box_new();\n";
68 if(defined($widget->{"layout"})) {
69 print "${p}gtk_button_box_set_layout(GTK_BUTTON_BOX(stack[$sl]), GTK_BUTTONBOX_" . $widget->{"layout"} . ");\n";
73 my($widget, $p, $sl) = @_;
74 print "${p}gtk_container_add(GTK_CONTAINER(stack[" . ($sl - 1) . "]), stack[$sl]);\n";
76 } elsif($widget->{"type"} eq "table") {
77 print "${p}stack[$sl] = gtk_table_new(" . $widget->{"rows"} . ", " . $widget->{"cols"};
78 print ", " . (($widget->{"homo"} eq "TRUE")?"TRUE":"FALSE");
82 my($widget, $p, $sl) = @_;
83 print "${p}gtk_table_attach(GTK_TABLE(stack[" . ($sl - 1) . "]), stack[$sl]";
84 print ", " . $widget->{"tx"};
85 print ", " . ($widget->{"tx"} + (defined($widget->{"tw"})?$widget->{"tw"}:1));
86 print ", " . $widget->{"ty"};
87 print ", " . ($widget->{"ty"} + (defined($widget->{"th"})?$widget->{"th"}:1));
88 if($widget->{"fill"} eq "y") {
89 $widget->{"fillx"} = "y";
90 $widget->{"filly"} = "y";
92 if($widget->{"shrink"} eq "y") {
93 $widget->{"shrinkx"} = "y";
94 $widget->{"shrinky"} = "y";
96 if($widget->{"expand"} eq "y") {
97 $widget->{"expandx"} = "y";
98 $widget->{"expandy"} = "y";
101 print " | GTK_FILL" if $widget->{"fillx"} eq "y";
102 print " | GTK_SHRINK" if $widget->{"shrinkx"} eq "y";
103 print " | GTK_EXPAND" if $widget->{"expandx"} eq "y";
105 print " | GTK_FILL" if $widget->{"filly"} eq "y";
106 print " | GTK_SHRINK" if $widget->{"shrinky"} eq "y";
107 print " | GTK_EXPAND" if $widget->{"expandy"} eq "y";
108 print ", " . (defined($widget->{"padx"})?$widget->{"padx"}:"0");
109 print ", " . (defined($widget->{"pady"})?$widget->{"pady"}:"0");
112 } elsif($widget->{"type"} eq "btn") {
113 $widget->{"label"} || die("Can't have button without label\n");
114 print "${p}stack[$sl] = gtk_button_new_with_mnemonic(_(\"" . $widget->{"label"} . "\"));\n";
115 } elsif($widget->{"type"} eq "chk") {
116 $widget->{"label"} || die("Can't have check button without label\n");
117 print "${p}stack[$sl] = gtk_check_button_new_with_mnemonic(_(\"" . $widget->{"label"} . "\"));\n";
118 } elsif($widget->{"type"} eq "radio") {
119 $widget->{"label"} || die("Can't have check button without label\n");
120 if(defined($widget->{"group"})) {
121 print "${p}stack[$sl] = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(" . $options{"prefix"} . $widget->{"group"} . "), _(\"" . $widget->{"label"} . "\"));\n";
123 print "${p}stack[$sl] = gtk_radio_button_new_with_mnemonic(NULL, _(\"" . $widget->{"label"} . "\"));\n";
125 } elsif($widget->{"type"} eq "sbtn") {
126 $widget->{"stock"} || die("Can't have button without stock\n");
127 print "${p}stack[$sl] = gtk_button_new_from_stock(GTK_STOCK_" . $widget->{"stock"} . ");\n";
128 } elsif($widget->{"type"} eq "simg") {
129 $widget->{"stock"} || die("Can't have image without stock\n");
130 $widget->{"size"} || die("Can't have image without size\n");
131 print "${p}stack[$sl] = gtk_image_new_from_stock(GTK_STOCK_" . $widget->{"stock"} . ", GTK_ICON_SIZE_" . $widget->{"size"} . ");\n";
132 } elsif($widget->{"type"} eq "xpmimg") {
133 $widget->{"data"} || die("Can't have XPM image without data\n");
134 print "${p}stack[$sl] = gtk_image_new_from_pixbuf(gdk_pixbuf_new_from_xpm_data((const char **)" . $widget->{"data"} . "));\n";
135 } elsif($widget->{"type"} eq "lbl") {
136 $widget->{"label"} || $widget->{"markup"} || die("Can't have label without label\n");
137 if($widget->{"label"}) {
138 print "${p}stack[$sl] = gtk_label_new(_(\"" . $widget->{"label"} . "\"));\n";
140 print "${p}stack[$sl] = gtk_label_new(NULL);\n";
141 print "${p}gtk_label_set_markup(GTK_LABEL(stack[$sl]), _(\"" . $widget->{"markup"} . "\"));\n";
143 if($widget->{"wrap"} eq "y") {
144 print "${p}gtk_label_set_line_wrap(GTK_LABEL(stack[$sl]), TRUE);\n";
146 } elsif($widget->{"type"} eq "mlbl") {
147 $widget->{"label"} || die("Can't have label without label\n");
148 print "${p}stack[$sl] = gtk_label_new_with_mnemonic(_(\"" . $widget->{"label"} . "\"));\n";
149 if(defined($widget->{"mwidget"}))
151 if($widget->{"var"} ne "y") {
152 $widget->{"var"} = "l";
154 if(!defined($widget->{"name"})) {
155 $widget->{"name"} = "temp" . $tempvar++;
157 $str = "gtk_label_set_mnemonic_widget(GTK_LABEL(";
158 if($widget->{"var"} eq "y") {
159 $str .= $options{"prefix"};
161 $str .= $widget->{"name"};
162 $str .= "), " . $options{"prefix"} . $widget->{"mwidget"} . ");";
163 push @delayedlines, ($str);
165 } elsif($widget->{"type"} eq "text") {
166 print "${p}stack[$sl] = gtk_entry_new();\n";
167 if($widget->{"default"}) {
168 print "${p}gtk_entry_set_text(GTK_ENTRY(stack[$sl]), \"" . $widget->{"default"} . "\");\n";
170 } elsif($widget->{"type"} eq "menubar") {
171 print "${p}stack[$sl] = gtk_menu_bar_new();\n";
174 my($widget, $p, $sl) = @_;
175 print "${p}gtk_menu_shell_append(GTK_MENU_SHELL(stack[" . ($sl - 1) . "]), stack[$sl]);\n";
177 } elsif($widget->{"type"} eq "menuitem") {
178 print "${p}stack[$sl] = gtk_menu_item_new_with_mnemonic(_(\"" . $widget->{"label"} . "\"));\n";
181 my($widget, $p, $sl) = @_;
182 print "${p}gtk_menu_item_set_submenu(GTK_MENU_ITEM(stack[" . ($sl - 1) . "]), stack[$sl]);\n";
184 } elsif($widget->{"type"} eq "smenuitem") {
185 print "${p}stack[$sl] = gtk_image_menu_item_new_from_stock(GTK_STOCK_" . $widget->{"stock"} . ", accel_group);\n";
188 my($widget, $p, $sl) = @_;
189 print "${p}gtk_menu_item_set_submenu(GTK_MENU_ITEM(stack[" . ($sl - 1) . "]), stack[$sl]);\n";
191 } elsif($widget->{"type"} eq "menusep") {
192 print "${p}stack[$sl] = gtk_separator_menu_item_new();\n";
193 } elsif($widget->{"type"} eq "menu") {
194 print "${p}stack[$sl] = gtk_menu_new();\n";
195 if($options{"hasaccels"}) {
196 print "${p}gtk_menu_set_accel_group(GTK_MENU(stack[$sl]), accel_group);\n";
200 my($widget, $p, $sl) = @_;
201 print "${p}gtk_menu_shell_append(GTK_MENU_SHELL(stack[" . ($sl - 1) . "]), stack[$sl]);\n";
203 $widget->{"noshow"} = 1;
204 } elsif($widget->{"type"} =~ /^[hv]paned$/) {
205 print "${p}stack[$sl] = gtk_" . $widget->{"type"} . "_new();\n";
206 $widget->{"cur"} = 1;
209 my($widget, $p, $sl) = @_;
210 print "${p}gtk_paned_pack" . ($widget->{"parent"}->{"cur"}) . "(GTK_PANED(stack[" . ($sl - 1) . "]), stack[$sl]";
211 print ", " . ((index($widget->{"parent"}->{"resize"}, $widget->{"parent"}->{"cur"}) < 0)?"FALSE":"TRUE");
212 print ", " . ((index($widget->{"parent"}->{"shrink"}, $widget->{"parent"}->{"cur"}) < 0)?"FALSE":"TRUE");
214 $widget->{"parent"}->{"cur"}++;
216 } elsif($widget->{"type"} eq "notebook") {
217 print "${p}stack[$sl] = gtk_notebook_new();\n";
218 if(defined($widget->{"pos"})) {
219 print "${p}gtk_notebook_set_tab_pos(GTK_NOTEBOOK(stack[$sl]), GTK_POS_" . $widget->{"pos"} . ");\n";
223 my($widget, $p, $sl) = @_;
224 print "${p}gtk_notebook_append_page(GTK_NOTEBOOK(stack[" . ($sl - 1) . "]), stack[$sl]";
225 print ", gtk_label_new_with_mnemonic(_(\"" . $widget->{"nblabel"} . "\"))";
228 } elsif($widget->{"type"} eq "sw") {
229 print "${p}stack[$sl] = gtk_scrolled_window_new(NULL, NULL);\n";
232 my($widget, $p, $sl) = @_;
233 print "${p}gtk_container_add(GTK_CONTAINER(stack[" . ($sl - 1) . "]), stack[$sl]);\n";
235 } elsif($widget->{"type"} eq "frame") {
236 print "${p}stack[$sl] = gtk_frame_new(_(\"" . $widget->{"label"} . "\"));\n";
239 my($widget, $p, $sl) = @_;
240 print "${p}gtk_container_add(GTK_CONTAINER(stack[" . ($sl - 1) . "]), stack[$sl]);\n";
242 } elsif($widget->{"type"} eq "exp") {
243 print "${p}stack[$sl] = gtk_expander_new_with_mnemonic(_(\"" . $widget->{"label"} . "\"));\n";
246 my($widget, $p, $sl) = @_;
247 print "${p}gtk_container_add(GTK_CONTAINER(stack[" . ($sl - 1) . "]), stack[$sl]);\n";
249 } elsif($widget->{"type"} eq "align") {
250 print "${p}stack[$sl] = gtk_alignment_new(";
251 if(defined($widget->{"xa"})) {
252 print $widget->{"xa"};
257 if(defined($widget->{"ya"})) {
258 print $widget->{"ya"};
263 if(defined($widget->{"xs"})) {
264 print $widget->{"xs"};
269 if(defined($widget->{"ys"})) {
270 print $widget->{"ys"};
277 my($widget, $p, $sl) = @_;
278 print "${p}gtk_container_add(GTK_CONTAINER(stack[" . ($sl - 1) . "]), stack[$sl]);\n";
280 } elsif($widget->{"type"} eq "treeview") {
281 print "${p}stack[$sl] = gtk_tree_view_new();\n";
282 if(defined($widget->{"hvis"})) {
283 print "${p}gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(stack[$sl]), " . $widget->{"hvis"} . ");\n";
285 if(defined($widget->{"rules"})) {
286 print "${p}gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(stack[$sl]), " . $widget->{"rules"} . ");\n";
288 if(defined($widget->{"searchcol"})) {
289 print "${p}gtk_tree_view_set_search_column(GTK_TREE_VIEW(stack[$sl]), " . $widget->{"searchcol"} . ");\n";
290 print "${p}gtk_tree_view_set_enable_search(GTK_TREE_VIEW(stack[$sl]), TRUE);\n";
294 my($widget, $p, $sl) = @_;
295 print "${p}gtk_tree_view_append_column(GTK_TREE_VIEW(stack[" . ($sl - 1) . "]), column);\n";
296 if($widget->{"expander"} eq "y") {
297 print "${p}gtk_tree_view_set_expander_column(GTK_TREE_VIEW(stack[" . ($sl - 1) . "]), column);\n";
300 } elsif($widget->{"type"} eq "tvcol") {
301 if(!defined($widget->{"subwidgets"}))
303 print "${p}column = gtk_tree_view_column_new_with_attributes(";
304 print "_(\"" . $widget->{"title"} . "\")";
305 print ", gtk_cell_renderer_text_new()";
306 if(defined($widget->{"text"})) {
307 print ", \"text\", " . $widget->{"text"};
311 print "${p}column = gtk_tree_view_column_new();\n";
312 print "${p}gtk_tree_view_column_set_title(column, _(\"" . $widget->{"title"} . "\"));\n";
314 if(defined($widget->{"sortcol"})) {
315 print "${p}gtk_tree_view_column_set_sort_column_id(column, " . $widget->{"sortcol"} . ");\n";
317 if(defined($widget->{"resizable"})) {
318 print "${p}gtk_tree_view_column_set_resizable(column, " . $widget->{"resizable"} . ");\n";
320 $widget->{"noshow"} = 1;
324 } elsif($widget->{"type"} eq "textrend") {
325 print "${p}renderer = gtk_cell_renderer_text_new();\n";
326 print "${p}gtk_tree_view_column_pack_start(column, renderer, " . (defined($widget->{"expand"})?$widget->{"expand"}:"TRUE") . ");\n";
327 if(defined($widget->{"text"})) {
328 print "${p}gtk_tree_view_column_add_attribute(column, renderer, \"text\", " . $widget->{"text"} . ");\n";
330 if(defined($widget->{"func"})) {
331 print "${p}gtk_tree_view_column_set_cell_data_func(column, renderer, " . $widget->{"func"} . ", " . ($widget->{"funcdata"} || "NULL") . ", NULL);\n";
333 $widget->{"noshow"} = 1;
334 } elsif($widget->{"type"} eq "progrend") {
335 print "${p}renderer = gtk_cell_renderer_progress_new();\n";
336 print "${p}gtk_tree_view_column_pack_start(column, renderer, " . (defined($widget->{"expand"})?$widget->{"expand"}:"FALSE") . ");\n";
337 if(defined($widget->{"value"})) {
338 print "${p}gtk_tree_view_column_add_attribute(column, renderer, \"value\", " . $widget->{"value"} . ");\n";
340 if(defined($widget->{"func"})) {
341 print "${p}gtk_tree_view_column_set_cell_data_func(column, renderer, " . $widget->{"func"} . ", " . ($widget->{"funcdata"} || "NULL") . ", NULL);\n";
343 $widget->{"noshow"} = 1;
344 } elsif($widget->{"type"} eq "custrend") {
345 print "${p}renderer = GTK_CELL_RENDERER(" . $widget->{"newfunc"} . "());\n";
346 print "${p}gtk_tree_view_column_pack_start(column, renderer, " . (defined($widget->{"expand"})?$widget->{"expand"}:"FALSE") . ");\n";
347 foreach $attr (keys %{$widget})
349 if($attr =~ /attr\((\S+)\)/)
351 print "${p}gtk_tree_view_column_add_attribute(column, renderer, \"" . $1 . "\", " . $widget->{$attr} . ");\n";
354 $widget->{"noshow"} = 1;
355 } elsif($widget->{"type"} eq "pixbufrend") {
356 print "${p}renderer = gtk_cell_renderer_pixbuf_new();\n";
357 print "${p}gtk_tree_view_column_pack_start(column, renderer, FALSE);\n";
358 if(defined($widget->{"stock_id"})) {
359 print "${p}gtk_tree_view_column_add_attribute(column, renderer, \"stock_id\", " . $widget->{"stock_id"} . ");\n";
361 $widget->{"noshow"} = 1;
362 } elsif($widget->{"type"} eq "textview") {
363 print "${p}stack[$sl] = gtk_text_view_new();\n";
364 if(defined($widget->{"editable"})) {
365 print "${p}gtk_text_view_set_editable(GTK_TEXT_VIEW(stack[$sl]), " . $widget->{"editable"} . ");\n";
367 } elsif($widget->{"type"} eq "pbar") {
368 print "${p}stack[$sl] = gtk_progress_bar_new();\n";
369 } elsif($widget->{"type"} eq "hr") {
370 print "${p}stack[$sl] = gtk_hseparator_new();\n";
371 } elsif($widget->{"type"} eq "sbar") {
372 print "${p}stack[$sl] = gtk_statusbar_new();\n";
373 if($widget->{"grip"} eq "n") {
374 print "${p}gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(stack[$sl]), FALSE);\n";
376 } elsif($widget->{"type"} eq "filechooser") {
377 print "${p}stack[$sl] = gtk_file_chooser_widget_new(GTK_FILE_CHOOSER_ACTION_" . (defined($widget->{"action"})?$widget->{"action"}:"OPEN") . ");\n";
379 print STDERR "Unknown widget: " . $widget->{"type"} ."\n";
381 if($widget->{"sensitive"}) {
382 print "${p}gtk_widget_set_sensitive(stack[$sl], " . $widget->{"sensitive"} . ");\n";
384 if($widget->{"rqsz"} =~ /(\d+)x(\d+)/) {
385 print "${p}gtk_widget_set_size_request(stack[$sl], $1, $2);\n";
387 if($widget->{"align"} =~ /([\d\.]+):([\d\.]+)/) {
388 print "${p}gtk_misc_set_alignment(GTK_MISC(stack[$sl]), $1, $2);\n";
390 if($widget->{"wpad"} =~ /([\d\.]+):([\d\.]+)/) {
391 print "${p}gtk_misc_set_padding(GTK_MISC(stack[$sl]), $1, $2);\n";
393 if($widget->{"var"} eq "y") {
394 print $p . $options{"prefix"} . $widget->{"name"} . " = stack[$sl];\n";
396 if($widget->{"var"} eq "l") {
397 print $p . "GtkWidget *" . $widget->{"name"} . " = stack[$sl];\n";
401 while($widget->{"sig"} =~ /\G([\w_]+),?/g) {
402 print "${p}g_signal_connect(G_OBJECT(stack[$sl]), \"$1\", G_CALLBACK(cb_" . $options{"prefix"} . $widget->{"name"} . "_" . $1 . "), (gpointer)NULL);\n";
405 if($widget->{"accel"})
408 while($widget->{"accel"} =~ /\G(\w+)\+/gc)
410 $mod .= " | " if($mod);
411 $mod = $mod . "GDK_" . $1 . "_MASK";
413 $mod || ($mod = "0");
414 $widget->{"accel"} =~ /\G(\w+)/g;
416 print "${p}gtk_widget_add_accelerator(stack[$sl], \"activate\", accel_group, GDK_$key, $mod, GTK_ACCEL_VISIBLE);\n";
418 foreach $attr (keys %{$widget})
420 if($attr =~ /^sig\((\S+)\)/)
423 if($widget->{$attr} =~ /([^,]*),(.*)/)
428 $cb = $widget->{$attr};
431 print "${p}g_signal_connect(G_OBJECT(stack[$sl]), \"$sig\", G_CALLBACK($cb), (gpointer)$data);\n";
434 if($widget->{"subwidgets"})
437 printwidgets($widget->{"subwidgets"}, $sl + 1, $pf);
441 &$cpf($widget, $p, $sl);
442 if(!$widget->{"noshow"}) {
443 print "${p}gtk_widget_show(stack[$sl]);\n";
448 foreach $line (@delayedlines)
450 print $p . $line . "\n";
456 my($widget, $handle);
458 foreach $widget (@{$_[0]})
462 $handle->print("extern GtkWidget *" . $options{"prefix"} . $widget->{"name"} .";\n");
464 printheader($widget->{"subwidgets"}, $handle) if($widget->{"subwidgets"});
471 foreach $widget (@{$_[0]})
475 print "GtkWidget *" . $options{"prefix"} . $widget->{"name"} .";\n";
477 printvars($widget->{"subwidgets"}) if($widget->{"subwidgets"});
485 $text =~ s/([^\\]|^)\"/$1/g;
486 $text =~ s/\\(.)/$1/g;
491 @estack = ($rootwidgets);
501 if(/^;\s*(\w+)\s*:\s*(\w.*)/)
504 } elsif(/^([:\$])\s*(\w+)/g) {
505 $curwidget = {"type" => $2};
506 push @{$estack[0]}, $curwidget;
507 if((scalar @wstack) > 0) {
508 $curwidget->{"parent"} = $wstack[0];
512 unshift @estack, ($curwidget->{"subwidgets"} = []);
513 unshift @wstack, $curwidget;
515 $maxstack = (scalar @estack) if((scalar @estack) > $maxstack);
516 while(/\G\s*(\S+)\s*:\s*((\w+|\"([^\\\"]+|\\.)*([^\\]|)\"|\\.)+)/g)
518 $curwidget->{$1} = dequote($2);
520 } elsif(/^%\s*(\S+)\s*:\s*((\w+|\"([^\\\"]+|\\.)*([^\\]|)\"|\\.)+)/) {
521 $curwidget || die("No current widget\n");
522 $curwidget->{$1} = dequote($2);
526 $curwidget = $wstack[0] if((scalar @wstack) > 0);
529 print STDERR "Invalid construct: $_\n";
535 $hfile = IO::File->new($args{"h"}, "w") || die;
536 $hfile->print("GtkWidget *create_" . $options{"prefix"} . "wnd(void);\n");
537 printheader $rootwidgets, $hfile;
541 printvars $rootwidgets;
543 print "GtkWidget *create_" . $options{"prefix"} . "wnd(void)\n";
545 print " GtkWidget *stack[$maxstack];\n";
546 print " GtkAccelGroup *accel_group;\n" if $options{"hasaccels"};
547 print " GtkTreeViewColumn *column;\n" if $options{"hascolumns"};
548 print " GtkCellRenderer *renderer;\n" if $options{"hasrenderers"};
550 print " accel_group = gtk_accel_group_new();\n" if $options{"hasaccels"};
551 printwidgets $rootwidgets, 0;
552 print " return(stack[0]);\n";