| [f5a86a] | 1 | /*
 | 
|---|
 | 2 |  * TextDialog.hpp
 | 
|---|
 | 3 |  *
 | 
|---|
 | 4 |  *  Created on: Jan 5, 2010
 | 
|---|
 | 5 |  *      Author: crueger
 | 
|---|
 | 6 |  */
 | 
|---|
 | 7 | 
 | 
|---|
 | 8 | #ifndef TEXTDIALOG_HPP_
 | 
|---|
 | 9 | #define TEXTDIALOG_HPP_
 | 
|---|
 | 10 | 
 | 
|---|
| [45f5d6] | 11 | #include <string>
 | 
|---|
 | 12 | 
 | 
|---|
| [5079a0] | 13 | #include "Dialog.hpp"
 | 
|---|
| [f5a86a] | 14 | 
 | 
|---|
| [97ebf8] | 15 | class atom;
 | 
|---|
 | 16 | class element;
 | 
|---|
 | 17 | class molecule;
 | 
|---|
 | 18 | class Vector;
 | 
|---|
 | 19 | 
 | 
|---|
| [f5a86a] | 20 | class TextDialog : public Dialog
 | 
|---|
 | 21 | {
 | 
|---|
 | 22 | public:
 | 
|---|
 | 23 |   TextDialog();
 | 
|---|
 | 24 |   virtual ~TextDialog();
 | 
|---|
 | 25 | 
 | 
|---|
| [86466e] | 26 |   virtual void queryEmpty(const char *, std::string = "");
 | 
|---|
| [97ebf8] | 27 |   virtual void queryBoolean(const char *, bool *, std::string = "");
 | 
|---|
| [a2ab15] | 28 |   virtual void queryInt(const char *, int *, std::string = "");
 | 
|---|
 | 29 |   virtual void queryString(const char*, std::string *, std::string = "");
 | 
|---|
 | 30 |   virtual void queryDouble(const char*, double*, std::string = "");
 | 
|---|
| [97ebf8] | 31 |   virtual void queryAtom(const char*,atom**,std::string = "");
 | 
|---|
 | 32 |   virtual void queryMolecule(const char*,molecule**,std::string = "");
 | 
|---|
| [a2ab15] | 33 |   virtual void queryVector(const char*,Vector *,const double * const,bool, std::string = "");
 | 
|---|
| [97ebf8] | 34 |   virtual void queryBox(const char*,double ** const, std::string = "");
 | 
|---|
| [104524] | 35 |   virtual void queryElement(const char*, std::vector<element *> *, std::string = "");
 | 
|---|
| [45f5d6] | 36 | 
 | 
|---|
 | 37 | protected:
 | 
|---|
 | 38 |   // specialized stuff for text queries
 | 
|---|
| [86466e] | 39 |   class EmptyTextQuery : public Dialog::EmptyQuery {
 | 
|---|
 | 40 |   public:
 | 
|---|
 | 41 |     EmptyTextQuery(std::string title, std::string _description = NULL);
 | 
|---|
 | 42 |     virtual ~EmptyTextQuery();
 | 
|---|
 | 43 |     virtual bool handle();
 | 
|---|
 | 44 |   };
 | 
|---|
 | 45 | 
 | 
|---|
| [97ebf8] | 46 |   class BooleanTextQuery : public Dialog::BooleanQuery {
 | 
|---|
 | 47 |   public:
 | 
|---|
 | 48 |     BooleanTextQuery(std::string title, bool *_target, std::string _description = NULL);
 | 
|---|
 | 49 |     virtual ~BooleanTextQuery();
 | 
|---|
 | 50 |     virtual bool handle();
 | 
|---|
 | 51 |   };
 | 
|---|
 | 52 | 
 | 
|---|
| [45f5d6] | 53 |   class IntTextQuery : public Dialog::IntQuery {
 | 
|---|
 | 54 |   public:
 | 
|---|
| [a2ab15] | 55 |     IntTextQuery(std::string title, int *_target, std::string _description = NULL);
 | 
|---|
| [5a7243] | 56 |     virtual ~IntTextQuery();
 | 
|---|
| [45f5d6] | 57 |     virtual bool handle();
 | 
|---|
 | 58 |   };
 | 
|---|
 | 59 | 
 | 
|---|
| [2ededc2] | 60 |   class DoubleTextQuery : public Dialog::DoubleQuery {
 | 
|---|
 | 61 |   public:
 | 
|---|
| [a2ab15] | 62 |     DoubleTextQuery(std::string title, double *_target, std::string _description = NULL);
 | 
|---|
| [5a7243] | 63 |     virtual ~DoubleTextQuery();
 | 
|---|
| [2ededc2] | 64 |     virtual bool handle();
 | 
|---|
 | 65 |   };
 | 
|---|
 | 66 | 
 | 
|---|
| [45f5d6] | 67 |   class StringTextQuery : public Dialog::StringQuery {
 | 
|---|
 | 68 |   public:
 | 
|---|
| [a2ab15] | 69 |     StringTextQuery(std::string title, std::string *_target, std::string _description = NULL);
 | 
|---|
| [5a7243] | 70 |     virtual ~StringTextQuery();
 | 
|---|
| [45f5d6] | 71 |     virtual bool handle();
 | 
|---|
 | 72 |   };
 | 
|---|
| [7aa000] | 73 | 
 | 
|---|
| [97ebf8] | 74 |   class AtomTextQuery : public Dialog::AtomQuery {
 | 
|---|
 | 75 |   public:
 | 
|---|
 | 76 |     AtomTextQuery(std::string title, atom **_target, std::string _description = NULL);
 | 
|---|
 | 77 |     virtual ~AtomTextQuery();
 | 
|---|
 | 78 |     virtual bool handle();
 | 
|---|
 | 79 |   };
 | 
|---|
 | 80 | 
 | 
|---|
| [7aa000] | 81 |   class MoleculeTextQuery : public Dialog::MoleculeQuery {
 | 
|---|
 | 82 |   public:
 | 
|---|
| [97ebf8] | 83 |     MoleculeTextQuery(std::string title, molecule **_target, std::string _description = NULL);
 | 
|---|
| [5a7243] | 84 |     virtual ~MoleculeTextQuery();
 | 
|---|
| [7aa000] | 85 |     virtual bool handle();
 | 
|---|
 | 86 |   };
 | 
|---|
| [2ededc2] | 87 | 
 | 
|---|
 | 88 |   class VectorTextQuery : public Dialog::VectorQuery {
 | 
|---|
 | 89 |   public:
 | 
|---|
| [a2ab15] | 90 |     VectorTextQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = NULL);
 | 
|---|
| [5a7243] | 91 |     virtual ~VectorTextQuery();
 | 
|---|
 | 92 |     virtual bool handle();
 | 
|---|
 | 93 |   };
 | 
|---|
 | 94 | 
 | 
|---|
| [97ebf8] | 95 |   class BoxTextQuery : public Dialog::BoxQuery {
 | 
|---|
 | 96 |   public:
 | 
|---|
 | 97 |     BoxTextQuery(std::string title,double ** const _cellSize, std::string _description = NULL);
 | 
|---|
 | 98 |     virtual ~BoxTextQuery();
 | 
|---|
 | 99 |     virtual bool handle();
 | 
|---|
 | 100 |   };
 | 
|---|
 | 101 | 
 | 
|---|
| [5a7243] | 102 |   class ElementTextQuery : public Dialog::ElementQuery {
 | 
|---|
 | 103 |   public:
 | 
|---|
| [104524] | 104 |     ElementTextQuery(std::string title, std::vector<element *> *_target, std::string _description = NULL);
 | 
|---|
| [5a7243] | 105 |     virtual ~ElementTextQuery();
 | 
|---|
| [2ededc2] | 106 |     virtual bool handle();
 | 
|---|
 | 107 |   };
 | 
|---|
| [f5a86a] | 108 | };
 | 
|---|
 | 109 | 
 | 
|---|
 | 110 | #endif /* TEXTDIALOG_HPP_ */
 | 
|---|