]> git.llucax.com Git - z.facultad/75.52/treemulator.git/commitdiff
Agrego Dialogo para crear un nuevo arbol.
authorRicardo Markiewicz <rmarkie@fi.uba.ar>
Mon, 26 Sep 2005 01:48:14 +0000 (01:48 +0000)
committerRicardo Markiewicz <rmarkie@fi.uba.ar>
Mon, 26 Sep 2005 01:48:14 +0000 (01:48 +0000)
viewer/Makefile
viewer/new_tree_dialog.cpp [new file with mode: 0644]
viewer/new_tree_dialog.h [new file with mode: 0644]

index af96ee25f40f343a964c633085ef43855d391926..f3603ed19a00e64b117ec44bbd20a7191b7e818f 100644 (file)
@@ -1,6 +1,6 @@
 TARGET=viewer
 CXXFLAGS=-Wall -g `pkg-config gtkmm-2.4 libgnomecanvasmm-2.6 --cflags` -I../src
 TARGET=viewer
 CXXFLAGS=-Wall -g `pkg-config gtkmm-2.4 libgnomecanvasmm-2.6 --cflags` -I../src
-OBJECTS=main.o view_btree.o view_btree_data.o view_properties.o view_node.o
+OBJECTS=main.o view_btree.o view_btree_data.o view_properties.o view_node.o new_tree_dialog.o
 
 all: $(TARGET)
 
 
 all: $(TARGET)
 
diff --git a/viewer/new_tree_dialog.cpp b/viewer/new_tree_dialog.cpp
new file mode 100644 (file)
index 0000000..8c77cf4
--- /dev/null
@@ -0,0 +1,22 @@
+
+#include "new_tree_dialog.h"
+
+
+NewTreeDialog::NewTreeDialog(): Gtk::Dialog ("Nuevo Arbol", true, true)
+{
+       label.set_label ("Cantidad a insertar : ");
+
+       hbox.pack_start (label, false, true, 8);
+       hbox.pack_start (entry, true, true, 8);
+       get_vbox ()->add (hbox);
+       add_button (Gtk::StockID ("Cancelar"), Gtk::RESPONSE_CANCEL);
+       add_button (Gtk::StockID ("Crear"), Gtk::RESPONSE_OK);
+
+       show_all ();
+}
+
+uint NewTreeDialog::getAmount ()
+{
+       return atoi (entry.get_text ().c_str());
+}
+
diff --git a/viewer/new_tree_dialog.h b/viewer/new_tree_dialog.h
new file mode 100644 (file)
index 0000000..bb4eb6e
--- /dev/null
@@ -0,0 +1,19 @@
+
+#ifndef _NUEVO_ARBOL_DLG_
+#define _NUEVO_ARBOL_DLG_
+
+#include <gtkmm.h>
+
+class NewTreeDialog : public Gtk::Dialog {
+       public:
+               NewTreeDialog ();
+
+               uint getAmount ();
+       private:
+               Gtk::HBox hbox;
+               Gtk::Label label;
+               Gtk::Entry entry;
+};
+
+#endif
+