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
19 #include "DialogBase.h"
21 #include "support/utility.hpp"
22 #include "insets/insetcommand.h"
24 #include <gtk--/widget.h>
25 #include <gtk--/clist.h>
26 #include <gnome--/entry.h>
27 #include <gnome--/less.h>
28 #include <gtk--/button.h>
29 #include <gtk--/paned.h>
30 #include <gtk--/box.h>
32 /** This class provides an Gnome implementation of the FormCitation Dialog.
34 class FormCitation : public DialogBase, public noncopyable {
37 FormCitation(LyXView *, Dialogs *);
41 /// Slot launching dialog to (possibly) create a new inset
42 void createInset( string const & );
43 /// Slot launching dialog to an existing inset
44 void showInset( InsetCommand * const );
46 /// Update dialog before showing it
47 virtual void update();
48 /// Apply from dialog (modify or create inset)
50 /// Explicitly free the dialog.
52 /// Create the dialog if necessary, update it and display it.
58 void sortBibList(gint);
59 /// update state of the buttons
61 /// clist selection/unselection callback
62 void selection_toggled(gint row,
67 /// adds new citation key
69 /// removes selected citation key
70 void removeCitation();
72 void moveCitationUp();
74 void moveCitationDown();
75 /// searches for entries
78 /// add item to the list
79 void addItemToBibList(int i);
81 /** Which LyXFunc do we use?
82 We could modify Dialogs to have a visible LyXFunc* instead and
83 save a couple of bytes per dialog.
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 passed through showInset (if any)
91 InsetCommand * inset_;
92 /// the nitty-griity. What is modified and passed back
93 InsetCommandParams params;
94 /// Update connection.
98 /// inset::hide connection.
101 /// Real GUI implementation.
102 Gtk::Widget * dialog_;
104 Gtk::Button * b_cancel;
107 Gnome::Entry * text_after_;
109 Gnome::Entry * search_text_;
111 Gtk::Button * button_select_;
112 Gtk::Button * button_unselect_;
113 Gtk::Button * button_up_;
114 Gtk::Button * button_down_;
115 Gtk::Button * button_search_;
117 Gtk::CList * clist_selected_;
118 Gtk::CList * clist_bib_;
120 Gtk::Paned * paned_info_;
121 Gtk::Paned * paned_key_;
122 Gtk::Box * box_keys_;
124 std::vector<string> bibkeys;
126 std::vector<string> bibkeysInfo;