2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2000 The LyX Team.
9 * ======================================================
12 #ifndef FORMCITATION_H
13 #define FORMCITATION_H
15 #include "DialogBase.h"
18 #include "form_citation.h"
21 // same arguement as in Dialogs.h s/LyX/UI/
25 /** This class provides an XForms implementation of the FormCitation Dialog.
27 class FormCitation : public DialogBase {
40 /**@name Constructors and Destructors */
42 /// #FormCitation x(LyXFunc ..., Dialogs ...);#
43 FormCitation(LyXView *, Dialogs *);
48 /**@name Real per-instance Callback Methods */
50 static int WMHideCB(FL_FORM *, void *);
51 static void OKCB(FL_OBJECT *, long);
52 static void CancelCB(FL_OBJECT *, long);
53 static void InputCB(FL_OBJECT *, long);
58 FormCitation(FormCitation &) : DialogBase() {}
60 /**@name Slot Methods */
62 /// Create the dialog if necessary, update it and display it.
63 void createInset( string const & );
65 void showInset( InsetCitation * );
70 /// Not used but we've got to implement it.
74 /**@name Dialog internal methods */
83 void updateCitekeys( string const & );
85 void updateBrowser( FL_OBJECT *, std::vector<string> const & ) const;
87 void setBibButtons( State ) const;
89 void setCiteButtons( State ) const;
91 void setSize( int, bool ) const;
93 FD_form_citation * build_citation();
94 /// Explicitly free the dialog.
98 /**@name Private Data */
100 /// Real GUI implementation.
101 FD_form_citation * dialog_;
102 /** Which LyXFunc do we use?
103 We could modify Dialogs to have a visible LyXFunc* instead and
104 save a couple of bytes per dialog.
107 /** Which Dialogs do we belong to?
108 Used so we can get at the signals we have to connect to.
111 /// Update connection.
116 InsetCitation * inset_;
122 std::vector<string> citekeys;
124 std::vector<string> bibkeys;
126 std::vector<string> bibkeysInfo;