2000-07-07 07:46:37 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 2000 The LyX Team.
|
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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
|
|
|
|
2000-10-13 05:57:05 +00:00
|
|
|
#include "FormInset.h"
|
2000-07-14 07:52:03 +00:00
|
|
|
struct FD_form_citation;
|
2000-07-07 07:46:37 +00:00
|
|
|
|
|
|
|
/** This class provides an XForms implementation of the FormCitation Dialog.
|
|
|
|
*/
|
2000-08-01 18:11:14 +00:00
|
|
|
class FormCitation : public FormCommand {
|
2000-07-07 07:46:37 +00:00
|
|
|
public:
|
2000-08-04 13:12:30 +00:00
|
|
|
///
|
|
|
|
FormCitation(LyXView *, Dialogs *);
|
|
|
|
///
|
|
|
|
~FormCitation();
|
|
|
|
private:
|
2000-07-07 07:46:37 +00:00
|
|
|
///
|
|
|
|
enum State {
|
|
|
|
ON,
|
2000-08-14 15:31:16 +00:00
|
|
|
///
|
2000-07-07 07:46:37 +00:00
|
|
|
OFF
|
|
|
|
};
|
2000-10-20 09:50:09 +00:00
|
|
|
/// Connect signals etc. Set form's max size.
|
|
|
|
virtual void connect();
|
2000-10-13 05:57:05 +00:00
|
|
|
/// Disconnect signals. Also perform any necessary housekeeping.
|
|
|
|
virtual void disconnect();
|
|
|
|
|
2000-07-07 07:46:37 +00:00
|
|
|
/// Build the dialog
|
2000-08-01 17:33:32 +00:00
|
|
|
virtual void build();
|
2000-08-03 12:56:25 +00:00
|
|
|
/// Filter the inputs
|
2001-02-16 18:50:28 +00:00
|
|
|
virtual bool input(FL_OBJECT *, long);
|
2000-08-03 12:56:25 +00:00
|
|
|
/// Update dialog before showing it
|
2000-10-24 13:13:59 +00:00
|
|
|
virtual void update();
|
2000-08-03 12:56:25 +00:00
|
|
|
/// Apply from dialog (modify or create inset)
|
|
|
|
virtual void apply();
|
2001-03-05 19:02:40 +00:00
|
|
|
/// Pointer to the actual instantiation of the xforms form
|
2000-10-03 05:53:25 +00:00
|
|
|
virtual FL_FORM * form() const;
|
2000-08-03 12:56:25 +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
|
|
|
///
|
2001-02-16 18:50:28 +00:00
|
|
|
void setSize(int, bool) const;
|
2000-11-03 17:05:42 +00:00
|
|
|
/// Type definition from the fdesign produced header file.
|
2000-07-07 07:46:37 +00:00
|
|
|
FD_form_citation * build_citation();
|
|
|
|
|
|
|
|
/// Real GUI implementation.
|
|
|
|
FD_form_citation * dialog_;
|
2000-08-04 13:12:30 +00:00
|
|
|
///
|
|
|
|
std::vector<string> citekeys;
|
|
|
|
///
|
|
|
|
std::vector<string> bibkeys;
|
|
|
|
///
|
|
|
|
std::vector<string> bibkeysInfo;
|
2000-07-07 07:46:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|