Index: src/UIElements/TextDialog.cpp
===================================================================
--- src/UIElements/TextDialog.cpp	(revision 86466e070d1b66f70981d199068ca4eb345320b0)
+++ src/UIElements/TextDialog.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -8,13 +8,20 @@
 #include <iostream>
 
+#include <Descriptors/AtomDescriptor.hpp>
+#include <Descriptors/AtomIdDescriptor.hpp>
+#include <Descriptors/MoleculeDescriptor.hpp>
+#include <Descriptors/MoleculeIdDescriptor.hpp>
 #include "UIElements/TextDialog.hpp"
 
 #include "World.hpp"
 #include "periodentafel.hpp"
-#include "atom.hpp"
-#include "molecule.hpp"
 #include "log.hpp"
 #include "verbose.hpp"
 
+#include "atom.hpp"
+#include "element.hpp"
+#include "molecule.hpp"
+#include "vector.hpp"
+
 using namespace std;
 
@@ -33,4 +40,8 @@
 }
 
+void TextDialog::queryBoolean(const char* title, bool* target, string description){
+  registerQuery(new BooleanTextQuery(title,target,description));
+}
+
 void TextDialog::queryInt(const char* title, int* target, string description){
   registerQuery(new IntTextQuery(title,target,description));
@@ -45,10 +56,18 @@
 }
 
-void TextDialog::queryMolecule(const char* title, molecule **target, MoleculeListClass *molecules, string description) {
-  registerQuery(new MoleculeTextQuery(title,target,molecules,description));
+void TextDialog::queryAtom(const char* title, atom **target, string description) {
+  registerQuery(new AtomTextQuery(title,target,description));
+}
+
+void TextDialog::queryMolecule(const char* title, molecule **target, string description) {
+  registerQuery(new MoleculeTextQuery(title,target,description));
 }
 
 void TextDialog::queryVector(const char* title, Vector *target,const double *const cellSize, bool check, string description) {
   registerQuery(new VectorTextQuery(title,target,cellSize,check,description));
+}
+
+void TextDialog::queryBox(const char* title,double ** const cellSize, string description) {
+  registerQuery(new BoxTextQuery(title,cellSize,description));
 }
 
@@ -94,4 +113,33 @@
 }
 
+TextDialog::BooleanTextQuery::BooleanTextQuery(string title, bool * _target, std::string _description) :
+    Dialog::BooleanQuery(title,_target,_description)
+{}
+
+TextDialog::BooleanTextQuery::~BooleanTextQuery() {}
+
+bool TextDialog::BooleanTextQuery::handle() {
+  bool badInput = false;
+  char input = ' ';
+  do{
+    badInput = false;
+    Log() << Verbose(0) << getTitle();
+    cin >> input;
+    if ((input == 'y' ) || (input == 'Y')) {
+      tmp = true;
+    } else if ((input == 'n' ) || (input == 'N')) {
+      tmp = false;
+    } else {
+      badInput=true;
+      cin.clear();
+      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+      Log() << Verbose(0) << "Input was not of [yYnN]!" << endl;
+    }
+  } while(badInput);
+  // clear the input buffer of anything still in the line
+  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+  return true;
+}
+
 TextDialog::StringTextQuery::StringTextQuery(string title,string *_target, std::string _description) :
     Dialog::StringQuery(title,_target,_description)
@@ -129,6 +177,38 @@
 }
 
-TextDialog::MoleculeTextQuery::MoleculeTextQuery(string title, molecule **_target, MoleculeListClass *_molecules, std::string _description) :
-    Dialog::MoleculeQuery(title,_target,_molecules,_description)
+TextDialog::AtomTextQuery::AtomTextQuery(string title, atom **_target, std::string _description) :
+    Dialog::AtomQuery(title,_target,_description)
+{}
+
+TextDialog::AtomTextQuery::~AtomTextQuery() {}
+
+bool TextDialog::AtomTextQuery::handle() {
+  int idxOfAtom=0;
+  bool badInput = false;
+  do{
+    badInput = false;
+    Log() << Verbose(0) << getTitle();
+    cin >> idxOfAtom;
+    if(cin.fail()){
+      badInput = true;
+      cin.clear();
+      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+      Log() << Verbose(0) << "Input was not a number!" << endl;
+      continue;
+    }
+
+    tmp = World::getInstance().getAtom(AtomById(idxOfAtom));
+    if(!tmp && idxOfAtom!=-1){
+      Log() << Verbose(0) << "Invalid Atom Index" << endl;
+      badInput = true;
+    }
+
+  } while(badInput);
+  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+  return (idxOfAtom!=-1);
+}
+
+TextDialog::MoleculeTextQuery::MoleculeTextQuery(string title, molecule **_target, std::string _description) :
+    Dialog::MoleculeQuery(title,_target,_description)
 {}
 
@@ -150,5 +230,5 @@
     }
 
-    tmp = molecules->ReturnIndex(idxOfMol);
+    tmp = World::getInstance().getMolecule(MoleculeById(idxOfMol));
     if(!tmp && idxOfMol!=-1){
       Log() << Verbose(0) << "Invalid Molecule Index" << endl;
@@ -183,4 +263,21 @@
 }
 
+TextDialog::BoxTextQuery::BoxTextQuery(std::string title, double ** const _cellSize, std::string _description) :
+    Dialog::BoxQuery(title,_cellSize,_description)
+{}
+
+TextDialog::BoxTextQuery::~BoxTextQuery()
+{}
+
+bool TextDialog::BoxTextQuery::handle() {
+  Log() << Verbose(0) << getTitle();
+
+  std::string coords[6] = {"xx","xy","xz", "yy", "yz", "zz"};
+  for (int i=0;i<6;i++) {
+    Log() << Verbose(0) << coords[i] << ": ";
+    cin >> tmp[i];
+  }
+  return true;
+}
 
 TextDialog::ElementTextQuery::ElementTextQuery(std::string title, const element **target, std::string _description) :
