2001-07-29 10:42:11 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file FormThesaurus.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-07-29 10:42:11 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author John Levon
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-07-29 10:42:11 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORMTHESAURUS_H
|
|
|
|
#define FORMTHESAURUS_H
|
|
|
|
|
|
|
|
|
2003-03-26 12:17:20 +00:00
|
|
|
#include "FormDialogView.h"
|
|
|
|
|
2001-07-29 10:42:11 +00:00
|
|
|
|
|
|
|
class ControlThesaurus;
|
2002-06-13 13:43:51 +00:00
|
|
|
struct FD_thesaurus;
|
2001-07-29 10:42:11 +00:00
|
|
|
|
|
|
|
/** This class provides an XForms implementation of the Thesaurus dialog.
|
|
|
|
*/
|
2003-03-26 12:17:20 +00:00
|
|
|
class FormThesaurus
|
|
|
|
: public FormController<ControlThesaurus, FormView<FD_thesaurus> > {
|
2001-07-29 10:42:11 +00:00
|
|
|
public:
|
|
|
|
///
|
2003-03-26 12:17:20 +00:00
|
|
|
FormThesaurus(Dialog &);
|
2001-07-29 10:42:11 +00:00
|
|
|
private:
|
|
|
|
/// not needed.
|
|
|
|
virtual void apply() {}
|
|
|
|
/// Build the dialog
|
|
|
|
virtual void build();
|
|
|
|
/// update dialog
|
|
|
|
virtual void update();
|
2002-01-13 01:46:33 +00:00
|
|
|
|
2001-07-29 10:42:11 +00:00
|
|
|
/// set the replace word properly
|
2002-03-11 22:47:41 +00:00
|
|
|
void setReplace(string const & templ, string const & nstr);
|
2001-07-29 10:42:11 +00:00
|
|
|
|
|
|
|
/// update browser entries
|
2002-03-11 22:47:41 +00:00
|
|
|
void updateMeanings(string const & str);
|
2001-07-29 10:42:11 +00:00
|
|
|
|
|
|
|
/// Filter the inputs
|
|
|
|
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-07-29 10:42:11 +00:00
|
|
|
/// for double click handling
|
|
|
|
int clickline_;
|
|
|
|
|
|
|
|
/// current string
|
|
|
|
string str_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FORMTHESAURUS_H
|