3 class MainWindow : Window
6 private TextView text_view;
10 this.title = "Moonshoot";
11 this.position = WindowPosition.CENTER;
12 set_default_size (400, 300);
18 private void build_ui()
20 var toolbar = new Toolbar ();
21 var open_button = new ToolButton (null, "Open"); //.from_stock (Stock.OPEN);
22 open_button.is_important = true;
23 toolbar.add (open_button);
24 //open_button.clicked.connect (on_open_clicked);
26 this.text_view = new TextView ();
27 this.text_view.editable = true;
28 this.text_view.cursor_visible = true;
30 var scroll = new ScrolledWindow (null, null);
31 scroll.set_policy (PolicyType.AUTOMATIC, PolicyType.AUTOMATIC);
32 scroll.add (this.text_view);
34 var vbox = new VBox (false, 0);
35 vbox.pack_start (toolbar, false, true, 0);
36 vbox.pack_start (scroll, true, true, 0);
40 private void connect_signals()
42 this.destroy.connect (Gtk.main_quit);
45 public static int main(string[] args)
49 Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
50 Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8");
51 Intl.textdomain (Config.GETTEXT_PACKAGE);
53 var window = new MainWindow();