]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcite.h
some reindentation, revert workarea xpos++, constify, remove all traces of LyXParagra...
[lyx.git] / src / insets / insetcite.h
index ee1581323b91d44ec2826afc22691ac48de2fa7c..3f896677f8e485f720c99863621ba3ac6a627b1f 100644 (file)
@@ -4,8 +4,7 @@
  *
  *           LyX, The Document Processor
  *      
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
+ *           Copyright 2000 The LyX Team.
  * 
  * ====================================================== */
 
 #endif
 
 #include "insetcommand.h"
-#include "bibforms.h"
-#include <vector>
-
-class Buffer;
 
 /** Used to insert citations  
  */
-class InsetCitation: public InsetCommand {
+class InsetCitation : public InsetCommand {
 public:
        ///
-       enum State {
-               CANCEL,
-               OK,
-               DOWN,
-               UP,
-               DELETE,
-               ADD,
-               BIBBRSR,
-               CITEBRSR,
-               ON,
-               OFF
-       };
-       ///
-       InsetCitation() : InsetCommand("cite") {}
-       ///
-       explicit
-       InsetCitation(string const & key, string const & note = string());
-        ///
-       ~InsetCitation();
-        ///
-        Inset * Clone() const {
-               return new InsetCitation(getContents(), getOptions());
-       }
-       ///
-       string getScreenLabel()const;
-        ///
-       void Edit(BufferView *, int x, int y, unsigned int button);
+       InsetCitation(InsetCommandParams const &);
        ///
-       void callback( FD_citation_form *, State );
-        ///
-       EDITABLE Editable() const {
-               return IS_EDITABLE;
+       Inset * Clone(Buffer const &) const {
+               return new InsetCitation(params());
        }
        ///
-       struct Holder {
-               InsetCitation * inset;
-               BufferView * view;
-       };
-
-private:
-        ///
-       void setSize( FD_citation_form *, int, bool ) const;
-       ///
-       void setBibButtons( FD_citation_form *, State ) const;
+       string const getScreenLabel() const;
        ///
-       void setCiteButtons( FD_citation_form *, State ) const;
+       EDITABLE Editable() const { return IS_EDITABLE; }
        ///
-       void updateBrowser( FL_OBJECT *, std::vector<string> const & ) const;
-        ///    
-       Holder holder;
+       Inset::Code LyxCode() const { return Inset::CITE_CODE; }
+        ///
+       void Edit(BufferView *, int, int, unsigned int);
 };
 
 #endif // INSET_CITE_H