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
17 #include "DialogBase.h"
19 #include "support/utility.hpp"
26 // same arguement as in Dialogs.h s/LyX/UI/
29 struct FD_form_citation;
31 /** This class provides an XForms implementation of the FormCitation Dialog.
33 class FormCitation : public DialogBase, public noncopyable {
46 /**@name Constructors and Destructors */
48 /// #FormCitation x(LyXFunc ..., Dialogs ...);#
49 FormCitation(LyXView *, Dialogs *);
54 /**@name Real per-instance Callback Methods */
56 static int WMHideCB(FL_FORM *, void *);
57 static void OKCB(FL_OBJECT *, long);
58 static void CancelCB(FL_OBJECT *, long);
59 static void InputCB(FL_OBJECT *, long);
63 /**@name Slot Methods */
65 /// Create the dialog if necessary, update it and display it.
66 void createInset( string const & );
68 void showInset( InsetCitation * );
77 /**@name Dialog internal methods */
86 void updateCitekeys( string const & );
88 void updateBrowser( FL_OBJECT *, std::vector<string> const & ) const;
90 void setBibButtons( State ) const;
92 void setCiteButtons( State ) const;
94 void setSize( int, bool ) const;
96 FD_form_citation * build_citation();
97 /// Explicitly free the dialog.
101 /**@name Private Data */
103 /// Real GUI implementation.
104 FD_form_citation * dialog_;
105 /** Which LyXFunc do we use?
106 We could modify Dialogs to have a visible LyXFunc* instead and
107 save a couple of bytes per dialog.
110 /** Which Dialogs do we belong to?
111 Used so we can get at the signals we have to connect to.
114 /// Update connection.
118 /// inset::hide connection.
121 InsetCitation * inset_;
127 std::vector<string> citekeys;
129 std::vector<string> bibkeys;
131 std::vector<string> bibkeysInfo;