Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/TextDialog.cpp

    r7aa000 r2ededc2  
    3131}
    3232
     33void TextDialog::queryDouble(const char* title, double* target){
     34  registerQuery(new DoubleTextQuery(title,target));
     35}
     36
    3337void TextDialog::queryString(const char* title, string* target){
    3438  registerQuery(new StringTextQuery(title,target));
     
    3741void TextDialog::queryMolecule(const char* title, molecule **target, MoleculeListClass *molecules) {
    3842  registerQuery(new MoleculeTextQuery(title,target,molecules));
     43}
     44
     45void TextDialog::queryVector(const char* title, Vector *target,const double *const cellSize, bool check) {
     46  registerQuery(new VectorTextQuery(title,target,cellSize,check));
    3947}
    4048
     
    6573}
    6674
     75TextDialog::DoubleTextQuery::DoubleTextQuery(string title,double *_target) :
     76    Dialog::DoubleQuery(title,_target)
     77{}
     78
     79TextDialog::DoubleTextQuery::~DoubleTextQuery() {}
     80
     81bool TextDialog::DoubleTextQuery::handle() {
     82  Log() << Verbose(0) << getTitle();
     83  cin >> tmp;
     84  return true;
     85}
     86
    6787TextDialog::MoleculeTextQuery::MoleculeTextQuery(string title, molecule **_target, MoleculeListClass *_molecules) :
    6888    Dialog::MoleculeQuery(title,_target,_molecules)
     
    84104  return (idxOfMol!=-1);
    85105}
     106
     107TextDialog::VectorTextQuery::VectorTextQuery(std::string title, Vector *_target, const double *const _cellSize, bool _check) :
     108    Dialog::VectorQuery(title,_target,_cellSize,_check)
     109{}
     110
     111TextDialog::VectorTextQuery::~VectorTextQuery()
     112{}
     113
     114bool TextDialog::VectorTextQuery::handle() {
     115 tmp->AskPosition(cellSize,check);
     116}
Note: See TracChangeset for help on using the changeset viewer.