]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gnome/FormCitation.h
fix problem with nroff detection, remove dead code with old floats, bogus message...
[lyx.git] / src / frontends / gnome / FormCitation.h
index f9234364b15fd61786e1c7a2c394a2720538bb58..48b7a8b1ca7662f21b4158f39ff402d008f8bb92 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "DialogBase.h"
 #include "LString.h"
-#include "support/utility.hpp"
 #include "insets/insetcommand.h"
 
 #include <gtk--/container.h>
 #include <gtk--/paned.h>
 #include <gtk--/box.h>
 #include <gtk--/checkbutton.h>
+#include "pixbutton.h"
 
 /** This class provides an Gnome implementation of the FormCitation Dialog.
  */
-class FormCitation : public DialogBase, public noncopyable {
+class FormCitation : public DialogBase {
 public:
   ///
   FormCitation(LyXView *, Dialogs *);
@@ -43,52 +43,74 @@ private:
   void createInset( string const & );
   /// Slot launching dialog to an existing inset
   void showInset( InsetCommand * const );
-  
-  /// Update dialog before showing it
-  virtual void update();
-  /// Apply from dialog (modify or create inset)
-  virtual void apply();
-  /// Apply from dialog (modify or create inset)
-  virtual void applySelect();
+
+  virtual void update() { }
+  virtual void updateSlot(bool = false);
+  /// The following two methods do nothing in this implementation
+  virtual void apply() { }
+  void show() { }
+
   /// Explicitly free the dialog.
   void free();
   /// Hide the dialog.
   void hide();
-  /// Create the dialog if necessary, update it and display it. Not used in this dialog
-  void show() { }
+
+  /// Apply from dialog (modify or create inset)
+  void applySelect();
+  /// Apply from dialog (modify or create inset)
+  void applyEdit();
+
+  /// Ask user for requested action: add new citation or edit the existing ones
+  void showStageAction();
   /// Ask user for regexp or keyword(s)
   void showStageSearch();
   /// Ask user to select the citation in the list
   void showStageSelect();
+  /// Ask user to edit the citation in the list
+  void showStageEdit();
+
   /// moves from Search to Select "stage"
   void moveFromSearchToSelect();
+  /// moves from Action to Search "stage"
+  void moveFromActionToSearch();
+  /// moves from Action to Edit "stage"
+  void moveFromActionToEdit();
   
   /// sort biblist
   void sortBibList(gint);
   /// update state of the buttons
   void updateButtons();
   /// clist selection/unselection callback
-  void selection_toggled(gint            row,
-                        gint            column,
-                        GdkEvent       *event,
-                        bool selected,
-                        bool citeselected);
-  /// adds new citation key
-  void newCitation();
+  void selectionToggled(gint            row,
+                       gint            column,
+                       GdkEvent       *event,
+                       bool selected,
+                       bool citeselected);
+
   /// removes selected citation key
   void removeCitation();
   /// moves citation up
   void moveCitationUp();
   /// moves citation up
   void moveCitationDown();
-  /// searches for entries
+
+  /// searches for entries (calls searchReg or searchSimple)
   void search();
+  /// searches for entries using regexp
   void searchReg();
+  /// searches for entries containing keyword(s)
   void searchSimple();
 
-  /// add item to the list 
+  /// adds item to clist_bib_
   void addItemToBibList(int i);
 
+  /// sets all widget pointers to 0
+  void cleanupWidgets();
+  /// initializes all non-0 member widgets
+  void initWidgets();
+  /// stores configuration of all non-0 member widgets
+  void storeWidgets();
+  
   /** Which LyXFunc do we use?
       We could modify Dialogs to have a visible LyXFunc* instead and
       save a couple of bytes per dialog.
@@ -103,11 +125,11 @@ private:
   /// the nitty-griity. What is modified and passed back
   InsetCommandParams params;
   /// Update connection.
-  Connection u_;
+  SigC::Connection u_;
   /// Hide connection.
-  Connection h_;
+  SigC::Connection h_;
   /// inset::hide connection.
-  Connection ih_;
+  SigC::Connection ih_;
 
   /// Real GUI implementation.
   Gtk::Container * dialog_;
@@ -121,18 +143,15 @@ private:
   Gnome::Less * info_;
   Gnome::Entry * text_after_;
 
-  Gtk::Button * button_select_;
-  Gtk::Button * button_unselect_;
-  Gtk::Button * button_up_;
-  Gtk::Button * button_down_;
+  Gnome::PixButton * button_unselect_;
+  Gnome::PixButton * button_up_;
+  Gnome::PixButton * button_down_;
   Gtk::CheckButton * button_regexp_;
   
   Gtk::CList * clist_selected_;
   Gtk::CList * clist_bib_;
   
   Gtk::Paned * paned_info_;
-  Gtk::Paned * paned_key_;
-  Gtk::Box * box_keys_;
   
   std::vector<string> bibkeys;
   ///