From: Ricardo Markiewicz Date: Mon, 26 Sep 2005 01:48:14 +0000 (+0000) Subject: Agrego Dialogo para crear un nuevo arbol. X-Git-Tag: 1_0-pre1~100 X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/commitdiff_plain/24f882b98f421e1d65f4fa46cda094f2ac2a34cd?ds=sidebyside Agrego Dialogo para crear un nuevo arbol. --- diff --git a/viewer/Makefile b/viewer/Makefile index af96ee2..f3603ed 100644 --- a/viewer/Makefile +++ b/viewer/Makefile @@ -1,6 +1,6 @@ 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) diff --git a/viewer/new_tree_dialog.cpp b/viewer/new_tree_dialog.cpp new file mode 100644 index 0000000..8c77cf4 --- /dev/null +++ b/viewer/new_tree_dialog.cpp @@ -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 index 0000000..bb4eb6e --- /dev/null +++ b/viewer/new_tree_dialog.h @@ -0,0 +1,19 @@ + +#ifndef _NUEVO_ARBOL_DLG_ +#define _NUEVO_ARBOL_DLG_ + +#include + +class NewTreeDialog : public Gtk::Dialog { + public: + NewTreeDialog (); + + uint getAmount (); + private: + Gtk::HBox hbox; + Gtk::Label label; + Gtk::Entry entry; +}; + +#endif +