3 * John Levon, moz@compsoc.man.ac.uk
6 /***************************************************************************
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
13 ***************************************************************************/
15 #ifndef FORMCITATION_H
16 #define FORMCITATION_H
18 #include "DialogBase.h"
19 #include "support/lstrings.h"
20 #include "support/utility.hpp"
21 #include "insets/insetcommand.h"
27 class FormCitationDialog;
29 class FormCitation : public DialogBase, public noncopyable {
31 /**@name Constructors and Destructors */
34 FormCitation(LyXView *, Dialogs *);
41 /// close the connections
51 /// a key has been highlighted
52 void highlight_key(const char *key);
53 /// a chosen key has been highlighted
54 void highlight_chosen(const char *key);
55 /// a key has been double-clicked
56 void select_key(const char *key);
59 /// Create the dialog if necessary, update it and display it.
63 /// Update the dialog.
66 /// create a Citation inset
67 void createCitation(string const &);
68 /// edit a Citation inset
69 void showCitation(InsetCommand * const);
71 /// update add,remove,up,down
73 /// update the available keys list
74 void updateAvailableList();
75 /// update the chosen keys list
76 void updateChosenList();
77 /// select the currently chosen key
80 /// Real GUI implementation.
81 FormCitationDialog * dialog_;
83 /// the LyXView we belong to
86 /** Which Dialogs do we belong to?
87 Used so we can get at the signals we have to connect to.
90 /// pointer to the inset if any
91 InsetCommand * inset_;
93 InsetCommandParams params;
94 /// is the inset we are reading from a readonly buffer ?
99 /// Update connection.
101 /// Inset hide connection.
104 /// available citation keys
105 std::vector<pair<string, string> > keys;
106 /// chosen citation keys
107 std::vector<string> chosenkeys;
109 /// currently selected key
112 /// currently selected chosen key
113 string selectedChosenKey;