2001-07-29 10:42:11 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file FormThesaurus.h
|
|
|
|
* Copyright 2001 the LyX Team
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
2002-03-11 17:00:41 +00:00
|
|
|
* \author John Levon, moz@compsoc.man.ac.uk
|
2001-07-29 10:42:11 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORMTHESAURUS_H
|
|
|
|
#define FORMTHESAURUS_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "FormBase.h"
|
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
2002-06-13 13:43:51 +00:00
|
|
|
class FormThesaurus : public FormCB<ControlThesaurus, FormDB<FD_thesaurus> > {
|
2001-07-29 10:42:11 +00:00
|
|
|
public:
|
|
|
|
///
|
2002-08-12 14:28:43 +00:00
|
|
|
FormThesaurus();
|
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
|