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>
31 #include <gtk--/checkbutton.h>
33 /** This class provides an Gnome implementation of the FormCitation Dialog.
35 class FormCitation : public DialogBase, public noncopyable {
38 FormCitation(LyXView *, Dialogs *);
42 /// Slot launching dialog to (possibly) create a new inset
43 void createInset( string const & );
44 /// Slot launching dialog to an existing inset
45 void showInset( InsetCommand * const );
47 /// Update dialog before showing it
48 virtual void update();
49 /// Apply from dialog (modify or create inset)
51 /// Explicitly free the dialog.
53 /// Create the dialog if necessary, update it and display it.
59 void sortBibList(gint);
60 /// update state of the buttons
62 /// clist selection/unselection callback
63 void selection_toggled(gint row,
68 /// adds new citation key
70 /// removes selected citation key
71 void removeCitation();
73 void moveCitationUp();
75 void moveCitationDown();
76 /// searches for entries
81 /// add item to the list
82 void addItemToBibList(int i);
84 /** Which LyXFunc do we use?
85 We could modify Dialogs to have a visible LyXFunc* instead and
86 save a couple of bytes per dialog.
89 /** Which Dialogs do we belong to?
90 Used so we can get at the signals we have to connect to.
93 /// pointer to the inset passed through showInset (if any)
94 InsetCommand * inset_;
95 /// the nitty-griity. What is modified and passed back
96 InsetCommandParams params;
97 /// Update connection.
101 /// inset::hide connection.
104 /// Real GUI implementation.
105 Gtk::Widget * dialog_;
107 Gtk::Button * b_cancel;
110 Gnome::Entry * text_after_;
112 Gnome::Entry * search_text_;
114 Gtk::Button * button_select_;
115 Gtk::Button * button_unselect_;
116 Gtk::Button * button_up_;
117 Gtk::Button * button_down_;
118 Gtk::Button * button_search_;
119 Gtk::CheckButton * button_regexp_;
121 Gtk::CList * clist_selected_;
122 Gtk::CList * clist_bib_;
124 Gtk::Paned * paned_info_;
125 Gtk::Paned * paned_key_;
126 Gtk::Box * box_keys_;
128 std::vector<string> bibkeys;
130 std::vector<string> bibkeysInfo;