2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2002-03-11 17:00:41 +00:00
|
|
|
/**
|
2002-03-11 22:47:41 +00:00
|
|
|
* \file xforms/FormCitation.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.
|
2002-03-11 17:00:41 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author Angus Leeming
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2000-07-07 07:46:37 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORMCITATION_H
|
|
|
|
#define FORMCITATION_H
|
|
|
|
|
2000-07-31 12:51:19 +00:00
|
|
|
#ifdef __GNUG__
|
2000-07-27 10:26:38 +00:00
|
|
|
#pragma interface
|
|
|
|
#endif
|
2000-07-07 07:46:37 +00:00
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
#include "FormBase.h"
|
2001-08-24 14:57:27 +00:00
|
|
|
#include "biblio.h"
|
2000-07-07 07:46:37 +00:00
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
/** This class provides an XForms implementation of the Citation Dialog.
|
2000-07-07 07:46:37 +00:00
|
|
|
*/
|
2001-03-15 13:37:04 +00:00
|
|
|
class ControlCitation;
|
2002-06-13 13:43:51 +00:00
|
|
|
struct FD_citation;
|
2001-03-15 13:37:04 +00:00
|
|
|
|
2002-06-13 13:43:51 +00:00
|
|
|
class FormCitation : public FormCB<ControlCitation, FormDB<FD_citation> > {
|
2000-07-07 07:46:37 +00:00
|
|
|
public:
|
2000-08-04 13:12:30 +00:00
|
|
|
///
|
2002-08-12 14:28:43 +00:00
|
|
|
FormCitation();
|
2000-08-04 13:12:30 +00:00
|
|
|
private:
|
2000-07-07 07:46:37 +00:00
|
|
|
///
|
|
|
|
enum State {
|
2001-03-15 13:37:04 +00:00
|
|
|
///
|
2000-07-07 07:46:37 +00:00
|
|
|
ON,
|
2000-08-14 15:31:16 +00:00
|
|
|
///
|
2000-07-07 07:46:37 +00:00
|
|
|
OFF
|
|
|
|
};
|
2000-10-13 05:57:05 +00:00
|
|
|
|
2001-03-23 17:09:34 +00:00
|
|
|
/// Set the Params variable for the Controller.
|
|
|
|
virtual void apply();
|
|
|
|
/// Build the dialog.
|
|
|
|
virtual void build();
|
|
|
|
/// Hide the dialog.
|
|
|
|
virtual void hide();
|
|
|
|
/// Update dialog before/whilst showing it.
|
|
|
|
virtual void update();
|
2001-03-15 13:37:04 +00:00
|
|
|
/// Filter the inputs on callback from xforms
|
|
|
|
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
|
|
|
|
|
2001-08-24 14:57:27 +00:00
|
|
|
/// search for a citation
|
2001-08-28 13:48:40 +00:00
|
|
|
void findBiblio(biblio::Direction const dir);
|
2001-08-24 14:57:27 +00:00
|
|
|
|
2000-07-07 07:46:37 +00:00
|
|
|
///
|
2001-02-16 18:50:28 +00:00
|
|
|
void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
|
2000-07-07 07:46:37 +00:00
|
|
|
///
|
2001-02-16 18:50:28 +00:00
|
|
|
void setBibButtons(State) const;
|
2000-07-07 07:46:37 +00:00
|
|
|
///
|
2001-02-16 18:50:28 +00:00
|
|
|
void setCiteButtons(State) const;
|
2000-07-07 07:46:37 +00:00
|
|
|
|
2000-08-04 13:12:30 +00:00
|
|
|
///
|
|
|
|
std::vector<string> citekeys;
|
|
|
|
///
|
|
|
|
std::vector<string> bibkeys;
|
2000-07-07 07:46:37 +00:00
|
|
|
};
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
#endif // FORMCITATION_H
|