2 #include "new_tree_dialog.h"
5 NewTreeDialog::NewTreeDialog(): Gtk::Dialog ("Nuevo Arbol", true, true),
6 fixed_key ("Clave Fija"), variable_key ("Clave Variable")
8 table.attach (fixed_key, 0, 1, 0, 1);
9 table.attach (variable_key, 1, 2, 0, 1);
11 label_block.set_label ("Tamaño de Bloque : ");
12 table.attach (label_block, 0, 1, 1, 2, Gtk::FILL|Gtk::SHRINK, Gtk::SHRINK, 8, 8);
13 table.attach (entry_block, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 8, 8);
15 label_count.set_label ("Cantidad a insertar : ");
16 table.attach (label_count, 0, 1, 2, 3, Gtk::FILL|Gtk::SHRINK, Gtk::SHRINK, 8, 8);
17 table.attach (entry_count, 1, 2, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 8, 8);
19 label_dels.set_label ("Cantidad a eliminar : ");
20 table.attach (label_dels, 0, 1, 3, 4, Gtk::FILL|Gtk::SHRINK, Gtk::SHRINK, 8, 8);
21 table.attach (entry_dels, 1, 2, 3, 4, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 8, 8);
23 get_vbox ()->add (table);
25 add_button (Gtk::StockID ("Cancelar"), Gtk::RESPONSE_CANCEL);
26 add_button (Gtk::StockID ("Crear"), Gtk::RESPONSE_OK);
28 Gtk::RadioButton::Group group = fixed_key.get_group();
29 fixed_key.set_group (group);
30 variable_key.set_group (group);
34 uint NewTreeDialog::getAdds ()
36 return atoi (entry_count.get_text ().c_str());
39 uint NewTreeDialog::getDels ()
41 std::cout << entry_dels.get_text () << std::endl;
42 return atoi (entry_dels.get_text ().c_str());
45 uint NewTreeDialog::getBlockSize()
47 return atoi (entry_block.get_text ().c_str());
50 int NewTreeDialog::getKeyType ()
52 if (fixed_key.get_active ())
53 return BTree::KEY_FIXED;
55 return BTree::KEY_VARIABLE;