<commit_before>extern crate gtk;
#[macro_use] extern crate log;
extern crate thud_game;
extern crate thud_ui_common;
extern crate thud_ui_gtk;

use gtk::prelude::*;
use thud_ui_gtk::board_display;

use std::default::Default;

fn main() {
    if let Err(e) = gtk::init() {
        panic!("Failed to initialize GTK: {:?}", e)
    }

    let main_container = gtk::Grid::new();

    let main_board = board_display::view::Interactive::new(
        board_display::model::Interactive::new(thud_ui_common::ThudState::new(Default::default()),
                                               board_display::model::InteractiveRoles::Both),
        board_display::view::Properties::new());
    main_container.attach(main_board.widget(), 0, 0, 1, 1);

    let window = gtk::Window::new(gtk::WindowType::Toplevel);
    window.set_title("Thud");
    window.connect_delete_event(|_, _| {
        gtk::main_quit();
        gtk::Inhibit(false)
    });
    window.add(&main_container);
    window.show_all();

    gtk::main();
}

//     let mut store = gtk_ui::search_table::Store::new(&columns);
//     let tree = gtk::TreeView::new_with_model(&store.model()).unwrap();
//     for (i, c) in columns.iter().enumerate() {
//         tree.append_column(&c.new_view_column(i as i32));
//     }
//     let graph_view = gtk::ScrolledWindow::new(None, None).unwrap();<commit_msg>Use new method for accessing drawing area widget.<commit_after>extern crate gtk;
#[macro_use] extern crate log;
extern crate thud_game;
extern crate thud_ui_common;
extern crate thud_ui_gtk;

use gtk::prelude::*;
use thud_ui_gtk::board_display;

use std::default::Default;

fn main() {
    if let Err(e) = gtk::init() {
        panic!("Failed to initialize GTK: {:?}", e)
    }

    let main_container = gtk::Grid::new();

    let main_board = board_display::view::Interactive::new(
        board_display::model::Interactive::new(thud_ui_common::ThudState::new(Default::default()),
                                               board_display::model::InteractiveRoles::Both),
        board_display::view::Properties::new());
    main_board.with_widget(|w| main_container.attach(w, 0, 0, 1, 1));

    let window = gtk::Window::new(gtk::WindowType::Toplevel);
    window.set_title("Thud");
    window.connect_delete_event(|_, _| {
        gtk::main_quit();
        gtk::Inhibit(false)
    });
    window.add(&main_container);
    window.show_all();

    gtk::main();
}

//     let mut store = gtk_ui::search_table::Store::new(&columns);
//     let tree = gtk::TreeView::new_with_model(&store.model()).unwrap();
//     for (i, c) in columns.iter().enumerate() {
//         tree.append_column(&c.new_view_column(i as i32));
//     }
//     let graph_view = gtk::ScrolledWindow::new(None, None).unwrap();
{'fraction_non_alphanumeric': 0.16896802325581395, 'fraction_numerical': 0.00436046511627907, 'mean_word_length': 3.6036789297658864, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6517204', 'n_tokens_mistral': 939, 'n_tokens_neox': 899, 'n_words': 159}