]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcite.h
Don't remove cell selections after fontchange.
[lyx.git] / src / insets / insetcite.h
index ee1581323b91d44ec2826afc22691ac48de2fa7c..efa21fd17883dfb5f3e2f1af2832cfc058d81b39 100644 (file)
@@ -4,8 +4,7 @@
  *
  *           LyX, The Document Processor
  *      
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
+ *           Copyright 2000-2001 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") {}
+       InsetCitation(InsetCommandParams const &, bool same_id = false);
        ///
-       explicit
-       InsetCitation(string const & key, string const & note = string());
-        ///
-       ~InsetCitation();
-        ///
-        Inset * Clone() const {
-               return new InsetCitation(getContents(), getOptions());
+       Inset * clone(Buffer const &, bool same_id = false) const {
+               return new InsetCitation(params(), same_id);
        }
-       ///
-       string getScreenLabel()const;
-        ///
-       void Edit(BufferView *, int x, int y, unsigned int button);
        ///
-       void callback( FD_citation_form *, State );
-        ///
-       EDITABLE Editable() const {
-               return IS_EDITABLE;
-       }
+       string const getScreenLabel(Buffer const *) const;
        ///
-       struct Holder {
-               InsetCitation * inset;
-               BufferView * view;
-       };
-
-private:
-        ///
-       void setSize( FD_citation_form *, int, bool ) const;
+       EDITABLE editable() const { return IS_EDITABLE; }
        ///
-       void setBibButtons( FD_citation_form *, State ) const;
+       Inset::Code lyxCode() const { return Inset::CITE_CODE; }
        ///
-       void setCiteButtons( FD_citation_form *, State ) const;
+       void edit(BufferView *, int, int, unsigned int);
+       ///
+       void edit(BufferView * bv, bool front = true);
+       ///
+       int ascii(Buffer const *, std::ostream &, int linelen) const;
+        ///
+       int latex(Buffer const *, std::ostream &, bool, bool) const;
        ///
-       void updateBrowser( FL_OBJECT *, std::vector<string> const & ) const;
-        ///    
-       Holder holder;
+       void validate(LaTeXFeatures &) const;
 };
 
 #endif // INSET_CITE_H