3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
7 * \author Angus Leeming
10 #ifndef FORMCITATION_H
11 #define FORMCITATION_H
15 #include "KFormBase.h"
18 class ControlCitation;
21 class FormCitation : public KFormBase<ControlCitation, CitationDialog> {
23 FormCitation(ControlCitation &);
25 // Functions accessible to the Controller
27 /// set the Params variable for the Controller
29 /// set the Params variable for the Controller
31 /// update dialog before/whilst showing it
32 virtual void update();
37 ButtonPolicy::SMInput add();
39 ButtonPolicy::SMInput remove();
41 ButtonPolicy::SMInput up();
43 ButtonPolicy::SMInput down();
44 /// a key has been highlighted
45 void highlight_key(char const * key);
46 /// a chosen key has been highlighted
47 void highlight_chosen(char const * key);
48 /// a key has been double-clicked
49 ButtonPolicy::SMInput select_key(char const * key);
51 friend class CitationDialog;
54 /// update add,remove,up,down
56 /// update the available keys list
57 void updateAvailableList();
58 /// update the chosen keys list
59 void updateChosenList();
60 /// select the currently chosen key
62 /// does the dirty work for highlight_key(), highlight_chosen()
63 void highlight(char const *, QListBox *, string &, string &);
64 /// does the dirty work for updateAvailableList(), updateChosenList()
65 void updateList(QListBox *, std::vector<string> const &);
67 /// available citation keys
68 std::vector<string> keys;
69 /// chosen citation keys
70 std::vector<string> chosenkeys;
72 /// currently selected key
75 /// currently selected chosen key
76 string selectedChosenKey;
79 #endif // FORMCITATION_H