3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
10 #define FORMCITATION_H
12 #include "DialogBase.h"
13 #include "support/lstrings.h"
14 #include "boost/utility.hpp"
15 #include "insets/insetcommand.h"
23 class FormCitation : public DialogBase, public noncopyable {
25 FormCitation(LyXView *, Dialogs *);
31 /// close the connections
41 /// a key has been highlighted
42 void highlight_key(char const * key);
43 /// a chosen key has been highlighted
44 void highlight_chosen(char const * key);
45 /// a key has been double-clicked
46 void select_key(char const * key);
49 /// Create the dialog if necessary, update it and display it.
53 /// Update the dialog.
54 void update(bool switched = false);
56 /// create a Citation inset
57 void createCitation(string const &);
58 /// edit a Citation inset
59 void showCitation(InsetCommand * const);
61 /// update add,remove,up,down
63 /// update the available keys list
64 void updateAvailableList();
65 /// update the chosen keys list
66 void updateChosenList();
67 /// select the currently chosen key
70 /// Real GUI implementation.
71 CitationDialog * dialog_;
73 /// the LyXView we belong to
76 /** Which Dialogs do we belong to?
77 Used so we can get at the signals we have to connect to.
80 /// pointer to the inset if any
81 InsetCommand * inset_;
83 InsetCommandParams params;
84 /// is the inset we are reading from a readonly buffer ?
89 /// Update connection.
91 /// Inset hide connection.
94 /// available citation keys
95 std::vector<std::pair<string, string> > keys;
96 /// chosen citation keys
97 std::vector<string> chosenkeys;
99 /// currently selected key
102 /// currently selected chosen key
103 string selectedChosenKey;
106 #endif // FORMCITATION_H